diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot-hermetic.yaml similarity index 91% rename from .github/.OwlBot.yaml rename to .github/.OwlBot-hermetic.yaml index 700ec1611c..40c7b4332b 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot-hermetic.yaml @@ -11,10 +11,6 @@ # 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. - -docker: - image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" - deep-remove-regex: - "/grpc-google-.*/src" - "/proto-google-.*/src" @@ -34,4 +30,4 @@ deep-copy-regex: - source: "/google/bigtable/admin/(v\\d)/.*-java/grpc-google-.*/src" dest: "/owl-bot-staging/$1/grpc-google-cloud-bigtable-admin-$1/src" - source: "/google/bigtable/admin/(v\\d)/.*-java/gapic-google-.*/src" - dest: "/owl-bot-staging/$1/google-cloud-bigtable/src" \ No newline at end of file + dest: "/owl-bot-staging/$1/google-cloud-bigtable/src" diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 5db36a5f7d..0000000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +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. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:68ba5f5164a4b55529d358bb262feaa000536a0c62980727dd05a91bbb47ea5e -# created: 2024-05-09T16:31:37.168667071Z diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1b14ac10a9..e1f4bd0e65 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,15 +4,19 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The @googleapis/api-bigtable @googleapis/api-bigtable-partners is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/api-bigtable @googleapis/api-bigtable-partners +# The @googleapis/bigtable-team is the default owner for changes in this repo +* @googleapis/cloud-sdk-java-team @googleapis/bigtable-team # for handwritten libraries, keep codeowner_team in .repo-metadata.json as owner -**/*.java @googleapis/api-bigtable @googleapis/api-bigtable-partners +**/*.java @googleapis/bigtable-team @googleapis/cloud-sdk-java-team # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers # Generated snippets should not be owned by samples reviewers -samples/snippets/generated/ @googleapis/yoshi-java +samples/snippets/generated/ @googleapis/cloud-sdk-java-team + +# Admin Module (Cloud Java Team ownership) +**/com/google/cloud/bigtable/admin/** @googleapis/bigtable-team @googleapis/cloud-sdk-java-team +**/com/google/bigtable/admin/** @googleapis/bigtable-team @googleapis/cloud-sdk-java-team diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index c644a24e11..e58cdcbad6 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -6,6 +6,7 @@ externalManifests: file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' ignoreAuthors: +- 'cloud-java-bot' - 'renovate-bot' - 'yoshi-automation' - 'release-please[bot]' diff --git a/.github/release-please.yml b/.github/release-please.yml index 62a86ce89b..64a2f5f5db 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,6 +1,8 @@ bumpMinorPreMajor: true handleGHRelease: true releaseType: java-yoshi +extraFiles: + - google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java branches: - bumpMinorPreMajor: true handleGHRelease: true @@ -65,5 +67,32 @@ branches: - >- google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java branch: 2.39.x -extraFiles: - - google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: 2.54.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: 2.61.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: 2.60.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-yoshi + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: protobuf-4.x-rc + manifest: true diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh new file mode 100644 index 0000000000..74d0e6cc41 --- /dev/null +++ b/.github/scripts/update_generation_config.sh @@ -0,0 +1,187 @@ +#!/bin/bash +set -ex +# This script should be run at the root of the repository. +# This script is used to update googleapis_commitish, gapic_generator_version, +# and libraries_bom_version in generation configuration at the time of running +# and create a pull request. + +# The following commands need to be installed before running the script: +# 1. git +# 2. gh +# 3. jq + +# Utility functions +# Get the latest released version of a Maven artifact. +function get_latest_released_version() { + local group_id=$1 + local artifact_id=$2 + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + + # 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}" + exit 1 + else + echo "${latest}" + fi +} + +# Update a key to a new value in the generation config. +function update_config() { + local key_word=$1 + local new_value=$2 + local file=$3 + echo "Update ${key_word} to ${new_value} in ${file}" + sed -i -e "s/^${key_word}.*$/${key_word}: ${new_value}/" "${file}" +} + +# Update an action to a new version in GitHub action. +function update_action() { + local key_word=$1 + local new_value=$2 + local file=$3 + echo "Update ${key_word} to ${new_value} in ${file}" + # use a different delimiter because the key_word contains "/". + sed -i -e "s|${key_word}@v.*$|${key_word}@v${new_value}|" "${file}" +} + +# The parameters of this script is: +# 1. base_branch, the base branch of the result pull request. +# 2. repo, organization/repo-name, e.g., googleapis/google-cloud-java +# 3. [optional] generation_config, the path to the generation configuration, +# the default value is generation_config.yaml in the repository root. +# 4. [optional] workflow, the library generation workflow file, +# the default value is .github/workflows/hermetic_library_generation.yaml. +while [[ $# -gt 0 ]]; do +key="$1" +case "${key}" in + --base_branch) + base_branch="$2" + shift + ;; + --repo) + repo="$2" + shift + ;; + --generation_config) + generation_config="$2" + shift + ;; + --workflow) + workflow="$2" + shift + ;; + *) + echo "Invalid option: [$1]" + exit 1 + ;; +esac +shift +done + +if [ -z "${base_branch}" ]; then + echo "missing required argument --base_branch" + exit 1 +fi + +if [ -z "${repo}" ]; then + echo "missing required argument --repo" + exit 1 +fi + +if [ -z "${generation_config}" ]; then + generation_config="generation_config.yaml" + echo "Use default generation config: ${generation_config}" +fi + +if [ -z "${workflow}" ]; then + workflow=".github/workflows/hermetic_library_generation.yaml" + echo "Use default library generation workflow file: ${workflow}" +fi + +current_branch="generate-libraries-${base_branch}" +title="chore: Update generation configuration at $(date)" + +git checkout "${base_branch}" +# Try to find a open pull request associated with the branch +pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number") +# Create a branch if there's no open pull request associated with the +# branch; otherwise checkout the pull request. +if [ -z "${pr_num}" ]; then + git checkout -b "${current_branch}" + # Push the current branch to remote so that we can + # compare the commits later. + git push -u origin "${current_branch}" +else + gh pr checkout "${pr_num}" +fi + +# Only allow fast-forward merging; exit with non-zero result if there's merging +# conflict. +git merge -m "chore: merge ${base_branch} into ${current_branch}" "${base_branch}" + +mkdir tmp-googleapis +# Use partial clone because only commit history is needed. +git clone --filter=blob:none https://github.com/googleapis/googleapis.git tmp-googleapis +pushd tmp-googleapis +git pull +latest_commit=$(git rev-parse HEAD) +popd +rm -rf tmp-googleapis +update_config "googleapis_commitish" "${latest_commit}" "${generation_config}" + +# Update gapic-generator-java version to the latest +latest_version=$(get_latest_released_version "com.google.api" "gapic-generator-java") +update_config "gapic_generator_version" "${latest_version}" "${generation_config}" + +# Update composite action version to latest gapic-generator-java version +update_action "googleapis/sdk-platform-java/.github/scripts" \ + "${latest_version}" \ + "${workflow}" + +# Update libraries-bom version to the latest +latest_version=$(get_latest_released_version "com.google.cloud" "libraries-bom") +update_config "libraries_bom_version" "${latest_version}" "${generation_config}" + +git add "${generation_config}" "${workflow}" +changed_files=$(git diff --cached --name-only) +if [[ "${changed_files}" == "" ]]; then + echo "The latest generation config is not changed." + echo "Skip committing to the pull request." +else + git commit -m "${title}" +fi + +# There are potentially at most two commits: merge commit and change commit. +# We want to exit the script if no commit happens (otherwise this will be an +# infinite loop). +# `git cherry` is a way to find whether the local branch has commits that are +# not in the remote branch. +# If we find any such commit, push them to remote branch. +unpushed_commit=$(git cherry -v "origin/${current_branch}" | wc -l) +if [[ "${unpushed_commit}" -eq 0 ]]; then + echo "No unpushed commits, exit" + exit 0 +fi + +if [ -z "${pr_num}" ]; then + git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git" + git fetch -q remote_repo + git push -f remote_repo "${current_branch}" + gh pr create --title "${title}" --head "${current_branch}" --body "${title}" --base "${base_branch}" +else + git push + gh pr edit "${pr_num}" --title "${title}" --body "${title}" +fi diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index e398bc14e4..1005971cae 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -15,11 +15,13 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - - 'Kokoro - Test: Java GraalVM Native Image' - - 'Kokoro - Test: Java 17 GraalVM Native Image' + - 'Kokoro - Test: Java GraalVM Native Image A' + - 'Kokoro - Test: Java GraalVM Native Image B' + - 'Kokoro - Test: Java GraalVM Native Image C' - javadoc - conformance + - library_generation + - unmanaged_dependency_check - pattern: 1.22.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 @@ -105,7 +107,6 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 2.25.x @@ -121,7 +122,6 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 2.30.x @@ -137,7 +137,6 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc @@ -155,15 +154,75 @@ branchProtectionRules: - units (11) - 'Kokoro - Test: Integration' - cla/google - - OwlBot Post Processor - 'Kokoro - Test: Java GraalVM Native Image' - 'Kokoro - Test: Java 17 GraalVM Native Image' - javadoc - conformance + - pattern: 2.54.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (17) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - cla/google + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' + - javadoc + - conformance + - library_generation + - unmanaged_dependency_check + - pattern: 2.61.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (17) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - cla/google + - 'Kokoro - Test: Java GraalVM Native Image A' + - 'Kokoro - Test: Java GraalVM Native Image B' + - 'Kokoro - Test: Java GraalVM Native Image C' + - javadoc + - conformance + - library_generation + - unmanaged_dependency_check + - pattern: 2.60.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (17) + - lint + - clirr + - units (11) + - units (17) + - units (21) + - units (24) + - 'Kokoro - Test: Integration' + - cla/google + - 'Kokoro - Test: Java GraalVM Native Image A' + - 'Kokoro - Test: Java GraalVM Native Image B' + - 'Kokoro - Test: Java GraalVM Native Image C' + - javadoc + - conformance + - library_generation + - unmanaged_dependency_check permissionRules: - team: yoshi-admins permission: admin - team: yoshi-java-admins permission: admin - - team: yoshi-java + - team: cloud-sdk-java-team permission: push diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b91fa381f5..b9b8be0c36 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [11, 17, 21] + java: [11, 17, 21, 25] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -104,7 +104,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 17 - run: java -version - run: .kokoro/build.sh env: diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml new file mode 100644 index 0000000000..b75ed7afad --- /dev/null +++ b/.github/workflows/hermetic_library_generation.yaml @@ -0,0 +1,45 @@ +# 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. +# GitHub action job to test core java library features on +# downstream client libraries before they are released. +name: Hermetic library generation upon generation config change through pull requests +on: + pull_request: + +env: + REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} + GITHUB_REPOSITORY: ${{ github.repository }} +jobs: + library_generation: + runs-on: ubuntu-latest + steps: + - name: Determine whether the pull request comes from a fork + run: | + if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then + echo "This PR comes from a fork. Skip library generation." + echo "SHOULD_RUN=false" >> $GITHUB_ENV + else + echo "SHOULD_RUN=true" >> $GITHUB_ENV + fi + - uses: actions/checkout@v4 + if: env.SHOULD_RUN == 'true' + with: + fetch-depth: 0 + token: ${{ secrets.CLOUD_JAVA_BOT_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 }} diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 7c5ec7865e..47b9e87c98 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -7,7 +7,7 @@ on: jobs: renovate_bot_config_validation: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code @@ -16,7 +16,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Install Renovate and Config Validator run: | diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index 03b2939567..186fd8bcfc 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 8 + java-version: 17 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check working-directory: samples/snippets diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 2460ddcf65..fa2fca7f1d 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -14,6 +14,6 @@ jobs: shell: bash run: .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.33.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.58.0 with: bom-path: google-cloud-bigtable-bom/pom.xml diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml new file mode 100644 index 0000000000..8de9d67eae --- /dev/null +++ b/.github/workflows/update_generation_config.yaml @@ -0,0 +1,47 @@ +# 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. +# GitHub action job to test core java library features on +# downstream client libraries before they are released. +name: Update generation configuration +on: + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + +jobs: + update-generation-config: + runs-on: ubuntu-24.04 + env: + # the branch into which the pull request is merged + base_branch: main + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils + - name: Update params in generation config to latest + shell: bash + run: | + set -x + [ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com" + [ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot" + bash .github/scripts/update_generation_config.sh \ + --base_branch "${base_branch}" \ + --repo ${{ github.repository }} + env: + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }} + diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 605555ecae..63ae42ebf8 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,11 +1,11 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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 +# 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, @@ -42,21 +42,22 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) fi + RETURN_CODE=0 set +e case ${JOB_TYPE} in test) echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}" - mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT} + mvn test -B -ntp -Dfmt.skip=true -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT} RETURN_CODE=$? ;; lint) - mvn com.coveo:fmt-maven-plugin:check -B -ntp + mvn com.spotify.fmt:fmt-maven-plugin:check -B -ntp RETURN_CODE=$? ;; javadoc) - mvn javadoc:javadoc javadoc:test-javadoc -B -ntp + mvn javadoc:javadoc javadoc:test-javadoc -B -ntp -Dfmt.skip=true RETURN_CODE=$? ;; integration) @@ -66,18 +67,16 @@ integration) -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ + -Dcheckstyle.skip=true \ + -DskipUnitTests=true \ + -Dfmt.skip=true \ -fae \ verify RETURN_CODE=$? ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test - RETURN_CODE=$? - ;; -graalvm17) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test -Dfmt.skip=true RETURN_CODE=$? ;; samples) @@ -101,6 +100,7 @@ samples) -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ + -Dfmt.skip=true \ -fae \ verify RETURN_CODE=$? @@ -110,7 +110,7 @@ samples) fi ;; clirr) - mvn -B -ntp -Denforcer.skip=true clirr:check + mvn -B -ntp -Dfmt.skip=true -Denforcer.skip=true clirr:check RETURN_CODE=$? ;; *) diff --git a/.kokoro/conformance.sh b/.kokoro/conformance.sh index 0229a03a70..4f0a7d4999 100755 --- a/.kokoro/conformance.sh +++ b/.kokoro/conformance.sh @@ -67,9 +67,7 @@ do pushd . cd cloud-bigtable-clients-test/tests - # If there is known failures, please add - # "-skip `cat ../../test-proxy/known_failures.txt`" to the command below. - eval "go test -v -proxy_addr=:9999 ${configFlag}" + eval "go test -v -proxy_addr=:9999 ${configFlag} -skip '`cat ../../test-proxy/known_failures.txt`'" returnCode=$? popd diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native-a.cfg similarity index 60% rename from .kokoro/presubmit/graalvm-native.cfg rename to .kokoro/presubmit/graalvm-native-a.cfg index 79883ef1a5..de4ac9dbfa 100644 --- a/.kokoro/presubmit/graalvm-native.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.33.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { @@ -17,11 +17,6 @@ env_vars: { value: "gcloud-devel" } -env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it,bigtable-prod-it,bigtable-prod-batch-it,enable-verbose-grpc-logs -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests -Dbigtable.kms_key_name=projects/gcloud-devel/locations/us-east1/keyRings/cmek-test-key-ring/cryptoKeys/cmek-test-key -Dbigtable.wait-for-cmek-key-status=true" -} - env_vars: { key: "GOOGLE_CLOUD_PROJECT" value: "gcloud-devel" @@ -36,3 +31,8 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + +env_vars: { + key: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-b.cfg similarity index 59% rename from .kokoro/presubmit/graalvm-native-17.cfg rename to .kokoro/presubmit/graalvm-native-b.cfg index 51d786651a..d8ae3b3222 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,17 +3,12 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.33.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} } env_vars: { key: "JOB_TYPE" - value: "graalvm17" -} - -env_vars: { - key: "INTEGRATION_TEST_ARGS" - value: "-P bigtable-emulator-it,bigtable-prod-it,bigtable-prod-batch-it,enable-verbose-grpc-logs -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests -Dbigtable.kms_key_name=projects/gcloud-devel/locations/us-east1/keyRings/cmek-test-key-ring/cryptoKeys/cmek-test-key -Dbigtable.wait-for-cmek-key-status=true" + value: "graalvm" } # TODO: remove this after we've migrated all tests and scripts @@ -36,3 +31,8 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + +env_vars: { + key: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg new file mode 100644 index 0000000000..0e9d1203a7 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-c.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.58.0" # {x-version-update:google-cloud-shared-dependencies:current} +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# 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: "IT_SERVICE_ACCOUNT_EMAIL" + value: "it-service-account@gcloud-devel.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/.kokoro/presubmit/integration-dp.cfg b/.kokoro/presubmit/integration-dp.cfg new file mode 100644 index 0000000000..0b01a0db0e --- /dev/null +++ b/.kokoro/presubmit/integration-dp.cfg @@ -0,0 +1,38 @@ +# 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: "INTEGRATION_TEST_ARGS" + value: "-P bigtable-directpath-it,enable-verbose-grpc-logs -Dbigtable.project=gcloud-devel -Dbigtable.instance=google-cloud-bigtable -Dbigtable.table=integration-tests" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# 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" +} diff --git a/.readme-partials.yml b/.readme-partials.yml index c9386d33fb..1dc60bd7a7 100644 --- a/.readme-partials.yml +++ b/.readme-partials.yml @@ -149,82 +149,9 @@ custom_content: | [CustomOpenTelemetryMetricsProvider](https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java) on how to set it up. - ## Client request tracing: OpenCensus Tracing - - Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), - which gives insight into the client internals and aids in debugging production issues. - By default, the functionality is disabled. For example to enable tracing using - [Google Stackdriver](https://cloud.google.com/trace/docs/): - - [//]: # (TODO: figure out how to keep opencensus version in sync with pom.xml) - - If you are using Maven, add this to your pom.xml file - ```xml - - io.opencensus - opencensus-impl - 0.31.1 - runtime - - - io.opencensus - opencensus-exporter-trace-stackdriver - 0.31.1 - - - io.grpc - * - - - com.google.auth - * - - - - ``` - If you are using Gradle, add this to your dependencies - ```Groovy - compile 'io.opencensus:opencensus-impl:0.24.0' - compile 'io.opencensus:opencensus-exporter-trace-stackdriver:0.24.0' - ``` - If you are using SBT, add this to your dependencies - ```Scala - libraryDependencies += "io.opencensus" % "opencensus-impl" % "0.24.0" - libraryDependencies += "io.opencensus" % "opencensus-exporter-trace-stackdriver" % "0.24.0" - ``` - - At the start of your application configure the exporter: - - ```java - import io.opencensus.exporter.trace.stackdriver.StackdriverTraceConfiguration; - import io.opencensus.exporter.trace.stackdriver.StackdriverTraceExporter; - - StackdriverTraceExporter.createAndRegister( - StackdriverTraceConfiguration.builder() - .setProjectId("YOUR_PROJECT_ID") - .build()); - ``` - - You can view the traces on the Google Cloud Platform Console - [Trace](https://console.cloud.google.com/traces) page. - - By default traces are [sampled](https://opencensus.io/tracing/sampling) at a rate of about 1/10,000. - You can configure a higher rate by updating the active tracing params: - - ```java - import io.opencensus.trace.Tracing; - import io.opencensus.trace.samplers.Samplers; - - Tracing.getTraceConfig().updateActiveTraceParams( - Tracing.getTraceConfig().getActiveTraceParams().toBuilder() - .setSampler(Samplers.probabilitySampler(0.01)) - .build() - ); - ``` - ### Disable Bigtbale traces - If your application already has OpenCensus Tracing integration and you want to disable Bigtable + If your application already has tracing integration and you want to disable Bigtable traces, you can do the following: ```java diff --git a/.repo-metadata.json b/.repo-metadata.json index aa4b44f8ff..8ac2726bf0 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -2,17 +2,20 @@ "api_shortname": "bigtable", "name_pretty": "Cloud Bigtable", "product_documentation": "https://cloud.google.com/bigtable", + "api_description": "API for reading and writing the contents of Bigtables associated with a cloud project.", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/history", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559777", "release_level": "stable", + "transport": "grpc", "language": "java", "repo": "googleapis/java-bigtable", "repo_short": "java-bigtable", "distribution_name": "com.google.cloud:google-cloud-bigtable", - "codeowner_team": "@googleapis/api-bigtable @googleapis/api-bigtable-partners", "api_id": "bigtable.googleapis.com", "library_type": "GAPIC_COMBO", - "extra_versioned_modules": "google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core", + "requires_billing": true, + "codeowner_team": "@googleapis/bigtable-team", "excluded_poms": "google-cloud-bigtable-bom", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559777", + "extra_versioned_modules": "google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core", "recommended_package": "com.google.cloud.bigtable" -} +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 52c886fec8..f753300e5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,694 @@ # Changelog +## [2.76.0](https://github.com/googleapis/java-bigtable/compare/v2.75.1...v2.76.0) (2026-04-09) + + +### Features + +* Add locations field to AutomatedBackupPolicy ([9345b35](https://github.com/googleapis/java-bigtable/commit/9345b359a1ee2e6f03cc26d50358bf0937b113a4)) +* **bigtable:** Classic direct access checker and it's implementation ([#2840](https://github.com/googleapis/java-bigtable/issues/2840)) ([c2ccda1](https://github.com/googleapis/java-bigtable/commit/c2ccda188e5ec5ec3004d0535efbc45a804f24f0)) +* **bigtable:** Enable direct access by default ([#2857](https://github.com/googleapis/java-bigtable/issues/2857)) ([bffd892](https://github.com/googleapis/java-bigtable/commit/bffd892185fba3f4cf59077201288796f620e389)) + + +### Bug Fixes + +* Check alts if we return permission denied for pingandwarm ([#2860](https://github.com/googleapis/java-bigtable/issues/2860)) ([3926275](https://github.com/googleapis/java-bigtable/commit/3926275d4eb84aeb07459abd1b6e70dd65f6beb8)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.68.0 ([9345b35](https://github.com/googleapis/java-bigtable/commit/9345b359a1ee2e6f03cc26d50358bf0937b113a4)) +* Logic to suppress failed metric export during client shutdown ([#2858](https://github.com/googleapis/java-bigtable/issues/2858)) ([ae0f0ef](https://github.com/googleapis/java-bigtable/commit/ae0f0efb483d04f56d456366a4d21ba5a949993c)) + + +### Dependencies + +* Manually update dependency com.google.cloud:sdk-platform-java-config to v3.59.0 ([#2865](https://github.com/googleapis/java-bigtable/issues/2865)) ([21c1833](https://github.com/googleapis/java-bigtable/commit/21c183368e3287472f5d3d755d6f1ce73a4d6e32)) + +## [2.75.1](https://github.com/googleapis/java-bigtable/compare/v2.75.0...v2.75.1) (2026-03-26) + + +### Bug Fixes + +* Ensure that EnvInfo stays constant between metric exports ([#2853](https://github.com/googleapis/java-bigtable/issues/2853)) ([cfc616d](https://github.com/googleapis/java-bigtable/commit/cfc616d708e1ca7714598535aa56585480414479)) + +## [2.75.0](https://github.com/googleapis/java-bigtable/compare/v2.74.0...v2.75.0) (2026-03-24) + + +### Features + +* Expose generated GAPIC instance admin client ([#2828](https://github.com/googleapis/java-bigtable/issues/2828)) ([7c42799](https://github.com/googleapis/java-bigtable/commit/7c42799d45dbefb172c567ab6242f2a6f27a1eba)) + + +### Bug Fixes + +* **bigtable:** Add gauge handling ([#2830](https://github.com/googleapis/java-bigtable/issues/2830)) ([915733b](https://github.com/googleapis/java-bigtable/commit/915733bbaf21626c87bb868070087c382ba0932e)) +* **bigtable:** Plumb transport type correctly ([#2824](https://github.com/googleapis/java-bigtable/issues/2824)) ([d25f39c](https://github.com/googleapis/java-bigtable/commit/d25f39c1f46263bd635731aa37ba71374c64c31c)) +* Fix automated backup ([#2844](https://github.com/googleapis/java-bigtable/issues/2844)) ([5dc6829](https://github.com/googleapis/java-bigtable/commit/5dc68297dc1f002cb527a710443d5c208d712bc1)) +* Fix race in emulator controller ([#2836](https://github.com/googleapis/java-bigtable/issues/2836)) ([17707be](https://github.com/googleapis/java-bigtable/commit/17707be3f4bfede9e4541d00350c400de937e3b6)) +* Use all known headers to detect connectivity errors ([#2841](https://github.com/googleapis/java-bigtable/issues/2841)) ([6466166](https://github.com/googleapis/java-bigtable/commit/6466166b417c9a5052c512f38047a7fac19b5d75)) + + +### Dependencies + +* Update shared dependencies ([#2850](https://github.com/googleapis/java-bigtable/issues/2850)) ([fb437e0](https://github.com/googleapis/java-bigtable/commit/fb437e074ee328d57c00807d4afcaf26dd78aea7)) + + +### Documentation + +* **bigtable:** Expose Admin API Stubs in Javadoc ([#2835](https://github.com/googleapis/java-bigtable/issues/2835)) ([b7a0232](https://github.com/googleapis/java-bigtable/commit/b7a0232b1cf9639f5c529240482a99c94d950931)) +* **bigtable:** Expose Base Admin Clients in Javadoc ([#2833](https://github.com/googleapis/java-bigtable/issues/2833)) ([2933ef6](https://github.com/googleapis/java-bigtable/commit/2933ef6419ec6ec6e3220a6bab03bb0c2cf7cd0d)) + +## [2.74.0](https://github.com/googleapis/java-bigtable/compare/v2.73.1...v2.74.0) (2026-03-02) + + +### Features + +* Add awaitOptimizeRestoredTable helper for Bigtable Admin ([#2781](https://github.com/googleapis/java-bigtable/issues/2781)) ([cf15d45](https://github.com/googleapis/java-bigtable/commit/cf15d45a8f4c0ee385d3e53a0bae153ee1064999)) +* Add TieredStorageConfig to table admin api ([f05a1a3](https://github.com/googleapis/java-bigtable/commit/f05a1a3b0bb730e62c349dc8a7a1a82b0cf00fa7)) +* **Bigtable:** Add support for creating instances with tags ([#2733](https://github.com/googleapis/java-bigtable/issues/2733)) ([bc46174](https://github.com/googleapis/java-bigtable/commit/bc461749a0aa702f65c26774dd4696d47ef88eae)) +* Expose generated GAPIC admin client and freeze legacy surface ([#2806](https://github.com/googleapis/java-bigtable/issues/2806)) ([c620710](https://github.com/googleapis/java-bigtable/commit/c62071092d67f8ccfebe3166ca826fb001c76e28)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.67.0 ([f05a1a3](https://github.com/googleapis/java-bigtable/commit/f05a1a3b0bb730e62c349dc8a7a1a82b0cf00fa7)) +* Ensure that per attempt metrics tracer is below the retries ([#2793](https://github.com/googleapis/java-bigtable/issues/2793)) ([1f39032](https://github.com/googleapis/java-bigtable/commit/1f390328b23855ee39e2c3dacf8a0eed8d962b08)) + + +### Dependencies + +* Update shared dependencies ([#2814](https://github.com/googleapis/java-bigtable/issues/2814)) ([dde68fe](https://github.com/googleapis/java-bigtable/commit/dde68fe0ee5c5a491a5ae5382babea57e901605c)) + +## [2.73.1](https://github.com/googleapis/java-bigtable/compare/v2.73.0...v2.73.1) (2026-02-17) + + +### Bug Fixes + +* **bigtable:** Drop redudant fields from internal otel metrics which are already in monitored resource ([#2783](https://github.com/googleapis/java-bigtable/issues/2783)) ([f45bb0e](https://github.com/googleapis/java-bigtable/commit/f45bb0e30343f08a90b1c7e30107ba7e0ae8e23a)) +* Fix skip large row ([#2785](https://github.com/googleapis/java-bigtable/issues/2785)) ([504bb51](https://github.com/googleapis/java-bigtable/commit/504bb512ff6d7c0ab6dd86785f0b255a2d910dbd)) +* Test proxy doesn't return "http2 excpetion" for long errors ([#2775](https://github.com/googleapis/java-bigtable/issues/2775)) ([dafe647](https://github.com/googleapis/java-bigtable/commit/dafe647ab7877f65b5d73e2a6519f71e6eb03f77)) +* Use StatusProto.fromThrowable for ApiException in test-proxy ([#2778](https://github.com/googleapis/java-bigtable/issues/2778)) ([de1669e](https://github.com/googleapis/java-bigtable/commit/de1669e882b814ff1708d2b74e62540f5bcd3dbf)) + +## [2.73.0](https://github.com/googleapis/java-bigtable/compare/v2.72.0...v2.73.0) (2026-02-06) + + +### Features + +* Add methods to wait for consistency with a token ([#2762](https://github.com/googleapis/java-bigtable/issues/2762)) ([b4a90b2](https://github.com/googleapis/java-bigtable/commit/b4a90b2d0fa2db34067577c2b56d815163dc7282)) + + +### Dependencies + +* Update shared dependencies ([#2773](https://github.com/googleapis/java-bigtable/issues/2773)) ([33a6d8a](https://github.com/googleapis/java-bigtable/commit/33a6d8ad8a0051550998724f5833a1e803315b47)) + +## [2.72.0](https://github.com/googleapis/java-bigtable/compare/v2.71.0...v2.72.0) (2026-01-30) + + +### Features + +* Add GcRuleBuilder for safe GC rule construction ([#2758](https://github.com/googleapis/java-bigtable/issues/2758)) ([4a99a8c](https://github.com/googleapis/java-bigtable/commit/4a99a8ccad8469933b63aa63205bc2c800a24fef)) +* Handle StatusRuntimeException in CbtTestProxy, increase inbound message / metadata size ([#2763](https://github.com/googleapis/java-bigtable/issues/2763)) ([3e27d28](https://github.com/googleapis/java-bigtable/commit/3e27d2895816685743ee59d566cd8870447c02f1)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.66.0 ([ca24007](https://github.com/googleapis/java-bigtable/commit/ca240078ea4400cd071d796259ed4b8c9501a6f6)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.56.0 ([#2765](https://github.com/googleapis/java-bigtable/issues/2765)) ([d1020a1](https://github.com/googleapis/java-bigtable/commit/d1020a1ea1e296273408262a33a09427a20d8156)) + +## [2.71.0](https://github.com/googleapis/java-bigtable/compare/v2.70.1...v2.71.0) (2026-01-15) + + +### Features + +* Add CSM for batch write flow control ([#2685](https://github.com/googleapis/java-bigtable/issues/2685)) ([62ffd1b](https://github.com/googleapis/java-bigtable/commit/62ffd1babb910bc9ef2e83482de9500e3e1a1b4f)) + + +### Bug Fixes + +* **bigtable:** Add handling for gauge metrics ([#2719](https://github.com/googleapis/java-bigtable/issues/2719)) ([87aa4d5](https://github.com/googleapis/java-bigtable/commit/87aa4d54c047d2de1e92d75a4ff69e6d02689bdb)) +* Create stub with BigtableClientContext so otels are closed ([#2747](https://github.com/googleapis/java-bigtable/issues/2747)) ([3d0a6d9](https://github.com/googleapis/java-bigtable/commit/3d0a6d9d52bd8a97adafe04ac7d6142b42139e51)) +* Update BigtableChannelPool to use the background executor ([#2753](https://github.com/googleapis/java-bigtable/issues/2753)) ([8f6e2df](https://github.com/googleapis/java-bigtable/commit/8f6e2df7bba6fee4e3999dd77b8b18cd85580eff)) +* Use the same background executor in otel reader and monitoring c… ([#2746](https://github.com/googleapis/java-bigtable/issues/2746)) ([3a58f9b](https://github.com/googleapis/java-bigtable/commit/3a58f9bebe416186aa8bffee8e024aef135f52c6)) + + +### Dependencies + +* Update dependency com.google.cloud:gapic-libraries-bom to v1.76.0 ([#2754](https://github.com/googleapis/java-bigtable/issues/2754)) ([be54ef6](https://github.com/googleapis/java-bigtable/commit/be54ef69a2c2d506fc84d08a202e1eb3dafaa849)) +* Update shared dependencies ([#2752](https://github.com/googleapis/java-bigtable/issues/2752)) ([fe1074c](https://github.com/googleapis/java-bigtable/commit/fe1074cb7631746b5bacee2fb4bbd37e4a96416a)) + +## [2.70.1](https://github.com/googleapis/java-bigtable/compare/v2.70.0...v2.70.1) (2025-12-12) + + +### Dependencies + +* Update shared dependencies ([#2734](https://github.com/googleapis/java-bigtable/issues/2734)) ([2823705](https://github.com/googleapis/java-bigtable/commit/28237059edaa20028ea35a1903bdee8c02885260)) + +## [2.70.0](https://github.com/googleapis/java-bigtable/compare/v2.69.0...v2.70.0) (2025-11-18) + + +### Features + +* Add PeerInfo proto in Bigtable API ([0736694](https://github.com/googleapis/java-bigtable/commit/0736694c74099a98ab9f36ecb011a31458c6d8c6)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.64.1 ([0736694](https://github.com/googleapis/java-bigtable/commit/0736694c74099a98ab9f36ecb011a31458c6d8c6)) + + +### Dependencies + +* Update shared dependencies ([#2704](https://github.com/googleapis/java-bigtable/issues/2704)) ([97a8a0e](https://github.com/googleapis/java-bigtable/commit/97a8a0e36281c3154e03e2ba74aed9af00c9a22b)) + + +### Documentation + +* Update javadoc sample for BigtableTableAdminClient.listTables ([#2308](https://github.com/googleapis/java-bigtable/issues/2308)) ([56237d7](https://github.com/googleapis/java-bigtable/commit/56237d7a8d420f526237e11c868fd85e9f256831)) + +## [2.69.0](https://github.com/googleapis/java-bigtable/compare/v2.68.0...v2.69.0) (2025-11-17) + + +### Features + +* **bigtable:** Add internal grpc subconnections metric and add outstanding rpcs to INTERNAL_VIEW ([#2700](https://github.com/googleapis/java-bigtable/issues/2700)) ([e3e6e99](https://github.com/googleapis/java-bigtable/commit/e3e6e993ee197f897c166fb8959755db0cb9c3fc)) +* **bigtable:** Expose a metric to track the number of outstanding rpcs (unary , streaming) in channel pool ([#2696](https://github.com/googleapis/java-bigtable/issues/2696)) ([140a1ad](https://github.com/googleapis/java-bigtable/commit/140a1ad81947da26c1539632ff04748dc3498d69)) +* **bigtable:** Populate alts field in channel entry ([#2702](https://github.com/googleapis/java-bigtable/issues/2702)) ([1bfb763](https://github.com/googleapis/java-bigtable/commit/1bfb763e6e4fb6fe8c808abe5dbd4221d3a632c3)) +* Enable ALTS hard bound token in Bigtable w/ direct access ([#2695](https://github.com/googleapis/java-bigtable/issues/2695)) ([d12b37d](https://github.com/googleapis/java-bigtable/commit/d12b37dacf8712d30be05175828999af74159819)) + +## [2.68.0](https://github.com/googleapis/java-bigtable/compare/v2.67.1...v2.68.0) (2025-10-22) + + +### Features + +* Add Type API updates needed to support structured keys in materialized views ([469290e](https://github.com/googleapis/java-bigtable/commit/469290eb188ce7155abc81d4fec9dd8319851cd9)) + + +### Bug Fixes + +* Add ReadRows/SampleRowKeys bindings for materialized views ([469290e](https://github.com/googleapis/java-bigtable/commit/469290eb188ce7155abc81d4fec9dd8319851cd9)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.62.3 ([469290e](https://github.com/googleapis/java-bigtable/commit/469290eb188ce7155abc81d4fec9dd8319851cd9)) +* **deps:** Update the Java code generator (gapic-generator-java) to 2.63.0 ([ed6c03f](https://github.com/googleapis/java-bigtable/commit/ed6c03ff50f42a06472f5be781b68937f48228d1)) +* Don't use String.format in Preconditions messages ([#2691](https://github.com/googleapis/java-bigtable/issues/2691)) ([62a1812](https://github.com/googleapis/java-bigtable/commit/62a18128d8ec65484509dde6cd0c2b0322890cc9)) +* Fixed the bigtableadmin API name for snippet region tags and possibly other GAPIC attributes ([469290e](https://github.com/googleapis/java-bigtable/commit/469290eb188ce7155abc81d4fec9dd8319851cd9)) + + +### Dependencies + +* Update shared dependencies ([#2697](https://github.com/googleapis/java-bigtable/issues/2697)) ([611ad20](https://github.com/googleapis/java-bigtable/commit/611ad208359e3c1f2e675d5e4e8c8ade3616b02b)) + +## [2.67.1](https://github.com/googleapis/java-bigtable/compare/v2.67.0...v2.67.1) (2025-10-08) + + +### Dependencies + +* Update shared dependencies ([#2686](https://github.com/googleapis/java-bigtable/issues/2686)) ([d7eaa02](https://github.com/googleapis/java-bigtable/commit/d7eaa02d89a63d9f9197d26e430267eff200b126)) + +## [2.67.0](https://github.com/googleapis/java-bigtable/compare/v2.66.0...v2.67.0) (2025-09-24) + + +### Features + +* Idle channel eviction ([#2651](https://github.com/googleapis/java-bigtable/issues/2651)) ([70c05c9](https://github.com/googleapis/java-bigtable/commit/70c05c9c09a63c53818384d2a66c622c9b95e00e)) +* Load balancing options for BigtableChannelPool ([#2667](https://github.com/googleapis/java-bigtable/issues/2667)) ([5adaa84](https://github.com/googleapis/java-bigtable/commit/5adaa84d80df08779da7c36a50de4632049cfe96)) + + +### Bug Fixes + +* Add missing break; to PROTO and ENUM value type check ([#2672](https://github.com/googleapis/java-bigtable/issues/2672)) ([337e432](https://github.com/googleapis/java-bigtable/commit/337e4325f6cb5d11309ec5f33550d47d97cbe3c3)) +* Remove beta api annotation for query paginator ([#2660](https://github.com/googleapis/java-bigtable/issues/2660)) ([f68a1fa](https://github.com/googleapis/java-bigtable/commit/f68a1fae49b701d1fb9942e2af2fa84a1e5b508a)) + + +### Dependencies + +* Update shared dependencies ([#2679](https://github.com/googleapis/java-bigtable/issues/2679)) ([a5b8260](https://github.com/googleapis/java-bigtable/commit/a5b82609c365ae4792ed822e59039c1a046ef3ff)) + +## [2.66.0](https://github.com/googleapis/java-bigtable/compare/v2.65.1...v2.66.0) (2025-09-10) + + +### Features + +* Add support for Proto and Enum types ([#2662](https://github.com/googleapis/java-bigtable/issues/2662)) ([da3065d](https://github.com/googleapis/java-bigtable/commit/da3065db331be191fdf9e06be71e45c7832574ea)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.52.1 ([#2668](https://github.com/googleapis/java-bigtable/issues/2668)) ([06ac93e](https://github.com/googleapis/java-bigtable/commit/06ac93e810830f9c04920b488d9a10af8995a6f3)) + +## [2.65.1](https://github.com/googleapis/java-bigtable/compare/v2.65.0...v2.65.1) (2025-08-27) + + +### Dependencies + +* Update shared dependencies ([#2664](https://github.com/googleapis/java-bigtable/issues/2664)) ([841318b](https://github.com/googleapis/java-bigtable/commit/841318b2248dcda89d8482bc2e84c838bd8be8d0)) + +## [2.65.0](https://github.com/googleapis/java-bigtable/compare/v2.64.0...v2.65.0) (2025-08-12) + + +### Features + +* **bigtable:** Lower the value for max rpc channels as channel resize is slow (1m, 2 channel) ([#2656](https://github.com/googleapis/java-bigtable/issues/2656)) ([d8055c1](https://github.com/googleapis/java-bigtable/commit/d8055c1fb75a616cda1503b92d7cddb9da47d42b)) + +## [2.64.0](https://github.com/googleapis/java-bigtable/compare/v2.63.0...v2.64.0) (2025-08-08) + + +### Features + +* Add tags field to Instance proto (stable branch) ([089d527](https://github.com/googleapis/java-bigtable/commit/089d52700c225015fabfaa763163c5874b96d830)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.61.0 ([089d527](https://github.com/googleapis/java-bigtable/commit/089d52700c225015fabfaa763163c5874b96d830)) + + +### Dependencies + +* Update shared dependencies ([#2654](https://github.com/googleapis/java-bigtable/issues/2654)) ([4b706f4](https://github.com/googleapis/java-bigtable/commit/4b706f4f76a8152556aa99656b440adb30f37a4c)) + +## [2.63.0](https://github.com/googleapis/java-bigtable/compare/v2.62.0...v2.63.0) (2025-07-30) + + +### Features + +* Add Idempotency to Cloud Bigtable MutateRowsRequest API ([bc58b4f](https://github.com/googleapis/java-bigtable/commit/bc58b4f31ef457bd322f270b044735e4b62d298f)) +* Add port as a parameter for the bigtable emulator ([#2645](https://github.com/googleapis/java-bigtable/issues/2645)) ([5acd3dc](https://github.com/googleapis/java-bigtable/commit/5acd3dc01c36072bd28248d560c5d923c34b1817)) +* Add type support for Proto and Enum ([bc58b4f](https://github.com/googleapis/java-bigtable/commit/bc58b4f31ef457bd322f270b044735e4b62d298f)) +* Publish Proto and Enum types to CBT data API ([ace12d5](https://github.com/googleapis/java-bigtable/commit/ace12d53fe9f4d3779b2b1a2aed69ceeedd11600)) +* Selective GAPIC autogeneration for Python Bigtable Admin ([e219c38](https://github.com/googleapis/java-bigtable/commit/e219c387487673869fb8bb55a5060bdc9d37bbcb)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.60.2 ([e219c38](https://github.com/googleapis/java-bigtable/commit/e219c387487673869fb8bb55a5060bdc9d37bbcb)) +* Update routing_parameters.path_template ([e219c38](https://github.com/googleapis/java-bigtable/commit/e219c387487673869fb8bb55a5060bdc9d37bbcb)) + + +### Dependencies + +* Update sdk-platorm-java-config to 3.50.2 ([#2646](https://github.com/googleapis/java-bigtable/issues/2646)) ([03e6961](https://github.com/googleapis/java-bigtable/commit/03e6961e758a9a0c39cb168c73c853328c14bfd1)) + + +### Documentation + +* Sync generated comments from the API Protos ([bc58b4f](https://github.com/googleapis/java-bigtable/commit/bc58b4f31ef457bd322f270b044735e4b62d298f)) + +## [2.62.0](https://github.com/googleapis/java-bigtable/compare/v2.61.0...v2.62.0) (2025-07-15) + + +### Features + +* Add Idempotency to Cloud Bigtable MutateRowRequest API ([b5acca6](https://github.com/googleapis/java-bigtable/commit/b5acca6ac4f1eec420adb27bc77aa1bda0ec2dca)) +* Add SchemaBundles API ([b5acca6](https://github.com/googleapis/java-bigtable/commit/b5acca6ac4f1eec420adb27bc77aa1bda0ec2dca)) +* **bigtable:** Add schema bundle support ([#2619](https://github.com/googleapis/java-bigtable/issues/2619)) ([7d7b9a9](https://github.com/googleapis/java-bigtable/commit/7d7b9a966d3ef7b7a0ef3f82038ab73f4d791427)) +* Next release from main branch is 2.62.0 ([#2621](https://github.com/googleapis/java-bigtable/issues/2621)) ([202b211](https://github.com/googleapis/java-bigtable/commit/202b21102e71da71ff56f19a12d8a00a59cd8107)) + + +### Dependencies + +* Minor cleanup ([#2623](https://github.com/googleapis/java-bigtable/issues/2623)) ([7b230e8](https://github.com/googleapis/java-bigtable/commit/7b230e86902b5733c06e45fad90da76653ee1096)) +* Update shared dependencies ([#2616](https://github.com/googleapis/java-bigtable/issues/2616)) ([eb7cfd5](https://github.com/googleapis/java-bigtable/commit/eb7cfd526aa999c614b7b8285d32759e2739ff9a)) + +## [2.61.0](https://github.com/googleapis/java-bigtable/compare/v2.60.0...v2.61.0) (2025-06-27) + + +### Features + +* Add getter for universe domain in JwtCredentialsWithAudience ([#2598](https://github.com/googleapis/java-bigtable/issues/2598)) ([9ad66b1](https://github.com/googleapis/java-bigtable/commit/9ad66b129923500cdeb794fc2e4570ad8b1d92fd)) + + +### Bug Fixes + +* Add name elements for the POM.xml files ([a873719](https://github.com/googleapis/java-bigtable/commit/a873719e7e32a0cd21dc259911a193520f20797e)) +* Populate table id for materialized view ([#2610](https://github.com/googleapis/java-bigtable/issues/2610)) ([50c3fe2](https://github.com/googleapis/java-bigtable/commit/50c3fe2ffe66acaba8cb408dc3b1a4d13a4a2556)) + + +### Dependencies + +* Update shared dependencies ([#2605](https://github.com/googleapis/java-bigtable/issues/2605)) ([4cc7246](https://github.com/googleapis/java-bigtable/commit/4cc7246ff8e2e0e26d2edc0aee8866a32ec1c8ab)) + +## [2.60.0](https://github.com/googleapis/java-bigtable/compare/v2.59.0...v2.60.0) (2025-06-06) + + +### Features + +* Improve error message on malformed struct ([#2592](https://github.com/googleapis/java-bigtable/issues/2592)) ([7f5fdf0](https://github.com/googleapis/java-bigtable/commit/7f5fdf094c5fe140807ce6abcea0b891462ba809)) +* Run ExecuteQuery conformance tests ([#2557](https://github.com/googleapis/java-bigtable/issues/2557)) ([0bbc083](https://github.com/googleapis/java-bigtable/commit/0bbc083b9e798e5b557f3ffe7090b45e66c9ada5)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.59.0 ([65782aa](https://github.com/googleapis/java-bigtable/commit/65782aaf89ad78aafd7f5928e81e513c3016b471)) +* Ensure that multiple instances of a client in the same process dont clobber each other ([#2590](https://github.com/googleapis/java-bigtable/issues/2590)) ([8d3dca4](https://github.com/googleapis/java-bigtable/commit/8d3dca43224179829829bcf91972610c666b130b)) + + +### Dependencies + +* Update shared dependencies ([#2587](https://github.com/googleapis/java-bigtable/issues/2587)) ([8ec0339](https://github.com/googleapis/java-bigtable/commit/8ec033994f20b2b3aea0dfcdaffbdd1c6d19fdad)) + +## [2.59.0](https://github.com/googleapis/java-bigtable/compare/v2.58.2...v2.59.0) (2025-05-16) + + +### Features + +* **bigtable:** Add DeletionProtection support for Logical Views ([#2539](https://github.com/googleapis/java-bigtable/issues/2539)) ([d9ba32b](https://github.com/googleapis/java-bigtable/commit/d9ba32b8e5792ceed054f67c58f5622e153e87d6)) + + +### Dependencies + +* Update googleapis/sdk-platform-java action to v2.58.0 ([#2581](https://github.com/googleapis/java-bigtable/issues/2581)) ([c9b0289](https://github.com/googleapis/java-bigtable/commit/c9b028902dc8aae9552181d65c9743be09d45ecf)) +* Update shared dependencies ([#2584](https://github.com/googleapis/java-bigtable/issues/2584)) ([ba82675](https://github.com/googleapis/java-bigtable/commit/ba82675c25dbe12443ac5ef48464dcb3f8c8894c)) + +## [2.58.2](https://github.com/googleapis/java-bigtable/compare/v2.58.1...v2.58.2) (2025-05-08) + + +### Bug Fixes + +* Use service name as the default audience ([#2579](https://github.com/googleapis/java-bigtable/issues/2579)) ([af6d7bd](https://github.com/googleapis/java-bigtable/commit/af6d7bd28d9d7a4ebb90825a9b4b8a73d63172f6)) + + +### Dependencies + +* Update shared dependencies ([#2565](https://github.com/googleapis/java-bigtable/issues/2565)) ([043f11b](https://github.com/googleapis/java-bigtable/commit/043f11b16948c338096d9407de1e99f02656169e)) + +## [2.58.1](https://github.com/googleapis/java-bigtable/compare/v2.58.0...v2.58.1) (2025-04-28) + + +### Bug Fixes + +* Close otel instance ([#2571](https://github.com/googleapis/java-bigtable/issues/2571)) ([422fe26](https://github.com/googleapis/java-bigtable/commit/422fe26f3aae30fe74de80fad3848707452d6646)) + +## [2.58.0](https://github.com/googleapis/java-bigtable/compare/v2.57.3...v2.58.0) (2025-04-28) + + +### Features + +* Add deletion_protection support for LVs ([43c97a3](https://github.com/googleapis/java-bigtable/commit/43c97a3f430ee4ee90d46b3685ae50f13949831c)) +* **bigtable:** Add integration tests for Materialized/Logical Views ([#2518](https://github.com/googleapis/java-bigtable/issues/2518)) ([4d3a7e6](https://github.com/googleapis/java-bigtable/commit/4d3a7e675b60ba6a3225a45b7463edff279f9bc4)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.56.2 ([43c97a3](https://github.com/googleapis/java-bigtable/commit/43c97a3f430ee4ee90d46b3685ae50f13949831c)) +* Fix retry info algorithm setting ([#2562](https://github.com/googleapis/java-bigtable/issues/2562)) ([c424ccb](https://github.com/googleapis/java-bigtable/commit/c424ccba72a191609dc726ed67d03f0d330015fc)) +* Use universe domain when creating the monitoring client ([#2570](https://github.com/googleapis/java-bigtable/issues/2570)) ([3b51e12](https://github.com/googleapis/java-bigtable/commit/3b51e1206a4f83078625705ed8d8a899839af1a9)) + +## [2.57.3](https://github.com/googleapis/java-bigtable/compare/v2.57.2...v2.57.3) (2025-04-01) + + +### Bug Fixes + +* Remove debug messages ([#2552](https://github.com/googleapis/java-bigtable/issues/2552)) ([6359834](https://github.com/googleapis/java-bigtable/commit/63598346ca39767d59d254fce2c718d1258e27d5)) + +## [2.57.2](https://github.com/googleapis/java-bigtable/compare/v2.57.1...v2.57.2) (2025-03-31) + + +### Bug Fixes + +* Library should released as 2.57.2 ([#2549](https://github.com/googleapis/java-bigtable/issues/2549)) ([58d0bbd](https://github.com/googleapis/java-bigtable/commit/58d0bbdcb983e3b5ee403edf45c4e98a6eb8dc16)) + +## [2.57.1](https://github.com/googleapis/java-bigtable/compare/v2.57.0...v2.57.1) (2025-03-24) + + +### Bug Fixes + +* Handling of totalTimeout on sql plan refresh ([#2541](https://github.com/googleapis/java-bigtable/issues/2541)) ([bf49cf9](https://github.com/googleapis/java-bigtable/commit/bf49cf93f9a3b9cbdb155bb6cbb7a9f763b6f738)) + +## [2.57.0](https://github.com/googleapis/java-bigtable/compare/v2.56.0...v2.57.0) (2025-03-24) + + +### Features + +* Add PreparedStatement and update ExecuteQuery API to use it ([#2534](https://github.com/googleapis/java-bigtable/issues/2534)) ([49d4d09](https://github.com/googleapis/java-bigtable/commit/49d4d09fd16a1eb4eb566227a049bca2aaaa61e3)) + +## [2.56.0](https://github.com/googleapis/java-bigtable/compare/v2.55.0...v2.56.0) (2025-03-18) + + +### Features + +* **bigtable:** Add support for Logical Views in Admin API ([#2519](https://github.com/googleapis/java-bigtable/issues/2519)) ([6dac3fd](https://github.com/googleapis/java-bigtable/commit/6dac3fd6443e94674af88a1dc97bedd9b3b0c834)) +* **bigtable:** Add support for Materialized Views in Admin API ([#2511](https://github.com/googleapis/java-bigtable/issues/2511)) ([55cd719](https://github.com/googleapis/java-bigtable/commit/55cd719df277a2ae1988c7cd53286558ad86835b)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.55.1 ([7992af0](https://github.com/googleapis/java-bigtable/commit/7992af08b4eb2f408ecb739a73fbdc36ca7af2b5)) + + +### Dependencies + +* Sdk-platform-java-config 3.45.1 ([#2517](https://github.com/googleapis/java-bigtable/issues/2517)) ([b2af258](https://github.com/googleapis/java-bigtable/commit/b2af258ed72d29644c8bd1079b1d0f223206d75b)) + +## [2.55.0](https://github.com/googleapis/java-bigtable/compare/v2.54.0...v2.55.0) (2025-03-11) + + +### Features + +* Add MaterializedViewName to ReadRows and SampleRowKeys ([1763c6e](https://github.com/googleapis/java-bigtable/commit/1763c6e9304010ed4034e1ddd03fdb94bca615dc)) +* Add MaterializedViews and LogicalViews APIs ([1763c6e](https://github.com/googleapis/java-bigtable/commit/1763c6e9304010ed4034e1ddd03fdb94bca615dc)) +* Add MaterializedViews and LogicalViews APIs ([7340527](https://github.com/googleapis/java-bigtable/commit/73405272c3fc77ca81c1df7cce1b8d889d4a96c4)) +* Add PrepareQuery api and update ExecuteQuery to support it ([1763c6e](https://github.com/googleapis/java-bigtable/commit/1763c6e9304010ed4034e1ddd03fdb94bca615dc)) +* **bigtable:** Add support for data APIs for materialized views ([#2508](https://github.com/googleapis/java-bigtable/issues/2508)) ([6310a63](https://github.com/googleapis/java-bigtable/commit/6310a631be3345f97d73b50f3b458fe40b071286)) +* **large-row-skip:** Added large-row-skip-callable with configurable rowadapter ([#2509](https://github.com/googleapis/java-bigtable/issues/2509)) ([ba193ef](https://github.com/googleapis/java-bigtable/commit/ba193ef771f913e6e6a1aca630fe52d0921ee077)) +* Next release from main branch is 2.55.0 ([#2506](https://github.com/googleapis/java-bigtable/issues/2506)) ([4e45837](https://github.com/googleapis/java-bigtable/commit/4e458378cc25a4dc5ac3fd1362626d89f0138186)) +* Publish row_key_schema fields in table proto and relevant admin APIs to setup a table with a row_key_schema ([7340527](https://github.com/googleapis/java-bigtable/commit/73405272c3fc77ca81c1df7cce1b8d889d4a96c4)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.54.0 ([91e4369](https://github.com/googleapis/java-bigtable/commit/91e4369d280c09fd2d1b4b5dd88809b6da01b0f8)) + + +### Documentation + +* Fixed formatting of resource path strings ([7340527](https://github.com/googleapis/java-bigtable/commit/73405272c3fc77ca81c1df7cce1b8d889d4a96c4)) + +## [2.54.0](https://github.com/googleapis/java-bigtable/compare/v2.53.0...v2.54.0) (2025-02-28) + + +### Features + +* Next release from main branch is 2.54.0 ([#2498](https://github.com/googleapis/java-bigtable/issues/2498)) ([f967ded](https://github.com/googleapis/java-bigtable/commit/f967deda8b68091dcc417b6c51f451abd36696f1)) + + +### Dependencies + +* Update shared dependencies ([#2493](https://github.com/googleapis/java-bigtable/issues/2493)) ([e1d09e7](https://github.com/googleapis/java-bigtable/commit/e1d09e7d03365d844e957d043e21d71948f98d04)) + +## [2.53.0](https://github.com/googleapis/java-bigtable/compare/v2.52.0...v2.53.0) (2025-02-21) + + +### Features + +* Skip large rows ([#2482](https://github.com/googleapis/java-bigtable/issues/2482)) ([cd7f82e](https://github.com/googleapis/java-bigtable/commit/cd7f82e4b66dc3c34262c73b26afc2fdfd1deed7)) + +## [2.52.0](https://github.com/googleapis/java-bigtable/compare/v2.51.2...v2.52.0) (2025-02-14) + + +### Features + +* Automated backups are supported in the admin client ([#2472](https://github.com/googleapis/java-bigtable/issues/2472)) ([48633e6](https://github.com/googleapis/java-bigtable/commit/48633e6160593c84f42a02f348ec18c3d1521ef0)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.53.0 ([47ca299](https://github.com/googleapis/java-bigtable/commit/47ca29931699cae87d640185ad31e4b61c0bb212)) +* Extend timeouts for check consistency ([47ca299](https://github.com/googleapis/java-bigtable/commit/47ca29931699cae87d640185ad31e4b61c0bb212)) + + +### Dependencies + +* Update dependency com.google.cloud:gapic-libraries-bom to v1.52.0 ([#2490](https://github.com/googleapis/java-bigtable/issues/2490)) ([ca25d4e](https://github.com/googleapis/java-bigtable/commit/ca25d4eb6c7333d1a77d2c99b1bb95c2a2f710c1)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.43.0 ([#2481](https://github.com/googleapis/java-bigtable/issues/2481)) ([deb1f79](https://github.com/googleapis/java-bigtable/commit/deb1f79c6efa223f6c2f780724ec9386f44f018a)) + +## [2.51.2](https://github.com/googleapis/java-bigtable/compare/v2.51.1...v2.51.2) (2025-02-03) + + +### Bug Fixes + +* Add known conformance test failures ([#2474](https://github.com/googleapis/java-bigtable/issues/2474)) ([15488fe](https://github.com/googleapis/java-bigtable/commit/15488fe6cfe05e84c4b6d65565150ee7277a60e7)) + + +### Dependencies + +* Update shared dependencies ([#2473](https://github.com/googleapis/java-bigtable/issues/2473)) ([4d6d419](https://github.com/googleapis/java-bigtable/commit/4d6d41988c8e4b92b01851ab7ab52183254e8798)) + +## [2.51.1](https://github.com/googleapis/java-bigtable/compare/v2.51.0...v2.51.1) (2025-01-10) + + +### Dependencies + +* Update dependency com.google.cloud:gapic-libraries-bom to v1.50.0 ([#2464](https://github.com/googleapis/java-bigtable/issues/2464)) ([d63dd43](https://github.com/googleapis/java-bigtable/commit/d63dd4333e94f8ad32f260315e44b622db157002)) +* Update dependency com.google.cloud:sdk-platform-java-config to v3.41.1 ([#2461](https://github.com/googleapis/java-bigtable/issues/2461)) ([ed24b4c](https://github.com/googleapis/java-bigtable/commit/ed24b4c0aebc2666850f103f551128f02c2ba2ae)) +* Update googleapis/sdk-platform-java action to v2.51.1 ([#2460](https://github.com/googleapis/java-bigtable/issues/2460)) ([35c979f](https://github.com/googleapis/java-bigtable/commit/35c979fff1d1194cc241f90057245de78cd5f010)) + +## [2.51.0](https://github.com/googleapis/java-bigtable/compare/v2.50.0...v2.51.0) (2024-12-17) + + +### Features + +* Introduce `java.time` ([#2415](https://github.com/googleapis/java-bigtable/issues/2415)) ([bb96c3e](https://github.com/googleapis/java-bigtable/commit/bb96c3e395793ba324cf658bb4c985d4315cf781)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.51.0 ([a5444a5](https://github.com/googleapis/java-bigtable/commit/a5444a545ec61a1520716dfafb6f62b7e39df1c7)) +* Move resource detection to the first export to avoid slow start ([#2450](https://github.com/googleapis/java-bigtable/issues/2450)) ([cec010a](https://github.com/googleapis/java-bigtable/commit/cec010aa64f2b190f8e742915be41baae2ad2083)) + + +### Dependencies + +* Update sdk-platform-java dependencies ([#2448](https://github.com/googleapis/java-bigtable/issues/2448)) ([825e717](https://github.com/googleapis/java-bigtable/commit/825e717e9d8ae3853d7509d0849b58f2c47c9803)) + +## [2.50.0](https://github.com/googleapis/java-bigtable/compare/v2.49.0...v2.50.0) (2024-12-06) + + +### Features + +* Add support for Row Affinity app profiles ([#2341](https://github.com/googleapis/java-bigtable/issues/2341)) ([cb4d60e](https://github.com/googleapis/java-bigtable/commit/cb4d60e8ce2079a270739ad91efb05cbb1ff74f8)) + +## [2.49.0](https://github.com/googleapis/java-bigtable/compare/v2.48.0...v2.49.0) (2024-12-03) + + +### Features + +* Add support for table deletion protection ([#2430](https://github.com/googleapis/java-bigtable/issues/2430)) ([687b6df](https://github.com/googleapis/java-bigtable/commit/687b6df14b743358e8207cda26022dfc75338d55)) + + +### Bug Fixes + +* Allow factory to export to different projects ([#2374](https://github.com/googleapis/java-bigtable/issues/2374)) ([06b912c](https://github.com/googleapis/java-bigtable/commit/06b912cc5d63436757008e79edfa8286b2ccac18)) +* Send priming requests on the channel directly ([#2435](https://github.com/googleapis/java-bigtable/issues/2435)) ([b76698d](https://github.com/googleapis/java-bigtable/commit/b76698dfb2c8552185f34e01e924ecc80798ba4f)) + +## [2.48.0](https://github.com/googleapis/java-bigtable/compare/v2.47.0...v2.48.0) (2024-11-19) + + +### Features + +* Enable trailer optimization by default ([#2421](https://github.com/googleapis/java-bigtable/issues/2421)) ([7b2c4e4](https://github.com/googleapis/java-bigtable/commit/7b2c4e45dce828f506dac16ffc2b71995564a477)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.50.0 ([6b35b47](https://github.com/googleapis/java-bigtable/commit/6b35b478e10efce77d95bffcd7a64e84e1bcc5b0)) +* Make client side metrics tag in sync with server ([#2401](https://github.com/googleapis/java-bigtable/issues/2401)) ([bba4183](https://github.com/googleapis/java-bigtable/commit/bba41837febc10e9507afc7117e2e4ec2d15fb11)) + + +### Dependencies + +* Revert downgrade grpc to 1.67.1 [#2366](https://github.com/googleapis/java-bigtable/issues/2366) ([#2414](https://github.com/googleapis/java-bigtable/issues/2414)) ([710fa52](https://github.com/googleapis/java-bigtable/commit/710fa52a05ce4fc81ee8e980d87e0ca86676219f)) +* Update dependency com.google.cloud:gapic-libraries-bom to v1.48.0 ([#2422](https://github.com/googleapis/java-bigtable/issues/2422)) ([2088a39](https://github.com/googleapis/java-bigtable/commit/2088a399bd8b71e98035cc475637f41d5873082d)) +* Update sdk-platform-java dependencies ([#2418](https://github.com/googleapis/java-bigtable/issues/2418)) ([c12bb01](https://github.com/googleapis/java-bigtable/commit/c12bb01a6c5be0a72285db0505407f3e1c2534fb)) + +## [2.47.0](https://github.com/googleapis/java-bigtable/compare/v2.46.0...v2.47.0) (2024-11-13) + + +### Features + +* Add an experimental feature to skip waiting for trailers for unary ops ([#2404](https://github.com/googleapis/java-bigtable/issues/2404)) ([cf58f26](https://github.com/googleapis/java-bigtable/commit/cf58f260fd7d3cb0dee4fee8e2d43367db6eadb1)) +* Add internal "deadline remaining" client side metric [#2341](https://github.com/googleapis/java-bigtable/issues/2341) ([#2370](https://github.com/googleapis/java-bigtable/issues/2370)) ([75d4105](https://github.com/googleapis/java-bigtable/commit/75d4105e0376dbe5810d6b96d71daa74b85e68ce)) + + +### Bug Fixes + +* Simplify remaining deadline metric impl ([#2410](https://github.com/googleapis/java-bigtable/issues/2410)) ([9796d57](https://github.com/googleapis/java-bigtable/commit/9796d57b60d928d3390e4ad311d5704dcbe808ec)) + +## [2.46.0](https://github.com/googleapis/java-bigtable/compare/v2.45.1...v2.46.0) (2024-10-29) + + +### Features + +* Test proxy support SSL backend ([#2381](https://github.com/googleapis/java-bigtable/issues/2381)) ([3cbf4ab](https://github.com/googleapis/java-bigtable/commit/3cbf4abe79d61daba0704abfccfb5558b026e6b7)) + + +### Bug Fixes + +* Fix client blocking latency ([#2346](https://github.com/googleapis/java-bigtable/issues/2346)) ([3801961](https://github.com/googleapis/java-bigtable/commit/380196174fb9b8cd97beb79d4faf49b30561be7f)) +* Fix first response latencies ([#2382](https://github.com/googleapis/java-bigtable/issues/2382)) ([8b2953e](https://github.com/googleapis/java-bigtable/commit/8b2953ed9c69c23b3e0c5c35d0538dc83f9dad80)) + + +### Dependencies + +* Update sdk-platform-java dependencies ([#2384](https://github.com/googleapis/java-bigtable/issues/2384)) ([81d7215](https://github.com/googleapis/java-bigtable/commit/81d72150b60d29e4e2ac17c6cb1fbdc89be0e16e)) + +## [2.45.1](https://github.com/googleapis/java-bigtable/compare/v2.45.0...v2.45.1) (2024-10-14) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.47.0 ([cdc2cc7](https://github.com/googleapis/java-bigtable/commit/cdc2cc7e085af42a2078373098b5f8ef8c752ea7)) + + +### Dependencies + +* Update sdk-platform-java dependencies ([#2378](https://github.com/googleapis/java-bigtable/issues/2378)) ([2499a3c](https://github.com/googleapis/java-bigtable/commit/2499a3cd5e0d0404666c7f9cf0c74f9edb90d894)) + +## [2.45.0](https://github.com/googleapis/java-bigtable/compare/v2.44.1...v2.45.0) (2024-10-03) + + +### Features + +* Add support for Cloud Bigtable Node Scaling Factor for CBT Clusters ([caf879c](https://github.com/googleapis/java-bigtable/commit/caf879cb4086d74bd4571662510014b27e6113a7)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.46.1 ([caf879c](https://github.com/googleapis/java-bigtable/commit/caf879cb4086d74bd4571662510014b27e6113a7)) +* Support override monitoring endpoint ([#2364](https://github.com/googleapis/java-bigtable/issues/2364)) ([a341eb8](https://github.com/googleapis/java-bigtable/commit/a341eb8530d959edabac0282c52c3e928abf733d)) + + +### Dependencies + +* Downgrade grpc to 1.67.1 ([#2366](https://github.com/googleapis/java-bigtable/issues/2366)) ([1baecb3](https://github.com/googleapis/java-bigtable/commit/1baecb3f6cd34a1daab632c322a1fb415efb9895)) +* Update dependency com.google.cloud:gapic-libraries-bom to v1.45.0 ([#2363](https://github.com/googleapis/java-bigtable/issues/2363)) ([9d24c45](https://github.com/googleapis/java-bigtable/commit/9d24c45b389f2edef0b02f6a8c3badbca2fd3946)) + +## [2.44.1](https://github.com/googleapis/java-bigtable/compare/v2.44.0...v2.44.1) (2024-09-26) + + +### Bug Fixes + +* Add RetryCallable to the callable chain ([#2348](https://github.com/googleapis/java-bigtable/issues/2348)) ([0330d77](https://github.com/googleapis/java-bigtable/commit/0330d77ac29d47e8610ddd23c324a55d1f9912cb)) +* Pass deadline through ExecuteQuery RetrySettings ([#2355](https://github.com/googleapis/java-bigtable/issues/2355)) ([6bc9820](https://github.com/googleapis/java-bigtable/commit/6bc98202897cebe09be8a4a78316cf5463106866)) +* Time based flakiness in execute query deadline test ([#2358](https://github.com/googleapis/java-bigtable/issues/2358)) ([b474173](https://github.com/googleapis/java-bigtable/commit/b474173a778cba273d2713e667000c5633de75bd)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.36.1 ([#2351](https://github.com/googleapis/java-bigtable/issues/2351)) ([40c428e](https://github.com/googleapis/java-bigtable/commit/40c428ec8e8cccb4dc3bb10d6674c94e9527e797)) + +## [2.44.0](https://github.com/googleapis/java-bigtable/compare/v2.43.0...v2.44.0) (2024-09-16) + + +### Features + +* Add APIs to enable hot backups ([#2313](https://github.com/googleapis/java-bigtable/issues/2313)) ([6d004cd](https://github.com/googleapis/java-bigtable/commit/6d004cd0809d02eeff05d5e90faf5e145f13d11e)) +* Add support for awaiting Data Boost ([#2329](https://github.com/googleapis/java-bigtable/issues/2329)) ([8556574](https://github.com/googleapis/java-bigtable/commit/85565742645537d1b55a1a52521d2ccf44b4d00c)) + + +### Dependencies + +* Update shared dependencies ([#2337](https://github.com/googleapis/java-bigtable/issues/2337)) ([dc65bd5](https://github.com/googleapis/java-bigtable/commit/dc65bd5a39cfe0c25a6b955f9f4d9367df334211)) + +## [2.43.0](https://github.com/googleapis/java-bigtable/compare/v2.42.0...v2.43.0) (2024-08-22) + + +### Features + +* Add fields and the BackupType proto for Hot Backups ([#2300](https://github.com/googleapis/java-bigtable/issues/2300)) ([acaa3ff](https://github.com/googleapis/java-bigtable/commit/acaa3ff26ab0d317362e2be65ac5edcf803b13a1)) +* Allow non default service account in DirectPath ([#2312](https://github.com/googleapis/java-bigtable/issues/2312)) ([09d0f23](https://github.com/googleapis/java-bigtable/commit/09d0f23032488dfa55c7a4c1c571a4f36bd94728)) +* **bigtable:** Remove deprecated Bytes from BigEndianBytesEncoding ([#2309](https://github.com/googleapis/java-bigtable/issues/2309)) ([32f244f](https://github.com/googleapis/java-bigtable/commit/32f244f13d0c8571654d314310a4756fe275d609)) +* Enable hermetic library generation ([#2234](https://github.com/googleapis/java-bigtable/issues/2234)) ([169aea5](https://github.com/googleapis/java-bigtable/commit/169aea5c43485a8d13ed53f57495609c142944df)) + + +### Bug Fixes + +* Add missing call to EqualsTester#testEquals ([#2307](https://github.com/googleapis/java-bigtable/issues/2307)) ([8b49f9c](https://github.com/googleapis/java-bigtable/commit/8b49f9ce84871f0f423f5837785604c3119ccd88)) + + +### Dependencies + +* Update shared dependencies ([#2314](https://github.com/googleapis/java-bigtable/issues/2314)) ([ab392ee](https://github.com/googleapis/java-bigtable/commit/ab392ee8d0c4535b5d3f31b3e111cbc41b399dd9)) + ## [2.42.0](https://github.com/googleapis/java-bigtable/compare/v2.41.0...v2.42.0) (2024-08-06) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3803aa5903..02aed7c1d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ This project follows ### Integration Tests Bigtable integration tests can either be run against an emulator or a real Bigtable instance. -The target environment can be selected by setting a maven profile. By default it is set to +The target environment can be selected by setting a maven profile. By default it is set to `bigtable-emulator-it` and other options are `bigtable-prod-it` and `bigtable-directpath-it`. To use the `bigtable-prod-it` and `bigtable-directpath-it` environments: @@ -49,7 +49,7 @@ To use the `bigtable-prod-it` and `bigtable-directpath-it` environments: 1. Set up the target table using scripts/setup-test-table.sh 2. Download the JSON service account credentials file from the Google Developer's Console. 3. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the credentials file -4. Enable the profile and the system properties `bigtable.project`, `bigtable.instance` +4. Enable the profile and the system properties `bigtable.project`, `bigtable.instance` and `bigtable.table` to created earlier. Example: ```bash mvn verify \ @@ -82,7 +82,7 @@ on how to run conformance tests. ## Formatting the code -To auto-format any code changes, run ``mvn com.coveo:fmt-maven-plugin:format``. +To auto-format any code changes, run ``mvn com.spotify.fmt:fmt-maven-plugin:format``. ## Native Image Testing Native Image testing is enabled for tests that follow a particular naming @@ -95,4 +95,4 @@ image compilation. A rollback plan is required for all new features. The rollback plan should include: 1. How to disable this feature from the server side. -2. For features that are strictly client side, what the risks are, and what tests are done. \ No newline at end of file +2. For features that are strictly client side, what the risks are, and what tests are done. diff --git a/README.md b/README.md index 645ea12695..d19eb5e2e5 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.37.0 + 26.69.0 pom import @@ -36,13 +36,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: If you are using Maven without the BOM, add this to your dependencies: - ```xml com.google.cloud google-cloud-bigtable - 2.40.0 + 2.67.0 ``` @@ -50,22 +49,21 @@ 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.44.0') +implementation platform('com.google.cloud:libraries-bom:26.79.0') implementation 'com.google.cloud:google-cloud-bigtable' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.42.0' +implementation 'com.google.cloud:google-cloud-bigtable:2.76.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.42.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.76.0" ``` - ## Authentication @@ -80,7 +78,7 @@ The client application making API calls must be granted [authorization scopes][a ### Prerequisites You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Bigtable [API enabled][enable-api]. - +You will need to [enable billing][enable-billing] to use Google Cloud Bigtable. [Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. @@ -93,7 +91,7 @@ to add `google-cloud-bigtable` as a dependency in your code. ## About Cloud Bigtable -[Cloud Bigtable][product-docs] +[Cloud Bigtable][product-docs] API for reading and writing the contents of Bigtables associated with a cloud project. See the [Cloud Bigtable client library docs][javadocs] to learn how to use this Cloud Bigtable Client Library. @@ -249,82 +247,9 @@ your OpenTelemetry instance. You can refer to [CustomOpenTelemetryMetricsProvider](https://github.com/googleapis/java-bigtable/blob/main/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java) on how to set it up. -## Client request tracing: OpenCensus Tracing - -Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), -which gives insight into the client internals and aids in debugging production issues. -By default, the functionality is disabled. For example to enable tracing using -[Google Stackdriver](https://cloud.google.com/trace/docs/): - -[//]: # (TODO: figure out how to keep opencensus version in sync with pom.xml) - -If you are using Maven, add this to your pom.xml file -```xml - - io.opencensus - opencensus-impl - 0.31.1 - runtime - - - io.opencensus - opencensus-exporter-trace-stackdriver - 0.31.1 - - - io.grpc - * - - - com.google.auth - * - - - -``` -If you are using Gradle, add this to your dependencies -```Groovy -compile 'io.opencensus:opencensus-impl:0.24.0' -compile 'io.opencensus:opencensus-exporter-trace-stackdriver:0.24.0' -``` -If you are using SBT, add this to your dependencies -```Scala -libraryDependencies += "io.opencensus" % "opencensus-impl" % "0.24.0" -libraryDependencies += "io.opencensus" % "opencensus-exporter-trace-stackdriver" % "0.24.0" -``` - -At the start of your application configure the exporter: - -```java -import io.opencensus.exporter.trace.stackdriver.StackdriverTraceConfiguration; -import io.opencensus.exporter.trace.stackdriver.StackdriverTraceExporter; - -StackdriverTraceExporter.createAndRegister( - StackdriverTraceConfiguration.builder() - .setProjectId("YOUR_PROJECT_ID") - .build()); -``` - -You can view the traces on the Google Cloud Platform Console -[Trace](https://console.cloud.google.com/traces) page. - -By default traces are [sampled](https://opencensus.io/tracing/sampling) at a rate of about 1/10,000. -You can configure a higher rate by updating the active tracing params: - -```java -import io.opencensus.trace.Tracing; -import io.opencensus.trace.samplers.Samplers; - -Tracing.getTraceConfig().updateActiveTraceParams( - Tracing.getTraceConfig().getActiveTraceParams().toBuilder() - .setSampler(Samplers.probabilitySampler(0.01)) - .build() -); -``` - ### Disable Bigtbale traces -If your application already has OpenCensus Tracing integration and you want to disable Bigtable +If your application already has tracing integration and you want to disable Bigtable traces, you can do the following: ```java @@ -420,7 +345,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-bigtable/tree | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Native Image Bigtable Sample | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/native-image-sample/src/main/java/com/example/bigtable/NativeImageBigtableSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/native-image-sample/src/main/java/com/example/bigtable/NativeImageBigtableSample.java) | | Authorized View Example | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/AuthorizedViewExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/AuthorizedViewExample.java) | | Configure Connection Pool | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/ConfigureConnectionPool.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/ConfigureConnectionPool.java) | | Filters | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Filters.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Filters.java) | @@ -429,6 +353,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-bigtable/tree | Key Salting | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/KeySalting.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/KeySalting.java) | | Quickstart | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Quickstart.java) | | Reads | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Reads.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Reads.java) | +| Schema Bundle Example | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java) | | Table Admin Example | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java) | | Write Aggregate | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/WriteAggregate.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/WriteAggregate.java) | | Write Batch | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/WriteBatch.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/WriteBatch.java) | @@ -450,6 +375,10 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-bigtable/tree To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. +## Transport + +Cloud Bigtable uses gRPC for the transport layer. + ## Supported Java Versions Java 8 or above is required for using this client. @@ -517,32 +446,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/bigtable [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/history -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/java11.svg -[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-bigtable/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-bigtable.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.42.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.76.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 @@ -554,7 +464,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [contributing]: https://github.com/googleapis/java-bigtable/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/googleapis/java-bigtable/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct [license]: https://github.com/googleapis/java-bigtable/blob/main/LICENSE - +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/generation_config.yaml b/generation_config.yaml new file mode 100644 index 0000000000..656e9053e3 --- /dev/null +++ b/generation_config.yaml @@ -0,0 +1,38 @@ +gapic_generator_version: 2.69.0 +googleapis_commitish: 9a832ccde3f3ca4d4e1c39593b1cbf9aa62a75b3 +libraries_bom_version: 26.79.0 +template_excludes: + - .gitignore + - .kokoro/presubmit/integration.cfg + - .kokoro/presubmit/graalvm-native.cfg + - .kokoro/presubmit/graalvm-native-17.cfg + - .kokoro/nightly/integration.cfg + - .kokoro/presubmit/samples.cfg + - .kokoro/nightly/samples.cfg + - .github/ISSUE_TEMPLATE/bug_report.md + - .github/PULL_REQUEST_TEMPLATE.md + - .github/trusted-contribution.yml + - CONTRIBUTING.md + - codecov.yaml + - .github/release-please.yml + - renovate.json + - .kokoro/requirements.in + - .kokoro/requirements.txt +libraries: +- api_shortname: bigtable + api_description: API for reading and writing the contents of Bigtables associated with a cloud project. + name_pretty: Cloud Bigtable + product_documentation: https://cloud.google.com/bigtable + client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/history + issue_tracker: https://issuetracker.google.com/savedsearches/559777 + release_level: stable + distribution_name: com.google.cloud:google-cloud-bigtable + codeowner_team: '@googleapis/bigtable-team' + api_id: bigtable.googleapis.com + library_type: GAPIC_COMBO + extra_versioned_modules: google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core + excluded_poms: google-cloud-bigtable-bom + recommended_package: com.google.cloud.bigtable + GAPICs: + - proto_path: google/bigtable/v2 + - proto_path: google/bigtable/admin/v2 diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 601f177d9c..51246fbec2 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom com.google.cloud sdk-platform-java-config - 3.33.0 + 3.59.0 @@ -63,37 +63,37 @@ com.google.cloud google-cloud-bigtable - 2.42.0 + 2.76.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.179.0 + 0.213.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.179.0 + 0.213.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index 2e0ad747d6..428184966c 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -7,15 +7,16 @@ com.google.cloud sdk-platform-java-config - 3.33.0 + 3.59.0 com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom + Google Cloud Bigtable Dependency BOM A BOM that describes all of the dependencies used by google-cloud-bigtable. It's mainly intended to be used by java-bigtable-hbase to align dependencies @@ -63,10 +64,11 @@ + com.google.cloud gapic-libraries-bom - 1.41.0 + 1.82.0 pom import diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 69716aeaf7..32d0186612 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,12 @@ google-cloud-bigtable-parent com.google.cloud - 2.42.0 + 2.76.1-SNAPSHOT + Google Cloud Java - Bigtable Emulator Core google-cloud-bigtable-emulator-core - 0.179.0 + 0.213.1-SNAPSHOT A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator-core/src/main/java/com/google/cloud/bigtable/emulator/core/EmulatorController.java b/google-cloud-bigtable-emulator-core/src/main/java/com/google/cloud/bigtable/emulator/core/EmulatorController.java index 9ac9245f22..960581483b 100644 --- a/google-cloud-bigtable-emulator-core/src/main/java/com/google/cloud/bigtable/emulator/core/EmulatorController.java +++ b/google-cloud-bigtable-emulator-core/src/main/java/com/google/cloud/bigtable/emulator/core/EmulatorController.java @@ -44,6 +44,8 @@ public class EmulatorController { private final Path executable; private Process process; + private Thread stdoutThread; + private Thread stderrThread; private boolean isStopped = true; private Thread shutdownHook; @@ -52,6 +54,7 @@ public class EmulatorController { public static EmulatorController createFromPath(Path path) { return new EmulatorController(path); } + /** * Create a new instance of emulator. The emulator will use the bundled binaries in this jar. * Please note that the emulator is created in a stopped state, please use {@link #start()} after @@ -90,12 +93,15 @@ private EmulatorController(Path executable) { public synchronized boolean isRunning() { return !isStopped; } + /** Starts the emulator process and waits for it to be ready. */ - public synchronized void start() throws IOException, TimeoutException, InterruptedException { + public synchronized void start(int port) + throws IOException, TimeoutException, InterruptedException { if (!isStopped) { throw new IllegalStateException("Emulator is already started"); } - this.port = getAvailablePort(); + + this.port = port; // Try to align the localhost address across java & golang emulator // This should fix issues on systems that default to ipv4 but the jvm is started with @@ -123,17 +129,19 @@ public synchronized void start() throws IOException, TimeoutException, Interrupt throw e; } } - pipeStreamToLog(process.getInputStream(), Level.INFO); - pipeStreamToLog(process.getErrorStream(), Level.WARNING); + Thread stdoutThread = pipeStreamToLog(process.getInputStream(), Level.INFO); + Thread stderrThread = pipeStreamToLog(process.getErrorStream(), Level.WARNING); isStopped = false; shutdownHook = new Thread( () -> { - if (!isStopped) { - isStopped = true; - process.destroy(); + synchronized (EmulatorController.this) { + if (!isStopped) { + isStopped = true; + } } + process.destroy(); }); Runtime.getRuntime().addShutdownHook(shutdownHook); @@ -141,6 +149,11 @@ public synchronized void start() throws IOException, TimeoutException, Interrupt waitForPort(port); } + /** Starts the emulator process and waits for it to be ready. */ + public synchronized void start() throws IOException, TimeoutException, InterruptedException { + start(getAvailablePort()); + } + /** Stops the emulator process. */ public synchronized void stop() { if (isStopped) { @@ -153,6 +166,23 @@ public synchronized void stop() { } finally { isStopped = true; process.destroy(); + + try { + process.waitFor(); + if (stdoutThread != null) { + stdoutThread.join(); + } + if (stderrThread != null) { + stderrThread.join(); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + LOGGER.log(Level.WARNING, "Interrupted while waiting for emulator to stop", e); + } finally { + stdoutThread = null; + stderrThread = null; + process = null; + } } } @@ -162,6 +192,7 @@ public synchronized int getPort() { } return port; } + // /** Gets the current platform, which will be used to select the appropriate emulator binary. */ @@ -227,7 +258,7 @@ private static void waitForPort(int port) throws InterruptedException, TimeoutEx } /** Creates a thread that will pipe an {@link InputStream} to this class' Logger. */ - private static void pipeStreamToLog(final InputStream stream, final Level level) { + private static Thread pipeStreamToLog(final InputStream stream, final Level level) { final BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); Thread thread = @@ -246,6 +277,7 @@ private static void pipeStreamToLog(final InputStream stream, final Level level) }); thread.setDaemon(true); thread.start(); + return thread; } // } diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index 1578e56fad..a4025cead1 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.179.0 + 0.213.1-SNAPSHOT Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.179.0 + 0.213.1-SNAPSHOT diff --git a/google-cloud-bigtable-emulator/src/main/java/com/google/cloud/bigtable/emulator/v2/Emulator.java b/google-cloud-bigtable-emulator/src/main/java/com/google/cloud/bigtable/emulator/v2/Emulator.java index b30fad7ebb..32f028f1f0 100644 --- a/google-cloud-bigtable-emulator/src/main/java/com/google/cloud/bigtable/emulator/v2/Emulator.java +++ b/google-cloud-bigtable-emulator/src/main/java/com/google/cloud/bigtable/emulator/v2/Emulator.java @@ -43,6 +43,7 @@ public class Emulator { public static Emulator createFromPath(Path path) { return new Emulator(EmulatorController.createFromPath(path)); } + /** * Create a new instance of emulator. The emulator will use the bundled binaries in this jar. * Please note that the emulator is created in a stopped state, please use {@link #start()} after @@ -61,6 +62,11 @@ public synchronized void start() throws IOException, TimeoutException, Interrupt controller.start(); } + public synchronized void start(int port) + throws IOException, TimeoutException, InterruptedException { + controller.start(port); + } + /** Stops the emulator process. */ public synchronized void stop() { controller.stop(); @@ -116,6 +122,7 @@ public synchronized ManagedChannel getAdminChannel() { } return adminChannel; } + // /** Creates a {@link io.grpc.ManagedChannelBuilder} preconfigured for the emulator's port. */ diff --git a/google-cloud-bigtable-emulator/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-bigtable-emulator/native-image.properties b/google-cloud-bigtable-emulator/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-bigtable-emulator/native-image.properties new file mode 100644 index 0000000000..0c5258dc2c --- /dev/null +++ b/google-cloud-bigtable-emulator/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-bigtable-emulator/native-image.properties @@ -0,0 +1,3 @@ +Args=--initialize-at-build-time=org.junit.runners.model.FrameworkField \ +--initialize-at-build-time=org.junit.runner.RunWith \ +--initialize-at-build-time=java.lang.annotation.Annotation diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index fb5b514b3d..383f60a7c1 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -34,6 +34,13 @@ com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub * + + + 7005 + com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub + * + * + 7002 @@ -55,6 +62,10 @@ 8001 com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracer + + 8001 + com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionMetricTracker + 8001 @@ -259,4 +270,245 @@ com/google/cloud/bigtable/admin/v2/models/Type$Int64$Encoding$BigEndianBytes * + + + 7004 + com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub + * + + + 7004 + com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter + * + + + 7004 + com/google/cloud/bigtable/data/v2/stub/metrics/DefaultMetricsProvider + * + + + + 7006 + com/google/cloud/bigtable/data/v2/internal/* + *getTimestamp(*) + java.time.Instant + + + + 7013 + com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation + *get*Time() + + + + 7013 + com/google/cloud/bigtable/data/v2/models/Heartbeat + *getEstimatedLowWatermarkTime() + + + + 7012 + com/google/cloud/bigtable/data/v2/models/TargetId + *scopedForMaterializedView() + + + + 7009 + com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter + * + + + + 7005 + com/google/cloud/bigtable/data/v2/BigtableDataClient + *executeQuery* + * + + + + 8001 + com/google/cloud/bigtable/data/v2/models/sql/Statement + * + + + + 8001 + com/google/cloud/bigtable/data/v2/models/sql/Statement$Builder + * + + + + 8001 + com/google/cloud/bigtable/data/v2/models/sql/Statement$Builder + * + + + + 7012 + com/google/cloud/bigtable/data/v2/models/sql/StructReader + *getProtoMessage(*) + + + + 7012 + com/google/cloud/bigtable/data/v2/models/sql/StructReader + *getProtoEnum(*) + + + + 7012 + com/google/cloud/bigtable/data/v2/models/sql/SqlType + *protoOf(*) + + + 7004 + com/google/cloud/bigtable/common/Type$SchemalessProto + * + + + 7004 + com/google/cloud/bigtable/common/Type$SchemalessEnum + * + + + 7013 + com/google/cloud/bigtable/common/Type$SchemalessProto + * + + + 7013 + com/google/cloud/bigtable/common/Type$SchemalessEnum + * + + + + 7012 + com/google/cloud/bigtable/data/v2/models/sql/SqlType + *enumOf(*) + + + + 7012 + com/google/cloud/bigtable/data/v2/models/sql/SqlType + *getUnqualifiedName* + + + + 7004 + com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil + * + + + + 7004 + com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext + *ExecuteQueryCallContext* + + + + 7009 + com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext + *ExecuteQueryCallContext* + + + + 7005 + com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext + *create* + * + + + + 7004 + com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable + *ExecuteQueryCallable* + * + + + + 7005 + com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable + *call* + * + + + + 8001 + com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallable + + + + 7004 + com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger + * + * + + + + 7004 + com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool + *create* + * + + + + 7004 + com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider + *create* + * + + + 4001 + com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer + com/google/api/gax/grpc/ChannelPrimer + + + 4001 + com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer + com/google/api/gax/grpc/ChannelPrimer + + + 7005 + com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool + *create* + * + + + + 7005 + com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider + *create* + * + + + + 7006 + com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer + *sendPrimeRequestsAsync* + com.google.api.core.ApiFuture + + + + 7013 + com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings + com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings$LoadBalancingStrategy getLoadBalancingStrategy() + + + + 7013 + com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings$Builder + com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings$Builder setLoadBalancingStrategy(com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings$LoadBalancingStrategy) + + + + 7004 + com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings$InternalMetricsProvider + * + + + + 7004 + com/google/cloud/bigtable/data/v2/stub/metrics/Util + * + diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index e1b6c0b4a3..e5478cda66 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.42.0 + 2.76.1-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT - 2.42.0 + 2.76.1-SNAPSHOT google-cloud-bigtable @@ -34,8 +34,10 @@ + + - 1.65.0 - 3.25.4 + 1.76.3 + 4.33.2 @@ -52,14 +54,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import @@ -141,7 +143,6 @@ io.grpc grpc-alts - runtime org.checkerframework @@ -158,15 +159,9 @@ google-http-client-gson runtime - io.grpc grpc-stub - runtime io.grpc @@ -202,6 +197,18 @@ io.grpc grpc-protobuf + + io.grpc + grpc-opentelemetry + + + + + io.opentelemetry + opentelemetry-api + + + org.threeten threetenbp @@ -212,6 +219,10 @@ io.opentelemetry opentelemetry-api + + io.opentelemetry + opentelemetry-context + io.opentelemetry opentelemetry-sdk @@ -243,6 +254,11 @@ + + com.google.api.grpc + grpc-google-cloud-monitoring-v3 + test + com.google.api gax @@ -289,27 +305,11 @@ com.google.truth truth test - - - - - org.checkerframework - checker-qual - - com.google.truth.extensions truth-proto-extension test - - - - - org.checkerframework - checker-qual - - io.grpc @@ -326,11 +326,36 @@ junit test + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter + test + + + org.junit.vintage + junit-vintage-engine + test + + + org.junit.jupiter + junit-jupiter-engine + test + org.mockito mockito-core test + + org.mockito + mockito-junit-jupiter + test + com.google.guava guava-testlib @@ -339,6 +364,101 @@ + + enable-enforcer-rules + + + + !performRelease + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.6.2 + + + + enforce-valid-profile + + + + + + + enforce + + + + + + + org.codehaus.mojo + extra-enforcer-rules + 1.8.0 + + + org.apache.maven.shared + maven-dependency-tree + 3.3.0 + + + + + + + + error-prone + + + [17,) + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + true + + + -XDcompilePolicy=simple + --should-stop=ifError=FLOW + -Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -Xep:MissingSummary:OFF -Xep:InlineMeSuggester:OFF -Xep:AutoValueImmutableFields:OFF -Xep:ObjectEqualsForPrimitives:OFF -Xep:JavaDurationGetSecondsToToSeconds:OFF + + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + + + + + + enable-verbose-grpc-logs @@ -417,6 +537,7 @@ cloud ${bigtable.cfe-data-endpoint} ${bigtable.cfe-admin-endpoint} + ${bigtable.cfe-jwt-audience} ${bigtable.enable-grpc-logs} ${project.build.directory}/test-grpc-logs/prod-it @@ -467,6 +588,7 @@ cloud ${bigtable.cfe-data-batch-endpoint} ${bigtable.cfe-admin-endpoint} + ${bigtable.cfe-jwt-audience} ${bigtable.enable-grpc-logs} ${project.build.directory}/test-grpc-logs/prod-batch-it @@ -502,6 +624,7 @@ cloud ${bigtable.directpath-data-endpoint} ${bigtable.directpath-admin-endpoint} + ${bigtable.directpath-jwt-audience} ${bigtable.enable-grpc-logs} ${project.build.directory}/test-grpc-logs/directpath-it REQUIRE_DIRECT_PATH @@ -543,6 +666,7 @@ cloud ${bigtable.cfe-data-endpoint} ${bigtable.cfe-admin-endpoint} + ${bigtable.cfe-jwt-audience} ${bigtable.enable-grpc-logs} ${project.build.directory}/test-grpc-logs/cfe-it REQUIRE_CFE @@ -581,6 +705,7 @@ cloud ${bigtable.directpath-data-endpoint} ${bigtable.directpath-admin-endpoint} + ${bigtable.directpath-jwt-audience} ${bigtable.enable-grpc-logs} ${project.build.directory}/test-grpc-logs/directpath-ipv4only-it REQUIRE_DIRECT_PATH_IPV4 @@ -653,54 +778,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - 3.5.0 - - - - enforce-valid-profile - - - - - - - enforce - - - - - enforce-dependency-upper-bound - - - - - - - enforce - - - - - - - org.codehaus.mojo - extra-enforcer-rules - 1.8.0 - - - org.apache.maven.shared - maven-dependency-tree - 3.3.0 - - - - org.apache.maven.plugins maven-dependency-plugin @@ -709,7 +786,6 @@ grpc-auth is not directly used transitively, but is pulled to align with other grpc parts opencensus-impl-core is brought in transitively through opencensus-impl --> - io.grpc:grpc-auth io.opencensus:opencensus-impl-core diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java index 48b8950a19..4cadbcc4ef 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java @@ -20,6 +20,6 @@ @InternalApi("For internal use only") public final class Version { // {x-version-update-start:google-cloud-bigtable:current} - public static String VERSION = "2.42.0"; + public static String VERSION = "2.76.1-SNAPSHOT"; // {x-version-update-end} } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 749947a6f6..aadfd5b638 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; @@ -37,12 +36,20 @@ import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewMetadata; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.HotTablet; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.InstanceName; @@ -54,6 +61,14 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.LogicalViewName; +import com.google.bigtable.admin.v2.MaterializedView; +import com.google.bigtable.admin.v2.MaterializedViewName; import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; @@ -62,6 +77,10 @@ import com.google.bigtable.admin.v2.UpdateAppProfileRequest; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStub; import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -81,9 +100,677 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Service Description: Service for creating, configuring, and deleting Cloud Bigtable Instances and + * Clusters. Provides access to the Instance and Cluster schemas only, not the tables' metadata or + * data stored in those tables. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ *     BaseBigtableInstanceAdminClient.create()) {
+ *   InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
+ *   Instance response = baseBigtableInstanceAdminClient.getInstance(name);
+ * }
+ * }
+ * + *

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

CreateInstance

Create an instance within a project. + *

Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createInstanceAsync(CreateInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createInstanceAsync(ProjectName parent, String instanceId, Instance instance, Map<String, Cluster> clusters) + *

  • createInstanceAsync(String parent, String instanceId, Instance instance, Map<String, Cluster> clusters) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createInstanceOperationCallable() + *

  • createInstanceCallable() + *

+ *

GetInstance

Gets information about an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getInstance(GetInstanceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getInstance(InstanceName name) + *

  • getInstance(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getInstanceCallable() + *

+ *

ListInstances

Lists information about instances in a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstances(ListInstancesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstances(ProjectName parent) + *

  • listInstances(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancesCallable() + *

+ *

UpdateInstance

Updates an instance within a project. This method updates only the display name and type for an Instance. To update other Instance properties, such as labels, use PartialUpdateInstance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateInstance(Instance request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateInstanceCallable() + *

+ *

PartialUpdateInstance

Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • partialUpdateInstanceAsync(PartialUpdateInstanceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • partialUpdateInstanceAsync(Instance instance, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • partialUpdateInstanceOperationCallable() + *

  • partialUpdateInstanceCallable() + *

+ *

DeleteInstance

Delete an instance from a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteInstance(DeleteInstanceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteInstance(InstanceName name) + *

  • deleteInstance(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteInstanceCallable() + *

+ *

CreateCluster

Creates a cluster within an instance. + *

Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createClusterAsync(CreateClusterRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createClusterAsync(InstanceName parent, String clusterId, Cluster cluster) + *

  • createClusterAsync(String parent, String clusterId, Cluster cluster) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createClusterOperationCallable() + *

  • createClusterCallable() + *

+ *

GetCluster

Gets information about a cluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCluster(GetClusterRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCluster(ClusterName name) + *

  • getCluster(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getClusterCallable() + *

+ *

ListClusters

Lists information about clusters in an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listClusters(ListClustersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listClusters(InstanceName parent) + *

  • listClusters(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listClustersCallable() + *

+ *

UpdateCluster

Updates a cluster within an instance. + *

Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateClusterAsync(Cluster request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateClusterOperationCallable() + *

  • updateClusterCallable() + *

+ *

PartialUpdateCluster

Partially updates a cluster within a project. This method is the preferred way to update a Cluster. + *

To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the update_mask. + *

To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • partialUpdateClusterAsync(PartialUpdateClusterRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • partialUpdateClusterAsync(Cluster cluster, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • partialUpdateClusterOperationCallable() + *

  • partialUpdateClusterCallable() + *

+ *

DeleteCluster

Deletes a cluster from an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCluster(DeleteClusterRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteCluster(ClusterName name) + *

  • deleteCluster(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteClusterCallable() + *

+ *

CreateAppProfile

Creates an app profile within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAppProfile(CreateAppProfileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createAppProfile(InstanceName parent, String appProfileId, AppProfile appProfile) + *

  • createAppProfile(String parent, String appProfileId, AppProfile appProfile) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAppProfileCallable() + *

+ *

GetAppProfile

Gets information about an app profile.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAppProfile(GetAppProfileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAppProfile(AppProfileName name) + *

  • getAppProfile(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAppProfileCallable() + *

+ *

ListAppProfiles

Lists information about app profiles in an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAppProfiles(ListAppProfilesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAppProfiles(InstanceName parent) + *

  • listAppProfiles(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAppProfilesPagedCallable() + *

  • listAppProfilesCallable() + *

+ *

UpdateAppProfile

Updates an app profile within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAppProfileAsync(UpdateAppProfileRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateAppProfileAsync(AppProfile appProfile, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAppProfileOperationCallable() + *

  • updateAppProfileCallable() + *

+ *

DeleteAppProfile

Deletes an app profile from an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAppProfile(DeleteAppProfileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteAppProfile(AppProfileName name) + *

  • deleteAppProfile(String name) + *

  • deleteAppProfile(AppProfileName name, boolean ignoreWarnings) + *

  • deleteAppProfile(String name, boolean ignoreWarnings) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAppProfileCallable() + *

+ *

GetIamPolicy

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *

  • getIamPolicy(String resource) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

SetIamPolicy

Sets the access control policy on an instance resource. Replaces any existing policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *

  • setIamPolicy(String resource, Policy policy) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that the caller has on the specified instance resource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List<String> permissions) + *

  • testIamPermissions(String resource, List<String> permissions) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *

ListHotTablets

Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listHotTablets(ListHotTabletsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listHotTablets(ClusterName parent) + *

  • listHotTablets(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listHotTabletsPagedCallable() + *

  • listHotTabletsCallable() + *

+ *

CreateLogicalView

Creates a logical view within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createLogicalViewAsync(CreateLogicalViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createLogicalViewAsync(InstanceName parent, LogicalView logicalView, String logicalViewId) + *

  • createLogicalViewAsync(String parent, LogicalView logicalView, String logicalViewId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createLogicalViewOperationCallable() + *

  • createLogicalViewCallable() + *

+ *

GetLogicalView

Gets information about a logical view.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLogicalView(GetLogicalViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getLogicalView(LogicalViewName name) + *

  • getLogicalView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLogicalViewCallable() + *

+ *

ListLogicalViews

Lists information about logical views in an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLogicalViews(ListLogicalViewsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listLogicalViews(InstanceName parent) + *

  • listLogicalViews(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLogicalViewsPagedCallable() + *

  • listLogicalViewsCallable() + *

+ *

UpdateLogicalView

Updates a logical view within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateLogicalViewAsync(UpdateLogicalViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateLogicalViewAsync(LogicalView logicalView, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateLogicalViewOperationCallable() + *

  • updateLogicalViewCallable() + *

+ *

DeleteLogicalView

Deletes a logical view from an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteLogicalView(DeleteLogicalViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteLogicalView(LogicalViewName name) + *

  • deleteLogicalView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteLogicalViewCallable() + *

+ *

CreateMaterializedView

Creates a materialized view within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createMaterializedViewAsync(CreateMaterializedViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createMaterializedViewAsync(InstanceName parent, MaterializedView materializedView, String materializedViewId) + *

  • createMaterializedViewAsync(String parent, MaterializedView materializedView, String materializedViewId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createMaterializedViewOperationCallable() + *

  • createMaterializedViewCallable() + *

+ *

GetMaterializedView

Gets information about a materialized view.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getMaterializedView(GetMaterializedViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getMaterializedView(MaterializedViewName name) + *

  • getMaterializedView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getMaterializedViewCallable() + *

+ *

ListMaterializedViews

Lists information about materialized views in an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listMaterializedViews(ListMaterializedViewsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listMaterializedViews(InstanceName parent) + *

  • listMaterializedViews(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listMaterializedViewsPagedCallable() + *

  • listMaterializedViewsCallable() + *

+ *

UpdateMaterializedView

Updates a materialized view within an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateMaterializedViewAsync(UpdateMaterializedViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateMaterializedViewAsync(MaterializedView materializedView, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateMaterializedViewOperationCallable() + *

  • updateMaterializedViewCallable() + *

+ *

DeleteMaterializedView

Deletes a materialized view from an instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteMaterializedView(DeleteMaterializedViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteMaterializedView(MaterializedViewName name) + *

  • deleteMaterializedView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteMaterializedViewCallable() + *

+ *
+ * + *

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

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

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
+ *     BaseBigtableInstanceAdminSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ *     BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
+ *     BaseBigtableInstanceAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ *     BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") public class BaseBigtableInstanceAdminClient implements BackgroundResource { private final BaseBigtableInstanceAdminSettings settings; private final BigtableInstanceAdminStub stub; @@ -185,7 +872,7 @@ public final OperationsClient getOperationsClient() { * @param clusters Required. The clusters to be created within the instance, mapped by desired * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` - * must be left blank. Currently, at most four clusters can be specified. + * must be left blank. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( @@ -239,7 +926,7 @@ public final OperationFuture createInstanceAsy * @param clusters Required. The clusters to be created within the instance, mapped by desired * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` - * must be left blank. Currently, at most four clusters can be specified. + * must be left blank. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createInstanceAsync( @@ -623,6 +1310,8 @@ public final UnaryCallable listInst * .putAllLabels(new HashMap()) * .setCreateTime(Timestamp.newBuilder().build()) * .setSatisfiesPzs(true) + * .setSatisfiesPzi(true) + * .putAllTags(new HashMap()) * .build(); * Instance response = baseBigtableInstanceAdminClient.updateInstance(request); * } @@ -657,6 +1346,8 @@ public final Instance updateInstance(Instance request) { * .putAllLabels(new HashMap()) * .setCreateTime(Timestamp.newBuilder().build()) * .setSatisfiesPzs(true) + * .setSatisfiesPzi(true) + * .putAllTags(new HashMap()) * .build(); * ApiFuture future = * baseBigtableInstanceAdminClient.updateInstanceCallable().futureCall(request); @@ -2385,6 +3076,74 @@ public final void deleteAppProfile(String name) { deleteAppProfile(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an app profile from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
+   *   boolean ignoreWarnings = true;
+   *   baseBigtableInstanceAdminClient.deleteAppProfile(name, ignoreWarnings);
+   * }
+   * }
+ * + * @param name Required. The unique name of the app profile to be deleted. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * @param ignoreWarnings Required. If true, ignore safety checks when deleting the app profile. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAppProfile(AppProfileName name, boolean ignoreWarnings) { + DeleteAppProfileRequest request = + DeleteAppProfileRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setIgnoreWarnings(ignoreWarnings) + .build(); + deleteAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an app profile from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
+   *   boolean ignoreWarnings = true;
+   *   baseBigtableInstanceAdminClient.deleteAppProfile(name, ignoreWarnings);
+   * }
+   * }
+ * + * @param name Required. The unique name of the app profile to be deleted. Values are of the form + * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. + * @param ignoreWarnings Required. If true, ignore safety checks when deleting the app profile. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAppProfile(String name, boolean ignoreWarnings) { + DeleteAppProfileRequest request = + DeleteAppProfileRequest.newBuilder() + .setName(name) + .setIgnoreWarnings(ignoreWarnings) + .build(); + deleteAppProfile(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an app profile from an instance. @@ -3022,64 +3781,1531 @@ public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest re return stub.listHotTabletsCallable(); } - @Override - public final void close() { - stub.close(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   LogicalView logicalView = LogicalView.newBuilder().build();
+   *   String logicalViewId = "logicalViewId-1408054263";
+   *   LogicalView response =
+   *       baseBigtableInstanceAdminClient
+   *           .createLogicalViewAsync(parent, logicalView, logicalViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent instance where this logical view will be created. Format: + * `projects/{project}/instances/{instance}`. + * @param logicalView Required. The logical view to create. + * @param logicalViewId Required. The ID to use for the logical view, which will become the final + * component of the logical view's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLogicalViewAsync( + InstanceName parent, LogicalView logicalView, String logicalViewId) { + CreateLogicalViewRequest request = + CreateLogicalViewRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLogicalView(logicalView) + .setLogicalViewId(logicalViewId) + .build(); + return createLogicalViewAsync(request); } - @Override - public void shutdown() { - stub.shutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   LogicalView logicalView = LogicalView.newBuilder().build();
+   *   String logicalViewId = "logicalViewId-1408054263";
+   *   LogicalView response =
+   *       baseBigtableInstanceAdminClient
+   *           .createLogicalViewAsync(parent, logicalView, logicalViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent instance where this logical view will be created. Format: + * `projects/{project}/instances/{instance}`. + * @param logicalView Required. The logical view to create. + * @param logicalViewId Required. The ID to use for the logical view, which will become the final + * component of the logical view's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLogicalViewAsync( + String parent, LogicalView logicalView, String logicalViewId) { + CreateLogicalViewRequest request = + CreateLogicalViewRequest.newBuilder() + .setParent(parent) + .setLogicalView(logicalView) + .setLogicalViewId(logicalViewId) + .build(); + return createLogicalViewAsync(request); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateLogicalViewRequest request =
+   *       CreateLogicalViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setLogicalViewId("logicalViewId-1408054263")
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .build();
+   *   LogicalView response = baseBigtableInstanceAdminClient.createLogicalViewAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createLogicalViewAsync( + CreateLogicalViewRequest request) { + return createLogicalViewOperationCallable().futureCall(request); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateLogicalViewRequest request =
+   *       CreateLogicalViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setLogicalViewId("logicalViewId-1408054263")
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       baseBigtableInstanceAdminClient.createLogicalViewOperationCallable().futureCall(request);
+   *   // Do something.
+   *   LogicalView response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createLogicalViewOperationCallable() { + return stub.createLogicalViewOperationCallable(); } - @Override - public void shutdownNow() { - stub.shutdownNow(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateLogicalViewRequest request =
+   *       CreateLogicalViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setLogicalViewId("logicalViewId-1408054263")
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.createLogicalViewCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createLogicalViewCallable() { + return stub.createLogicalViewCallable(); } - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a logical view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]");
+   *   LogicalView response = baseBigtableInstanceAdminClient.getLogicalView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the requested logical view. Values are of the form + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalView getLogicalView(LogicalViewName name) { + GetLogicalViewRequest request = + GetLogicalViewRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLogicalView(request); } - public static class ListAppProfilesPagedResponse - extends AbstractPagedListResponse< - ListAppProfilesRequest, - ListAppProfilesResponse, - AppProfile, - ListAppProfilesPage, - ListAppProfilesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAppProfilesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListAppProfilesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListAppProfilesPagedResponse(ListAppProfilesPage page) { - super(page, ListAppProfilesFixedSizeCollection.createEmptyCollection()); - } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a logical view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString();
+   *   LogicalView response = baseBigtableInstanceAdminClient.getLogicalView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the requested logical view. Values are of the form + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalView getLogicalView(String name) { + GetLogicalViewRequest request = GetLogicalViewRequest.newBuilder().setName(name).build(); + return getLogicalView(request); } - public static class ListAppProfilesPage - extends AbstractPage< - ListAppProfilesRequest, ListAppProfilesResponse, AppProfile, ListAppProfilesPage> { - + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a logical view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   GetLogicalViewRequest request =
+   *       GetLogicalViewRequest.newBuilder()
+   *           .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString())
+   *           .build();
+   *   LogicalView response = baseBigtableInstanceAdminClient.getLogicalView(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalView getLogicalView(GetLogicalViewRequest request) { + return getLogicalViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a logical view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   GetLogicalViewRequest request =
+   *       GetLogicalViewRequest.newBuilder()
+   *           .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.getLogicalViewCallable().futureCall(request);
+   *   // Do something.
+   *   LogicalView response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLogicalViewCallable() { + return stub.getLogicalViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about logical views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   for (LogicalView element :
+   *       baseBigtableInstanceAdminClient.listLogicalViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The unique name of the instance for which the list of logical views is + * requested. Values are of the form `projects/{project}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalViewsPagedResponse listLogicalViews(InstanceName parent) { + ListLogicalViewsRequest request = + ListLogicalViewsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLogicalViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about logical views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   for (LogicalView element :
+   *       baseBigtableInstanceAdminClient.listLogicalViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The unique name of the instance for which the list of logical views is + * requested. Values are of the form `projects/{project}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalViewsPagedResponse listLogicalViews(String parent) { + ListLogicalViewsRequest request = + ListLogicalViewsRequest.newBuilder().setParent(parent).build(); + return listLogicalViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about logical views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListLogicalViewsRequest request =
+   *       ListLogicalViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (LogicalView element :
+   *       baseBigtableInstanceAdminClient.listLogicalViews(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalViewsPagedResponse listLogicalViews(ListLogicalViewsRequest request) { + return listLogicalViewsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about logical views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListLogicalViewsRequest request =
+   *       ListLogicalViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.listLogicalViewsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (LogicalView element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLogicalViewsPagedCallable() { + return stub.listLogicalViewsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about logical views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListLogicalViewsRequest request =
+   *       ListLogicalViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLogicalViewsResponse response =
+   *         baseBigtableInstanceAdminClient.listLogicalViewsCallable().call(request);
+   *     for (LogicalView element : response.getLogicalViewsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLogicalViewsCallable() { + return stub.listLogicalViewsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   LogicalView logicalView = LogicalView.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   LogicalView response =
+   *       baseBigtableInstanceAdminClient.updateLogicalViewAsync(logicalView, updateMask).get();
+   * }
+   * }
+ * + * @param logicalView Required. The logical view to update. + *

The logical view's `name` field is used to identify the view to update. Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateLogicalViewAsync( + LogicalView logicalView, FieldMask updateMask) { + UpdateLogicalViewRequest request = + UpdateLogicalViewRequest.newBuilder() + .setLogicalView(logicalView) + .setUpdateMask(updateMask) + .build(); + return updateLogicalViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateLogicalViewRequest request =
+   *       UpdateLogicalViewRequest.newBuilder()
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   LogicalView response = baseBigtableInstanceAdminClient.updateLogicalViewAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateLogicalViewAsync( + UpdateLogicalViewRequest request) { + return updateLogicalViewOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateLogicalViewRequest request =
+   *       UpdateLogicalViewRequest.newBuilder()
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       baseBigtableInstanceAdminClient.updateLogicalViewOperationCallable().futureCall(request);
+   *   // Do something.
+   *   LogicalView response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateLogicalViewOperationCallable() { + return stub.updateLogicalViewOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a logical view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateLogicalViewRequest request =
+   *       UpdateLogicalViewRequest.newBuilder()
+   *           .setLogicalView(LogicalView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.updateLogicalViewCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateLogicalViewCallable() { + return stub.updateLogicalViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a logical view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]");
+   *   baseBigtableInstanceAdminClient.deleteLogicalView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the logical view to be deleted. Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogicalView(LogicalViewName name) { + DeleteLogicalViewRequest request = + DeleteLogicalViewRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteLogicalView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a logical view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString();
+   *   baseBigtableInstanceAdminClient.deleteLogicalView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the logical view to be deleted. Format: + * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogicalView(String name) { + DeleteLogicalViewRequest request = DeleteLogicalViewRequest.newBuilder().setName(name).build(); + deleteLogicalView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a logical view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   DeleteLogicalViewRequest request =
+   *       DeleteLogicalViewRequest.newBuilder()
+   *           .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   baseBigtableInstanceAdminClient.deleteLogicalView(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteLogicalView(DeleteLogicalViewRequest request) { + deleteLogicalViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a logical view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   DeleteLogicalViewRequest request =
+   *       DeleteLogicalViewRequest.newBuilder()
+   *           .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.deleteLogicalViewCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteLogicalViewCallable() { + return stub.deleteLogicalViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   MaterializedView materializedView = MaterializedView.newBuilder().build();
+   *   String materializedViewId = "materializedViewId682270903";
+   *   MaterializedView response =
+   *       baseBigtableInstanceAdminClient
+   *           .createMaterializedViewAsync(parent, materializedView, materializedViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent instance where this materialized view will be created. + * Format: `projects/{project}/instances/{instance}`. + * @param materializedView Required. The materialized view to create. + * @param materializedViewId Required. The ID to use for the materialized view, which will become + * the final component of the materialized view's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createMaterializedViewAsync( + InstanceName parent, MaterializedView materializedView, String materializedViewId) { + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMaterializedView(materializedView) + .setMaterializedViewId(materializedViewId) + .build(); + return createMaterializedViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   MaterializedView materializedView = MaterializedView.newBuilder().build();
+   *   String materializedViewId = "materializedViewId682270903";
+   *   MaterializedView response =
+   *       baseBigtableInstanceAdminClient
+   *           .createMaterializedViewAsync(parent, materializedView, materializedViewId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent instance where this materialized view will be created. + * Format: `projects/{project}/instances/{instance}`. + * @param materializedView Required. The materialized view to create. + * @param materializedViewId Required. The ID to use for the materialized view, which will become + * the final component of the materialized view's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createMaterializedViewAsync( + String parent, MaterializedView materializedView, String materializedViewId) { + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.newBuilder() + .setParent(parent) + .setMaterializedView(materializedView) + .setMaterializedViewId(materializedViewId) + .build(); + return createMaterializedViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateMaterializedViewRequest request =
+   *       CreateMaterializedViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setMaterializedViewId("materializedViewId682270903")
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .build();
+   *   MaterializedView response =
+   *       baseBigtableInstanceAdminClient.createMaterializedViewAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createMaterializedViewAsync(CreateMaterializedViewRequest request) { + return createMaterializedViewOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateMaterializedViewRequest request =
+   *       CreateMaterializedViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setMaterializedViewId("materializedViewId682270903")
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       baseBigtableInstanceAdminClient
+   *           .createMaterializedViewOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   MaterializedView response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationCallable() { + return stub.createMaterializedViewOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   CreateMaterializedViewRequest request =
+   *       CreateMaterializedViewRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setMaterializedViewId("materializedViewId682270903")
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.createMaterializedViewCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMaterializedViewCallable() { + return stub.createMaterializedViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a materialized view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   MaterializedViewName name =
+   *       MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]");
+   *   MaterializedView response = baseBigtableInstanceAdminClient.getMaterializedView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the requested materialized view. Values are of the + * form `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MaterializedView getMaterializedView(MaterializedViewName name) { + GetMaterializedViewRequest request = + GetMaterializedViewRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getMaterializedView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a materialized view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String name =
+   *       MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]").toString();
+   *   MaterializedView response = baseBigtableInstanceAdminClient.getMaterializedView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the requested materialized view. Values are of the + * form `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MaterializedView getMaterializedView(String name) { + GetMaterializedViewRequest request = + GetMaterializedViewRequest.newBuilder().setName(name).build(); + return getMaterializedView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a materialized view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   GetMaterializedViewRequest request =
+   *       GetMaterializedViewRequest.newBuilder()
+   *           .setName(
+   *               MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]")
+   *                   .toString())
+   *           .build();
+   *   MaterializedView response = baseBigtableInstanceAdminClient.getMaterializedView(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final MaterializedView getMaterializedView(GetMaterializedViewRequest request) { + return getMaterializedViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a materialized view. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   GetMaterializedViewRequest request =
+   *       GetMaterializedViewRequest.newBuilder()
+   *           .setName(
+   *               MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.getMaterializedViewCallable().futureCall(request);
+   *   // Do something.
+   *   MaterializedView response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getMaterializedViewCallable() { + return stub.getMaterializedViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about materialized views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   for (MaterializedView element :
+   *       baseBigtableInstanceAdminClient.listMaterializedViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The unique name of the instance for which the list of materialized + * views is requested. Values are of the form `projects/{project}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMaterializedViewsPagedResponse listMaterializedViews(InstanceName parent) { + ListMaterializedViewsRequest request = + ListMaterializedViewsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMaterializedViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about materialized views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   for (MaterializedView element :
+   *       baseBigtableInstanceAdminClient.listMaterializedViews(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The unique name of the instance for which the list of materialized + * views is requested. Values are of the form `projects/{project}/instances/{instance}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMaterializedViewsPagedResponse listMaterializedViews(String parent) { + ListMaterializedViewsRequest request = + ListMaterializedViewsRequest.newBuilder().setParent(parent).build(); + return listMaterializedViews(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about materialized views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListMaterializedViewsRequest request =
+   *       ListMaterializedViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MaterializedView element :
+   *       baseBigtableInstanceAdminClient.listMaterializedViews(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMaterializedViewsPagedResponse listMaterializedViews( + ListMaterializedViewsRequest request) { + return listMaterializedViewsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about materialized views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListMaterializedViewsRequest request =
+   *       ListMaterializedViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.listMaterializedViewsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (MaterializedView element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMaterializedViewsPagedCallable() { + return stub.listMaterializedViewsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about materialized views in an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   ListMaterializedViewsRequest request =
+   *       ListMaterializedViewsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListMaterializedViewsResponse response =
+   *         baseBigtableInstanceAdminClient.listMaterializedViewsCallable().call(request);
+   *     for (MaterializedView element : response.getMaterializedViewsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listMaterializedViewsCallable() { + return stub.listMaterializedViewsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   MaterializedView materializedView = MaterializedView.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   MaterializedView response =
+   *       baseBigtableInstanceAdminClient
+   *           .updateMaterializedViewAsync(materializedView, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param materializedView Required. The materialized view to update. + *

The materialized view's `name` field is used to identify the view to update. Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateMaterializedViewAsync(MaterializedView materializedView, FieldMask updateMask) { + UpdateMaterializedViewRequest request = + UpdateMaterializedViewRequest.newBuilder() + .setMaterializedView(materializedView) + .setUpdateMask(updateMask) + .build(); + return updateMaterializedViewAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateMaterializedViewRequest request =
+   *       UpdateMaterializedViewRequest.newBuilder()
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   MaterializedView response =
+   *       baseBigtableInstanceAdminClient.updateMaterializedViewAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateMaterializedViewAsync(UpdateMaterializedViewRequest request) { + return updateMaterializedViewOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateMaterializedViewRequest request =
+   *       UpdateMaterializedViewRequest.newBuilder()
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       baseBigtableInstanceAdminClient
+   *           .updateMaterializedViewOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   MaterializedView response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationCallable() { + return stub.updateMaterializedViewOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a materialized view within an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   UpdateMaterializedViewRequest request =
+   *       UpdateMaterializedViewRequest.newBuilder()
+   *           .setMaterializedView(MaterializedView.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.updateMaterializedViewCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMaterializedViewCallable() { + return stub.updateMaterializedViewCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a materialized view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   MaterializedViewName name =
+   *       MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]");
+   *   baseBigtableInstanceAdminClient.deleteMaterializedView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the materialized view to be deleted. Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMaterializedView(MaterializedViewName name) { + DeleteMaterializedViewRequest request = + DeleteMaterializedViewRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteMaterializedView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a materialized view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   String name =
+   *       MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]").toString();
+   *   baseBigtableInstanceAdminClient.deleteMaterializedView(name);
+   * }
+   * }
+ * + * @param name Required. The unique name of the materialized view to be deleted. Format: + * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMaterializedView(String name) { + DeleteMaterializedViewRequest request = + DeleteMaterializedViewRequest.newBuilder().setName(name).build(); + deleteMaterializedView(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a materialized view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   DeleteMaterializedViewRequest request =
+   *       DeleteMaterializedViewRequest.newBuilder()
+   *           .setName(
+   *               MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   baseBigtableInstanceAdminClient.deleteMaterializedView(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteMaterializedView(DeleteMaterializedViewRequest request) { + deleteMaterializedViewCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a materialized view from an instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+   *     BaseBigtableInstanceAdminClient.create()) {
+   *   DeleteMaterializedViewRequest request =
+   *       DeleteMaterializedViewRequest.newBuilder()
+   *           .setName(
+   *               MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       baseBigtableInstanceAdminClient.deleteMaterializedViewCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteMaterializedViewCallable() { + return stub.deleteMaterializedViewCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAppProfilesPagedResponse + extends AbstractPagedListResponse< + ListAppProfilesRequest, + ListAppProfilesResponse, + AppProfile, + ListAppProfilesPage, + ListAppProfilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAppProfilesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAppProfilesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAppProfilesPagedResponse(ListAppProfilesPage page) { + super(page, ListAppProfilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAppProfilesPage + extends AbstractPage< + ListAppProfilesRequest, ListAppProfilesResponse, AppProfile, ListAppProfilesPage> { + private ListAppProfilesPage( PageContext context, ListAppProfilesResponse response) { @@ -3204,4 +5430,165 @@ protected ListHotTabletsFixedSizeCollection createCollection( return new ListHotTabletsFixedSizeCollection(pages, collectionSize); } } + + public static class ListLogicalViewsPagedResponse + extends AbstractPagedListResponse< + ListLogicalViewsRequest, + ListLogicalViewsResponse, + LogicalView, + ListLogicalViewsPage, + ListLogicalViewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLogicalViewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLogicalViewsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLogicalViewsPagedResponse(ListLogicalViewsPage page) { + super(page, ListLogicalViewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLogicalViewsPage + extends AbstractPage< + ListLogicalViewsRequest, ListLogicalViewsResponse, LogicalView, ListLogicalViewsPage> { + + private ListLogicalViewsPage( + PageContext context, + ListLogicalViewsResponse response) { + super(context, response); + } + + private static ListLogicalViewsPage createEmptyPage() { + return new ListLogicalViewsPage(null, null); + } + + @Override + protected ListLogicalViewsPage createPage( + PageContext context, + ListLogicalViewsResponse response) { + return new ListLogicalViewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLogicalViewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLogicalViewsRequest, + ListLogicalViewsResponse, + LogicalView, + ListLogicalViewsPage, + ListLogicalViewsFixedSizeCollection> { + + private ListLogicalViewsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLogicalViewsFixedSizeCollection createEmptyCollection() { + return new ListLogicalViewsFixedSizeCollection(null, 0); + } + + @Override + protected ListLogicalViewsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLogicalViewsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMaterializedViewsPagedResponse + extends AbstractPagedListResponse< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + MaterializedView, + ListMaterializedViewsPage, + ListMaterializedViewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMaterializedViewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMaterializedViewsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMaterializedViewsPagedResponse(ListMaterializedViewsPage page) { + super(page, ListMaterializedViewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMaterializedViewsPage + extends AbstractPage< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + MaterializedView, + ListMaterializedViewsPage> { + + private ListMaterializedViewsPage( + PageContext + context, + ListMaterializedViewsResponse response) { + super(context, response); + } + + private static ListMaterializedViewsPage createEmptyPage() { + return new ListMaterializedViewsPage(null, null); + } + + @Override + protected ListMaterializedViewsPage createPage( + PageContext + context, + ListMaterializedViewsResponse response) { + return new ListMaterializedViewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMaterializedViewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + MaterializedView, + ListMaterializedViewsPage, + ListMaterializedViewsFixedSizeCollection> { + + private ListMaterializedViewsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMaterializedViewsFixedSizeCollection createEmptyCollection() { + return new ListMaterializedViewsFixedSizeCollection(null, 0); + } + + @Override + protected ListMaterializedViewsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMaterializedViewsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java index 65b582f74a..87fa4df55f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,9 +18,10 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; import com.google.api.core.ApiFunction; -import com.google.api.core.InternalApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; @@ -38,12 +39,20 @@ import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewMetadata; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.ListAppProfilesRequest; import com.google.bigtable.admin.v2.ListAppProfilesResponse; @@ -53,6 +62,12 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.MaterializedView; import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; @@ -60,6 +75,10 @@ import com.google.bigtable.admin.v2.UpdateAppProfileRequest; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStubSettings; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -73,9 +92,83 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Settings class to configure an instance of {@link BaseBigtableInstanceAdminClient}. + * + *

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

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

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

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getInstance: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
+ *     BaseBigtableInstanceAdminSettings.newBuilder();
+ * baseBigtableInstanceAdminSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         baseBigtableInstanceAdminSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
+ *     baseBigtableInstanceAdminSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * 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 + * configure the RetrySettings for createInstance: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
+ *     BaseBigtableInstanceAdminSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * baseBigtableInstanceAdminSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") public class BaseBigtableInstanceAdminSettings extends ClientSettings { @@ -101,6 +194,11 @@ public UnaryCallSettings listInstan return ((BigtableInstanceAdminStubSettings) getStubSettings()).listInstancesSettings(); } + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateInstanceSettings(); + } + /** Returns the object with the settings used for calls to partialUpdateInstance. */ public UnaryCallSettings partialUpdateInstanceSettings() { @@ -225,6 +323,95 @@ public UnaryCallSettings setIamPolicySettings() { return ((BigtableInstanceAdminStubSettings) getStubSettings()).listHotTabletsSettings(); } + /** Returns the object with the settings used for calls to createLogicalView. */ + public UnaryCallSettings createLogicalViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).createLogicalViewSettings(); + } + + /** Returns the object with the settings used for calls to createLogicalView. */ + public OperationCallSettings + createLogicalViewOperationSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()) + .createLogicalViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to getLogicalView. */ + public UnaryCallSettings getLogicalViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).getLogicalViewSettings(); + } + + /** Returns the object with the settings used for calls to listLogicalViews. */ + public PagedCallSettings< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).listLogicalViewsSettings(); + } + + /** Returns the object with the settings used for calls to updateLogicalView. */ + public UnaryCallSettings updateLogicalViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateLogicalViewSettings(); + } + + /** Returns the object with the settings used for calls to updateLogicalView. */ + public OperationCallSettings + updateLogicalViewOperationSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()) + .updateLogicalViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteLogicalView. */ + public UnaryCallSettings deleteLogicalViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).deleteLogicalViewSettings(); + } + + /** Returns the object with the settings used for calls to createMaterializedView. */ + public UnaryCallSettings + createMaterializedViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).createMaterializedViewSettings(); + } + + /** Returns the object with the settings used for calls to createMaterializedView. */ + public OperationCallSettings< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()) + .createMaterializedViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to getMaterializedView. */ + public UnaryCallSettings + getMaterializedViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).getMaterializedViewSettings(); + } + + /** Returns the object with the settings used for calls to listMaterializedViews. */ + public PagedCallSettings< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).listMaterializedViewsSettings(); + } + + /** Returns the object with the settings used for calls to updateMaterializedView. */ + public UnaryCallSettings + updateMaterializedViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateMaterializedViewSettings(); + } + + /** Returns the object with the settings used for calls to updateMaterializedView. */ + public OperationCallSettings< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()) + .updateMaterializedViewOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteMaterializedView. */ + public UnaryCallSettings deleteMaterializedViewSettings() { + return ((BigtableInstanceAdminStubSettings) getStubSettings()).deleteMaterializedViewSettings(); + } + public static final BaseBigtableInstanceAdminSettings create( BigtableInstanceAdminStubSettings stub) throws IOException { return new BaseBigtableInstanceAdminSettings.Builder(stub.toBuilder()).build(); @@ -344,6 +531,11 @@ public UnaryCallSettings.Builder getInstanceSettin return getStubSettingsBuilder().listInstancesSettings(); } + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder updateInstanceSettings() { + return getStubSettingsBuilder().updateInstanceSettings(); + } + /** Returns the builder for the settings used for calls to partialUpdateInstance. */ public UnaryCallSettings.Builder partialUpdateInstanceSettings() { @@ -472,6 +664,96 @@ public UnaryCallSettings.Builder setIamPolicySettin return getStubSettingsBuilder().listHotTabletsSettings(); } + /** Returns the builder for the settings used for calls to createLogicalView. */ + public UnaryCallSettings.Builder + createLogicalViewSettings() { + return getStubSettingsBuilder().createLogicalViewSettings(); + } + + /** Returns the builder for the settings used for calls to createLogicalView. */ + public OperationCallSettings.Builder< + CreateLogicalViewRequest, LogicalView, CreateLogicalViewMetadata> + createLogicalViewOperationSettings() { + return getStubSettingsBuilder().createLogicalViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getLogicalView. */ + public UnaryCallSettings.Builder getLogicalViewSettings() { + return getStubSettingsBuilder().getLogicalViewSettings(); + } + + /** Returns the builder for the settings used for calls to listLogicalViews. */ + public PagedCallSettings.Builder< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings() { + return getStubSettingsBuilder().listLogicalViewsSettings(); + } + + /** Returns the builder for the settings used for calls to updateLogicalView. */ + public UnaryCallSettings.Builder + updateLogicalViewSettings() { + return getStubSettingsBuilder().updateLogicalViewSettings(); + } + + /** Returns the builder for the settings used for calls to updateLogicalView. */ + public OperationCallSettings.Builder< + UpdateLogicalViewRequest, LogicalView, UpdateLogicalViewMetadata> + updateLogicalViewOperationSettings() { + return getStubSettingsBuilder().updateLogicalViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteLogicalView. */ + public UnaryCallSettings.Builder deleteLogicalViewSettings() { + return getStubSettingsBuilder().deleteLogicalViewSettings(); + } + + /** Returns the builder for the settings used for calls to createMaterializedView. */ + public UnaryCallSettings.Builder + createMaterializedViewSettings() { + return getStubSettingsBuilder().createMaterializedViewSettings(); + } + + /** Returns the builder for the settings used for calls to createMaterializedView. */ + public OperationCallSettings.Builder< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings() { + return getStubSettingsBuilder().createMaterializedViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getMaterializedView. */ + public UnaryCallSettings.Builder + getMaterializedViewSettings() { + return getStubSettingsBuilder().getMaterializedViewSettings(); + } + + /** Returns the builder for the settings used for calls to listMaterializedViews. */ + public PagedCallSettings.Builder< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings() { + return getStubSettingsBuilder().listMaterializedViewsSettings(); + } + + /** Returns the builder for the settings used for calls to updateMaterializedView. */ + public UnaryCallSettings.Builder + updateMaterializedViewSettings() { + return getStubSettingsBuilder().updateMaterializedViewSettings(); + } + + /** Returns the builder for the settings used for calls to updateMaterializedView. */ + public OperationCallSettings.Builder< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings() { + return getStubSettingsBuilder().updateMaterializedViewOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteMaterializedView. */ + public UnaryCallSettings.Builder + deleteMaterializedViewSettings() { + return getStubSettingsBuilder().deleteMaterializedViewSettings(); + } + @Override public BaseBigtableInstanceAdminSettings build() throws IOException { return new BaseBigtableInstanceAdminSettings(this); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java index cb4787b2e4..7caa206d32 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,7 +18,6 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; @@ -41,11 +40,14 @@ import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupMetadata; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -53,6 +55,7 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.InstanceName; @@ -60,6 +63,8 @@ import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -67,6 +72,8 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; +import com.google.bigtable.admin.v2.SchemaBundleName; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotName; import com.google.bigtable.admin.v2.SnapshotTableMetadata; @@ -78,6 +85,8 @@ import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub; @@ -99,9 +108,762 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Service Description: Service for creating, configuring, and deleting Cloud Bigtable tables. + * + *

Provides access to the table schemas only, not the data stored within the tables. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ *     BaseBigtableTableAdminClient.create()) {
+ *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
+ *   String tableId = "tableId-1552905847";
+ *   Table table = Table.newBuilder().build();
+ *   Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
+ * }
+ * }
+ * + *

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

CreateTable

Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTable(CreateTableRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTable(InstanceName parent, String tableId, Table table) + *

  • createTable(String parent, String tableId, Table table) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTableCallable() + *

+ *

CreateTableFromSnapshot

Creates a new table from the specified snapshot. The target table must not exist. The snapshot and the table must be in the same instance. + *

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTableFromSnapshotAsync(CreateTableFromSnapshotRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createTableFromSnapshotAsync(InstanceName parent, String tableId, SnapshotName sourceSnapshot) + *

  • createTableFromSnapshotAsync(InstanceName parent, String tableId, String sourceSnapshot) + *

  • createTableFromSnapshotAsync(String parent, String tableId, SnapshotName sourceSnapshot) + *

  • createTableFromSnapshotAsync(String parent, String tableId, String sourceSnapshot) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTableFromSnapshotOperationCallable() + *

  • createTableFromSnapshotCallable() + *

+ *

ListTables

Lists all tables served from a specified instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTables(ListTablesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTables(InstanceName parent) + *

  • listTables(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTablesPagedCallable() + *

  • listTablesCallable() + *

+ *

GetTable

Gets metadata information about the specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTable(GetTableRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTable(TableName name) + *

  • getTable(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTableCallable() + *

+ *

UpdateTable

Updates a specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTableAsync(UpdateTableRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateTableAsync(Table table, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateTableOperationCallable() + *

  • updateTableCallable() + *

+ *

DeleteTable

Permanently deletes a specified table and all of its data.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTable(DeleteTableRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTable(TableName name) + *

  • deleteTable(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteTableCallable() + *

+ *

UndeleteTable

Restores a specified table which was accidentally deleted.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • undeleteTableAsync(UndeleteTableRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • undeleteTableAsync(TableName name) + *

  • undeleteTableAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • undeleteTableOperationCallable() + *

  • undeleteTableCallable() + *

+ *

CreateAuthorizedView

Creates a new AuthorizedView in a table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAuthorizedViewAsync(CreateAuthorizedViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createAuthorizedViewAsync(TableName parent, AuthorizedView authorizedView, String authorizedViewId) + *

  • createAuthorizedViewAsync(String parent, AuthorizedView authorizedView, String authorizedViewId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAuthorizedViewOperationCallable() + *

  • createAuthorizedViewCallable() + *

+ *

ListAuthorizedViews

Lists all AuthorizedViews from a specific table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAuthorizedViews(ListAuthorizedViewsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAuthorizedViews(TableName parent) + *

  • listAuthorizedViews(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAuthorizedViewsPagedCallable() + *

  • listAuthorizedViewsCallable() + *

+ *

GetAuthorizedView

Gets information from a specified AuthorizedView.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAuthorizedView(GetAuthorizedViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAuthorizedView(AuthorizedViewName name) + *

  • getAuthorizedView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAuthorizedViewCallable() + *

+ *

UpdateAuthorizedView

Updates an AuthorizedView in a table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAuthorizedViewAsync(UpdateAuthorizedViewRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateAuthorizedViewAsync(AuthorizedView authorizedView, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAuthorizedViewOperationCallable() + *

  • updateAuthorizedViewCallable() + *

+ *

DeleteAuthorizedView

Permanently deletes a specified AuthorizedView.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAuthorizedView(DeleteAuthorizedViewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteAuthorizedView(AuthorizedViewName name) + *

  • deleteAuthorizedView(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAuthorizedViewCallable() + *

+ *

ModifyColumnFamilies

Performs a series of column family modifications on the specified table. Either all or none of the modifications will occur before this method returns, but data requests received prior to that point may see a table where only some modifications have taken effect.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • modifyColumnFamilies(ModifyColumnFamiliesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • modifyColumnFamilies(TableName name, List<ModifyColumnFamiliesRequest.Modification> modifications) + *

  • modifyColumnFamilies(String name, List<ModifyColumnFamiliesRequest.Modification> modifications) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • modifyColumnFamiliesCallable() + *

+ *

DropRowRange

Permanently drop/delete a row range from a specified table. The request can specify whether to delete all rows in a table, or only those that match a particular prefix.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • dropRowRange(DropRowRangeRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • dropRowRangeCallable() + *

+ *

GenerateConsistencyToken

Generates a consistency token for a Table, which can be used in CheckConsistency to check whether mutations to the table that finished before this call started have been replicated. The tokens will be available for 90 days.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateConsistencyToken(GenerateConsistencyTokenRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • generateConsistencyToken(TableName name) + *

  • generateConsistencyToken(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateConsistencyTokenCallable() + *

+ *

CheckConsistency

Checks replication consistency based on a consistency token, that is, if replication has caught up based on the conditions specified in the token and the check request.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • checkConsistency(CheckConsistencyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • checkConsistency(TableName name, String consistencyToken) + *

  • checkConsistency(String name, String consistencyToken) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • checkConsistencyCallable() + *

+ *

SnapshotTable

Creates a new snapshot in the specified cluster from the specified source table. The cluster and the table must be in the same instance. + *

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • snapshotTableAsync(SnapshotTableRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • snapshotTableAsync(TableName name, ClusterName cluster, String snapshotId, String description) + *

  • snapshotTableAsync(TableName name, String cluster, String snapshotId, String description) + *

  • snapshotTableAsync(String name, ClusterName cluster, String snapshotId, String description) + *

  • snapshotTableAsync(String name, String cluster, String snapshotId, String description) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • snapshotTableOperationCallable() + *

  • snapshotTableCallable() + *

+ *

GetSnapshot

Gets metadata information about the specified snapshot. + *

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSnapshot(GetSnapshotRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSnapshot(SnapshotName name) + *

  • getSnapshot(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSnapshotCallable() + *

+ *

ListSnapshots

Lists all snapshots associated with the specified cluster. + *

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSnapshots(ListSnapshotsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSnapshots(ClusterName parent) + *

  • listSnapshots(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSnapshotsPagedCallable() + *

  • listSnapshotsCallable() + *

+ *

DeleteSnapshot

Permanently deletes the specified snapshot. + *

Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSnapshot(DeleteSnapshotRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSnapshot(SnapshotName name) + *

  • deleteSnapshot(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSnapshotCallable() + *

+ *

CreateBackup

Starts creating a new Cloud Bigtable Backup. The returned backup [long-running operation][google.longrunning.Operation] can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBackupAsync(CreateBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createBackupAsync(ClusterName parent, String backupId, Backup backup) + *

  • createBackupAsync(String parent, String backupId, Backup backup) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBackupOperationCallable() + *

  • createBackupCallable() + *

+ *

GetBackup

Gets metadata on a pending or completed Cloud Bigtable Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackup(GetBackupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackup(BackupName name) + *

  • getBackup(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupCallable() + *

+ *

UpdateBackup

Updates a pending or completed Cloud Bigtable Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBackup(UpdateBackupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateBackup(Backup backup, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBackupCallable() + *

+ *

DeleteBackup

Deletes a pending or completed Cloud Bigtable backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBackup(DeleteBackupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteBackup(BackupName name) + *

  • deleteBackup(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBackupCallable() + *

+ *

ListBackups

Lists Cloud Bigtable backups. Returns both completed and pending backups.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackups(ListBackupsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackups(ClusterName parent) + *

  • listBackups(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupsPagedCallable() + *

  • listBackupsCallable() + *

+ *

RestoreTable

Create a new table by restoring from a completed backup. The returned table [long-running operation][google.longrunning.Operation] can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The [response][google.longrunning.Operation.response] type is [Table][google.bigtable.admin.v2.Table], if successful.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • restoreTableAsync(RestoreTableRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • restoreTableOperationCallable() + *

  • restoreTableCallable() + *

+ *

CopyBackup

Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • copyBackupAsync(CopyBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • copyBackupAsync(ClusterName parent, String backupId, BackupName sourceBackup, Timestamp expireTime) + *

  • copyBackupAsync(ClusterName parent, String backupId, String sourceBackup, Timestamp expireTime) + *

  • copyBackupAsync(String parent, String backupId, BackupName sourceBackup, Timestamp expireTime) + *

  • copyBackupAsync(String parent, String backupId, String sourceBackup, Timestamp expireTime) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • copyBackupOperationCallable() + *

  • copyBackupCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource exists but does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIamPolicy(ResourceName resource) + *

  • getIamPolicy(String resource) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

SetIamPolicy

Sets the access control policy on a Bigtable resource. Replaces any existing policy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • setIamPolicy(ResourceName resource, Policy policy) + *

  • setIamPolicy(String resource, Policy policy) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that the caller has on the specified Bigtable resource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • testIamPermissions(ResourceName resource, List<String> permissions) + *

  • testIamPermissions(String resource, List<String> permissions) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *

CreateSchemaBundle

Creates a new schema bundle in the specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSchemaBundleAsync(CreateSchemaBundleRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createSchemaBundleAsync(TableName parent, String schemaBundleId, SchemaBundle schemaBundle) + *

  • createSchemaBundleAsync(String parent, String schemaBundleId, SchemaBundle schemaBundle) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSchemaBundleOperationCallable() + *

  • createSchemaBundleCallable() + *

+ *

UpdateSchemaBundle

Updates a schema bundle in the specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSchemaBundleAsync(UpdateSchemaBundleRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateSchemaBundleAsync(SchemaBundle schemaBundle, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSchemaBundleOperationCallable() + *

  • updateSchemaBundleCallable() + *

+ *

GetSchemaBundle

Gets metadata information about the specified schema bundle.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSchemaBundle(GetSchemaBundleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSchemaBundle(SchemaBundleName name) + *

  • getSchemaBundle(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSchemaBundleCallable() + *

+ *

ListSchemaBundles

Lists all schema bundles associated with the specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSchemaBundles(ListSchemaBundlesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSchemaBundles(TableName parent) + *

  • listSchemaBundles(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSchemaBundlesPagedCallable() + *

  • listSchemaBundlesCallable() + *

+ *

DeleteSchemaBundle

Deletes a schema bundle in the specified table.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSchemaBundle(DeleteSchemaBundleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSchemaBundle(SchemaBundleName name) + *

  • deleteSchemaBundle(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSchemaBundleCallable() + *

+ *
+ * + *

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

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

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

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
+ *     BaseBigtableTableAdminSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ *     BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
+ *     BaseBigtableTableAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ *     BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") public class BaseBigtableTableAdminClient implements BackgroundResource { private final BaseBigtableTableAdminSettings settings; private final BigtableTableAdminStub stub; @@ -944,6 +1706,7 @@ public final UnaryCallable getTableCallable() { *

  • `change_stream_config` *
  • `change_stream_config.retention_period` *
  • `deletion_protection` + *
  • `row_key_schema` * *

    If `column_families` is set in `update_mask`, it will return an UNIMPLEMENTED error. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -973,6 +1736,7 @@ public final OperationFuture updateTableAsync( * UpdateTableRequest.newBuilder() * .setTable(Table.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) + * .setIgnoreWarnings(true) * .build(); * Table response = baseBigtableTableAdminClient.updateTableAsync(request).get(); * } @@ -1004,6 +1768,7 @@ public final OperationFuture updateTableAsync( * UpdateTableRequest.newBuilder() * .setTable(Table.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) + * .setIgnoreWarnings(true) * .build(); * OperationFuture future = * baseBigtableTableAdminClient.updateTableOperationCallable().futureCall(request); @@ -1035,6 +1800,7 @@ public final OperationFuture updateTableAsync( * UpdateTableRequest.newBuilder() * .setTable(Table.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) + * .setIgnoreWarnings(true) * .build(); * ApiFuture future = * baseBigtableTableAdminClient.updateTableCallable().futureCall(request); @@ -1818,8 +2584,8 @@ public final UnaryCallable getAuthoriz * } * * @param authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view` - * is used to identify the AuthorizedView. AuthorizedView name must in this format - * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view> + * is used to identify the AuthorizedView. AuthorizedView name must in this format: + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. * @param updateMask Optional. The list of fields to update. A mask specifying which fields in the * AuthorizedView resource should be updated. This mask is relative to the AuthorizedView * resource, not to the request message. A field will be overwritten if it is in the mask. If @@ -4506,8 +5272,8 @@ public final UnaryCallable copyBackupCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the - * resource exists but does not have a policy set. + * Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource + * exists but does not have a policy set. * *

    Sample code: * @@ -4519,7 +5285,8 @@ public final UnaryCallable copyBackupCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + * ResourceName resource = + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource); * } * } @@ -4538,8 +5305,8 @@ public final Policy getIamPolicy(ResourceName resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the - * resource exists but does not have a policy set. + * Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource + * exists but does not have a policy set. * *

    Sample code: * @@ -4567,8 +5334,8 @@ public final Policy getIamPolicy(String resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the - * resource exists but does not have a policy set. + * Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource + * exists but does not have a policy set. * *

    Sample code: * @@ -4583,7 +5350,8 @@ public final Policy getIamPolicy(String resource) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * Policy response = baseBigtableTableAdminClient.getIamPolicy(request); @@ -4599,8 +5367,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the - * resource exists but does not have a policy set. + * Gets the access control policy for a Bigtable resource. Returns an empty policy if the resource + * exists but does not have a policy set. * *

    Sample code: * @@ -4615,7 +5383,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * GetIamPolicyRequest request = * GetIamPolicyRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .setOptions(GetPolicyOptions.newBuilder().build()) * .build(); * ApiFuture future = @@ -4631,7 +5400,7 @@ public final UnaryCallable getIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on a Table or Backup resource. Replaces any existing policy. + * Sets the access control policy on a Bigtable resource. Replaces any existing policy. * *

    Sample code: * @@ -4643,7 +5412,8 @@ public final UnaryCallable getIamPolicyCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + * ResourceName resource = + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); * Policy policy = Policy.newBuilder().build(); * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy); * } @@ -4667,7 +5437,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on a Table or Backup resource. Replaces any existing policy. + * Sets the access control policy on a Bigtable resource. Replaces any existing policy. * *

    Sample code: * @@ -4700,7 +5470,7 @@ public final Policy setIamPolicy(String resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on a Table or Backup resource. Replaces any existing policy. + * Sets the access control policy on a Bigtable resource. Replaces any existing policy. * *

    Sample code: * @@ -4715,7 +5485,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -4732,7 +5503,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on a Table or Backup resource. Replaces any existing policy. + * Sets the access control policy on a Bigtable resource. Replaces any existing policy. * *

    Sample code: * @@ -4747,7 +5518,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * SetIamPolicyRequest request = * SetIamPolicyRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .setPolicy(Policy.newBuilder().build()) * .setUpdateMask(FieldMask.newBuilder().build()) * .build(); @@ -4764,7 +5536,7 @@ public final UnaryCallable setIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that the caller has on the specified Table or Backup resource. + * Returns permissions that the caller has on the specified Bigtable resource. * *

    Sample code: * @@ -4776,7 +5548,8 @@ public final UnaryCallable setIamPolicyCallable() { * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = * BaseBigtableTableAdminClient.create()) { - * ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + * ResourceName resource = + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); * List permissions = new ArrayList<>(); * TestIamPermissionsResponse response = * baseBigtableTableAdminClient.testIamPermissions(resource, permissions); @@ -4802,7 +5575,7 @@ public final TestIamPermissionsResponse testIamPermissions( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that the caller has on the specified Table or Backup resource. + * Returns permissions that the caller has on the specified Bigtable resource. * *

    Sample code: * @@ -4840,7 +5613,7 @@ public final TestIamPermissionsResponse testIamPermissions( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that the caller has on the specified Table or Backup resource. + * Returns permissions that the caller has on the specified Bigtable resource. * *

    Sample code: * @@ -4855,7 +5628,8 @@ public final TestIamPermissionsResponse testIamPermissions( * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .addAllPermissions(new ArrayList()) * .build(); * TestIamPermissionsResponse response = @@ -4872,7 +5646,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that the caller has on the specified Table or Backup resource. + * Returns permissions that the caller has on the specified Bigtable resource. * *

    Sample code: * @@ -4887,7 +5661,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * TestIamPermissionsRequest request = * TestIamPermissionsRequest.newBuilder() * .setResource( - * BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString()) + * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]") + * .toString()) * .addAllPermissions(new ArrayList()) * .build(); * ApiFuture future = @@ -4902,63 +5677,799 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq return stub.testIamPermissionsCallable(); } - @Override - public final void close() { - stub.close(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +   *   String schemaBundleId = "schemaBundleId2039843326";
    +   *   SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
    +   *   SchemaBundle response =
    +   *       baseBigtableTableAdminClient
    +   *           .createSchemaBundleAsync(parent, schemaBundleId, schemaBundle)
    +   *           .get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource where this schema bundle will be created. Values + * are of the form `projects/{project}/instances/{instance}/tables/{table}`. + * @param schemaBundleId Required. The unique ID to use for the schema bundle, which will become + * the final component of the schema bundle's resource name. + * @param schemaBundle Required. The schema bundle to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaBundleAsync( + TableName parent, String schemaBundleId, SchemaBundle schemaBundle) { + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSchemaBundleId(schemaBundleId) + .setSchemaBundle(schemaBundle) + .build(); + return createSchemaBundleAsync(request); } - @Override - public void shutdown() { - stub.shutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    +   *   String schemaBundleId = "schemaBundleId2039843326";
    +   *   SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
    +   *   SchemaBundle response =
    +   *       baseBigtableTableAdminClient
    +   *           .createSchemaBundleAsync(parent, schemaBundleId, schemaBundle)
    +   *           .get();
    +   * }
    +   * }
    + * + * @param parent Required. The parent resource where this schema bundle will be created. Values + * are of the form `projects/{project}/instances/{instance}/tables/{table}`. + * @param schemaBundleId Required. The unique ID to use for the schema bundle, which will become + * the final component of the schema bundle's resource name. + * @param schemaBundle Required. The schema bundle to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaBundleAsync( + String parent, String schemaBundleId, SchemaBundle schemaBundle) { + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.newBuilder() + .setParent(parent) + .setSchemaBundleId(schemaBundleId) + .setSchemaBundle(schemaBundle) + .build(); + return createSchemaBundleAsync(request); } - @Override - public boolean isShutdown() { - return stub.isShutdown(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   CreateSchemaBundleRequest request =
    +   *       CreateSchemaBundleRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setSchemaBundleId("schemaBundleId2039843326")
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .build();
    +   *   SchemaBundle response = baseBigtableTableAdminClient.createSchemaBundleAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSchemaBundleAsync( + CreateSchemaBundleRequest request) { + return createSchemaBundleOperationCallable().futureCall(request); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   CreateSchemaBundleRequest request =
    +   *       CreateSchemaBundleRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setSchemaBundleId("schemaBundleId2039843326")
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       baseBigtableTableAdminClient.createSchemaBundleOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   SchemaBundle response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationCallable() { + return stub.createSchemaBundleOperationCallable(); } - @Override - public void shutdownNow() { - stub.shutdownNow(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   CreateSchemaBundleRequest request =
    +   *       CreateSchemaBundleRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setSchemaBundleId("schemaBundleId2039843326")
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.createSchemaBundleCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable createSchemaBundleCallable() { + return stub.createSchemaBundleCallable(); } - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   SchemaBundle schemaBundle = SchemaBundle.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   SchemaBundle response =
    +   *       baseBigtableTableAdminClient.updateSchemaBundleAsync(schemaBundle, updateMask).get();
    +   * }
    +   * }
    + * + * @param schemaBundle Required. The schema bundle to update. + *

    The schema bundle's `name` field is used to identify the schema bundle to update. Values + * are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSchemaBundleAsync( + SchemaBundle schemaBundle, FieldMask updateMask) { + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.newBuilder() + .setSchemaBundle(schemaBundle) + .setUpdateMask(updateMask) + .build(); + return updateSchemaBundleAsync(request); } - public static class ListTablesPagedResponse - extends AbstractPagedListResponse< - ListTablesRequest, - ListTablesResponse, - Table, - ListTablesPage, - ListTablesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListTablesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListTablesPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListTablesPagedResponse(ListTablesPage page) { - super(page, ListTablesFixedSizeCollection.createEmptyCollection()); - } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateSchemaBundleRequest request =
    +   *       UpdateSchemaBundleRequest.newBuilder()
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .setIgnoreWarnings(true)
    +   *           .build();
    +   *   SchemaBundle response = baseBigtableTableAdminClient.updateSchemaBundleAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSchemaBundleAsync( + UpdateSchemaBundleRequest request) { + return updateSchemaBundleOperationCallable().futureCall(request); } - public static class ListTablesPage - extends AbstractPage { + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateSchemaBundleRequest request =
    +   *       UpdateSchemaBundleRequest.newBuilder()
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .setIgnoreWarnings(true)
    +   *           .build();
    +   *   OperationFuture future =
    +   *       baseBigtableTableAdminClient.updateSchemaBundleOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   SchemaBundle response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationCallable() { + return stub.updateSchemaBundleOperationCallable(); + } - private ListTablesPage( - PageContext context, + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateSchemaBundleRequest request =
    +   *       UpdateSchemaBundleRequest.newBuilder()
    +   *           .setSchemaBundle(SchemaBundle.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .setIgnoreWarnings(true)
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.updateSchemaBundleCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateSchemaBundleCallable() { + return stub.updateSchemaBundleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata information about the specified schema bundle. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   SchemaBundleName name =
    +   *       SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]");
    +   *   SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(name);
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the schema bundle to retrieve. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SchemaBundle getSchemaBundle(SchemaBundleName name) { + GetSchemaBundleRequest request = + GetSchemaBundleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSchemaBundle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata information about the specified schema bundle. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   String name =
    +   *       SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]").toString();
    +   *   SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(name);
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the schema bundle to retrieve. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SchemaBundle getSchemaBundle(String name) { + GetSchemaBundleRequest request = GetSchemaBundleRequest.newBuilder().setName(name).build(); + return getSchemaBundle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata information about the specified schema bundle. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   GetSchemaBundleRequest request =
    +   *       GetSchemaBundleRequest.newBuilder()
    +   *           .setName(
    +   *               SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
    +   *                   .toString())
    +   *           .build();
    +   *   SchemaBundle response = baseBigtableTableAdminClient.getSchemaBundle(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SchemaBundle getSchemaBundle(GetSchemaBundleRequest request) { + return getSchemaBundleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata information about the specified schema bundle. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   GetSchemaBundleRequest request =
    +   *       GetSchemaBundleRequest.newBuilder()
    +   *           .setName(
    +   *               SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
    +   *                   .toString())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.getSchemaBundleCallable().futureCall(request);
    +   *   // Do something.
    +   *   SchemaBundle response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable getSchemaBundleCallable() { + return stub.getSchemaBundleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all schema bundles associated with the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    +   *   for (SchemaBundle element :
    +   *       baseBigtableTableAdminClient.listSchemaBundles(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of schema bundles. Values are of + * the form `projects/{project}/instances/{instance}/tables/{table}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemaBundlesPagedResponse listSchemaBundles(TableName parent) { + ListSchemaBundlesRequest request = + ListSchemaBundlesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSchemaBundles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all schema bundles associated with the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    +   *   for (SchemaBundle element :
    +   *       baseBigtableTableAdminClient.listSchemaBundles(parent).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param parent Required. The parent, which owns this collection of schema bundles. Values are of + * the form `projects/{project}/instances/{instance}/tables/{table}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemaBundlesPagedResponse listSchemaBundles(String parent) { + ListSchemaBundlesRequest request = + ListSchemaBundlesRequest.newBuilder().setParent(parent).build(); + return listSchemaBundles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all schema bundles associated with the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   ListSchemaBundlesRequest request =
    +   *       ListSchemaBundlesRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   for (SchemaBundle element :
    +   *       baseBigtableTableAdminClient.listSchemaBundles(request).iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchemaBundlesPagedResponse listSchemaBundles(ListSchemaBundlesRequest request) { + return listSchemaBundlesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all schema bundles associated with the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   ListSchemaBundlesRequest request =
    +   *       ListSchemaBundlesRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.listSchemaBundlesPagedCallable().futureCall(request);
    +   *   // Do something.
    +   *   for (SchemaBundle element : future.get().iterateAll()) {
    +   *     // doThingsWith(element);
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listSchemaBundlesPagedCallable() { + return stub.listSchemaBundlesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all schema bundles associated with the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   ListSchemaBundlesRequest request =
    +   *       ListSchemaBundlesRequest.newBuilder()
    +   *           .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
    +   *           .setPageSize(883849137)
    +   *           .setPageToken("pageToken873572522")
    +   *           .build();
    +   *   while (true) {
    +   *     ListSchemaBundlesResponse response =
    +   *         baseBigtableTableAdminClient.listSchemaBundlesCallable().call(request);
    +   *     for (SchemaBundle element : response.getSchemaBundlesList()) {
    +   *       // doThingsWith(element);
    +   *     }
    +   *     String nextPageToken = response.getNextPageToken();
    +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
    +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
    +   *     } else {
    +   *       break;
    +   *     }
    +   *   }
    +   * }
    +   * }
    + */ + public final UnaryCallable + listSchemaBundlesCallable() { + return stub.listSchemaBundlesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   SchemaBundleName name =
    +   *       SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]");
    +   *   baseBigtableTableAdminClient.deleteSchemaBundle(name);
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the schema bundle to delete. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSchemaBundle(SchemaBundleName name) { + DeleteSchemaBundleRequest request = + DeleteSchemaBundleRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSchemaBundle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   String name =
    +   *       SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]").toString();
    +   *   baseBigtableTableAdminClient.deleteSchemaBundle(name);
    +   * }
    +   * }
    + * + * @param name Required. The unique name of the schema bundle to delete. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSchemaBundle(String name) { + DeleteSchemaBundleRequest request = + DeleteSchemaBundleRequest.newBuilder().setName(name).build(); + deleteSchemaBundle(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   DeleteSchemaBundleRequest request =
    +   *       DeleteSchemaBundleRequest.newBuilder()
    +   *           .setName(
    +   *               SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
    +   *                   .toString())
    +   *           .setEtag("etag3123477")
    +   *           .build();
    +   *   baseBigtableTableAdminClient.deleteSchemaBundle(request);
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSchemaBundle(DeleteSchemaBundleRequest request) { + deleteSchemaBundleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a schema bundle in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   DeleteSchemaBundleRequest request =
    +   *       DeleteSchemaBundleRequest.newBuilder()
    +   *           .setName(
    +   *               SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]")
    +   *                   .toString())
    +   *           .setEtag("etag3123477")
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.deleteSchemaBundleCallable().futureCall(request);
    +   *   // Do something.
    +   *   future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable deleteSchemaBundleCallable() { + return stub.deleteSchemaBundleCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTablesPagedResponse + extends AbstractPagedListResponse< + ListTablesRequest, + ListTablesResponse, + Table, + ListTablesPage, + ListTablesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTablesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListTablesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListTablesPagedResponse(ListTablesPage page) { + super(page, ListTablesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTablesPage + extends AbstractPage { + + private ListTablesPage( + PageContext context, ListTablesResponse response) { super(context, response); } @@ -5237,4 +6748,84 @@ protected ListBackupsFixedSizeCollection createCollection( return new ListBackupsFixedSizeCollection(pages, collectionSize); } } + + public static class ListSchemaBundlesPagedResponse + extends AbstractPagedListResponse< + ListSchemaBundlesRequest, + ListSchemaBundlesResponse, + SchemaBundle, + ListSchemaBundlesPage, + ListSchemaBundlesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSchemaBundlesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSchemaBundlesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSchemaBundlesPagedResponse(ListSchemaBundlesPage page) { + super(page, ListSchemaBundlesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSchemaBundlesPage + extends AbstractPage< + ListSchemaBundlesRequest, + ListSchemaBundlesResponse, + SchemaBundle, + ListSchemaBundlesPage> { + + private ListSchemaBundlesPage( + PageContext context, + ListSchemaBundlesResponse response) { + super(context, response); + } + + private static ListSchemaBundlesPage createEmptyPage() { + return new ListSchemaBundlesPage(null, null); + } + + @Override + protected ListSchemaBundlesPage createPage( + PageContext context, + ListSchemaBundlesResponse response) { + return new ListSchemaBundlesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSchemaBundlesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSchemaBundlesRequest, + ListSchemaBundlesResponse, + SchemaBundle, + ListSchemaBundlesPage, + ListSchemaBundlesFixedSizeCollection> { + + private ListSchemaBundlesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSchemaBundlesFixedSizeCollection createEmptyCollection() { + return new ListSchemaBundlesFixedSizeCollection(null, 0); + } + + @Override + protected ListSchemaBundlesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSchemaBundlesFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java index 35494a28f7..19cc61a490 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,11 +18,11 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; import com.google.api.core.ApiFunction; -import com.google.api.core.InternalApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; @@ -43,11 +43,14 @@ import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupMetadata; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -55,12 +58,15 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -68,6 +74,7 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; @@ -77,6 +84,8 @@ import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings; @@ -92,9 +101,83 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Settings class to configure an instance of {@link BaseBigtableTableAdminClient}. + * + *

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

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

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

    For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createTable: + * + *

    {@code
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    + * BaseBigtableTableAdminSettings.Builder baseBigtableTableAdminSettingsBuilder =
    + *     BaseBigtableTableAdminSettings.newBuilder();
    + * baseBigtableTableAdminSettingsBuilder
    + *     .createTableSettings()
    + *     .setRetrySettings(
    + *         baseBigtableTableAdminSettingsBuilder
    + *             .createTableSettings()
    + *             .getRetrySettings()
    + *             .toBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
    + *             .build());
    + * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
    + *     baseBigtableTableAdminSettingsBuilder.build();
    + * }
    + * + * Please refer to the [Client Side Retry + * 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 + * configure the RetrySettings for createTableFromSnapshot: + * + *

    {@code
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    + * BaseBigtableTableAdminSettings.Builder baseBigtableTableAdminSettingsBuilder =
    + *     BaseBigtableTableAdminSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * baseBigtableTableAdminSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    + */ +@Generated("by gapic-generator-java") public class BaseBigtableTableAdminSettings extends ClientSettings { /** Returns the object with the settings used for calls to createTable. */ @@ -316,6 +399,47 @@ public UnaryCallSettings setIamPolicySettings() { return ((BigtableTableAdminStubSettings) getStubSettings()).testIamPermissionsSettings(); } + /** Returns the object with the settings used for calls to createSchemaBundle. */ + public UnaryCallSettings createSchemaBundleSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).createSchemaBundleSettings(); + } + + /** Returns the object with the settings used for calls to createSchemaBundle. */ + public OperationCallSettings + createSchemaBundleOperationSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()) + .createSchemaBundleOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSchemaBundle. */ + public UnaryCallSettings updateSchemaBundleSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).updateSchemaBundleSettings(); + } + + /** Returns the object with the settings used for calls to updateSchemaBundle. */ + public OperationCallSettings + updateSchemaBundleOperationSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()) + .updateSchemaBundleOperationSettings(); + } + + /** Returns the object with the settings used for calls to getSchemaBundle. */ + public UnaryCallSettings getSchemaBundleSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).getSchemaBundleSettings(); + } + + /** Returns the object with the settings used for calls to listSchemaBundles. */ + public PagedCallSettings< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).listSchemaBundlesSettings(); + } + + /** Returns the object with the settings used for calls to deleteSchemaBundle. */ + public UnaryCallSettings deleteSchemaBundleSettings() { + return ((BigtableTableAdminStubSettings) getStubSettings()).deleteSchemaBundleSettings(); + } + public static final BaseBigtableTableAdminSettings create(BigtableTableAdminStubSettings stub) throws IOException { return new BaseBigtableTableAdminSettings.Builder(stub.toBuilder()).build(); @@ -639,6 +763,51 @@ public UnaryCallSettings.Builder setIamPolicySettin return getStubSettingsBuilder().testIamPermissionsSettings(); } + /** Returns the builder for the settings used for calls to createSchemaBundle. */ + public UnaryCallSettings.Builder + createSchemaBundleSettings() { + return getStubSettingsBuilder().createSchemaBundleSettings(); + } + + /** Returns the builder for the settings used for calls to createSchemaBundle. */ + public OperationCallSettings.Builder< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationSettings() { + return getStubSettingsBuilder().createSchemaBundleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSchemaBundle. */ + public UnaryCallSettings.Builder + updateSchemaBundleSettings() { + return getStubSettingsBuilder().updateSchemaBundleSettings(); + } + + /** Returns the builder for the settings used for calls to updateSchemaBundle. */ + public OperationCallSettings.Builder< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationSettings() { + return getStubSettingsBuilder().updateSchemaBundleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getSchemaBundle. */ + public UnaryCallSettings.Builder + getSchemaBundleSettings() { + return getStubSettingsBuilder().getSchemaBundleSettings(); + } + + /** Returns the builder for the settings used for calls to listSchemaBundles. */ + public PagedCallSettings.Builder< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings() { + return getStubSettingsBuilder().listSchemaBundlesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSchemaBundle. */ + public UnaryCallSettings.Builder + deleteSchemaBundleSettings() { + return getStubSettingsBuilder().deleteSchemaBundleSettings(); + } + @Override public BaseBigtableTableAdminSettings build() throws IOException { return new BaseBigtableTableAdminSettings(this); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java index 793766c26a..0e5a9155a0 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java @@ -19,16 +19,27 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.rpc.ApiExceptions; import com.google.api.gax.rpc.NotFoundException; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.ListAppProfilesRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.cloud.Policy; import com.google.cloud.Policy.DefaultMarshaller; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AppProfile; import com.google.cloud.bigtable.admin.v2.models.Cluster; @@ -36,11 +47,17 @@ import com.google.cloud.bigtable.admin.v2.models.CreateAppProfileRequest; import com.google.cloud.bigtable.admin.v2.models.CreateClusterRequest; import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.models.Instance; +import com.google.cloud.bigtable.admin.v2.models.LogicalView; +import com.google.cloud.bigtable.admin.v2.models.MaterializedView; import com.google.cloud.bigtable.admin.v2.models.PartialListClustersException; import com.google.cloud.bigtable.admin.v2.models.PartialListInstancesException; import com.google.cloud.bigtable.admin.v2.models.UpdateAppProfileRequest; import com.google.cloud.bigtable.admin.v2.models.UpdateInstanceRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStub; import com.google.common.base.Verify; import com.google.common.collect.ImmutableList; @@ -108,6 +125,7 @@ public final class BigtableInstanceAdminClient implements AutoCloseable { private final String projectId; private final BigtableInstanceAdminStub stub; + private final BaseBigtableInstanceAdminClient baseClient; /** Constructs an instance of BigtableInstanceAdminClient with the given project ID. */ public static BigtableInstanceAdminClient create(@Nonnull String projectId) throws IOException { @@ -130,6 +148,7 @@ private BigtableInstanceAdminClient( @Nonnull String projectId, @Nonnull BigtableInstanceAdminStub stub) { this.projectId = projectId; this.stub = stub; + this.baseClient = BaseBigtableInstanceAdminClient.create(stub); } /** Gets the project ID this client is associated with. */ @@ -137,6 +156,14 @@ public String getProjectId() { return projectId; } + /** + * Returns the modern autogenerated client. This provides access to the newest features and + * proto-based methods. + */ + public BaseBigtableInstanceAdminClient getBaseClient() { + return baseClient; + } + /** Closes the client and frees all resources associated with it (like thread pools). */ @Override public void close() { @@ -144,7 +171,10 @@ public void close() { } /** - * Creates a new instance and returns its representation. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createInstanceAsync(com.google.bigtable.admin.v2.CreateInstanceRequest)}. + * + *

    Creates a new instance and returns its representation. * *

    Sample code: * @@ -158,12 +188,16 @@ public void close() { * @see CreateInstanceRequest for details. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Instance createInstance(CreateInstanceRequest request) { return ApiExceptions.callAndTranslateApiException(createInstanceAsync(request)); } /** - * Asynchronously creates a new instance and returns its representation wrapped in a future. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createInstanceAsync(com.google.bigtable.admin.v2.CreateInstanceRequest)}. + * + *

    Asynchronously creates a new instance and returns its representation wrapped in a future. * *

    Sample code: * @@ -179,6 +213,7 @@ public Instance createInstance(CreateInstanceRequest request) { * @see CreateInstanceRequest for details. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createInstanceAsync(CreateInstanceRequest request) { return ApiFutures.transform( stub.createInstanceOperationCallable().futureCall(request.toProto(projectId)), @@ -192,7 +227,10 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { } /** - * Updates a new instance and returns its representation. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateInstanceAsync(com.google.bigtable.admin.v2.PartialUpdateInstanceRequest)}. + * + *

    Updates a new instance and returns its representation. * *

    Sample code: * @@ -206,12 +244,16 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { * @see UpdateInstanceRequest for details. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Instance updateInstance(UpdateInstanceRequest request) { return ApiExceptions.callAndTranslateApiException(updateInstanceAsync(request)); } /** - * Asynchronously updates a new instance and returns its representation wrapped in a future. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateInstanceAsync(com.google.bigtable.admin.v2.PartialUpdateInstanceRequest)}. + * + *

    Asynchronously updates a new instance and returns its representation wrapped in a future. * *

    Sample code: * @@ -227,6 +269,7 @@ public Instance updateInstance(UpdateInstanceRequest request) { * @see UpdateInstanceRequest for details. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture updateInstanceAsync(UpdateInstanceRequest request) { return ApiFutures.transform( stub.partialUpdateInstanceOperationCallable().futureCall(request.toProto(projectId)), @@ -240,7 +283,10 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { } /** - * Get the instance representation by ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getInstance(com.google.bigtable.admin.v2.GetInstanceRequest)}. + * + *

    Get the instance representation by ID. * *

    Sample code: * @@ -248,12 +294,16 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { * Instance instance = client.getInstance("my-instance"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Instance getInstance(String id) { return ApiExceptions.callAndTranslateApiException(getInstanceAsync(id)); } /** - * Asynchronously gets the instance representation by ID wrapped in a future. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getInstance(com.google.bigtable.admin.v2.GetInstanceRequest)}. + * + *

    Asynchronously gets the instance representation by ID wrapped in a future. * *

    Sample code: * @@ -263,6 +313,7 @@ public Instance getInstance(String id) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getInstanceAsync(String instanceId) { String name = NameUtil.formatInstanceName(projectId, instanceId); @@ -281,7 +332,10 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { } /** - * Lists all of the instances in the current project. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listInstances(com.google.bigtable.admin.v2.ListInstancesRequest)}. + * + *

    Lists all of the instances in the current project. * *

    This method will throw a {@link PartialListInstancesException} when any zone is unavailable. * If a partial list is OK, the exception can be caught and inspected. @@ -298,12 +352,16 @@ public Instance apply(com.google.bigtable.admin.v2.Instance proto) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listInstances() { return ApiExceptions.callAndTranslateApiException(listInstancesAsync()); } /** - * Asynchronously lists all of the instances in the current project. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listInstances(com.google.bigtable.admin.v2.ListInstancesRequest)}. + * + *

    Asynchronously lists all of the instances in the current project. * *

    This method will throw a {@link PartialListInstancesException} when any zone is unavailable. * If a partial list is OK, the exception can be caught and inspected. @@ -331,6 +389,7 @@ public List listInstances() { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listInstancesAsync() { com.google.bigtable.admin.v2.ListInstancesRequest request = com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() @@ -373,7 +432,10 @@ public List apply(com.google.bigtable.admin.v2.ListInstancesResponse p } /** - * Deletes the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest)}. + * + *

    Deletes the specified instance. * *

    Sample code: * @@ -382,12 +444,16 @@ public List apply(com.google.bigtable.admin.v2.ListInstancesResponse p * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteInstance(String instanceId) { ApiExceptions.callAndTranslateApiException(deleteInstanceAsync(instanceId)); } /** - * Asynchronously deletes the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest)}. + * + *

    Asynchronously deletes the specified instance. * *

    Sample code: * @@ -397,6 +463,7 @@ public void deleteInstance(String instanceId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteInstanceAsync(String instanceId) { String instanceName = NameUtil.formatInstanceName(projectId, instanceId); @@ -417,7 +484,10 @@ public Void apply(Empty input) { } /** - * Checks if the instance specified by the instance ID exists. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getInstance(com.google.bigtable.admin.v2.GetInstanceRequest)}. + * + *

    Checks if the instance specified by the instance ID exists. * *

    Sample code: * @@ -427,12 +497,16 @@ public Void apply(Empty input) { * } * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public boolean exists(String instanceId) { return ApiExceptions.callAndTranslateApiException(existsAsync(instanceId)); } /** - * Asynchronously checks if the instance specified by the instance ID exists. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getInstance(com.google.bigtable.admin.v2.GetInstanceRequest)}. + * + *

    Asynchronously checks if the instance specified by the instance ID exists. * *

    Sample code: * @@ -458,6 +532,7 @@ public boolean exists(String instanceId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture existsAsync(String instanceId) { ApiFuture protoFuture = getInstanceAsync(instanceId); @@ -485,7 +560,10 @@ public Boolean apply(NotFoundException ignored) { } /** - * Creates a new cluster in the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createClusterAsync(com.google.bigtable.admin.v2.CreateClusterRequest)}. + * + *

    Creates a new cluster in the specified instance. * *

    Sample code: * @@ -499,12 +577,16 @@ public Boolean apply(NotFoundException ignored) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Cluster createCluster(CreateClusterRequest request) { return ApiExceptions.callAndTranslateApiException(createClusterAsync(request)); } /** - * Asynchronously creates a new cluster in the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createClusterAsync(com.google.bigtable.admin.v2.CreateClusterRequest)}. + * + *

    Asynchronously creates a new cluster in the specified instance. * *

    Sample code: * @@ -520,6 +602,7 @@ public Cluster createCluster(CreateClusterRequest request) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createClusterAsync(CreateClusterRequest request) { return ApiFutures.transform( stub.createClusterOperationCallable().futureCall(request.toProto(projectId)), @@ -528,7 +611,10 @@ public ApiFuture createClusterAsync(CreateClusterRequest request) { } /** - * Gets the cluster representation by ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getCluster(com.google.bigtable.admin.v2.GetClusterRequest)}. + * + *

    Gets the cluster representation by ID. * *

    Sample code: * @@ -537,12 +623,16 @@ public ApiFuture createClusterAsync(CreateClusterRequest request) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Cluster getCluster(String instanceId, String clusterId) { return ApiExceptions.callAndTranslateApiException(getClusterAsync(instanceId, clusterId)); } /** - * Asynchronously gets the cluster representation by ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getCluster(com.google.bigtable.admin.v2.GetClusterRequest)}. + * + *

    Asynchronously gets the cluster representation by ID. * *

    Sample code: * @@ -552,6 +642,7 @@ public Cluster getCluster(String instanceId, String clusterId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getClusterAsync(String instanceId, String clusterId) { String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); @@ -570,7 +661,10 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) { } /** - * Lists all clusters in the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listClusters(com.google.bigtable.admin.v2.ListClustersRequest)}. + * + *

    Lists all clusters in the specified instance. * *

    This method will throw a {@link PartialListClustersException} when any zone is unavailable. * If a partial list is OK, the exception can be caught and inspected. @@ -587,12 +681,16 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listClusters(String instanceId) { return ApiExceptions.callAndTranslateApiException(listClustersAsync(instanceId)); } /** - * Asynchronously lists all clusters in the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listClusters(com.google.bigtable.admin.v2.ListClustersRequest)}. + * + *

    Asynchronously lists all clusters in the specified instance. * *

    This method will throw a {@link PartialListClustersException} when any zone is unavailable. * If a partial list is OK, the exception can be caught and inspected. @@ -620,6 +718,7 @@ public List listClusters(String instanceId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listClustersAsync(String instanceId) { String name = NameUtil.formatInstanceName(projectId, instanceId); com.google.bigtable.admin.v2.ListClustersRequest request = @@ -658,10 +757,14 @@ public List apply(com.google.bigtable.admin.v2.ListClustersResponse pro } /** - * Modifies the cluster's node count for manual scaling. If autoscaling is already enabled, manual - * scaling will be silently ignored. If you wish to disable autoscaling and enable manual scaling, - * please use {@link BigtableInstanceAdminClient#disableClusterAutoscaling(String, String, int)} - * instead. Please note that only clusters that belong to a production instance can be resized. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Modifies the cluster's node count for manual scaling. If autoscaling is already enabled, + * manual scaling will be silently ignored. If you wish to disable autoscaling and enable manual + * scaling, please use {@link BigtableInstanceAdminClient#disableClusterAutoscaling(String, + * String, int)} instead. Please note that only clusters that belong to a production instance can + * be resized. * *

    Sample code: * @@ -670,17 +773,21 @@ public List apply(com.google.bigtable.admin.v2.ListClustersResponse pro * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Cluster resizeCluster(String instanceId, String clusterId, int numServeNodes) { return ApiExceptions.callAndTranslateApiException( resizeClusterAsync(instanceId, clusterId, numServeNodes)); } /** - * Asynchronously modifies the cluster's node count for manual scaling. If autoscaling is already - * enabled, manual scaling will be silently ignored. If you wish to disable autoscaling and enable - * manual scaling, please use {@link BigtableInstanceAdminClient#disableClusterAutoscaling(String, - * String, int)} instead. Please note that only clusters that belong to a production instance can - * be resized. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Asynchronously modifies the cluster's node count for manual scaling. If autoscaling is + * already enabled, manual scaling will be silently ignored. If you wish to disable autoscaling + * and enable manual scaling, please use {@link + * BigtableInstanceAdminClient#disableClusterAutoscaling(String, String, int)} instead. Please + * note that only clusters that belong to a production instance can be resized. * *

    {@code
        * ApiFuture clusterFuture = client.resizeCluster("my-instance", "my-cluster", 30);
    @@ -688,6 +795,7 @@ public Cluster resizeCluster(String instanceId, String clusterId, int numServeNo
        * }
    */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture resizeClusterAsync( String instanceId, String clusterId, int numServeNodes) { @@ -711,7 +819,10 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) { } /** - * Modifies the cluster's autoscaling config. This will enable autoscaling and disable manual + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Modifies the cluster's autoscaling config. This will enable autoscaling and disable manual * scaling if the cluster is manually scaled. Please note that only clusters that belong to a * production instance can enable autoscaling. * @@ -726,6 +837,7 @@ public Cluster apply(com.google.bigtable.admin.v2.Cluster proto) { * Cluster cluster = client.updateClusterAutoscalingConfig(clusterAutoscalingConfig); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Cluster updateClusterAutoscalingConfig( @Nonnull ClusterAutoscalingConfig clusterAutoscalingConfig) { return ApiExceptions.callAndTranslateApiException( @@ -733,7 +845,10 @@ public Cluster updateClusterAutoscalingConfig( } /** - * Asynchronously modifies the cluster's autoscaling config. This will enable autoscaling and + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Asynchronously modifies the cluster's autoscaling config. This will enable autoscaling and * disable manual scaling if the cluster is manually scaled. Please note that only clusters that * belong to a production instance can enable autoscaling. * @@ -750,6 +865,7 @@ public Cluster updateClusterAutoscalingConfig( * Cluster cluster = clusterApiFuture.get(); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture updateClusterAutoscalingConfigAsync( @Nonnull ClusterAutoscalingConfig clusterAutoscalingConfig) { PartialUpdateClusterRequest proto = clusterAutoscalingConfig.toProto(projectId); @@ -761,8 +877,11 @@ public ApiFuture updateClusterAutoscalingConfigAsync( } /** - * Disables autoscaling and enables manual scaling by setting a static node count for the cluster. - * Please note that only clusters that belong to a production instance can be resized. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Disables autoscaling and enables manual scaling by setting a static node count for the + * cluster. Please note that only clusters that belong to a production instance can be resized. * *

    Sample code: * @@ -770,15 +889,19 @@ public ApiFuture updateClusterAutoscalingConfigAsync( * Cluster cluster = client.disableClusterAutoscaling("my-instance", "my-cluster", 3); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Cluster disableClusterAutoscaling(String instanceId, String clusterId, int staticSize) { return ApiExceptions.callAndTranslateApiException( disableClusterAutoscalingAsync(instanceId, clusterId, staticSize)); } /** - * Asynchronously disables autoscaling and enables manual scaling by setting a static node count - * for the cluster. Please note that only clusters that belong to a production instance can be - * resized. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#partialUpdateClusterAsync(com.google.bigtable.admin.v2.PartialUpdateClusterRequest)}. + * + *

    Asynchronously disables autoscaling and enables manual scaling by setting a static node + * count for the cluster. Please note that only clusters that belong to a production instance can + * be resized. * *

    Sample code: * @@ -787,6 +910,7 @@ public Cluster disableClusterAutoscaling(String instanceId, String clusterId, in * Cluster cluster = clusterApiFuture.get(); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture disableClusterAutoscalingAsync( String instanceId, String clusterId, int staticSize) { String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); @@ -814,7 +938,10 @@ public ApiFuture disableClusterAutoscalingAsync( } /** - * Deletes the specified cluster. Please note that an instance must have at least 1 cluster. To + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteCluster(com.google.bigtable.admin.v2.DeleteClusterRequest)}. + * + *

    Deletes the specified cluster. Please note that an instance must have at least 1 cluster. To * remove the last cluster, please use {@link BigtableInstanceAdminClient#deleteInstance(String)}. * *

    Sample code: @@ -824,13 +951,17 @@ public ApiFuture disableClusterAutoscalingAsync( * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteCluster(String instanceId, String clusterId) { ApiExceptions.callAndTranslateApiException(deleteClusterAsync(instanceId, clusterId)); } /** - * Asynchronously deletes the specified cluster. Please note that an instance must have at least 1 - * cluster. To remove the last cluster, please use {@link + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteCluster(com.google.bigtable.admin.v2.DeleteClusterRequest)}. + * + *

    Asynchronously deletes the specified cluster. Please note that an instance must have at + * least 1 cluster. To remove the last cluster, please use {@link * BigtableInstanceAdminClient#deleteInstanceAsync(String)}. * *

    Sample code: @@ -841,6 +972,7 @@ public void deleteCluster(String instanceId, String clusterId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteClusterAsync(String instanceId, String clusterId) { String name = NameUtil.formatClusterName(projectId, instanceId, clusterId); @@ -859,7 +991,10 @@ public Void apply(Empty input) { } /** - * Creates a new app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createAppProfile(com.google.bigtable.admin.v2.CreateAppProfileRequest)}. + * + *

    Creates a new app profile. * *

    Sample code: * @@ -873,12 +1008,16 @@ public Void apply(Empty input) { * @see CreateAppProfileRequest */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AppProfile createAppProfile(CreateAppProfileRequest request) { return ApiExceptions.callAndTranslateApiException(createAppProfileAsync(request)); } /** - * Asynchronously creates a new app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createAppProfile(com.google.bigtable.admin.v2.CreateAppProfileRequest)}. + * + *

    Asynchronously creates a new app profile. * *

    Sample code: * @@ -894,6 +1033,7 @@ public AppProfile createAppProfile(CreateAppProfileRequest request) { * @see CreateAppProfileRequest */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createAppProfileAsync(CreateAppProfileRequest request) { return ApiFutures.transform( stub.createAppProfileCallable().futureCall(request.toProto(projectId)), @@ -907,7 +1047,10 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { } /** - * Gets the app profile by ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getAppProfile(com.google.bigtable.admin.v2.GetAppProfileRequest)}. + * + *

    Gets the app profile by ID. * *

    Sample code: * @@ -917,12 +1060,16 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { * * @see AppProfile */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AppProfile getAppProfile(String instanceId, String appProfileId) { return ApiExceptions.callAndTranslateApiException(getAppProfileAsync(instanceId, appProfileId)); } /** - * Asynchronously gets the app profile by ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getAppProfile(com.google.bigtable.admin.v2.GetAppProfileRequest)}. + * + *

    Asynchronously gets the app profile by ID. * *

    Sample code: * @@ -935,6 +1082,7 @@ public AppProfile getAppProfile(String instanceId, String appProfileId) { * @see AppProfile */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getAppProfileAsync(String instanceId, String appProfileId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); @@ -952,7 +1100,10 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { } /** - * Lists all app profiles of the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listAppProfiles(com.google.bigtable.admin.v2.ListAppProfilesRequest)}. + * + *

    Lists all app profiles of the specified instance. * *

    Sample code: * @@ -963,12 +1114,16 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { * @see AppProfile */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listAppProfiles(String instanceId) { return ApiExceptions.callAndTranslateApiException(listAppProfilesAsync(instanceId)); } /** - * Asynchronously lists all app profiles of the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listAppProfiles(com.google.bigtable.admin.v2.ListAppProfilesRequest)}. + * + *

    Asynchronously lists all app profiles of the specified instance. * *

    Sample code: * @@ -981,6 +1136,7 @@ public List listAppProfiles(String instanceId) { * @see AppProfile */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listAppProfilesAsync(String instanceId) { String instanceName = NameUtil.formatInstanceName(projectId, instanceId); @@ -1046,7 +1202,10 @@ public List apply(List inpu } /** - * Updates an existing app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateAppProfile(com.google.bigtable.admin.v2.UpdateAppProfileRequest)}. + * + *

    Updates an existing app profile. * *

    Sample code: * @@ -1062,12 +1221,16 @@ public List apply(List inpu * @see UpdateAppProfileRequest */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AppProfile updateAppProfile(UpdateAppProfileRequest request) { return ApiExceptions.callAndTranslateApiException(updateAppProfileAsync(request)); } /** - * Asynchronously updates an existing app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateAppProfile(com.google.bigtable.admin.v2.UpdateAppProfileRequest)}. + * + *

    Asynchronously updates an existing app profile. * *

    Sample code: * @@ -1093,6 +1256,7 @@ public AppProfile updateAppProfile(UpdateAppProfileRequest request) { * @see UpdateAppProfileRequest */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture updateAppProfileAsync(UpdateAppProfileRequest request) { return ApiFutures.transform( stub.updateAppProfileOperationCallable().futureCall(request.toProto(projectId)), @@ -1106,7 +1270,10 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { } /** - * Deletes the specified app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest)}. + * + *

    Deletes the specified app profile. * *

    Sample code: * @@ -1115,13 +1282,17 @@ public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteAppProfile(String instanceId, String appProfileId) { ApiExceptions.callAndTranslateApiException( deleteAppProfileAsync(instanceId, appProfileId, false)); } /** - * Asynchronously deletes the specified app profile. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest)}. + * + *

    Asynchronously deletes the specified app profile. * *

    Sample code: * @@ -1132,12 +1303,16 @@ public void deleteAppProfile(String instanceId, String appProfileId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteAppProfileAsync(String instanceId, String appProfileId) { return deleteAppProfileAsync(instanceId, appProfileId, false); } /** - * Deletes the specified app profile with an option to force deletion. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest)}. + * + *

    Deletes the specified app profile with an option to force deletion. * *

    Sample code: * @@ -1146,13 +1321,17 @@ public ApiFuture deleteAppProfileAsync(String instanceId, String appProfil * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteAppProfile(String instanceId, String appProfileId, boolean forceDelete) { ApiExceptions.callAndTranslateApiException( deleteAppProfileAsync(instanceId, appProfileId, forceDelete)); } /** - * Asynchronously deletes the specified app profile with an option to force deletion. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest)}. + * + *

    Asynchronously deletes the specified app profile with an option to force deletion. * *

    Sample code: * @@ -1163,6 +1342,7 @@ public void deleteAppProfile(String instanceId, String appProfileId, boolean for * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteAppProfileAsync( String instanceId, String appProfileId, boolean forceDelete) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); @@ -1181,7 +1361,10 @@ public Void apply(Empty input) { } /** - * Gets the IAM access control policy for the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getIamPolicy(com.google.iam.v1.GetIamPolicyRequest)}. + * + *

    Gets the IAM access control policy for the specified instance. * *

    Sample code: * @@ -1197,12 +1380,16 @@ public Void apply(Empty input) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy getIamPolicy(String instanceId) { return ApiExceptions.callAndTranslateApiException(getIamPolicyAsync(instanceId)); } /** - * Asynchronously gets the IAM access control policy for the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getIamPolicy(com.google.iam.v1.GetIamPolicyRequest)}. + * + *

    Asynchronously gets the IAM access control policy for the specified instance. * *

    Sample code: * @@ -1229,6 +1416,7 @@ public Policy getIamPolicy(String instanceId) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getIamPolicyAsync(String instanceId) { String name = NameUtil.formatInstanceName(projectId, instanceId); @@ -1248,7 +1436,10 @@ public Policy apply(com.google.iam.v1.Policy proto) { } /** - * Replaces the IAM policy associated with the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#setIamPolicy(com.google.iam.v1.SetIamPolicyRequest)}. + * + *

    Replaces the IAM policy associated with the specified instance. * *

    Sample code: * @@ -1265,12 +1456,16 @@ public Policy apply(com.google.iam.v1.Policy proto) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy setIamPolicy(String instanceId, Policy policy) { return ApiExceptions.callAndTranslateApiException(setIamPolicyAsync(instanceId, policy)); } /** - * Asynchronously replaces the IAM policy associated with the specified instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#setIamPolicy(com.google.iam.v1.SetIamPolicyRequest)}. + * + *

    Asynchronously replaces the IAM policy associated with the specified instance. * *

    Sample code: * @@ -1301,6 +1496,7 @@ public Policy setIamPolicy(String instanceId, Policy policy) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture setIamPolicyAsync(String instanceId, Policy policy) { String name = NameUtil.formatInstanceName(projectId, instanceId); final IamPolicyMarshaller marshaller = new IamPolicyMarshaller(); @@ -1323,8 +1519,11 @@ public Policy apply(com.google.iam.v1.Policy proto) { } /** - * Tests whether the caller has the given permissions for the specified instance. Returns a subset - * of the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest)}. + * + *

    Tests whether the caller has the given permissions for the specified instance. Returns a + * subset of the specified permissions that the caller has. * *

    Sample code: * @@ -1341,14 +1540,18 @@ public Policy apply(com.google.iam.v1.Policy proto) { * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List testIamPermission(String instanceId, String... permissions) { return ApiExceptions.callAndTranslateApiException( testIamPermissionAsync(instanceId, permissions)); } /** - * Asynchronously tests whether the caller has the given permissions for the specified instance. - * Returns a subset of the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest)}. + * + *

    Asynchronously tests whether the caller has the given permissions for the specified + * instance. Returns a subset of the specified permissions that the caller has. * *

    Sample code: * @@ -1374,6 +1577,7 @@ public List testIamPermission(String instanceId, String... permissions) * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> testIamPermissionAsync(String instanceId, String... permissions) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() @@ -1392,6 +1596,674 @@ public List apply(TestIamPermissionsResponse input) { MoreExecutors.directExecutor()); } + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createMaterializedViewAsync(com.google.bigtable.admin.v2.CreateMaterializedViewRequest)}. + * + *

    Creates a new materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * MaterializedView materializedView = client.createMaterializedView(
    +   *   CreateMaterializedViewRequest.of("my-instance", "my-new-materialized-view")
    +   *     .setQuery(query)
    +   * );
    +   * }
    + * + * @see CreateMaterializedViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public MaterializedView createMaterializedView(CreateMaterializedViewRequest request) { + return ApiExceptions.callAndTranslateApiException(createMaterializedViewAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createMaterializedViewAsync(com.google.bigtable.admin.v2.CreateMaterializedViewRequest)}. + * + *

    Asynchronously creates a new materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture materializedViewFuture = client.createMaterializedViewAsync(
    +   *   CreateMaterializedViewRequest.of("my-instance", "my-new-materialized-view")
    +   *     .setQuery(query)
    +   * );
    +   *
    +   * MaterializedView materializedView = materializedViewFuture.get();
    +   * }
    + * + * @see CreateMaterializedViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture createMaterializedViewAsync( + CreateMaterializedViewRequest request) { + return ApiFutures.transform( + stub.createMaterializedViewOperationCallable().futureCall(request.toProto(projectId)), + new ApiFunction() { + @Override + public MaterializedView apply(com.google.bigtable.admin.v2.MaterializedView proto) { + return MaterializedView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getMaterializedView(com.google.bigtable.admin.v2.GetMaterializedViewRequest)}. + * + *

    Gets the materialized view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * MaterializedView materializedView = client.getMaterializedView("my-instance", "my-materialized-view");
    +   * }
    + * + * @see MaterializedView + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public MaterializedView getMaterializedView(String instanceId, String materializedViewId) { + return ApiExceptions.callAndTranslateApiException( + getMaterializedViewAsync(instanceId, materializedViewId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getMaterializedView(com.google.bigtable.admin.v2.GetMaterializedViewRequest)}. + * + *

    Asynchronously gets the materialized view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture materializedViewFuture = client.getMaterializedViewAsync("my-instance", "my-materialized-view");
    +   *
    +   * MaterializedView materializedView = materializedViewFuture.get();
    +   * }
    + * + * @see MaterializedView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture getMaterializedViewAsync( + String instanceId, String materializedViewId) { + String name = NameUtil.formatMaterializedViewName(projectId, instanceId, materializedViewId); + + GetMaterializedViewRequest request = + GetMaterializedViewRequest.newBuilder().setName(name).build(); + + return ApiFutures.transform( + stub.getMaterializedViewCallable().futureCall(request), + new ApiFunction() { + @Override + public MaterializedView apply(com.google.bigtable.admin.v2.MaterializedView proto) { + return MaterializedView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listMaterializedViews(com.google.bigtable.admin.v2.ListMaterializedViewsRequest)}. + * + *

    Lists all materialized views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * List materializedViews = client.listMaterializedViews("my-instance");
    +   * }
    + * + * @see MaterializedView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public List listMaterializedViews(String instanceId) { + return ApiExceptions.callAndTranslateApiException(listMaterializedViewsAsync(instanceId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listMaterializedViews(com.google.bigtable.admin.v2.ListMaterializedViewsRequest)}. + * + *

    Asynchronously lists all materialized views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture> materializedViewsFuture = client.listMaterializedViewsAsync("my-instance");
    +   *
    +   * List materializedViews = materializedViewFuture.get();
    +   * }
    + * + * @see MaterializedView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture> listMaterializedViewsAsync(String instanceId) { + String instanceName = NameUtil.formatInstanceName(projectId, instanceId); + + ListMaterializedViewsRequest request = + ListMaterializedViewsRequest.newBuilder().setParent(instanceName).build(); + + // TODO(igorbernstein2): try to upstream pagination spooling or figure out a way to expose the + // paginated responses while maintaining the wrapper facade. + + // Fetches the first page. + ApiFuture firstPageFuture = + ApiFutures.transform( + stub.listMaterializedViewsPagedCallable().futureCall(request), + new ApiFunction() { + @Override + public ListMaterializedViewsPage apply(ListMaterializedViewsPagedResponse response) { + return response.getPage(); + } + }, + MoreExecutors.directExecutor()); + + // Fetches the rest of the pages by chaining the futures. + ApiFuture> allProtos = + ApiFutures.transformAsync( + firstPageFuture, + new ApiAsyncFunction< + ListMaterializedViewsPage, List>() { + List responseAccumulator = + Lists.newArrayList(); + + @Override + public ApiFuture> apply( + ListMaterializedViewsPage page) { + // Add all entries from the page + responseAccumulator.addAll(Lists.newArrayList(page.getValues())); + + // If this is the last page, just return the accumulated responses. + if (!page.hasNextPage()) { + return ApiFutures.immediateFuture(responseAccumulator); + } + + // Otherwise fetch the next page. + return ApiFutures.transformAsync( + page.getNextPageAsync(), this, MoreExecutors.directExecutor()); + } + }, + MoreExecutors.directExecutor()); + + // Wraps all of the accumulated protos. + return ApiFutures.transform( + allProtos, + new ApiFunction< + List, List>() { + @Override + public List apply( + List input) { + List results = Lists.newArrayListWithCapacity(input.size()); + for (com.google.bigtable.admin.v2.MaterializedView materializedView : input) { + results.add(MaterializedView.fromProto(materializedView)); + } + return results; + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateMaterializedView(com.google.bigtable.admin.v2.UpdateMaterializedViewRequest)}. + * + *

    Updates an existing materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * MaterializedView existingMaterializedView = client.getMaterializedView("my-instance", "my-materialized-view");
    +   *
    +   * MaterializedView updatedMaterializedView = client.updateMaterializedView(
    +   *   UpdateMaterializedViewRequest.of(existingMaterializedView)
    +   *     .setDeletionProtection(false)
    +   * );
    +   * }
    + * + * @see UpdateMaterializedViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public MaterializedView updateMaterializedView(UpdateMaterializedViewRequest request) { + return ApiExceptions.callAndTranslateApiException(updateMaterializedViewAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateMaterializedView(com.google.bigtable.admin.v2.UpdateMaterializedViewRequest)}. + * + *

    Asynchronously updates an existing materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture existingMaterializedViewFuture = client.getMaterializedViewAsync("my-instance", "my-materialized-view");
    +   *
    +   * ApiFuture updatedMaterializedViewFuture = ApiFutures.transformAsync(
    +   *   existingMaterializedViewFuture,
    +   *   new ApiAsyncFunction() {
    +   *     public ApiFuture apply(MaterializedView existingMaterializedView) {
    +   *       return client.updateMaterializedViewAsync(
    +   *         UpdateMaterializedViewRequest.of(existingMaterializedView)
    +   *           .setDeletionProtection(false)
    +   *       );
    +   *     }
    +   *   },
    +   *   MoreExecutors.directExecutor()
    +   * );
    +   *
    +   * ApiFuture materializedView = updatedMaterializedViewFuture.get();
    +   * }
    + * + * @see UpdateMaterializedViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture updateMaterializedViewAsync( + UpdateMaterializedViewRequest request) { + return ApiFutures.transform( + stub.updateMaterializedViewOperationCallable().futureCall(request.toProto(projectId)), + new ApiFunction() { + @Override + public MaterializedView apply(com.google.bigtable.admin.v2.MaterializedView proto) { + return MaterializedView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteMaterializedView(com.google.bigtable.admin.v2.DeleteMaterializedViewRequest)}. + * + *

    Deletes the specified materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteMaterializedView("my-instance", "my-materialized-view");
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public void deleteMaterializedView(String instanceId, String materializedViewId) { + ApiExceptions.callAndTranslateApiException( + deleteMaterializedViewAsync(instanceId, materializedViewId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteMaterializedView(com.google.bigtable.admin.v2.DeleteMaterializedViewRequest)}. + * + *

    Asynchronously deletes the specified materialized view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture deleteFuture = client.deleteMaterializedViewAsync("my-instance", "my-materialized-view");
    +   *
    +   * deleteFuture.get();
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture deleteMaterializedViewAsync(String instanceId, String materializedViewId) { + + String name = NameUtil.formatMaterializedViewName(projectId, instanceId, materializedViewId); + DeleteMaterializedViewRequest request = + DeleteMaterializedViewRequest.newBuilder().setName(name).build(); + + return ApiFutures.transform( + stub.deleteMaterializedViewCallable().futureCall(request), + new ApiFunction() { + @Override + public Void apply(Empty input) { + return null; + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createLogicalViewAsync(com.google.bigtable.admin.v2.CreateLogicalViewRequest)}. + * + *

    Creates a new logical view. + * + *

    Sample code: + * + *

    {@code
    +   * LogicalView logicalView = client.createLogicalView(
    +   *   CreateLogicalViewRequest.of("my-instance", "my-new-logical-view")
    +   *     .setQuery(query)
    +   * );
    +   * }
    + * + * @see CreateLogicalViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public LogicalView createLogicalView(CreateLogicalViewRequest request) { + return ApiExceptions.callAndTranslateApiException(createLogicalViewAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#createLogicalViewAsync(com.google.bigtable.admin.v2.CreateLogicalViewRequest)}. + * + *

    Asynchronously creates a new logical view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture logicalViewFuture = client.createLogicalViewAsync(
    +   *   CreateLogicalViewRequest.of("my-instance", "my-new-logical-view")
    +   *     .setQuery(query)
    +   * );
    +   *
    +   * LogicalView logicalView = logicalViewFuture.get();
    +   * }
    + * + * @see CreateLogicalViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture createLogicalViewAsync(CreateLogicalViewRequest request) { + return ApiFutures.transform( + stub.createLogicalViewOperationCallable().futureCall(request.toProto(projectId)), + new ApiFunction() { + @Override + public LogicalView apply(com.google.bigtable.admin.v2.LogicalView proto) { + return LogicalView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getLogicalView(com.google.bigtable.admin.v2.GetLogicalViewRequest)}. + * + *

    Gets the logical view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * LogicalView logicalView = client.getLogicalView("my-instance", "my-logical-view");
    +   * }
    + * + * @see LogicalView + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public LogicalView getLogicalView(String instanceId, String logicalViewId) { + return ApiExceptions.callAndTranslateApiException( + getLogicalViewAsync(instanceId, logicalViewId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#getLogicalView(com.google.bigtable.admin.v2.GetLogicalViewRequest)}. + * + *

    Asynchronously gets the logical view by ID. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture logicalViewFuture = client.getLogicalViewAsync("my-instance", "my-logical-view");
    +   *
    +   * LogicalView logicalView = logicalViewFuture.get();
    +   * }
    + * + * @see LogicalView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture getLogicalViewAsync(String instanceId, String logicalViewId) { + String name = NameUtil.formatLogicalViewName(projectId, instanceId, logicalViewId); + + GetLogicalViewRequest request = GetLogicalViewRequest.newBuilder().setName(name).build(); + + return ApiFutures.transform( + stub.getLogicalViewCallable().futureCall(request), + new ApiFunction() { + @Override + public LogicalView apply(com.google.bigtable.admin.v2.LogicalView proto) { + return LogicalView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listLogicalViews(com.google.bigtable.admin.v2.ListLogicalViewsRequest)}. + * + *

    Lists all logical views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * List logicalViews = client.listLogicalViews("my-instance");
    +   * }
    + * + * @see LogicalView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public List listLogicalViews(String instanceId) { + return ApiExceptions.callAndTranslateApiException(listLogicalViewsAsync(instanceId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#listLogicalViews(com.google.bigtable.admin.v2.ListLogicalViewsRequest)}. + * + *

    Asynchronously lists all logical views of the specified instance. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture> logicalViewsFuture = client.listLogicalViewsAsync("my-instance");
    +   *
    +   * List logicalViews = logicalViewFuture.get();
    +   * }
    + * + * @see LogicalView + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture> listLogicalViewsAsync(String instanceId) { + String instanceName = NameUtil.formatInstanceName(projectId, instanceId); + + ListLogicalViewsRequest request = + ListLogicalViewsRequest.newBuilder().setParent(instanceName).build(); + + // TODO(igorbernstein2): try to upstream pagination spooling or figure out a way to expose the + // paginated responses while maintaining the wrapper facade. + + // Fetches the first page. + ApiFuture firstPageFuture = + ApiFutures.transform( + stub.listLogicalViewsPagedCallable().futureCall(request), + new ApiFunction() { + @Override + public ListLogicalViewsPage apply(ListLogicalViewsPagedResponse response) { + return response.getPage(); + } + }, + MoreExecutors.directExecutor()); + + // Fetches the rest of the pages by chaining the futures. + ApiFuture> allProtos = + ApiFutures.transformAsync( + firstPageFuture, + new ApiAsyncFunction< + ListLogicalViewsPage, List>() { + List responseAccumulator = + Lists.newArrayList(); + + @Override + public ApiFuture> apply( + ListLogicalViewsPage page) { + // Add all entries from the page + responseAccumulator.addAll(Lists.newArrayList(page.getValues())); + + // If this is the last page, just return the accumulated responses. + if (!page.hasNextPage()) { + return ApiFutures.immediateFuture(responseAccumulator); + } + + // Otherwise fetch the next page. + return ApiFutures.transformAsync( + page.getNextPageAsync(), this, MoreExecutors.directExecutor()); + } + }, + MoreExecutors.directExecutor()); + + // Wraps all of the accumulated protos. + return ApiFutures.transform( + allProtos, + new ApiFunction, List>() { + @Override + public List apply(List input) { + List results = Lists.newArrayListWithCapacity(input.size()); + for (com.google.bigtable.admin.v2.LogicalView logicalView : input) { + results.add(LogicalView.fromProto(logicalView)); + } + return results; + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateLogicalView(com.google.bigtable.admin.v2.UpdateLogicalViewRequest)}. + * + *

    Updates an existing logical view. + * + *

    Sample code: + * + *

    {@code
    +   * LogicalView existingLogicalView = client.getLogicalView("my-instance", "my-logical-view");
    +   *
    +   * LogicalView updatedLogicalView = client.updateLogicalView(
    +   *   UpdateLogicalViewRequest.of(existingLogicalView)
    +   *     .setQuery(query)
    +   * );
    +   * }
    + * + * @see UpdateLogicalViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public LogicalView updateLogicalView(UpdateLogicalViewRequest request) { + return ApiExceptions.callAndTranslateApiException(updateLogicalViewAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#updateLogicalView(com.google.bigtable.admin.v2.UpdateLogicalViewRequest)}. + * + *

    Asynchronously updates an existing logical view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture existingLogicalViewFuture = client.getLogicalViewAsync("my-instance", "my-logical-view");
    +   *
    +   * ApiFuture updatedLogicalViewFuture = ApiFutures.transformAsync(
    +   *   existingLogicalViewFuture,
    +   *   new ApiAsyncFunction() {
    +   *     public ApiFuture apply(LogicalView existingLogicalView) {
    +   *       return client.updateLogicalViewAsync(
    +   *         UpdateLogicalViewRequest.of(existingLogicalView)
    +   *           .setQuery(query)
    +   *       );
    +   *     }
    +   *   },
    +   *   MoreExecutors.directExecutor()
    +   * );
    +   *
    +   * ApiFuture logicalView = updatedLogicalViewFuture.get();
    +   * }
    + * + * @see UpdateLogicalViewRequest + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture updateLogicalViewAsync(UpdateLogicalViewRequest request) { + return ApiFutures.transform( + stub.updateLogicalViewOperationCallable().futureCall(request.toProto(projectId)), + new ApiFunction() { + @Override + public LogicalView apply(com.google.bigtable.admin.v2.LogicalView proto) { + return LogicalView.fromProto(proto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteLogicalView(com.google.bigtable.admin.v2.DeleteLogicalViewRequest)}. + * + *

    Deletes the specified logical view. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteLogicalView("my-instance", "my-logical-view");
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public void deleteLogicalView(String instanceId, String logicalViewId) { + ApiExceptions.callAndTranslateApiException(deleteLogicalViewAsync(instanceId, logicalViewId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient#deleteLogicalView(com.google.bigtable.admin.v2.DeleteLogicalViewRequest)}. + * + *

    Asynchronously deletes the specified logical view. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture deleteFuture = client.deleteLogicalViewAsync("my-instance", "my-logical-view");
    +   *
    +   * deleteFuture.get();
    +   * }
    + */ + @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture deleteLogicalViewAsync(String instanceId, String logicalViewId) { + + String name = NameUtil.formatLogicalViewName(projectId, instanceId, logicalViewId); + DeleteLogicalViewRequest request = DeleteLogicalViewRequest.newBuilder().setName(name).build(); + + return ApiFutures.transform( + stub.deleteLogicalViewCallable().futureCall(request), + new ApiFunction() { + @Override + public Void apply(Empty input) { + return null; + } + }, + MoreExecutors.directExecutor()); + } + /** * Simple adapter to expose {@link DefaultMarshaller} to this class. It enables this client to * convert to/from IAM wrappers and protobufs. diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java index 42b0ea9b5d..974317a9d1 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettings.java @@ -113,6 +113,16 @@ public String toString() { .add("getIamPolicySettings", stubSettings.getIamPolicySettings()) .add("setIamPolicySettings", stubSettings.setIamPolicySettings()) .add("testIamPermissionsSettings", stubSettings.testIamPermissionsSettings()) + .add("createMaterializedViewSettings", stubSettings.createMaterializedViewSettings()) + .add("getMaterializedViewSettings", stubSettings.getMaterializedViewSettings()) + .add("listMaterializedViewsSettings", stubSettings.listMaterializedViewsSettings()) + .add("updateMaterializedViewSettings", stubSettings.updateMaterializedViewSettings()) + .add("deleteMaterializedViewSettings", stubSettings.deleteMaterializedViewSettings()) + .add("createLogicalViewSettings", stubSettings.createLogicalViewSettings()) + .add("getLogicalViewSettings", stubSettings.getLogicalViewSettings()) + .add("listLogicalViewsSettings", stubSettings.listLogicalViewsSettings()) + .add("updateLogicalViewSettings", stubSettings.updateLogicalViewSettings()) + .add("deleteLogicalViewSettings", stubSettings.deleteLogicalViewSettings()) .add("stubSettings", stubSettings) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java index f640bb6a30..3cd7fef840 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java @@ -19,18 +19,22 @@ import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.ObsoleteApi; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.rpc.ApiExceptions; import com.google.api.gax.rpc.NotFoundException; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListBackupsRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; import com.google.bigtable.admin.v2.ListTablesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.Table.ClusterState; @@ -41,14 +45,18 @@ import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AuthorizedView; import com.google.cloud.bigtable.admin.v2.models.Backup; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; import com.google.cloud.bigtable.admin.v2.models.CopyBackupRequest; import com.google.cloud.bigtable.admin.v2.models.CreateAuthorizedViewRequest; import com.google.cloud.bigtable.admin.v2.models.CreateBackupRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateSchemaBundleRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.EncryptionInfo; import com.google.cloud.bigtable.admin.v2.models.GCRules; @@ -56,12 +64,16 @@ import com.google.cloud.bigtable.admin.v2.models.OptimizeRestoredTableOperationToken; import com.google.cloud.bigtable.admin.v2.models.RestoreTableRequest; import com.google.cloud.bigtable.admin.v2.models.RestoredTableResult; +import com.google.cloud.bigtable.admin.v2.models.SchemaBundle; import com.google.cloud.bigtable.admin.v2.models.Table; import com.google.cloud.bigtable.admin.v2.models.UpdateAuthorizedViewRequest; import com.google.cloud.bigtable.admin.v2.models.UpdateBackupRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateSchemaBundleRequest; import com.google.cloud.bigtable.admin.v2.models.UpdateTableRequest; import com.google.cloud.bigtable.admin.v2.stub.EnhancedBigtableTableAdminStub; +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext; import com.google.common.base.Preconditions; +import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -92,13 +104,30 @@ * // One instance per application. * BigtableTableAdminClient client = BigtableTableAdminClient.create("[PROJECT]", "[INSTANCE]"); * - * CreateTableRequest request = - * CreateTableRequest.of("my-table") - * .addFamily("cf1") - * .addFamily("cf2", GCRULES.maxVersions(10)) - * .addSplit(ByteString.copyFromUtf8("b")) - * .addSplit(ByteString.copyFromUtf8("q")); - * client.createTable(request); + * com.google.bigtable.admin.v2.CreateTableRequest request = + * com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setTableId("my-table") + * .setTable( + * com.google.bigtable.admin.v2.Table.newBuilder() + * .putColumnFamilies("cf1", com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance()) + * .putColumnFamilies( + * "cf2", + * com.google.bigtable.admin.v2.ColumnFamily.newBuilder() + * .setGcRule(GcRuleBuilder.maxVersions(10)) + * .build()) + * .build()) + * .addInitialSplits( + * com.google.bigtable.admin.v2.CreateTableRequest.Split.newBuilder() + * .setKey(ByteString.copyFromUtf8("b")) + * .build()) + * .addInitialSplits( + * com.google.bigtable.admin.v2.CreateTableRequest.Split.newBuilder() + * .setKey(ByteString.copyFromUtf8("q")) + * .build()) + * .build(); + * + * client.getBaseClient().createTable(request); * * // Cleanup during application shutdown. * client.close(); @@ -140,6 +169,7 @@ public final class BigtableTableAdminClient implements AutoCloseable { private final EnhancedBigtableTableAdminStub stub; private final String projectId; private final String instanceId; + private final BaseBigtableTableAdminClient baseClient; /** Constructs an instance of BigtableTableAdminClient with the given project and instance IDs. */ public static BigtableTableAdminClient create( @@ -154,8 +184,10 @@ public static BigtableTableAdminClient create( /** Constructs an instance of BigtableTableAdminClient with the given settings. */ public static BigtableTableAdminClient create(@Nonnull BigtableTableAdminSettings settings) throws IOException { + TableAdminRequestContext requestContext = + TableAdminRequestContext.create(settings.getProjectId(), settings.getInstanceId()); EnhancedBigtableTableAdminStub stub = - EnhancedBigtableTableAdminStub.createEnhanced(settings.getStubSettings()); + EnhancedBigtableTableAdminStub.createEnhanced(settings.getStubSettings(), requestContext); return create(settings.getProjectId(), settings.getInstanceId(), stub); } @@ -177,6 +209,7 @@ private BigtableTableAdminClient( this.projectId = projectId; this.instanceId = instanceId; this.stub = stub; + this.baseClient = BaseBigtableTableAdminClient.create(stub); } /** Gets the project ID of the instance whose tables this client manages. */ @@ -189,13 +222,24 @@ public String getInstanceId() { return instanceId; } + /** + * Returns the modern autogenerated client. This provides access to the newest features and + * proto-based methods. + */ + public BaseBigtableTableAdminClient getBaseClient() { + return baseClient; + } + @Override public void close() { stub.close(); } /** - * Creates a new table with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createTable(com.google.bigtable.admin.v2.CreateTableRequest)}. + * + *

    Creates a new table with the specified configuration. * *

    Sample code: * @@ -219,12 +263,16 @@ public void close() { * @see CreateTableRequest for available options. * @see GCRules for the documentation on available garbage collection rules. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Table createTable(CreateTableRequest request) { return ApiExceptions.callAndTranslateApiException(createTableAsync(request)); } /** - * Asynchronously creates a new table with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createTableCallable()}. + * + *

    Asynchronously creates a new table with the specified configuration. * *

    Sample code: * @@ -263,13 +311,17 @@ public Table createTable(CreateTableRequest request) { * @see GCRules for the documentation on available garbage collection rules. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createTableAsync(CreateTableRequest request) { return transformToTableResponse( this.stub.createTableCallable().futureCall(request.toProto(projectId, instanceId))); } /** - * Update a table with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateTable(com.google.bigtable.admin.v2.UpdateTableRequest)}. + * + *

    Update a table with the specified configuration. * *

    Sample code: * @@ -289,12 +341,16 @@ public ApiFuture

    createTableAsync(CreateTableRequest request) { * * @see UpdateTableRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Table updateTable(UpdateTableRequest request) { return ApiExceptions.callAndTranslateApiException(updateTableAsync(request)); } /** - * Asynchronously update a table with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateTableOperationCallable()}. + * + *

    Asynchronously update a table with the specified configuration. * *

    Sample code: * @@ -322,6 +378,7 @@ public Table updateTable(UpdateTableRequest request) { * * @see UpdateTableRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture

    updateTableAsync(UpdateTableRequest request) { return ApiFutures.transform( stub.updateTableOperationCallable().futureCall(request.toProto(projectId, instanceId)), @@ -335,7 +392,10 @@ public Table apply(com.google.bigtable.admin.v2.Table tableProto) { } /** - * Creates, updates and drops column families as specified in the request. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#modifyColumnFamilies(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest)}. + * + *

    Creates, updates and drops column families as specified in the request. * *

    Sample code: * @@ -368,12 +428,16 @@ public Table apply(com.google.bigtable.admin.v2.Table tableProto) { * * @see ModifyColumnFamiliesRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Table modifyFamilies(ModifyColumnFamiliesRequest request) { return ApiExceptions.callAndTranslateApiException(modifyFamiliesAsync(request)); } /** - * Asynchronously creates, updates, and drops column families as specified in the request. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#modifyColumnFamiliesCallable()}. + * + *

    Asynchronously creates, updates, and drops column families as specified in the request. * *

    Sample code: * @@ -420,6 +484,7 @@ public Table modifyFamilies(ModifyColumnFamiliesRequest request) { * @see ModifyColumnFamiliesRequest for available options. */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture

    modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { return transformToTableResponse( this.stub @@ -428,7 +493,10 @@ public ApiFuture
    modifyFamiliesAsync(ModifyColumnFamiliesRequest request) } /** - * Deletes the table specified by the table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteTable(com.google.bigtable.admin.v2.DeleteTableRequest)}. + * + *

    Deletes the table specified by the table ID. * *

    Sample code: * @@ -436,12 +504,16 @@ public ApiFuture

    modifyFamiliesAsync(ModifyColumnFamiliesRequest request) * client.deleteTable("my-table"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteTable(String tableId) { ApiExceptions.callAndTranslateApiException(deleteTableAsync(tableId)); } /** - * Asynchronously deletes the table specified by the table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteTableCallable()}. + * + *

    Asynchronously deletes the table specified by the table ID. * *

    Sample code: * @@ -464,6 +536,7 @@ public void deleteTable(String tableId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteTableAsync(String tableId) { DeleteTableRequest request = DeleteTableRequest.newBuilder().setName(getTableName(tableId)).build(); @@ -472,7 +545,10 @@ public ApiFuture deleteTableAsync(String tableId) { } /** - * Checks if the table specified by the table ID exists. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTable(com.google.bigtable.admin.v2.GetTableRequest)}. + * + *

    Checks if the table specified by the table ID exists. * *

    Sample code: * @@ -482,12 +558,16 @@ public ApiFuture deleteTableAsync(String tableId) { * } * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public boolean exists(String tableId) { return ApiExceptions.callAndTranslateApiException(existsAsync(tableId)); } /** - * Asynchronously checks if the table specified by the table ID exists. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTableCallable()}. + * + *

    Asynchronously checks if the table specified by the table ID exists. * *

    Sample code: * @@ -513,6 +593,7 @@ public boolean exists(String tableId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture existsAsync(String tableId) { ApiFuture

    protoFuture = @@ -542,7 +623,10 @@ public Boolean apply(NotFoundException ignored) { } /** - * Gets the table metadata by table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTable(com.google.bigtable.admin.v2.GetTableRequest)}. + * + *

    Gets the table metadata by table ID. * *

    Sample code: * @@ -557,12 +641,16 @@ public Boolean apply(NotFoundException ignored) { * } * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Table getTable(String tableId) { return ApiExceptions.callAndTranslateApiException(getTableAsync(tableId)); } /** - * Asynchronously gets the table metadata by table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTableCallable()}. + * + *

    Asynchronously gets the table metadata by table ID. * *

    Sample code: * @@ -589,6 +677,7 @@ public Table getTable(String tableId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture

    getTableAsync(String tableId) { return getTableAsync(tableId, com.google.bigtable.admin.v2.Table.View.SCHEMA_VIEW); } @@ -602,21 +691,29 @@ private ApiFuture
    getTableAsync( } /** - * Gets the current encryption info for the table across all of the clusters. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTable(com.google.bigtable.admin.v2.GetTableRequest)}. + * + *

    Gets the current encryption info for the table across all of the clusters. * *

    The returned Map will be keyed by cluster id and contain a status for all of the keys in * use. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Map> getEncryptionInfo(String tableId) { return ApiExceptions.callAndTranslateApiException(getEncryptionInfoAsync(tableId)); } /** - * Asynchronously gets the current encryption info for the table across all of the clusters. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getTableCallable()}. + * + *

    Asynchronously gets the current encryption info for the table across all of the clusters. * *

    The returned Map will be keyed by cluster id and contain a status for all of the keys in * use. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture>> getEncryptionInfoAsync(String tableId) { GetTableRequest request = GetTableRequest.newBuilder() @@ -648,23 +745,31 @@ public Map> apply(com.google.bigtable.admin.v2.Tabl } /** - * Lists all table IDs in the instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listTables(com.google.bigtable.admin.v2.ListTablesRequest)}. + * + *

    Lists all table IDs in the instance. * *

    Sample code: * *

    {@code
        * List tableIds = client.listTables();
    +   * System.out.println("Got list of tables:");
        * for(String tableId: tableIds) {
    -   *   System.out.println(name.getTable());
    +   *   System.out.println(tableId);
        * }
        * }
    */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listTables() { return ApiExceptions.callAndTranslateApiException(listTablesAsync()); } /** - * Asynchronously lists all table IDs in the instance. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listTablesPagedCallable()}. + * + *

    Asynchronously lists all table IDs in the instance. * *

    Sample code: * @@ -689,6 +794,7 @@ public List listTables() { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listTablesAsync() { ListTablesRequest request = ListTablesRequest.newBuilder() @@ -752,7 +858,10 @@ public List apply(List protos) { } /** - * Drops rows by the specified row key prefix and table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest)}. + * + *

    Drops rows by the specified row key prefix and table ID. * *

    Please note that this method is considered part of the admin API and is rate limited. * @@ -762,12 +871,16 @@ public List apply(List protos) { * client.dropRowRange("my-table", "prefix"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void dropRowRange(String tableId, String rowKeyPrefix) { ApiExceptions.callAndTranslateApiException(dropRowRangeAsync(tableId, rowKeyPrefix)); } /** - * Asynchronously drops rows by the specified row key prefix and table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRangeCallable()}. + * + *

    Asynchronously drops rows by the specified row key prefix and table ID. * *

    Please note that this method is considered part of the admin API and is rate limited. * @@ -792,12 +905,16 @@ public void dropRowRange(String tableId, String rowKeyPrefix) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture dropRowRangeAsync(String tableId, String rowKeyPrefix) { return dropRowRangeAsync(tableId, ByteString.copyFromUtf8(rowKeyPrefix)); } /** - * Drops rows by the specified row key prefix and table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest)}. + * + *

    Drops rows by the specified row key prefix and table ID. * *

    Please note that this method is considered part of the admin API and is rate limited. * @@ -808,12 +925,16 @@ public ApiFuture dropRowRangeAsync(String tableId, String rowKeyPrefix) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void dropRowRange(String tableId, ByteString rowKeyPrefix) { ApiExceptions.callAndTranslateApiException(dropRowRangeAsync(tableId, rowKeyPrefix)); } /** - * Asynchronously drops rows by the specified row key prefix and table ID. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRangeCallable()}. + * + *

    Asynchronously drops rows by the specified row key prefix and table ID. * *

    Please note that this method is considered part of the admin API and is rate limited. * @@ -838,6 +959,7 @@ public void dropRowRange(String tableId, ByteString rowKeyPrefix) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture dropRowRangeAsync(String tableId, ByteString rowKeyPrefix) { DropRowRangeRequest request = DropRowRangeRequest.newBuilder() @@ -849,7 +971,10 @@ public ApiFuture dropRowRangeAsync(String tableId, ByteString rowKeyPrefix } /** - * Drops all data in the table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRange(com.google.bigtable.admin.v2.DropRowRangeRequest)}. + * + *

    Drops all data in the table. * *

    Sample code: * @@ -857,12 +982,16 @@ public ApiFuture dropRowRangeAsync(String tableId, ByteString rowKeyPrefix * client.dropAllRows("my-table"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void dropAllRows(String tableId) { ApiExceptions.callAndTranslateApiException(dropAllRowsAsync(tableId)); } /** - * Asynchronously drops all data in the table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#dropRowRangeCallable()}. + * + *

    Asynchronously drops all data in the table. * *

    Sample code: * @@ -885,6 +1014,7 @@ public void dropAllRows(String tableId) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture dropAllRowsAsync(String tableId) { DropRowRangeRequest request = DropRowRangeRequest.newBuilder() @@ -896,7 +1026,10 @@ public ApiFuture dropAllRowsAsync(String tableId) { } /** - * Blocks the current thread until replication has caught up to the point when this method was + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#checkConsistency(com.google.bigtable.admin.v2.CheckConsistencyRequest)}. + * + *

    Blocks the current thread until replication has caught up to the point when this method was * called. This allows callers to make sure that their mutations have been replicated across all * of their clusters. * @@ -908,6 +1041,8 @@ public ApiFuture dropAllRowsAsync(String tableId) { * * @throws com.google.api.gax.retrying.PollException when polling exceeds the total timeout */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + @Deprecated public void awaitReplication(String tableId) { // TODO(igorbernstein2): remove usage of typesafe names com.google.bigtable.admin.v2.TableName tableName = @@ -917,8 +1052,16 @@ public void awaitReplication(String tableId) { stub.awaitReplicationCallable().futureCall(tableName)); } + public void awaitConsistency(ConsistencyRequest consistencyRequest) { + ApiExceptions.callAndTranslateApiException( + stub.awaitConsistencyCallable().futureCall(consistencyRequest)); + } + /** - * Creates a backup with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createBackup(com.google.bigtable.admin.v2.CreateBackupRequest)}. + * + *

    Creates a backup with the specified configuration. * *

    Sample code * @@ -930,12 +1073,16 @@ public void awaitReplication(String tableId) { * Backup response = client.createBackup(request); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Backup createBackup(CreateBackupRequest request) { return ApiExceptions.callAndTranslateApiException(createBackupAsync(request)); } /** - * Creates a backup with the specified configuration asynchronously. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createBackupOperationCallable()}. + * + *

    Creates a backup with the specified configuration asynchronously. * *

    Sample code * @@ -961,6 +1108,7 @@ public Backup createBackup(CreateBackupRequest request) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createBackupAsync(CreateBackupRequest request) { return ApiFutures.transform( stub.createBackupOperationCallable().futureCall(request.toProto(projectId, instanceId)), @@ -974,7 +1122,10 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backupProto) { } /** - * Gets a backup with the specified backup ID in the specified cluster. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getBackup(com.google.bigtable.admin.v2.GetBackupRequest)}. + * + *

    Gets a backup with the specified backup ID in the specified cluster. * *

    Sample code * @@ -982,12 +1133,16 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backupProto) { * Backup backup = client.getBackup(clusterId, backupId); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Backup getBackup(String clusterId, String backupId) { return ApiExceptions.callAndTranslateApiException(getBackupAsync(clusterId, backupId)); } /** - * Gets a backup with the specified backup ID in the specified cluster asynchronously. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getBackupCallable()}. + * + *

    Gets a backup with the specified backup ID in the specified cluster asynchronously. * *

    Sample code * @@ -1009,6 +1164,7 @@ public Backup getBackup(String clusterId, String backupId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getBackupAsync(String clusterId, String backupId) { GetBackupRequest request = GetBackupRequest.newBuilder() @@ -1026,7 +1182,10 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backup) { } /** - * Lists backups in the specified cluster. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listBackups(com.google.bigtable.admin.v2.ListBackupsRequest)}. + * + *

    Lists backups in the specified cluster. * *

    Sample code * @@ -1034,12 +1193,16 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backup) { * List backups = client.listBackups(clusterId); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listBackups(String clusterId) { return ApiExceptions.callAndTranslateApiException(listBackupsAsync(clusterId)); } /** - * Lists backups in the specified cluster asynchronously. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listBackupsPagedCallable()}. + * + *

    Lists backups in the specified cluster asynchronously. * *

    Sample code: * @@ -1064,6 +1227,7 @@ public List listBackups(String clusterId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listBackupsAsync(String clusterId) { ListBackupsRequest request = ListBackupsRequest.newBuilder() @@ -1127,7 +1291,10 @@ public List apply(List protos) { } /** - * Deletes a backup with the specified backup ID in the specified cluster. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteBackup(com.google.bigtable.admin.v2.DeleteBackupRequest)}. + * + *

    Deletes a backup with the specified backup ID in the specified cluster. * *

    Sample code * @@ -1135,12 +1302,16 @@ public List apply(List protos) { * client.deleteBackup(clusterId, backupId); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteBackup(String clusterId, String backupId) { ApiExceptions.callAndTranslateApiException(deleteBackupAsync(clusterId, backupId)); } /** - * Deletes a backup with the specified backup ID in the specified cluster asynchronously. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteBackupCallable()}. + * + *

    Deletes a backup with the specified backup ID in the specified cluster asynchronously. * *

    Sample code * @@ -1162,6 +1333,7 @@ public void deleteBackup(String clusterId, String backupId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteBackupAsync(String clusterId, String backupId) { DeleteBackupRequest request = DeleteBackupRequest.newBuilder() @@ -1172,7 +1344,10 @@ public ApiFuture deleteBackupAsync(String clusterId, String backupId) { } /** - * Updates a backup with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateBackup(com.google.bigtable.admin.v2.UpdateBackupRequest)}. + * + *

    Updates a backup with the specified configuration. * *

    Sample code * @@ -1180,12 +1355,16 @@ public ApiFuture deleteBackupAsync(String clusterId, String backupId) { * Backup backup = client.updateBackup(clusterId, backupId); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Backup updateBackup(UpdateBackupRequest request) { return ApiExceptions.callAndTranslateApiException(updateBackupAsync(request)); } /** - * Updates a backup with the specified configuration asynchronously. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateBackupCallable()}. + * + *

    Updates a backup with the specified configuration asynchronously. * *

    Sample code * @@ -1207,6 +1386,7 @@ public Backup updateBackup(UpdateBackupRequest request) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture updateBackupAsync(UpdateBackupRequest request) { return ApiFutures.transform( stub.updateBackupCallable().futureCall(request.toProto(projectId, instanceId)), @@ -1220,7 +1400,10 @@ public Backup apply(com.google.bigtable.admin.v2.Backup proto) { } /** - * Restores a backup to a new table with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#restoreTable(com.google.bigtable.admin.v2.RestoreTableRequest)}. + * + *

    Restores a backup to a new table with the specified configuration. * *

    Sample code * @@ -1229,12 +1412,18 @@ public Backup apply(com.google.bigtable.admin.v2.Backup proto) { * client.restoreTable(RestoreTableRequest.of(clusterId, backupId).setTableId(tableId)); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public RestoredTableResult restoreTable(RestoreTableRequest request) throws ExecutionException, InterruptedException { return ApiExceptions.callAndTranslateApiException(restoreTableAsync(request)); } - /** Restores a backup to a new table with the specified configuration asynchronously. + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#restoreTableAsync(com.google.bigtable.admin.v2.RestoreTableRequest)}. + * + *

    Restores a backup to a new table with the specified configuration asynchronously. + * *

    Sample code * *

    {@code
    @@ -1254,8 +1443,9 @@ public RestoredTableResult restoreTable(RestoreTableRequest request)
        *   },
        *   MoreExecutors.directExecutor()
        * );
    -   * 
    - * */ + * } + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture restoreTableAsync(RestoreTableRequest request) { final OperationFuture future = this.stub @@ -1278,6 +1468,37 @@ public ApiFuture apply(com.google.bigtable.admin.v2.Table t MoreExecutors.directExecutor()); } + /** + * Awaits the completion of the "Optimize Restored Table" operation. + * + *

    This method blocks until the restore operation is complete, extracts the optimization token, + * and returns an ApiFuture for the optimization phase. + * + * @param restoreFuture The future returned by restoreTableAsync(). + * @return An ApiFuture that tracks the optimization progress. + */ + public ApiFuture awaitOptimizeRestoredTable(ApiFuture restoreFuture) { + // 1. Block and wait for the restore operation to complete + RestoredTableResult result; + try { + result = restoreFuture.get(); + } catch (Exception e) { + throw new RuntimeException("Restore operation failed", e); + } + + // 2. Extract the operation token from the result + // (RestoredTableResult already wraps the OptimizeRestoredTableOperationToken) + OptimizeRestoredTableOperationToken token = result.getOptimizeRestoredTableOperationToken(); + + if (token == null || Strings.isNullOrEmpty(token.getOperationName())) { + // If there is no optimization operation, return immediate success. + return ApiFutures.immediateFuture(Empty.getDefaultInstance()); + } + + // 3. Return the future for the optimization operation + return stub.awaitOptimizeRestoredTableCallable().resumeFutureCall(token.getOperationName()); + } + /** * Awaits a restored table is fully optimized. * @@ -1327,7 +1548,10 @@ public ApiFuture awaitOptimizeRestoredTableAsync( } /** - * Copy an existing backup to a new backup in a Cloud Bigtable cluster with the specified + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#copyBackup(com.google.bigtable.admin.v2.CopyBackupRequest)}. + * + *

    Copy an existing backup to a new backup in a Cloud Bigtable cluster with the specified * configuration. * *

    Sample code Note: You want to create the client with project and instance where you want the @@ -1364,12 +1588,16 @@ public ApiFuture awaitOptimizeRestoredTableAsync( * Backup response = client.copyBackup(request); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Backup copyBackup(CopyBackupRequest request) { return ApiExceptions.callAndTranslateApiException(copyBackupAsync(request)); } /** - * Creates a copy of a backup from an existing backup in a Cloud Bigtable cluster with the + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#copyBackupOperationCallable()}. + * + *

    Creates a copy of a backup from an existing backup in a Cloud Bigtable cluster with the * specified configuration asynchronously. * *

    Sample code @@ -1396,6 +1624,7 @@ public Backup copyBackup(CopyBackupRequest request) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture copyBackupAsync(CopyBackupRequest request) { return ApiFutures.transform( stub.copyBackupOperationCallable().futureCall(request.toProto(projectId, instanceId)), @@ -1409,9 +1638,12 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backupProto) { } /** - * Returns a future that is resolved when replication has caught up to the point when this method - * was called. This allows callers to make sure that their mutations have been replicated across - * all of their clusters. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#generateConsistencyTokenCallable()}. + * + *

    Returns a future that is resolved when replication has caught up to the point when this + * method was called. This allows callers to make sure that their mutations have been replicated + * across all of their clusters. * *

    Sample code: * @@ -1435,6 +1667,8 @@ public Backup apply(com.google.bigtable.admin.v2.Backup backupProto) { * } */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + @Deprecated public ApiFuture awaitReplicationAsync(final String tableId) { // TODO(igorbernstein2): remove usage of typesafe names com.google.bigtable.admin.v2.TableName tableName = @@ -1443,7 +1677,34 @@ public ApiFuture awaitReplicationAsync(final String tableId) { } /** - * Creates a new authorized view with the specified configuration. + * Polls an existing consistency token until table replication is consistent across all clusters. + * Useful for checking consistency of a token generated in a separate process. Blocks until + * completion. + * + * @param tableId The table to check. + * @param consistencyToken The token to poll. + */ + public void waitForConsistency(String tableId, String consistencyToken) { + ApiExceptions.callAndTranslateApiException(waitForConsistencyAsync(tableId, consistencyToken)); + } + + /** + * Asynchronously polls the consistency token. Returns a future that completes when table + * replication is consistent across all clusters. + * + * @param tableId The table to check. + * @param consistencyToken The token to poll. + */ + public ApiFuture waitForConsistencyAsync(String tableId, String consistencyToken) { + return stub.awaitConsistencyCallable() + .futureCall(ConsistencyRequest.forReplication(tableId, consistencyToken)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createAuthorizedView(com.google.bigtable.admin.v2.CreateAuthorizedViewRequest)}. + * + *

    Creates a new authorized view with the specified configuration. * *

    Sample code: * @@ -1462,12 +1723,16 @@ public ApiFuture awaitReplicationAsync(final String tableId) { * * @see CreateAuthorizedViewRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AuthorizedView createAuthorizedView(CreateAuthorizedViewRequest request) { return ApiExceptions.callAndTranslateApiException(createAuthorizedViewAsync(request)); } /** - * Asynchronously creates a new authorized view with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createAuthorizedViewOperationCallable()}. + * + *

    Asynchronously creates a new authorized view with the specified configuration. * *

    Sample code: * @@ -1500,6 +1765,7 @@ public AuthorizedView createAuthorizedView(CreateAuthorizedViewRequest request) * * @see CreateAuthorizedViewRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture createAuthorizedViewAsync(CreateAuthorizedViewRequest request) { return ApiFutures.transform( stub.createAuthorizedViewOperationCallable() @@ -1515,7 +1781,10 @@ public AuthorizedView apply( } /** - * Updates an existing authorized view with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateAuthorizedView(com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest)}. + * + *

    Updates an existing authorized view with the specified configuration. * *

    Sample code: * @@ -1530,12 +1799,16 @@ public AuthorizedView apply( * * @see UpdateAuthorizedViewRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AuthorizedView updateAuthorizedView(UpdateAuthorizedViewRequest request) { return ApiExceptions.callAndTranslateApiException(updateAuthorizedViewAsync(request)); } /** - * Asynchronously updates an existing authorized view with the specified configuration. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateAuthorizedViewOperationCallable()}. + * + *

    Asynchronously updates an existing authorized view with the specified configuration. * *

    Sample code: * @@ -1564,6 +1837,7 @@ public AuthorizedView updateAuthorizedView(UpdateAuthorizedViewRequest request) * * @see UpdateAuthorizedViewRequest for available options. */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture updateAuthorizedViewAsync(UpdateAuthorizedViewRequest request) { return ApiFutures.transform( stub.updateAuthorizedViewOperationCallable() @@ -1579,7 +1853,10 @@ public AuthorizedView apply( } /** - * Gets an authorized view with the specified authorized view ID in the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getAuthorizedView(com.google.bigtable.admin.v2.GetAuthorizedViewRequest)}. + * + *

    Gets an authorized view with the specified authorized view ID in the specified table. * *

    Sample code: * @@ -1587,14 +1864,18 @@ public AuthorizedView apply( * AuthorizedView authorizedView = client.getAuthorizedView("my-table", "my-authorized-view"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public AuthorizedView getAuthorizedView(String tableId, String authorizedViewId) { return ApiExceptions.callAndTranslateApiException( getAuthorizedViewAsync(tableId, authorizedViewId)); } /** - * Asynchronously gets an authorized view with the specified authorized view ID in the specified - * table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getAuthorizedViewCallable()}. + * + *

    Asynchronously gets an authorized view with the specified authorized view ID in the + * specified table. * *

    Sample code: * @@ -1616,6 +1897,7 @@ public AuthorizedView getAuthorizedView(String tableId, String authorizedViewId) * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getAuthorizedViewAsync(String tableId, String authorizedViewId) { GetAuthorizedViewRequest request = GetAuthorizedViewRequest.newBuilder() @@ -1635,7 +1917,10 @@ public AuthorizedView apply( } /** - * Lists all authorized view IDs in the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listAuthorizedViews(com.google.bigtable.admin.v2.ListAuthorizedViewsRequest)}. + * + *

    Lists all authorized view IDs in the specified table. * *

    Sample code: * @@ -1643,12 +1928,16 @@ public AuthorizedView apply( * List authorizedViews = client.listAuthorizedViews("my-table"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List listAuthorizedViews(String tableId) { return ApiExceptions.callAndTranslateApiException(listAuthorizedViewsAsync(tableId)); } /** - * Asynchronously lists all authorized view IDs in the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listAuthorizedViewsPagedCallable()}. + * + *

    Asynchronously lists all authorized view IDs in the specified table. * *

    Sample code: * @@ -1673,6 +1962,7 @@ public List listAuthorizedViews(String tableId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> listAuthorizedViewsAsync(String tableId) { ListAuthorizedViewsRequest request = ListAuthorizedViewsRequest.newBuilder() @@ -1738,9 +2028,12 @@ public List apply(List prot } /** - * Deletes an authorized view with the specified authorized view ID in the specified table. Note - * that the deletion is prohibited if the authorized view has deletion_protection field set to - * true. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteAuthorizedView(com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest)}. + * + *

    Deletes an authorized view with the specified authorized view ID in the specified table. + * Note that the deletion is prohibited if the authorized view has deletion_protection field set + * to true. * *

    Sample code: * @@ -1748,13 +2041,17 @@ public List apply(List prot * client.deleteAuthorizedView("my-table", "my-authorized-view"); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public void deleteAuthorizedView(String tableId, String authorizedViewId) { ApiExceptions.callAndTranslateApiException( deleteAuthorizedViewAsync(tableId, authorizedViewId)); } /** - * Asynchronously deletes an authorized view with the specified authorized view ID in the + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteAuthorizedViewCallable()}. + * + *

    Asynchronously deletes an authorized view with the specified authorized view ID in the * specified table. Note that the deletion is prohibited if the authorized view has * deletion_protection field set to true. * @@ -1778,6 +2075,7 @@ public void deleteAuthorizedView(String tableId, String authorizedViewId) { * ); * } */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture deleteAuthorizedViewAsync(String tableId, String authorizedViewId) { DeleteAuthorizedViewRequest request = DeleteAuthorizedViewRequest.newBuilder() @@ -1788,6 +2086,378 @@ public ApiFuture deleteAuthorizedViewAsync(String tableId, String authoriz return transformToVoid(this.stub.deleteAuthorizedViewCallable().futureCall(request)); } + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createSchemaBundle(com.google.bigtable.admin.v2.CreateSchemaBundleRequest)}. + * + *

    Creates a new schema bundle with the specified configuration. + * + *

    Sample code: + * + *

    {@code
    +   * CreateSchemaBundleRequest request = CreateSchemaBundleRequest.of("my-table", "my-new-schema-bundle")
    +   *     .setDeletionProtection(true)
    +   *     .setSchemaBundleType(
    +   *         SubsetView.create()
    +   *             .addRowPrefix("row#")
    +   *             .addFamilySubsets(
    +   *                 "my-family", FamilySubsets.create().addQualifier("column")));
    +   *
    +   * SchemaBundle response = client.createSchemaBundle(request);
    +   * }
    + * + * @see CreateSchemaBundleRequest for available options. + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public SchemaBundle createSchemaBundle(CreateSchemaBundleRequest request) { + return ApiExceptions.callAndTranslateApiException(createSchemaBundleAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#createSchemaBundleOperationCallable()}. + * + *

    Asynchronously creates a new schema bundle with the specified configuration. + * + *

    Sample code: + * + *

    {@code
    +   * CreateSchemaBundleRequest request = CreateSchemaBundleRequest.of("my-table", "my-new-schema-bundle")
    +   *     .setDeletionProtection(true)
    +   *     .setSchemaBundleType(
    +   *         SubsetView.create()
    +   *             .addRowPrefix("row#")
    +   *             .addFamilySubsets(
    +   *                 "my-family", FamilySubsets.create().addQualifier("column")));
    +   *
    +   * ApiFuture future = client.createSchemaBundleAsync(request);
    +   *
    +   * ApiFutures.addCallback(
    +   *     future,
    +   *     new ApiFutureCallback() {
    +   *       public void onSuccess(SchemaBundle schemaBundle) {
    +   *         System.out.println("Successfully created the schema bundle: " + schemaBundle.getId());
    +   *       }
    +   *
    +   *       public void onFailure(Throwable t) {
    +   *         t.printStackTrace();
    +   *       }
    +   *     },
    +   *     MoreExecutors.directExecutor());
    +   * }
    + * + * @see CreateSchemaBundleRequest for available options. + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture createSchemaBundleAsync(CreateSchemaBundleRequest request) { + return ApiFutures.transform( + stub.createSchemaBundleOperationCallable() + .futureCall(request.toProto(projectId, instanceId)), + new ApiFunction() { + @Override + public SchemaBundle apply(com.google.bigtable.admin.v2.SchemaBundle schemaBundleProto) { + return SchemaBundle.fromProto(schemaBundleProto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateSchemaBundle(com.google.bigtable.admin.v2.UpdateSchemaBundleRequest)}. + * + *

    Updates an existing schema bundle with the specified configuration. + * + *

    Sample code: + * + *

    {@code
    +   * SchemaBundle existingSchemaBundle = client.getSchemaBundle("my-table", "my-schema-bundle");
    +   *
    +   * UpdateSchemaBundleRequest request = UpdateSchemaBundleRequest.of(existingSchemaBundle).setDeletionProtection(true);
    +   *
    +   * SchemaBundle response = client.updateSchemaBundle(request);
    +   * }
    + * + * @see UpdateSchemaBundleRequest for available options. + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public SchemaBundle updateSchemaBundle(UpdateSchemaBundleRequest request) { + return ApiExceptions.callAndTranslateApiException(updateSchemaBundleAsync(request)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#updateSchemaBundleOperationCallable()}. + * + *

    Asynchronously updates an existing schema bundle with the specified configuration. + * + *

    Sample code: + * + *

    {@code
    +   * SchemaBundle existingSchemaBundle = client.getSchemaBundle("my-table", "my-schema-bundle");
    +   *
    +   * UpdateSchemaBundleRequest request = UpdateSchemaBundleRequest.of(existingSchemaBundle).setDeletionProtection(true);
    +   *
    +   * ApiFuture future = client.updateSchemaBundleAsync(request);
    +   *
    +   * ApiFutures.addCallback(
    +   *     future,
    +   *     new ApiFutureCallback() {
    +   *       public void onSuccess(SchemaBundle schemaBundle) {
    +   *         System.out.println("Successfully updated the schema bundle: " + schemaBundle.getId());
    +   *       }
    +   *
    +   *       public void onFailure(Throwable t) {
    +   *         t.printStackTrace();
    +   *       }
    +   *     },
    +   *     MoreExecutors.directExecutor());
    +   * }
    + * + * @see UpdateSchemaBundleRequest for available options. + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture updateSchemaBundleAsync(UpdateSchemaBundleRequest request) { + return ApiFutures.transform( + stub.updateSchemaBundleOperationCallable() + .futureCall(request.toProto(projectId, instanceId)), + new ApiFunction() { + @Override + public SchemaBundle apply(com.google.bigtable.admin.v2.SchemaBundle schemaBundleProto) { + return SchemaBundle.fromProto(schemaBundleProto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getSchemaBundle(com.google.bigtable.admin.v2.GetSchemaBundleRequest)}. + * + *

    Gets an schema bundle with the specified schema bundle ID in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * SchemaBundle schemaBundle = client.getSchemaBundle("my-table", "my-schema-bundle");
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public SchemaBundle getSchemaBundle(String tableId, String schemaBundleId) { + return ApiExceptions.callAndTranslateApiException( + getSchemaBundleAsync(tableId, schemaBundleId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getSchemaBundleCallable()}. + * + *

    Asynchronously gets an schema bundle with the specified schema bundle ID in the specified + * table. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture future = client.getSchemaBundleAsync("my-table", "my-schema-bundle");
    +   *
    +   * ApiFutures.addCallback(
    +   *     future,
    +   *     new ApiFutureCallback() {
    +   *       public void onSuccess(SchemaBundle schemaBundle) {
    +   *         System.out.println("Successfully get the schema bundle: " + schemaBundle.getId());
    +   *       }
    +   *
    +   *       public void onFailure(Throwable t) {
    +   *         t.printStackTrace();
    +   *       }
    +   *     },
    +   *     MoreExecutors.directExecutor());
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture getSchemaBundleAsync(String tableId, String schemaBundleId) { + GetSchemaBundleRequest request = + GetSchemaBundleRequest.newBuilder() + .setName( + NameUtil.formatSchemaBundleName(projectId, instanceId, tableId, schemaBundleId)) + .build(); + return ApiFutures.transform( + stub.getSchemaBundleCallable().futureCall(request), + new ApiFunction() { + @Override + public SchemaBundle apply(com.google.bigtable.admin.v2.SchemaBundle schemaBundleProto) { + return SchemaBundle.fromProto(schemaBundleProto); + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listSchemaBundles(com.google.bigtable.admin.v2.ListSchemaBundlesRequest)}. + * + *

    Lists all schema bundle IDs in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * List schemaBundles = client.listSchemaBundles("my-table");
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public List listSchemaBundles(String tableId) { + return ApiExceptions.callAndTranslateApiException(listSchemaBundlesAsync(tableId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#listSchemaBundlesPagedCallable()}. + * + *

    Asynchronously lists all schema bundle IDs in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture> future = client.listSchemaBundlesAsync("my-table");
    +   *
    +   * ApiFutures.addCallback(
    +   *     future,
    +   *     new ApiFutureCallback>() {
    +   *       public void onSuccess(List schemaBundleIds) {
    +   *         System.out.println("Successfully get list of schema bundles:");
    +   *         for (SchemaBundle schemaBundleId : schemaBundleIds) {
    +   *           System.out.println(schemaBundleId);
    +   *         }
    +   *       }
    +   *
    +   *       public void onFailure(Throwable t) {
    +   *         t.printStackTrace();
    +   *       }
    +   *     },
    +   *     MoreExecutors.directExecutor());
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture> listSchemaBundlesAsync(String tableId) { + ListSchemaBundlesRequest request = + ListSchemaBundlesRequest.newBuilder() + .setParent(NameUtil.formatTableName(projectId, instanceId, tableId)) + .build(); + + // TODO(igorbernstein2): try to upstream pagination spooling or figure out a way + // to expose the + // paginated responses while maintaining the wrapper facade. + + // Fetches the first page. + ApiFuture firstPageFuture = + ApiFutures.transform( + stub.listSchemaBundlesPagedCallable().futureCall(request), + new ApiFunction() { + @Override + public ListSchemaBundlesPage apply(ListSchemaBundlesPagedResponse response) { + return response.getPage(); + } + }, + MoreExecutors.directExecutor()); + + // Fetches the rest of the pages by chaining the futures. + ApiFuture> allProtos = + ApiFutures.transformAsync( + firstPageFuture, + new ApiAsyncFunction< + ListSchemaBundlesPage, List>() { + List responseAccumulator = + Lists.newArrayList(); + + @Override + public ApiFuture> apply( + ListSchemaBundlesPage page) { + // Add all entries from the page + responseAccumulator.addAll(Lists.newArrayList(page.getValues())); + + // If this is the last page, just return the accumulated responses. + if (!page.hasNextPage()) { + return ApiFutures.immediateFuture(responseAccumulator); + } + + // Otherwise fetch the next page. + return ApiFutures.transformAsync( + page.getNextPageAsync(), this, MoreExecutors.directExecutor()); + } + }, + MoreExecutors.directExecutor()); + + // Wraps all of the accumulated protos. + return ApiFutures.transform( + allProtos, + new ApiFunction, List>() { + @Override + public List apply(List protos) { + List results = Lists.newArrayListWithCapacity(protos.size()); + for (com.google.bigtable.admin.v2.SchemaBundle proto : protos) { + results.add(NameUtil.extractSchemaBundleIdFromSchemaBundleName(proto.getName())); + } + return results; + } + }, + MoreExecutors.directExecutor()); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteSchemaBundle(com.google.bigtable.admin.v2.DeleteSchemaBundleRequest)}. + * + *

    Deletes an schema bundle with the specified schema bundle ID in the specified table. + * + *

    Sample code: + * + *

    {@code
    +   * client.deleteSchemaBundle("my-table", "my-schema-bundle");
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public void deleteSchemaBundle(String tableId, String schemaBundleId) { + ApiExceptions.callAndTranslateApiException(deleteSchemaBundleAsync(tableId, schemaBundleId)); + } + + /** + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#deleteSchemaBundleCallable()}. + * + *

    Asynchronously deletes an schema bundle with the specified schema bundle ID in the specified + * table. + * + *

    Sample code: + * + *

    {@code
    +   * ApiFuture future = client.deleteSchemaBundleAsync("my-table", "my-schema-bundle");
    +   *
    +   * ApiFutures.addCallback(
    +   *   future,
    +   *   new ApiFutureCallback() {
    +   *     public void onSuccess(Void ignored) {
    +   *       System.out.println("Successfully deleted the schema bundle");
    +   *     }
    +   *
    +   *     public void onFailure(Throwable t) {
    +   *       t.printStackTrace();
    +   *     }
    +   *   },
    +   *   MoreExecutors.directExecutor()
    +   * );
    +   * }
    + */ + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") + public ApiFuture deleteSchemaBundleAsync(String tableId, String schemaBundleId) { + DeleteSchemaBundleRequest request = + DeleteSchemaBundleRequest.newBuilder() + .setName( + NameUtil.formatSchemaBundleName(projectId, instanceId, tableId, schemaBundleId)) + .build(); + + return transformToVoid(this.stub.deleteSchemaBundleCallable().futureCall(request)); + } + /** * Helper method to construct the table name in format: * projects/{project}/instances/{instance}/tables/{tableId} @@ -1828,7 +2498,10 @@ public Void apply(Empty empty) { } /** - * Gets the IAM access control policy for the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicy(com.google.iam.v1.GetIamPolicyRequest)}. + * + *

    Gets the IAM access control policy for the specified table. * *

    Sample code: * @@ -1844,12 +2517,16 @@ public Void apply(Empty empty) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy getIamPolicy(String tableId) { return ApiExceptions.callAndTranslateApiException(getIamPolicyAsync(tableId)); } /** - * Asynchronously gets the IAM access control policy for the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicyCallable()}. + * + *

    Asynchronously gets the IAM access control policy for the specified table. * *

    Sample code: * @@ -1876,13 +2553,17 @@ public Policy getIamPolicy(String tableId) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getIamPolicyAsync(String tableId) { String tableName = NameUtil.formatTableName(projectId, instanceId, tableId); return getResourceIamPolicy(tableName); } /** - * Replaces the IAM policy associated with the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicy(com.google.iam.v1.SetIamPolicyRequest)}. + * + *

    Replaces the IAM policy associated with the specified table. * *

    Sample code: * @@ -1899,12 +2580,16 @@ public ApiFuture getIamPolicyAsync(String tableId) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy setIamPolicy(String tableId, Policy policy) { return ApiExceptions.callAndTranslateApiException(setIamPolicyAsync(tableId, policy)); } /** - * Asynchronously replaces the IAM policy associated with the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicyCallable()}. + * + *

    Asynchronously replaces the IAM policy associated with the specified table. * *

    Sample code: * @@ -1935,14 +2620,18 @@ public Policy setIamPolicy(String tableId, Policy policy) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture setIamPolicyAsync(String tableId, Policy policy) { String tableName = NameUtil.formatTableName(projectId, instanceId, tableId); return setResourceIamPolicy(policy, tableName); } /** - * Tests whether the caller has the given permissions for the specified table. Returns a subset of - * the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest)}. + * + *

    Tests whether the caller has the given permissions for the specified table. Returns a subset + * of the specified permissions that the caller has. * *

    Sample code: * @@ -1959,12 +2648,16 @@ public ApiFuture setIamPolicyAsync(String tableId, Policy policy) { * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List testIamPermission(String tableId, String... permissions) { return ApiExceptions.callAndTranslateApiException(testIamPermissionAsync(tableId, permissions)); } /** - * Asynchronously tests whether the caller has the given permissions for the specified table. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissionsCallable()}. + * + *

    Asynchronously tests whether the caller has the given permissions for the specified table. * Returns a subset of the specified permissions that the caller has. * *

    Sample code: @@ -1991,13 +2684,17 @@ public List testIamPermission(String tableId, String... permissions) { * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> testIamPermissionAsync(String tableId, String... permissions) { String tableName = NameUtil.formatTableName(projectId, instanceId, tableId); return testResourceIamPermissions(tableName, permissions); } /** - * Gets the IAM access control policy for the specified backup. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicy(com.google.iam.v1.GetIamPolicyRequest)}. + * + *

    Gets the IAM access control policy for the specified backup. * *

    Sample code: * @@ -2013,12 +2710,16 @@ public ApiFuture> testIamPermissionAsync(String tableId, String... * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy getBackupIamPolicy(String clusterId, String backupId) { return ApiExceptions.callAndTranslateApiException(getBackupIamPolicyAsync(clusterId, backupId)); } /** - * Asynchronously gets the IAM access control policy for the specified backup. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicyCallable()}. + * + *

    Asynchronously gets the IAM access control policy for the specified backup. * *

    Sample code: * @@ -2045,13 +2746,17 @@ public Policy getBackupIamPolicy(String clusterId, String backupId) { * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getBackupIamPolicyAsync(String clusterId, String backupId) { String backupName = NameUtil.formatBackupName(projectId, instanceId, clusterId, backupId); return getResourceIamPolicy(backupName); } /** - * Replaces the IAM policy associated with the specified backup. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicy(com.google.iam.v1.SetIamPolicyRequest)}. + * + *

    Replaces the IAM policy associated with the specified backup. * *

    Sample code: * @@ -2068,13 +2773,17 @@ public ApiFuture getBackupIamPolicyAsync(String clusterId, String backup * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy setBackupIamPolicy(String clusterId, String backupId, Policy policy) { return ApiExceptions.callAndTranslateApiException( setBackupIamPolicyAsync(clusterId, backupId, policy)); } /** - * Asynchronously replaces the IAM policy associated with the specified backup. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicyCallable()}. + * + *

    Asynchronously replaces the IAM policy associated with the specified backup. * *

    Sample code: * @@ -2105,6 +2814,7 @@ public Policy setBackupIamPolicy(String clusterId, String backupId, Policy polic * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture setBackupIamPolicyAsync( String clusterId, String backupId, Policy policy) { String backupName = NameUtil.formatBackupName(projectId, instanceId, clusterId, backupId); @@ -2112,8 +2822,11 @@ public ApiFuture setBackupIamPolicyAsync( } /** - * Tests whether the caller has the given permissions for the specified backup. Returns a subset - * of the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest)}. + * + *

    Tests whether the caller has the given permissions for the specified backup. Returns a + * subset of the specified permissions that the caller has. * *

    Sample code: * @@ -2132,6 +2845,7 @@ public ApiFuture setBackupIamPolicyAsync( * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List testBackupIamPermission( String clusterId, String backupId, String... permissions) { return ApiExceptions.callAndTranslateApiException( @@ -2139,7 +2853,10 @@ public List testBackupIamPermission( } /** - * Asynchronously tests whether the caller has the given permissions for the specified backup. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissionsCallable()}. + * + *

    Asynchronously tests whether the caller has the given permissions for the specified backup. * Returns a subset of the specified permissions that the caller has. * *

    Sample code: @@ -2166,6 +2883,7 @@ public List testBackupIamPermission( * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture> testBackupIamPermissionAsync( String clusterId, String backupId, String... permissions) { String backupName = NameUtil.formatBackupName(projectId, instanceId, clusterId, backupId); @@ -2173,7 +2891,10 @@ public ApiFuture> testBackupIamPermissionAsync( } /** - * Gets the IAM access control policy for the specified authorized view. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicy(com.google.iam.v1.GetIamPolicyRequest)}. + * + *

    Gets the IAM access control policy for the specified authorized view. * *

    Sample code: * @@ -2189,13 +2910,17 @@ public ApiFuture> testBackupIamPermissionAsync( * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy getAuthorizedViewIamPolicy(String tableId, String authorizedViewId) { return ApiExceptions.callAndTranslateApiException( getAuthorizedViewIamPolicyAsync(tableId, authorizedViewId)); } /** - * Asynchronously gets the IAM access control policy for the specified authorized view. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#getIamPolicyCallable()}. + * + *

    Asynchronously gets the IAM access control policy for the specified authorized view. * *

    Sample code: * @@ -2222,6 +2947,7 @@ public Policy getAuthorizedViewIamPolicy(String tableId, String authorizedViewId * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture getAuthorizedViewIamPolicyAsync( String tableId, String authorizedViewId) { String authorizedViewName = @@ -2230,7 +2956,10 @@ public ApiFuture getAuthorizedViewIamPolicyAsync( } /** - * Replaces the IAM policy associated with the specified authorized view. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicy(com.google.iam.v1.SetIamPolicyRequest)}. + * + *

    Replaces the IAM policy associated with the specified authorized view. * *

    Sample code: * @@ -2247,13 +2976,17 @@ public ApiFuture getAuthorizedViewIamPolicyAsync( * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public Policy setAuthorizedViewIamPolicy(String tableId, String authorizedViewId, Policy policy) { return ApiExceptions.callAndTranslateApiException( setAuthorizedViewIamPolicyAsync(tableId, authorizedViewId, policy)); } /** - * Asynchronously replaces the IAM policy associated with the specified authorized view. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#setIamPolicyCallable()}. + * + *

    Asynchronously replaces the IAM policy associated with the specified authorized view. * *

    Sample code: * @@ -2284,6 +3017,7 @@ public Policy setAuthorizedViewIamPolicy(String tableId, String authorizedViewId * IAM management */ @SuppressWarnings("WeakerAccess") + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public ApiFuture setAuthorizedViewIamPolicyAsync( String tableId, String authorizedViewId, Policy policy) { String authorizedViewName = @@ -2292,8 +3026,11 @@ public ApiFuture setAuthorizedViewIamPolicyAsync( } /** - * Tests whether the caller has the given permissions for the specified authorized view. Returns a - * subset of the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest)}. + * + *

    Tests whether the caller has the given permissions for the specified authorized view. + * Returns a subset of the specified permissions that the caller has. * *

    Sample code: * @@ -2312,6 +3049,7 @@ public ApiFuture setAuthorizedViewIamPolicyAsync( * permissions */ @SuppressWarnings({"WeakerAccess"}) + @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.") public List testAuthorizedViewIamPermission( String tableId, String authorizedViewId, String... permissions) { return ApiExceptions.callAndTranslateApiException( @@ -2319,14 +3057,17 @@ public List testAuthorizedViewIamPermission( } /** - * Asynchronously tests whether the caller has the given permissions for the specified authorized - * view. Returns a subset of the specified permissions that the caller has. + * This method is obsolete. For the recommended proto-based approach, please see {@link + * com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient#testIamPermissionsCallable()}. + * + *

    Asynchronously tests whether the caller has the given permissions for the specified + * authorized view. Returns a subset of the specified permissions that the caller has. * *

    Sample code: * *

    {@code
    -   * ApiFuture> grantedPermissionsFuture = client.testAuthorizedViewIamPermissionAsync("my-table-id", "my-authorized-view-id",
    -   *   "bigtable.authorizedViews.get", "bigtable.authorizedViews.delete");
    +   * ApiFuture> grantedPermissionsFuture = client.testAuthorizedViewIamPermissionAsync("my-table-id",
    +   *   "my-authorized-view-id", "bigtable.authorizedViews.get", "bigtable.authorizedViews.delete");
        *
        * ApiFutures.addCallback(grantedPermissionsFuture,
        *   new ApiFutureCallback>() {
    @@ -2346,6 +3087,7 @@ public List testAuthorizedViewIamPermission(
        *     permissions
        */
       @SuppressWarnings({"WeakerAccess"})
    +  @ObsoleteApi("Use getBaseClient() to access the auto-generated proto-based methods instead.")
       public ApiFuture> testAuthorizedViewIamPermissionAsync(
           String tableId, String authorizedViewId, String... permissions) {
         String authorizedViewName =
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    index 9da3e9af17..a9a8acead9 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    @@ -139,6 +139,15 @@ public String toString() {
             .add("deleteAuthorizedViewSettings", stubSettings.deleteAuthorizedViewSettings())
             .add("listAuthorizedViewsSettings", stubSettings.listAuthorizedViewsSettings())
             .add("getAuthorizedViewSettings", stubSettings.getAuthorizedViewSettings())
    +        .add("createSchemaBundleSettings", stubSettings.createSchemaBundleSettings())
    +        .add("createSchemaBundleOperationSettings", stubSettings.createBackupOperationSettings())
    +        .add("updateSchemaBundleSettings", stubSettings.updateSchemaBundleSettings())
    +        .add(
    +            "updateSchemaBundleOperationSettings",
    +            stubSettings.updateSchemaBundleOperationSettings())
    +        .add("getSchemaBundleSettings", stubSettings.getSchemaBundleSettings())
    +        .add("listSchemaBundlesSettings", stubSettings.listSchemaBundlesSettings())
    +        .add("deleteSchemaBundleSettings", stubSettings.deleteSchemaBundleSettings())
             .toString();
       }
     
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    index 796badc1bb..8ad0f454cc 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    @@ -19,8 +19,14 @@
                 "CreateInstance": {
                   "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"]
                 },
    +            "CreateLogicalView": {
    +              "methods": ["createLogicalViewAsync", "createLogicalViewAsync", "createLogicalViewAsync", "createLogicalViewOperationCallable", "createLogicalViewCallable"]
    +            },
    +            "CreateMaterializedView": {
    +              "methods": ["createMaterializedViewAsync", "createMaterializedViewAsync", "createMaterializedViewAsync", "createMaterializedViewOperationCallable", "createMaterializedViewCallable"]
    +            },
                 "DeleteAppProfile": {
    -              "methods": ["deleteAppProfile", "deleteAppProfile", "deleteAppProfile", "deleteAppProfileCallable"]
    +              "methods": ["deleteAppProfile", "deleteAppProfile", "deleteAppProfile", "deleteAppProfile", "deleteAppProfile", "deleteAppProfileCallable"]
                 },
                 "DeleteCluster": {
                   "methods": ["deleteCluster", "deleteCluster", "deleteCluster", "deleteClusterCallable"]
    @@ -28,6 +34,12 @@
                 "DeleteInstance": {
                   "methods": ["deleteInstance", "deleteInstance", "deleteInstance", "deleteInstanceCallable"]
                 },
    +            "DeleteLogicalView": {
    +              "methods": ["deleteLogicalView", "deleteLogicalView", "deleteLogicalView", "deleteLogicalViewCallable"]
    +            },
    +            "DeleteMaterializedView": {
    +              "methods": ["deleteMaterializedView", "deleteMaterializedView", "deleteMaterializedView", "deleteMaterializedViewCallable"]
    +            },
                 "GetAppProfile": {
                   "methods": ["getAppProfile", "getAppProfile", "getAppProfile", "getAppProfileCallable"]
                 },
    @@ -40,6 +52,12 @@
                 "GetInstance": {
                   "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"]
                 },
    +            "GetLogicalView": {
    +              "methods": ["getLogicalView", "getLogicalView", "getLogicalView", "getLogicalViewCallable"]
    +            },
    +            "GetMaterializedView": {
    +              "methods": ["getMaterializedView", "getMaterializedView", "getMaterializedView", "getMaterializedViewCallable"]
    +            },
                 "ListAppProfiles": {
                   "methods": ["listAppProfiles", "listAppProfiles", "listAppProfiles", "listAppProfilesPagedCallable", "listAppProfilesCallable"]
                 },
    @@ -52,6 +70,12 @@
                 "ListInstances": {
                   "methods": ["listInstances", "listInstances", "listInstances", "listInstancesCallable"]
                 },
    +            "ListLogicalViews": {
    +              "methods": ["listLogicalViews", "listLogicalViews", "listLogicalViews", "listLogicalViewsPagedCallable", "listLogicalViewsCallable"]
    +            },
    +            "ListMaterializedViews": {
    +              "methods": ["listMaterializedViews", "listMaterializedViews", "listMaterializedViews", "listMaterializedViewsPagedCallable", "listMaterializedViewsCallable"]
    +            },
                 "PartialUpdateCluster": {
                   "methods": ["partialUpdateClusterAsync", "partialUpdateClusterAsync", "partialUpdateClusterOperationCallable", "partialUpdateClusterCallable"]
                 },
    @@ -72,6 +96,12 @@
                 },
                 "UpdateInstance": {
                   "methods": ["updateInstance", "updateInstanceCallable"]
    +            },
    +            "UpdateLogicalView": {
    +              "methods": ["updateLogicalViewAsync", "updateLogicalViewAsync", "updateLogicalViewOperationCallable", "updateLogicalViewCallable"]
    +            },
    +            "UpdateMaterializedView": {
    +              "methods": ["updateMaterializedViewAsync", "updateMaterializedViewAsync", "updateMaterializedViewOperationCallable", "updateMaterializedViewCallable"]
                 }
               }
             }
    @@ -94,6 +124,9 @@
                 "CreateBackup": {
                   "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"]
                 },
    +            "CreateSchemaBundle": {
    +              "methods": ["createSchemaBundleAsync", "createSchemaBundleAsync", "createSchemaBundleAsync", "createSchemaBundleOperationCallable", "createSchemaBundleCallable"]
    +            },
                 "CreateTable": {
                   "methods": ["createTable", "createTable", "createTable", "createTableCallable"]
                 },
    @@ -106,6 +139,9 @@
                 "DeleteBackup": {
                   "methods": ["deleteBackup", "deleteBackup", "deleteBackup", "deleteBackupCallable"]
                 },
    +            "DeleteSchemaBundle": {
    +              "methods": ["deleteSchemaBundle", "deleteSchemaBundle", "deleteSchemaBundle", "deleteSchemaBundleCallable"]
    +            },
                 "DeleteSnapshot": {
                   "methods": ["deleteSnapshot", "deleteSnapshot", "deleteSnapshot", "deleteSnapshotCallable"]
                 },
    @@ -127,6 +163,9 @@
                 "GetIamPolicy": {
                   "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"]
                 },
    +            "GetSchemaBundle": {
    +              "methods": ["getSchemaBundle", "getSchemaBundle", "getSchemaBundle", "getSchemaBundleCallable"]
    +            },
                 "GetSnapshot": {
                   "methods": ["getSnapshot", "getSnapshot", "getSnapshot", "getSnapshotCallable"]
                 },
    @@ -139,6 +178,9 @@
                 "ListBackups": {
                   "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"]
                 },
    +            "ListSchemaBundles": {
    +              "methods": ["listSchemaBundles", "listSchemaBundles", "listSchemaBundles", "listSchemaBundlesPagedCallable", "listSchemaBundlesCallable"]
    +            },
                 "ListSnapshots": {
                   "methods": ["listSnapshots", "listSnapshots", "listSnapshots", "listSnapshotsPagedCallable", "listSnapshotsCallable"]
                 },
    @@ -169,6 +211,9 @@
                 "UpdateBackup": {
                   "methods": ["updateBackup", "updateBackup", "updateBackupCallable"]
                 },
    +            "UpdateSchemaBundle": {
    +              "methods": ["updateSchemaBundleAsync", "updateSchemaBundleAsync", "updateSchemaBundleOperationCallable", "updateSchemaBundleCallable"]
    +            },
                 "UpdateTable": {
                   "methods": ["updateTableAsync", "updateTableAsync", "updateTableOperationCallable", "updateTableCallable"]
                 }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java
    index a2b59d6b5b..a0fef3c0fc 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/internal/NameUtil.java
    @@ -16,8 +16,10 @@
     package com.google.cloud.bigtable.admin.v2.internal;
     
     import com.google.api.core.InternalApi;
    +import com.google.cloud.bigtable.data.v2.models.TableId;
     import java.util.regex.Matcher;
     import java.util.regex.Pattern;
    +import javax.annotation.Nonnull;
     
     /**
      * Internal helper to compose full resource names.
    @@ -37,6 +39,9 @@ public class NameUtil {
       private static final Pattern AUTHORIZED_VIEW_PATTERN =
           Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)/authorizedViews/([^/]+)");
     
    +  private static final Pattern SCHEMA_BUNDLE_PATTERN =
    +      Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)/schemaBundles/([^/]+)");
    +
       public static String formatProjectName(String projectId) {
         return "projects/" + projectId;
       }
    @@ -49,6 +54,20 @@ public static String formatTableName(String projectId, String instanceId, String
         return formatInstanceName(projectId, instanceId) + "/tables/" + tableId;
       }
     
    +  public static String formatTableName(String projectId, String instanceId, TableId tableId) {
    +    return formatInstanceName(projectId, instanceId) + "/tables/" + tableId.getTableId();
    +  }
    +
    +  public static String formatMaterializedViewName(
    +      @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String materializedViewId) {
    +    return formatInstanceName(projectId, instanceId) + "/materializedViews/" + materializedViewId;
    +  }
    +
    +  public static String formatLogicalViewName(
    +      @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String logicalViewId) {
    +    return formatInstanceName(projectId, instanceId) + "/logicalViews/" + logicalViewId;
    +  }
    +
       public static String formatLocationName(String projectId, String zone) {
         return formatProjectName(projectId) + "/locations/" + zone;
       }
    @@ -63,6 +82,11 @@ public static String formatAuthorizedViewName(
         return formatTableName(projectId, instanceId, tableId) + "/authorizedViews/" + viewId;
       }
     
    +  public static String formatSchemaBundleName(
    +      String projectId, String instanceId, String tableId, String bundleId) {
    +    return formatTableName(projectId, instanceId, tableId) + "/schemaBundles/" + bundleId;
    +  }
    +
       public static String extractTableIdFromTableName(String fullTableName) {
         Matcher matcher = TABLE_PATTERN.matcher(fullTableName);
         if (!matcher.matches()) {
    @@ -88,6 +112,14 @@ public static String extractAuthorizedViewIdFromAuthorizedViewName(
         return matcher.group(4);
       }
     
    +  public static String extractSchemaBundleIdFromSchemaBundleName(String fullSchemaBundleName) {
    +    Matcher matcher = SCHEMA_BUNDLE_PATTERN.matcher(fullSchemaBundleName);
    +    if (!matcher.matches()) {
    +      throw new IllegalArgumentException("Invalid schema bundle name: " + fullSchemaBundleName);
    +    }
    +    return matcher.group(4);
    +  }
    +
       public static String extractZoneIdFromLocationName(String fullLocationName) {
         Matcher matcher = LOCATION_PATTERN.matcher(fullLocationName);
         if (!matcher.matches()) {
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/AppProfile.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/AppProfile.java
    index bd7a534640..247d2fc2b8 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/AppProfile.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/AppProfile.java
    @@ -18,7 +18,6 @@
     import com.google.api.core.InternalApi;
     import com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly;
     import com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny;
    -import com.google.bigtable.admin.v2.AppProfile.Priority;
     import com.google.bigtable.admin.v2.AppProfile.StandardIsolation;
     import com.google.bigtable.admin.v2.AppProfileName;
     import com.google.common.base.Objects;
    @@ -69,6 +68,10 @@ private AppProfile(@Nonnull com.google.bigtable.admin.v2.AppProfile proto) {
       @SuppressWarnings("WeakerAccess")
       public RoutingPolicy getPolicy() {
         if (proto.hasMultiClusterRoutingUseAny()) {
    +      if (proto.getMultiClusterRoutingUseAny().hasRowAffinity()) {
    +        return MultiClusterRoutingPolicy.withRowAffinity(
    +            ImmutableSet.copyOf(proto.getMultiClusterRoutingUseAny().getClusterIdsList()));
    +      }
           return MultiClusterRoutingPolicy.of(
               ImmutableSet.copyOf(proto.getMultiClusterRoutingUseAny().getClusterIdsList()));
         } else if (proto.hasSingleClusterRouting()) {
    @@ -220,6 +223,7 @@ com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting toProto() {
           return proto;
         }
     
    +    @SuppressWarnings("EqualsGetClass")
         @Override
         public boolean equals(Object o) {
           if (this == o) {
    @@ -267,6 +271,34 @@ public static MultiClusterRoutingPolicy of(Set clusterIds) {
               MultiClusterRoutingUseAny.newBuilder().addAllClusterIds(clusterIds).build());
         }
     
    +    /** Creates a new instance of {@link MultiClusterRoutingPolicy}. */
    +    public static MultiClusterRoutingPolicy withRowAffinity() {
    +      return new MultiClusterRoutingPolicy(
    +          MultiClusterRoutingUseAny.newBuilder()
    +              .setRowAffinity(MultiClusterRoutingUseAny.RowAffinity.newBuilder().build())
    +              .build());
    +    }
    +
    +    /**
    +     * Creates a new instance of {@link MultiClusterRoutingPolicy} with row affinity enabled and
    +     * specified cluster ids to route to.
    +     */
    +    public static MultiClusterRoutingPolicy withRowAffinity(String... clusterIds) {
    +      return withRowAffinity(ImmutableSet.copyOf(clusterIds));
    +    }
    +
    +    /**
    +     * Creates a new instance of {@link MultiClusterRoutingPolicy} with specified cluster ids to
    +     * route to.
    +     */
    +    public static MultiClusterRoutingPolicy withRowAffinity(Set clusterIds) {
    +      return new MultiClusterRoutingPolicy(
    +          MultiClusterRoutingUseAny.newBuilder()
    +              .addAllClusterIds(clusterIds)
    +              .setRowAffinity(MultiClusterRoutingUseAny.RowAffinity.newBuilder().build())
    +              .build());
    +    }
    +
         /*
          * Returns the set of clusters to route to. The order is ignored; clusters will be
          * tried in order of distance. If empty, all clusters are eligible.
    @@ -289,6 +321,7 @@ MultiClusterRoutingUseAny toProto() {
           return proto;
         }
     
    +    @SuppressWarnings("EqualsGetClass")
         @Override
         public boolean equals(Object o) {
           if (this == o) {
    @@ -395,6 +428,7 @@ com.google.bigtable.admin.v2.AppProfile.StandardIsolation toProto() {
           return proto;
         }
     
    +    @SuppressWarnings("EqualsGetClass")
         @Override
         public boolean equals(Object o) {
           if (this == o) {
    @@ -496,6 +530,7 @@ public DataBoostIsolationReadOnly toProto() {
           return proto;
         }
     
    +    @SuppressWarnings("EqualsGetClass")
         @Override
         public boolean equals(Object o) {
           if (this == o) {
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Backup.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Backup.java
    index 59e6fcd038..f57d6fded0 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Backup.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Backup.java
    @@ -76,6 +76,56 @@ public com.google.bigtable.admin.v2.Backup.State toProto() {
         }
       }
     
    +  public enum BackupType {
    +    /** Not specified. */
    +    BACKUP_TYPE_UNSPECIFIED(com.google.bigtable.admin.v2.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED),
    +
    +    /**
    +     * The default type for Cloud Bigtable managed backups. Supported for backups created in both
    +     * HDD and SSD instances. Requires optimization when restored to a table in an SSD instance.
    +     */
    +    STANDARD(com.google.bigtable.admin.v2.Backup.BackupType.STANDARD),
    +    /**
    +     * A backup type with faster restore to SSD performance. Only supported for backups created in
    +     * SSD instances. A new SSD table restored from a hot backup reaches production performance more
    +     * quickly than a standard backup.
    +     */
    +    HOT(com.google.bigtable.admin.v2.Backup.BackupType.HOT),
    +
    +    /** The backup type of the backup is not known by this client. Please upgrade your client. */
    +    UNRECOGNIZED(com.google.bigtable.admin.v2.Backup.BackupType.UNRECOGNIZED);
    +
    +    private final com.google.bigtable.admin.v2.Backup.BackupType proto;
    +
    +    BackupType(com.google.bigtable.admin.v2.Backup.BackupType proto) {
    +      this.proto = proto;
    +    }
    +
    +    /**
    +     * Wraps the protobuf. This method is considered an internal implementation detail and not meant
    +     * to be used by applications.
    +     */
    +    @InternalApi
    +    public static Backup.BackupType fromProto(
    +        com.google.bigtable.admin.v2.Backup.BackupType proto) {
    +      for (Backup.BackupType backupType : values()) {
    +        if (backupType.proto.equals(proto)) {
    +          return backupType;
    +        }
    +      }
    +      return BACKUP_TYPE_UNSPECIFIED;
    +    }
    +
    +    /**
    +     * Creates the request protobuf. This method is considered an internal implementation detail and
    +     * not meant to be used by applications.
    +     */
    +    @InternalApi
    +    public com.google.bigtable.admin.v2.Backup.BackupType toProto() {
    +      return proto;
    +    }
    +  }
    +
       @Nonnull private final com.google.bigtable.admin.v2.Backup proto;
       @Nonnull private final String id;
       @Nonnull private final String instanceId;
    @@ -147,6 +197,20 @@ public State getState() {
         return State.fromProto(proto.getState());
       }
     
    +  /** Get the backup type of this backup. */
    +  public BackupType getBackupType() {
    +    return BackupType.fromProto(proto.getBackupType());
    +  }
    +
    +  /** Get the time at which this backup will be converted from a hot backup to a standard backup. */
    +  @Nullable
    +  public Instant getHotToStandardTime() {
    +    if (proto.hasHotToStandardTime()) {
    +      return Instant.ofEpochMilli(Timestamps.toMillis(proto.getHotToStandardTime()));
    +    }
    +    return null;
    +  }
    +
       /**
        * Get the encryption information for the backup.
        *
    @@ -159,6 +223,7 @@ public EncryptionInfo getEncryptionInfo() {
         return EncryptionInfo.fromProto(proto.getEncryptionInfo());
       }
     
    +  @SuppressWarnings("EqualsGetClass")
       @Override
       public boolean equals(Object o) {
         if (this == o) {
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
    index 189685cfc0..fb6af29f55 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Cluster.java
    @@ -177,6 +177,7 @@ public int getAutoscalingCpuPercentageTarget() {
             .getAutoscalingTargets()
             .getCpuUtilizationPercent();
       }
    +
       /**
        * Get the storage utilization that the Autoscaler should be trying to achieve. This number is
        * limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD cluster and between 8192 (8TiB) and
    @@ -213,6 +214,7 @@ public String getKmsKeyName() {
         return null;
       }
     
    +  @SuppressWarnings("EqualsGetClass")
       @Override
       public boolean equals(Object o) {
         if (this == o) {
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ClusterAutoscalingConfig.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ClusterAutoscalingConfig.java
    index 617618b800..fe83273cf8 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ClusterAutoscalingConfig.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ClusterAutoscalingConfig.java
    @@ -177,6 +177,7 @@ public com.google.bigtable.admin.v2.PartialUpdateClusterRequest toProto(String p
         return this.builder.build();
       }
     
    +  @SuppressWarnings({"EqualsGetClass", "ObjectEqualsForPrimitives"})
       @Override
       public boolean equals(Object o) {
         if (this == o) {
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java
    new file mode 100644
    index 0000000000..f338776503
    --- /dev/null
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java
    @@ -0,0 +1,95 @@
    +/*
    + * 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
    + *
    + *     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.bigtable.admin.v2.models;
    +
    +import com.google.api.core.InternalApi;
    +import com.google.auto.value.AutoValue;
    +import com.google.bigtable.admin.v2.CheckConsistencyRequest;
    +import com.google.bigtable.admin.v2.DataBoostReadLocalWrites;
    +import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
    +import com.google.bigtable.admin.v2.StandardReadRemoteWrites;
    +import com.google.bigtable.admin.v2.TableName;
    +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext;
    +import com.google.common.base.Preconditions;
    +import javax.annotation.Nonnull;
    +import javax.annotation.Nullable;
    +
    +@AutoValue
    +public abstract class ConsistencyRequest {
    +  @Nonnull
    +  protected abstract String getTableId();
    +
    +  @Nonnull
    +  protected abstract CheckConsistencyRequest.ModeCase getMode();
    +
    +  /**
    +   * Internal accessor for the consistency token. Must be public to be accessible from the stub
    +   * package.
    +   */
    +  @InternalApi
    +  @Nullable
    +  public abstract String getConsistencyToken();
    +
    +  public static ConsistencyRequest forReplication(String tableId) {
    +    return new AutoValue_ConsistencyRequest(
    +        tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES, null);
    +  }
    +
    +  /**
    +   * Creates a request to check consistency using an existing token.
    +   *
    +   * @param tableId The table ID.
    +   * @param consistencyToken The token to check. Must not be null.
    +   * @throws NullPointerException if consistencyToken is null.
    +   */
    +  public static ConsistencyRequest forReplication(String tableId, String consistencyToken) {
    +    Preconditions.checkNotNull(consistencyToken, "consistencyToken must not be null");
    +
    +    return new AutoValue_ConsistencyRequest(
    +        tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES, consistencyToken);
    +  }
    +
    +  public static ConsistencyRequest forDataBoost(String tableId) {
    +    return new AutoValue_ConsistencyRequest(
    +        tableId, CheckConsistencyRequest.ModeCase.DATA_BOOST_READ_LOCAL_WRITES, null);
    +  }
    +
    +  @InternalApi
    +  public CheckConsistencyRequest toCheckConsistencyProto(
    +      TableAdminRequestContext requestContext, String token) {
    +    CheckConsistencyRequest.Builder builder = CheckConsistencyRequest.newBuilder();
    +    TableName tableName =
    +        TableName.of(requestContext.getProjectId(), requestContext.getInstanceId(), getTableId());
    +
    +    if (getMode().equals(CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES)) {
    +      builder.setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build());
    +    } else {
    +      builder.setDataBoostReadLocalWrites(DataBoostReadLocalWrites.newBuilder().build());
    +    }
    +
    +    return builder.setName(tableName.toString()).setConsistencyToken(token).build();
    +  }
    +
    +  @InternalApi
    +  public GenerateConsistencyTokenRequest toGenerateTokenProto(
    +      TableAdminRequestContext requestContext) {
    +    GenerateConsistencyTokenRequest.Builder builder = GenerateConsistencyTokenRequest.newBuilder();
    +    TableName tableName =
    +        TableName.of(requestContext.getProjectId(), requestContext.getInstanceId(), getTableId());
    +
    +    return builder.setName(tableName.toString()).build();
    +  }
    +}
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequest.java
    index 1a27546c8d..542ba8da20 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequest.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequest.java
    @@ -58,6 +58,23 @@ public CreateBackupRequest setExpireTime(Instant expireTime) {
         return this;
       }
     
    +  public CreateBackupRequest setBackupType(Backup.BackupType backupType) {
    +    Preconditions.checkNotNull(backupType);
    +    requestBuilder.getBackupBuilder().setBackupType(backupType.toProto());
    +    return this;
    +  }
    +
    +  // The time at which this backup will be converted from a hot backup to a standard backup. Only
    +  // applicable for hot backups. If not set, the backup will remain as a hot backup until it is
    +  // deleted.
    +  public CreateBackupRequest setHotToStandardTime(Instant hotToStandardTime) {
    +    Preconditions.checkNotNull(hotToStandardTime);
    +    requestBuilder
    +        .getBackupBuilder()
    +        .setHotToStandardTime(Timestamps.fromMillis(hotToStandardTime.toEpochMilli()));
    +    return this;
    +  }
    +
       @Override
       public boolean equals(Object o) {
         if (this == o) {
    @@ -69,12 +86,23 @@ public boolean equals(Object o) {
         CreateBackupRequest that = (CreateBackupRequest) o;
         return Objects.equal(requestBuilder.getBackupId(), that.requestBuilder.getBackupId())
             && Objects.equal(clusterId, that.clusterId)
    -        && Objects.equal(sourceTableId, that.sourceTableId);
    +        && Objects.equal(sourceTableId, that.sourceTableId)
    +        && Objects.equal(
    +            requestBuilder.getBackup().getBackupType(),
    +            that.requestBuilder.getBackup().getBackupType())
    +        && Objects.equal(
    +            requestBuilder.getBackup().getHotToStandardTime(),
    +            that.requestBuilder.getBackup().getHotToStandardTime());
       }
     
       @Override
       public int hashCode() {
    -    return Objects.hashCode(requestBuilder.getBackupId(), clusterId, sourceTableId);
    +    return Objects.hashCode(
    +        requestBuilder.getBackupId(),
    +        clusterId,
    +        sourceTableId,
    +        requestBuilder.getBackup().getBackupType(),
    +        requestBuilder.getBackup().getHotToStandardTime());
       }
     
       @InternalApi
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java
    index 851f0e677f..c7ad0a6e38 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequest.java
    @@ -102,7 +102,8 @@ public CreateClusterRequest setScalingMode(@Nonnull StaticClusterSize staticClus
         Preconditions.checkState(staticClusterSize.getClusterSize() > 0, "Serve nodes must be > 0");
         if (proto.getCluster().getClusterConfig().hasClusterAutoscalingConfig()) {
           throw new IllegalArgumentException(
    -          "Autoscaling is already set. To enable manual scaling, do not set the max nodes, min nodes, and CPU percentage.");
    +          "Autoscaling is already set. To enable manual scaling, do not set the max nodes, min"
    +              + " nodes, and CPU percentage.");
         }
         proto.getClusterBuilder().setServeNodes(staticClusterSize.getClusterSize());
         return this;
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java
    index 685e52d555..092a4c7aa0 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateInstanceRequest.java
    @@ -16,7 +16,6 @@
     package com.google.cloud.bigtable.admin.v2.models;
     
     import com.google.api.core.InternalApi;
    -import com.google.bigtable.admin.v2.Instance.Type;
     import com.google.cloud.bigtable.admin.v2.internal.NameUtil;
     import com.google.common.base.Preconditions;
     import com.google.common.collect.Lists;
    @@ -74,7 +73,7 @@ private CreateInstanceRequest(@Nonnull String instanceId) {
     
         builder.setInstanceId(instanceId);
         builder.getInstanceBuilder().setDisplayName(instanceId);
    -    builder.getInstanceBuilder().setType(Type.PRODUCTION);
    +    builder.getInstanceBuilder().setType(com.google.bigtable.admin.v2.Instance.Type.PRODUCTION);
       }
     
       /**
    @@ -118,6 +117,22 @@ public CreateInstanceRequest addLabel(@Nonnull String key, @Nonnull String value
         return this;
       }
     
    +  /**
    +   * Adds a tag to the instance.
    +   *
    +   * 

    Tags are a way to organize and govern resources across Google Cloud. Unlike labels, Tags are + * standalone resources created and managed through the Resource Manager API. + * + * @see For more details + */ + @SuppressWarnings("WeakerAccess") + public CreateInstanceRequest addTag(@Nonnull String key, @Nonnull String value) { + Preconditions.checkNotNull(key, "Key can't be null"); + Preconditions.checkNotNull(value, "Value can't be null"); + builder.getInstanceBuilder().putTags(key, value); + return this; + } + /** * Adds a cluster to the instance request with manual scaling enabled. * @@ -140,7 +155,7 @@ public CreateInstanceRequest addCluster( CreateClusterRequest clusterRequest = CreateClusterRequest.of("ignored-instance-id", clusterId) .setZone(zone) - .setServeNodes(serveNodes) + .setScalingMode(StaticClusterSize.of(serveNodes)) .setStorageType(storageType); clusterRequests.add(clusterRequest); @@ -196,7 +211,7 @@ public CreateInstanceRequest addCmekCluster( CreateClusterRequest clusterRequest = CreateClusterRequest.of("ignored-instance-id", clusterId) .setZone(zone) - .setServeNodes(serveNodes) + .setScalingMode(StaticClusterSize.of(serveNodes)) .setStorageType(storageType) .setKmsKeyName(kmsKeyName); clusterRequests.add(clusterRequest); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequest.java new file mode 100644 index 0000000000..5a3a6e0f5f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2018 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import javax.annotation.Nonnull; + +/** + * Parameters for creating a new Cloud Bigtable logical view. + * + *

    Sample code: + * + *

    {@code
    + * LogicalView existingLogicalView = ...;
    + * CreateLogicalViewRequest logicalViewRequest = CreateLogicalViewRequest.of("my-instance", "my-new-logical-view")
    + *   .setQuery("...").setDeletionProtection(true);
    + * }
    + * + * @see LogicalView for more details + */ +public final class CreateLogicalViewRequest { + private final String instanceId; + private final com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder proto; + + /** Builds a new request to create a new logical view in the specified instance. */ + public static CreateLogicalViewRequest of(String instanceId, String logicalViewId) { + return new CreateLogicalViewRequest(instanceId, logicalViewId); + } + + private CreateLogicalViewRequest(String instanceId, String logicalViewId) { + this.instanceId = instanceId; + this.proto = com.google.bigtable.admin.v2.CreateLogicalViewRequest.newBuilder(); + + proto.setLogicalViewId(logicalViewId); + } + + /** Sets the query of the LogicalView. */ + @SuppressWarnings("WeakerAccess") + public CreateLogicalViewRequest setQuery(@Nonnull String query) { + proto.getLogicalViewBuilder().setQuery(query); + return this; + } + + /** Configures if the logical view is deletion protected. */ + @SuppressWarnings("WeakerAccess") + public CreateLogicalViewRequest setDeletionProtection(boolean value) { + proto.getLogicalViewBuilder().setDeletionProtection(value); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateLogicalViewRequest that = (CreateLogicalViewRequest) o; + return Objects.equal(proto.build(), that.proto.build()) + && Objects.equal(instanceId, that.instanceId); + } + + @Override + public int hashCode() { + return Objects.hashCode(proto.build(), instanceId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.CreateLogicalViewRequest toProto(String projectId) { + String name = NameUtil.formatInstanceName(projectId, instanceId); + + return proto.setParent(name).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequest.java new file mode 100644 index 0000000000..983a0a48e1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2018 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import javax.annotation.Nonnull; + +/** + * Parameters for creating a new Cloud Bigtable materialized view. + * + *

    Sample code: + * + *

    {@code
    + * MaterializedView existingMaterializedView = ...;
    + * CreateMaterializedViewRequest materializedViewRequest = CreateMaterializedViewRequest.of("my-instance", "my-new-materialized-view")
    + *   .setQuery("...");
    + * }
    + * + * @see MaterializedView for more details + */ +public final class CreateMaterializedViewRequest { + private final String instanceId; + private final com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder proto; + + /** Builds a new request to create a new materialized view in the specified instance. */ + public static CreateMaterializedViewRequest of(String instanceId, String materializedViewId) { + return new CreateMaterializedViewRequest(instanceId, materializedViewId); + } + + private CreateMaterializedViewRequest(String instanceId, String materializedViewId) { + this.instanceId = instanceId; + this.proto = com.google.bigtable.admin.v2.CreateMaterializedViewRequest.newBuilder(); + + proto.setMaterializedViewId(materializedViewId); + } + + /** Configures if the materialized view is deletion protected. */ + @SuppressWarnings("WeakerAccess") + public CreateMaterializedViewRequest setDeletionProtection(boolean value) { + proto.getMaterializedViewBuilder().setDeletionProtection(value); + return this; + } + + /** Sets the query of the MaterializedView. */ + @SuppressWarnings("WeakerAccess") + public CreateMaterializedViewRequest setQuery(@Nonnull String query) { + proto.getMaterializedViewBuilder().setQuery(query); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateMaterializedViewRequest that = (CreateMaterializedViewRequest) o; + return Objects.equal(proto.build(), that.proto.build()) + && Objects.equal(instanceId, that.instanceId); + } + + @Override + public int hashCode() { + return Objects.hashCode(proto.build(), instanceId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest toProto(String projectId) { + String name = NameUtil.formatInstanceName(projectId, instanceId); + + return proto.setParent(name).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequest.java new file mode 100644 index 0000000000..b6d88e2b53 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequest.java @@ -0,0 +1,108 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.ProtoSchema; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import javax.annotation.Nonnull; + +/** + * Parameters for creating a new Cloud Bigtable {@link SchemaBundle}, which represents subsets of a + * particular table. + * + *

    Sample code: + * + *

    {@code
    + * CreateSchemaBundleRequest request =
    + *     CreateSchemaBundleRequest.of("my-table", "my-new-schema-bundle")
    + *         .setProtoSchemaFile("proto_file.pb");
    + * }
    + * + * @see SchemaBundle for more details. + */ +public final class CreateSchemaBundleRequest { + private final String tableId; + private final com.google.bigtable.admin.v2.CreateSchemaBundleRequest.Builder requestBuilder = + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.newBuilder(); + + public static CreateSchemaBundleRequest of( + @Nonnull String tableId, @Nonnull String schemaBundleId) { + return new CreateSchemaBundleRequest(tableId, schemaBundleId); + } + + private CreateSchemaBundleRequest(@Nonnull String tableId, @Nonnull String schemaBundleId) { + Preconditions.checkNotNull(tableId, "tableId must be set"); + Preconditions.checkNotNull(schemaBundleId, "schemaBundleId must be set"); + + this.tableId = tableId; + requestBuilder.setSchemaBundleId(schemaBundleId); + } + + /** Sets the proto schema for this schema bundle. */ + public CreateSchemaBundleRequest setProtoSchemaFile(@Nonnull String protoSchemaFile) + throws IOException { + Preconditions.checkNotNull(protoSchemaFile, "protoSchemaFile must be set"); + byte[] content = Files.readAllBytes(Paths.get(protoSchemaFile)); + return setProtoSchema(ByteString.copyFrom(content)); + } + + /** Sets the proto schema for this schema bundle. */ + public CreateSchemaBundleRequest setProtoSchema(@Nonnull ByteString protoSchema) { + Preconditions.checkNotNull(protoSchema, "protoSchema must be set"); + requestBuilder.setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setProtoSchema(ProtoSchema.newBuilder().setProtoDescriptors(protoSchema))); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSchemaBundleRequest that = (CreateSchemaBundleRequest) o; + return Objects.equal(requestBuilder.build(), that.requestBuilder.build()) + && Objects.equal(tableId, that.tableId); + } + + @Override + public int hashCode() { + return Objects.hashCode(requestBuilder.build(), tableId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.CreateSchemaBundleRequest toProto( + @Nonnull String projectId, @Nonnull String instanceId) { + return requestBuilder + .setParent(NameUtil.formatTableName(projectId, instanceId, tableId)) + .build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java index 0fbffcb190..88e6b99c22 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequest.java @@ -100,14 +100,14 @@ public CreateTableRequest addFamily( return this; } - /** Adds split at the specified key to the configuration */ + /** Adds split at the specified key to the configuration. */ public CreateTableRequest addSplit(ByteString key) { Preconditions.checkNotNull(key); requestBuilder.addInitialSplitsBuilder().setKey(key); return this; } - /** Add change stream retention period between 1 day and 7 days */ + /** Add change stream retention period between 1 day and 7 days. */ public CreateTableRequest addChangeStreamRetention(Duration retention) { Preconditions.checkNotNull(retention); requestBuilder @@ -123,6 +123,32 @@ public CreateTableRequest addChangeStreamRetention(Duration retention) { return this; } + /** Configures if the table is deletion protected. */ + public CreateTableRequest setDeletionProtection(boolean deletionProtection) { + requestBuilder.getTableBuilder().setDeletionProtection(deletionProtection); + return this; + } + + /** Set an automated backup policy for the table. */ + public CreateTableRequest setAutomatedBackup(Duration retentionPeriod, Duration frequency) { + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy policy = + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder() + .setSeconds(retentionPeriod.getSeconds()) + .setNanos(retentionPeriod.getNano()) + .build()) + .setFrequency( + com.google.protobuf.Duration.newBuilder() + .setSeconds(frequency.getSeconds()) + .setNanos(frequency.getNano()) + .build()) + .build(); + + requestBuilder.getTableBuilder().setAutomatedBackupPolicy(policy); + return this; + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilder.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilder.java new file mode 100644 index 0000000000..552a789624 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2026 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.bigtable.admin.v2.models; + +import com.google.bigtable.admin.v2.GcRule; +import com.google.protobuf.util.Durations; +import java.time.Duration; + +/** + * Factory for creating safe GcRule protos. + * + *

    Use this class to construct {@link GcRule} instances instead of the raw proto builder ({@link + * GcRule#newBuilder()}) to avoid common pitfalls with "oneof" fields (e.g. accidentally overwriting + * max age with max versions). + */ +public final class GcRuleBuilder { + private GcRuleBuilder() {} // Static utility + + // Entry points for composite rules + + /** + * Starts building an Intersection (AND) rule. + * + * @return A new builder for an intersection rule. + */ + public static IntersectionRuleBuilder intersection() { + return new IntersectionRuleBuilder(); + } + + /** + * Starts building a Union (OR) rule. + * + * @return A new builder for a union rule. + */ + public static UnionRuleBuilder union() { + return new UnionRuleBuilder(); + } + + // Entry points for simple rules (return the Proto directly) + + /** + * Creates a Max Age rule. + * + * @param age The maximum age of the cell. + * @return The constructed GcRule proto. + */ + public static GcRule maxAge(Duration age) { + long seconds = age.getSeconds(); + int nanos = age.getNano(); + return GcRule.newBuilder() + .setMaxAge(Durations.fromNanos(seconds * 1_000_000_000L + nanos)) + .build(); + } + + /** + * Creates a Max Versions rule. + * + * @param versions The maximum number of versions. + * @return The constructed GcRule proto. + */ + public static GcRule maxVersions(int versions) { + return GcRule.newBuilder().setMaxNumVersions(versions).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Instance.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Instance.java index c3a0c43bca..df163b0e0d 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Instance.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Instance.java @@ -150,6 +150,12 @@ public String getDisplayName() { return proto.getDisplayName(); } + /** Gets the instance's tags. */ + @SuppressWarnings("WeakerAccess") + public Map getTags() { + return proto.getTagsMap(); + } + /** Gets the instance's current type. Can be DEVELOPMENT or PRODUCTION. */ @SuppressWarnings("WeakerAccess") public Type getType() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/IntersectionRuleBuilder.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/IntersectionRuleBuilder.java new file mode 100644 index 0000000000..96891669c4 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/IntersectionRuleBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.bigtable.admin.v2.models; + +import com.google.bigtable.admin.v2.GcRule; +import com.google.bigtable.admin.v2.GcRule.Intersection; + +/** + * Builder for creating an Intersection (AND) GC Rule. + * + *

    This class ensures type safety when constructing composite rules, preventing the misuse of the + * standard builder's ambiguous setters. + */ +public final class IntersectionRuleBuilder { + private final Intersection.Builder intersectionBuilder = Intersection.newBuilder(); + + /** + * Adds a rule to the intersection. + * + * @param rule The rule to add to the intersection. + * @return The builder instance for chaining. + */ + public IntersectionRuleBuilder add(GcRule rule) { + intersectionBuilder.addRules(rule); + return this; + } + + /** + * Builds the final GcRule proto. + * + * @return The constructed GcRule proto. + */ + public GcRule build() { + return GcRule.newBuilder().setIntersection(intersectionBuilder).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/LogicalView.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/LogicalView.java new file mode 100644 index 0000000000..48100c81de --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/LogicalView.java @@ -0,0 +1,108 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.LogicalViewName; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.common.base.Verify; +import javax.annotation.Nonnull; + +/** + * A class that wraps the {@link com.google.bigtable.admin.v2.LogicalView} protocol buffer object. + * + *

    A LogicalView represents subsets of a particular table based on rules. The access to each + * LogicalView can be configured separately from the Table. + * + *

    Users can perform read/write operation on a LogicalView by providing a logicalView id besides + * a table id, in which case the semantics remain identical as reading/writing on a Table except + * that visibility is restricted to the subset of the Table that the LogicalView represents. + */ +public final class LogicalView { + private final com.google.bigtable.admin.v2.LogicalView proto; + + /** + * Wraps the protobuf. This method is considered an internal implementation detail and not meant + * to be used by applications. + */ + @InternalApi + public static LogicalView fromProto(@Nonnull com.google.bigtable.admin.v2.LogicalView proto) { + return new LogicalView(proto); + } + + private LogicalView(@Nonnull com.google.bigtable.admin.v2.LogicalView proto) { + Preconditions.checkNotNull(proto); + Preconditions.checkArgument(!proto.getName().isEmpty(), "LogicalView must have a name"); + this.proto = proto; + } + + /** Gets the logical view's id. */ + public String getId() { + // Constructor ensures that name is not null. + LogicalViewName fullName = LogicalViewName.parse(proto.getName()); + + //noinspection ConstantConditions + return fullName.getLogicalView(); + } + + /** Gets the id of the instance that owns this LogicalView. */ + @SuppressWarnings("WeakerAccess") + public String getInstanceId() { + LogicalViewName fullName = + Verify.verifyNotNull(LogicalViewName.parse(proto.getName()), "Name can never be null"); + + //noinspection ConstantConditions + return fullName.getInstance(); + } + + /** Gets the query of this logical view. */ + public String getQuery() { + return proto.getQuery(); + } + + /** Returns whether this logical view is deletion protected. */ + public boolean isDeletionProtected() { + return proto.getDeletionProtection(); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.LogicalView toProto() { + return proto; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogicalView that = (LogicalView) o; + return Objects.equal(proto, that.proto); + } + + @Override + public int hashCode() { + return Objects.hashCode(proto); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/MaterializedView.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/MaterializedView.java new file mode 100644 index 0000000000..c3bf494c03 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/MaterializedView.java @@ -0,0 +1,111 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.MaterializedViewName; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.common.base.Verify; +import javax.annotation.Nonnull; + +/** + * A class that wraps the {@link com.google.bigtable.admin.v2.MaterializedView} protocol buffer + * object. + * + *

    A MaterializedView represents subsets of a particular table based on rules. The access to each + * MaterializedView can be configured separately from the Table. + * + *

    Users can perform read/write operation on a MaterializedView by providing a materializedView + * id besides a table id, in which case the semantics remain identical as reading/writing on a Table + * except that visibility is restricted to the subset of the Table that the MaterializedView + * represents. + */ +public final class MaterializedView { + private final com.google.bigtable.admin.v2.MaterializedView proto; + + /** + * Wraps the protobuf. This method is considered an internal implementation detail and not meant + * to be used by applications. + */ + @InternalApi + public static MaterializedView fromProto( + @Nonnull com.google.bigtable.admin.v2.MaterializedView proto) { + return new MaterializedView(proto); + } + + private MaterializedView(@Nonnull com.google.bigtable.admin.v2.MaterializedView proto) { + Preconditions.checkNotNull(proto); + Preconditions.checkArgument(!proto.getName().isEmpty(), "MaterializedView must have a name"); + this.proto = proto; + } + + /** Gets the materialized view's id. */ + public String getId() { + // Constructor ensures that name is not null. + MaterializedViewName fullName = MaterializedViewName.parse(proto.getName()); + + //noinspection ConstantConditions + return fullName.getMaterializedView(); + } + + /** Gets the id of the instance that owns this MaterializedView. */ + @SuppressWarnings("WeakerAccess") + public String getInstanceId() { + MaterializedViewName fullName = + Verify.verifyNotNull(MaterializedViewName.parse(proto.getName()), "Name can never be null"); + + //noinspection ConstantConditions + return fullName.getInstance(); + } + + /** Returns whether this materialized view is deletion protected. */ + public boolean isDeletionProtected() { + return proto.getDeletionProtection(); + } + + /** Gets the query of this materialized view. */ + public String getQuery() { + return proto.getQuery(); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.MaterializedView toProto() { + return proto; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MaterializedView that = (MaterializedView) o; + return Objects.equal(proto, that.proto); + } + + @Override + public int hashCode() { + return Objects.hashCode(proto); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundle.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundle.java new file mode 100644 index 0000000000..7782c335a2 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundle.java @@ -0,0 +1,95 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.SchemaBundleName; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; + +/** + * A class that wraps the {@link com.google.bigtable.admin.v2.SchemaBundle} protocol buffer object. + */ +public final class SchemaBundle { + private final com.google.bigtable.admin.v2.SchemaBundle proto; + private final SchemaBundleName schemaBundleName; + + /** + * Wraps the protobuf. This method is considered an internal implementation detail and not meant + * to be used by applications. + */ + @InternalApi + public static SchemaBundle fromProto(@Nonnull com.google.bigtable.admin.v2.SchemaBundle proto) { + return new SchemaBundle(proto); + } + + private SchemaBundle(@Nonnull com.google.bigtable.admin.v2.SchemaBundle proto) { + Preconditions.checkNotNull(proto); + Preconditions.checkArgument(!proto.getName().isEmpty(), "SchemaBundle must have a name"); + Preconditions.checkArgument( + proto.hasProtoSchema(), "Schemabundle must have a proto_schema field"); + this.proto = proto; + this.schemaBundleName = SchemaBundleName.parse(proto.getName()); + } + + /** Gets the schema bundle's id. */ + public String getId() { + //noinspection ConstantConditions + return schemaBundleName.getSchemaBundle(); + } + + /** Gets the id of the table that owns this schema bundle. */ + public String getTableId() { + //noinspection ConstantConditions + return schemaBundleName.getTable(); + } + + /** Gets the proto schema of this schema bundle. */ + public com.google.protobuf.ByteString getProtoSchema() { + if (proto.hasProtoSchema()) { + return proto.getProtoSchema().getProtoDescriptors(); + } + throw new IllegalStateException("This SchemaBundle doesn't have a valid type specified"); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.SchemaBundle toProto() { + return proto; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemaBundle that = (SchemaBundle) o; + return Objects.equal(proto, that.proto); + } + + @Override + public int hashCode() { + return Objects.hashCode(proto); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SubsetView.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SubsetView.java index 6ace603e46..dc0e599286 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SubsetView.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/SubsetView.java @@ -105,6 +105,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView toProto() { } @Override + @SuppressWarnings("EqualsGetClass") public boolean equals(Object o) { if (this == o) { return true; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java index 31aa612f18..2163b8c47d 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Table.java @@ -13,10 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.bigtable.admin.v2.models; import com.google.api.core.InternalApi; import com.google.bigtable.admin.v2.TableName; +import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -25,6 +27,7 @@ import java.util.Map; import java.util.Map.Entry; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.threeten.bp.Duration; /** Wrapper for {@link Table} protocol buffer object */ @@ -58,7 +61,7 @@ public enum ReplicationState { /** * The table is fully created and ready for use after a restore, and is being optimized for - * performance. When optimizations are complete, the table will transition to `READY` state. + * performance. When optimizations are complete, the table will transition to`READY` state. */ READY_OPTIMIZING( com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState.READY_OPTIMIZING), @@ -99,12 +102,50 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState toProto( } } + public static class AutomatedBackupPolicy { + private final com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy proto; + + /** + * Wraps the protobuf. This method is considered an internal implementation detail and not meant + * to be used by applications. + */ + @InternalApi + public static AutomatedBackupPolicy fromProto( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy proto) { + Preconditions.checkNotNull(proto); + return new AutomatedBackupPolicy(proto); + } + + AutomatedBackupPolicy(@Nonnull com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy proto) { + this.proto = proto; + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy toProto() { + return proto; + } + + /** Returns policy config contents as a string. */ + public String viewConfig() { + return MoreObjects.toStringHelper(this) + .add(proto.getClass().getName() + ".retention_period", proto.getRetentionPeriod()) + .add(proto.getClass().getName() + ".frequency", proto.getFrequency()) + .toString(); + } + } + private final String id; private final String instanceId; private final Map replicationStatesByClusterId; private final List columnFamilies; private final Duration changeStreamRetention; + private final boolean deletionProtection; + @Nullable private final AutomatedBackupPolicy automatedBackupPolicy; @InternalApi public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) { @@ -131,23 +172,34 @@ public static Table fromProto(@Nonnull com.google.bigtable.admin.v2.Table proto) proto.getChangeStreamConfig().getRetentionPeriod().getNanos()); } + AutomatedBackupPolicy automatedBackupPolicy = null; + if (proto.hasAutomatedBackupPolicy()) { + automatedBackupPolicy = AutomatedBackupPolicy.fromProto(proto.getAutomatedBackupPolicy()); + } + return new Table( TableName.parse(proto.getName()), replicationStates.build(), columnFamilies.build(), - changeStreamConfig); + changeStreamConfig, + proto.getDeletionProtection(), + automatedBackupPolicy); } private Table( TableName tableName, Map replicationStatesByClusterId, List columnFamilies, - Duration changeStreamRetention) { + Duration changeStreamRetention, + boolean deletionProtection, + @Nullable AutomatedBackupPolicy automatedBackupPolicy) { this.instanceId = tableName.getInstance(); this.id = tableName.getTable(); this.replicationStatesByClusterId = replicationStatesByClusterId; this.columnFamilies = columnFamilies; this.changeStreamRetention = changeStreamRetention; + this.deletionProtection = deletionProtection; + this.automatedBackupPolicy = automatedBackupPolicy; } /** Gets the table's id. */ @@ -172,6 +224,22 @@ public Duration getChangeStreamRetention() { return changeStreamRetention; } + /** Returns whether this table is deletion protected. */ + public boolean isDeletionProtected() { + return deletionProtection; + } + + /** Returns whether this table has automated backups enabled. */ + public boolean isAutomatedBackupEnabled() { + return automatedBackupPolicy != null; + } + + /** Returns the automated backup policy config. */ + @Nullable + public AutomatedBackupPolicy getAutomatedBackupPolicy() { + return automatedBackupPolicy; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -185,12 +253,20 @@ public boolean equals(Object o) { && Objects.equal(instanceId, table.instanceId) && Objects.equal(replicationStatesByClusterId, table.replicationStatesByClusterId) && Objects.equal(columnFamilies, table.columnFamilies) - && Objects.equal(changeStreamRetention, table.changeStreamRetention); + && Objects.equal(changeStreamRetention, table.changeStreamRetention) + && Objects.equal(deletionProtection, table.deletionProtection) + && Objects.equal(automatedBackupPolicy, table.automatedBackupPolicy); } @Override public int hashCode() { return Objects.hashCode( - id, instanceId, replicationStatesByClusterId, columnFamilies, changeStreamRetention); + id, + instanceId, + replicationStatesByClusterId, + columnFamilies, + changeStreamRetention, + deletionProtection, + automatedBackupPolicy); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java index 99f7f98c79..0505aa90b3 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/Type.java @@ -27,6 +27,7 @@ * @see com.google.bigtable.admin.v2.Type */ @BetaApi +@SuppressWarnings("SameNameButDifferent") public interface Type { /** * These types are marker types that allow types to be used as the input to aggregate function. @@ -51,8 +52,9 @@ static Type fromProto(com.google.bigtable.admin.v2.Type source) { return Aggregate.fromProto(source.getAggregateType()); case KIND_NOT_SET: return Raw.create(); + default: + throw new UnsupportedOperationException(); } - throw new UnsupportedOperationException(); } /** The raw type denotes the absence of a type. */ @@ -203,8 +205,9 @@ static Encoding fromProto(com.google.bigtable.admin.v2.Type.Int64.Encoding sourc return BigEndianBytes.create(); case ENCODING_NOT_SET: return BigEndianBytes.create(); + default: + throw new UnsupportedOperationException(); } - throw new UnsupportedOperationException(); } @AutoValue diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UnionRuleBuilder.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UnionRuleBuilder.java new file mode 100644 index 0000000000..0d4c1ba70a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UnionRuleBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.bigtable.admin.v2.models; + +import com.google.bigtable.admin.v2.GcRule; +import com.google.bigtable.admin.v2.GcRule.Union; + +/** + * Builder for creating a Union (OR) GC Rule. + * + *

    This class ensures type safety when constructing composite rules, preventing the misuse of the + * standard builder's ambiguous setters. + */ +public final class UnionRuleBuilder { + private final Union.Builder unionBuilder = Union.newBuilder(); + + /** + * Adds a rule to the union. + * + * @param rule The rule to add to the union. + * @return The builder instance for chaining. + */ + public UnionRuleBuilder add(GcRule rule) { + unionBuilder.addRules(rule); + return this; + } + + /** + * Builds the final GcRule proto. + * + * @return The constructed GcRule proto. + */ + public GcRule build() { + return GcRule.newBuilder().setUnion(unionBuilder).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequest.java index 9f8aa6a799..9bf9076b0c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequest.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequest.java @@ -16,10 +16,12 @@ package com.google.cloud.bigtable.admin.v2.models; import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.Backup; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; import com.google.protobuf.util.Timestamps; import javax.annotation.Nonnull; import org.threeten.bp.Instant; @@ -43,12 +45,35 @@ private UpdateBackupRequest(String clusterId, String backupId) { this.clusterId = clusterId; } + private void updateFieldMask(int fieldNumber) { + FieldMask newMask = FieldMaskUtil.fromFieldNumbers(Backup.class, fieldNumber); + requestBuilder.setUpdateMask(FieldMaskUtil.union(requestBuilder.getUpdateMask(), newMask)); + } + public UpdateBackupRequest setExpireTime(Instant expireTime) { Preconditions.checkNotNull(expireTime); requestBuilder .getBackupBuilder() .setExpireTime(Timestamps.fromMillis(expireTime.toEpochMilli())); - requestBuilder.setUpdateMask(FieldMask.newBuilder().addPaths("expire_time")); + updateFieldMask(Backup.EXPIRE_TIME_FIELD_NUMBER); + return this; + } + + // The time at which this backup will be converted from a hot backup to a standard backup. Only + // applicable for hot backups. If not set, the backup will remain as a hot backup until it is + // deleted. + public UpdateBackupRequest setHotToStandardTime(Instant hotToStandardTime) { + Preconditions.checkNotNull(hotToStandardTime); + requestBuilder + .getBackupBuilder() + .setHotToStandardTime(Timestamps.fromMillis(hotToStandardTime.toEpochMilli())); + updateFieldMask(Backup.HOT_TO_STANDARD_TIME_FIELD_NUMBER); + return this; + } + + public UpdateBackupRequest clearHotToStandardTime() { + requestBuilder.getBackupBuilder().clearHotToStandardTime(); + updateFieldMask(Backup.HOT_TO_STANDARD_TIME_FIELD_NUMBER); return this; } @@ -64,6 +89,9 @@ public boolean equals(Object o) { return Objects.equal( requestBuilder.getBackupBuilder().getExpireTime(), that.requestBuilder.getBackupBuilder().getExpireTime()) + && Objects.equal( + requestBuilder.getBackupBuilder().getHotToStandardTime(), + that.requestBuilder.getBackupBuilder().getHotToStandardTime()) && Objects.equal(requestBuilder.getUpdateMask(), that.requestBuilder.getUpdateMask()) && Objects.equal(clusterId, that.clusterId) && Objects.equal(backupId, that.backupId); @@ -73,6 +101,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hashCode( requestBuilder.getBackupBuilder().getExpireTime(), + requestBuilder.getBackupBuilder().getHotToStandardTime(), requestBuilder.getUpdateMask(), backupId); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java index ac64fa1f91..ddab8e7b88 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequest.java @@ -17,7 +17,6 @@ import com.google.api.core.InternalApi; import com.google.bigtable.admin.v2.Instance; -import com.google.bigtable.admin.v2.Instance.Type; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.common.base.Preconditions; @@ -64,7 +63,7 @@ public UpdateInstanceRequest setDisplayName(@Nonnull String displayName) { */ @SuppressWarnings("WeakerAccess") public UpdateInstanceRequest setProductionType() { - builder.getInstanceBuilder().setType(Type.PRODUCTION); + builder.getInstanceBuilder().setType(Instance.Type.PRODUCTION); updateFieldMask(Instance.TYPE_FIELD_NUMBER); return this; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequest.java new file mode 100644 index 0000000000..6cbc55a28d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequest.java @@ -0,0 +1,125 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import javax.annotation.Nonnull; + +/** + * Parameters for updating an existing Cloud Bigtable {@link LogicalView}. + * + *

    Sample code: + * + *

    {@code
    + * LogicalView existingLogicalView = client.getLogicalView("my-table", "my-logical-view");
    + * UpdateLogicalViewRequest request =
    + *     UpdateLogicalViewRequest.of(existingLogicalView).setQuery(query);
    + * }
    + * + * @see LogicalView for more details. + */ +public final class UpdateLogicalViewRequest { + private final com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder requestBuilder; + private final String instanceId; + private final String logicalViewId; + + /** Builds a new update request using an existing logical view. */ + public static UpdateLogicalViewRequest of(@Nonnull LogicalView logicalView) { + return new UpdateLogicalViewRequest( + logicalView.getId(), + logicalView.getInstanceId(), + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.newBuilder() + .setLogicalView(logicalView.toProto())); + } + + /** Builds a new update logical view request. */ + public static UpdateLogicalViewRequest of( + @Nonnull String instanceId, @Nonnull String logicalViewId) { + return new UpdateLogicalViewRequest( + logicalViewId, + instanceId, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.newBuilder()); + } + + private UpdateLogicalViewRequest( + @Nonnull String logicalViewId, + @Nonnull String instanceId, + @Nonnull com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder requestBuilder) { + Preconditions.checkNotNull(instanceId, "instanceId must be set"); + Preconditions.checkNotNull(logicalViewId, "logicalViewId must be set"); + Preconditions.checkNotNull(requestBuilder, "proto builder must be set"); + + this.instanceId = instanceId; + this.logicalViewId = logicalViewId; + this.requestBuilder = requestBuilder; + } + + /** Changes the query of an existing logical view. */ + public UpdateLogicalViewRequest setQuery(String query) { + requestBuilder.getLogicalViewBuilder().setQuery(query); + updateFieldMask(com.google.bigtable.admin.v2.LogicalView.QUERY_FIELD_NUMBER); + return this; + } + + /** Changes the deletion protection of an existing logical view. */ + public UpdateLogicalViewRequest setDeletionProtection(boolean deletionProtection) { + requestBuilder.getLogicalViewBuilder().setDeletionProtection(deletionProtection); + updateFieldMask(com.google.bigtable.admin.v2.LogicalView.DELETION_PROTECTION_FIELD_NUMBER); + return this; + } + + private void updateFieldMask(int fieldNumber) { + FieldMask newMask = + FieldMaskUtil.fromFieldNumbers(com.google.bigtable.admin.v2.LogicalView.class, fieldNumber); + requestBuilder.setUpdateMask(FieldMaskUtil.union(requestBuilder.getUpdateMask(), newMask)); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateLogicalViewRequest that = (UpdateLogicalViewRequest) o; + return Objects.equal(requestBuilder.build(), that.requestBuilder.build()) + && Objects.equal(logicalViewId, that.logicalViewId); + } + + @Override + public int hashCode() { + return Objects.hashCode(requestBuilder.build(), logicalViewId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest toProto(@Nonnull String projectId) { + requestBuilder + .getLogicalViewBuilder() + .setName(NameUtil.formatLogicalViewName(projectId, instanceId, logicalViewId)); + return requestBuilder.build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequest.java new file mode 100644 index 0000000000..57823da81f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequest.java @@ -0,0 +1,120 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import javax.annotation.Nonnull; + +/** + * Parameters for updating an existing Cloud Bigtable {@link MaterializedView}. + * + *

    Sample code: + * + *

    {@code
    + * MaterializedView existingMaterializedView = client.getMaterializedView("my-table", "my-materialized-view");
    + * UpdateMaterializedViewRequest request =
    + *     UpdateMaterializedViewRequest.of(existingMaterializedView).setDeletionProtection(true);
    + * }
    + * + * @see MaterializedView for more details. + */ +public final class UpdateMaterializedViewRequest { + private final com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder requestBuilder; + private final String instanceId; + private final String materializedViewId; + + /** Builds a new update request using an existing materialized view. */ + public static UpdateMaterializedViewRequest of(@Nonnull MaterializedView materializedView) { + return new UpdateMaterializedViewRequest( + materializedView.getId(), + materializedView.getInstanceId(), + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.newBuilder() + .setMaterializedView(materializedView.toProto())); + } + + /** Builds a new update materialized view request. */ + public static UpdateMaterializedViewRequest of( + @Nonnull String instanceId, @Nonnull String materializedViewId) { + return new UpdateMaterializedViewRequest( + materializedViewId, + instanceId, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.newBuilder()); + } + + private UpdateMaterializedViewRequest( + @Nonnull String materializedViewId, + @Nonnull String instanceId, + @Nonnull com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder requestBuilder) { + Preconditions.checkNotNull(instanceId, "instanceId must be set"); + Preconditions.checkNotNull(materializedViewId, "materializedViewId must be set"); + Preconditions.checkNotNull(requestBuilder, "proto builder must be set"); + + this.instanceId = instanceId; + this.materializedViewId = materializedViewId; + this.requestBuilder = requestBuilder; + } + + /** Changes the deletion protection of an existing materialized view. */ + public UpdateMaterializedViewRequest setDeletionProtection(boolean deletionProtection) { + requestBuilder.getMaterializedViewBuilder().setDeletionProtection(deletionProtection); + updateFieldMask(com.google.bigtable.admin.v2.MaterializedView.DELETION_PROTECTION_FIELD_NUMBER); + return this; + } + + private void updateFieldMask(int fieldNumber) { + FieldMask newMask = + FieldMaskUtil.fromFieldNumbers( + com.google.bigtable.admin.v2.MaterializedView.class, fieldNumber); + requestBuilder.setUpdateMask(FieldMaskUtil.union(requestBuilder.getUpdateMask(), newMask)); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateMaterializedViewRequest that = (UpdateMaterializedViewRequest) o; + return Objects.equal(requestBuilder.build(), that.requestBuilder.build()) + && Objects.equal(materializedViewId, that.materializedViewId); + } + + @Override + public int hashCode() { + return Objects.hashCode(requestBuilder.build(), materializedViewId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest toProto( + @Nonnull String projectId) { + requestBuilder + .getMaterializedViewBuilder() + .setName(NameUtil.formatMaterializedViewName(projectId, instanceId, materializedViewId)); + return requestBuilder.build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequest.java new file mode 100644 index 0000000000..904c4d0097 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequest.java @@ -0,0 +1,148 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.admin.v2.ProtoSchema; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import javax.annotation.Nonnull; + +/** + * Parameters for updating an existing Cloud Bigtable {@link SchemaBundle}. + * + *

    Sample code: + * + *

    {@code
    + * SchemaBundle existingSchemaBundle = client.getSchemaBundle("my-table", "my-schema-bundle");
    + * UpdateSchemaBundleRequest request =
    + *     UpdateSchemaBundleRequest.of(existingSchemaBundle).setProtoSchemaFile("file.pb");
    + * }
    + * + * @see SchemaBundle for more details. + */ +public final class UpdateSchemaBundleRequest { + private final com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.Builder requestBuilder; + private final String tableId; + private final String schemaBundleId; + + /** Builds a new update request using an existing schema bundle. */ + public static UpdateSchemaBundleRequest of(@Nonnull SchemaBundle schemaBundle) { + return new UpdateSchemaBundleRequest( + schemaBundle.getTableId(), + schemaBundle.getId(), + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder() + .setSchemaBundle(schemaBundle.toProto())); + } + + /** Builds a new update schema bundle request. */ + public static UpdateSchemaBundleRequest of( + @Nonnull String tableId, @Nonnull String schemaBundleId) { + return new UpdateSchemaBundleRequest( + tableId, + schemaBundleId, + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder()); + } + + private UpdateSchemaBundleRequest( + @Nonnull String tableId, + @Nonnull String schemaBundleId, + @Nonnull com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.Builder requestBuilder) { + Preconditions.checkNotNull(tableId, "tableId must be set"); + Preconditions.checkNotNull(schemaBundleId, "schemaBundleId must be set"); + Preconditions.checkNotNull(requestBuilder, "proto builder must be set"); + + this.tableId = tableId; + this.schemaBundleId = schemaBundleId; + this.requestBuilder = requestBuilder; + } + + /** Sets the proto schema for this schema bundle. */ + public UpdateSchemaBundleRequest setProtoSchemaFile(@Nonnull String protoSchemaFile) + throws IOException { + Preconditions.checkNotNull(protoSchemaFile, "protoSchemaFile must be set"); + byte[] content = Files.readAllBytes(Paths.get(protoSchemaFile)); + return setProtoSchema(ByteString.copyFrom(content)); + } + + /** Sets the proto schema for this schema bundle. */ + public UpdateSchemaBundleRequest setProtoSchema(@Nonnull ByteString protoSchema) + throws IOException { + Preconditions.checkNotNull(protoSchema, "protoSchema must be set"); + requestBuilder.setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setProtoSchema(ProtoSchema.newBuilder().setProtoDescriptors(protoSchema))); + updateFieldMask(com.google.bigtable.admin.v2.SchemaBundle.PROTO_SCHEMA_FIELD_NUMBER); + return this; + } + + /** + * Configures if safety warnings should be disabled. If set, then non backwards compatible changes + * are allowed. + */ + @SuppressWarnings("WeakerAccess") + public UpdateSchemaBundleRequest setIgnoreWarnings(boolean value) { + requestBuilder.setIgnoreWarnings(value); + return this; + } + + private void updateFieldMask(int fieldNumber) { + FieldMask newMask = + FieldMaskUtil.fromFieldNumbers( + com.google.bigtable.admin.v2.SchemaBundle.class, fieldNumber); + requestBuilder.setUpdateMask(FieldMaskUtil.union(requestBuilder.getUpdateMask(), newMask)); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSchemaBundleRequest that = (UpdateSchemaBundleRequest) o; + return Objects.equal(requestBuilder.build(), that.requestBuilder.build()) + && Objects.equal(tableId, that.tableId) + && Objects.equal(schemaBundleId, that.schemaBundleId); + } + + @Override + public int hashCode() { + return Objects.hashCode(requestBuilder.build(), tableId, schemaBundleId); + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi + public com.google.bigtable.admin.v2.UpdateSchemaBundleRequest toProto( + @Nonnull String projectId, @Nonnull String instanceId) { + requestBuilder + .getSchemaBundleBuilder() + .setName(NameUtil.formatSchemaBundleName(projectId, instanceId, tableId, schemaBundleId)); + return requestBuilder.build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequest.java index 034736aa56..1d6d635ac0 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequest.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequest.java @@ -39,6 +39,10 @@ public class UpdateTableRequest { private final com.google.bigtable.admin.v2.UpdateTableRequest.Builder requestBuilder = com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder(); + private final com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder + automatedPolicyBuilder = + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder(); + public static UpdateTableRequest of(String tableId) { return new UpdateTableRequest(tableId); } @@ -69,11 +73,78 @@ public UpdateTableRequest addChangeStreamRetention(Duration retention) { return this; } - /** Disable change stream for table */ + /** Disable change stream for table. */ public UpdateTableRequest disableChangeStreamRetention() { return addChangeStreamRetention(Duration.ZERO); } + /** Changes the deletion protection of an existing table. */ + public UpdateTableRequest setDeletionProtection(boolean deletionProtection) { + requestBuilder.getTableBuilder().setDeletionProtection(deletionProtection); + requestBuilder.getUpdateMaskBuilder().addPaths("deletion_protection"); + return this; + } + + /** Disables table automated backup policy. */ + public UpdateTableRequest disableAutomatedBackup() { + requestBuilder.getTableBuilder().setAutomatedBackupPolicy(automatedPolicyBuilder.build()); + requestBuilder.getUpdateMaskBuilder().addPaths("automated_backup_policy"); + return this; + } + + /** Set an automated backup policy for the table. */ + public UpdateTableRequest setAutomatedBackup(Duration retentionPeriod, Duration frequency) { + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy policy = + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder() + .setSeconds(retentionPeriod.getSeconds()) + .setNanos(retentionPeriod.getNano()) + .build()) + .setFrequency( + com.google.protobuf.Duration.newBuilder() + .setSeconds(frequency.getSeconds()) + .setNanos(frequency.getNano()) + .build()) + .build(); + + requestBuilder.getTableBuilder().setAutomatedBackupPolicy(policy); + requestBuilder.getUpdateMaskBuilder().addPaths("automated_backup_policy"); + return this; + } + + /** Updates table automated backup policy retention period. */ + public UpdateTableRequest setAutomatedBackupRetentionPeriod(Duration retention) { + requestBuilder + .getTableBuilder() + .setAutomatedBackupPolicy( + automatedPolicyBuilder + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder() + .setSeconds(retention.getSeconds()) + .setNanos(retention.getNano()) + .build()) + .build()); + requestBuilder.getUpdateMaskBuilder().addPaths("automated_backup_policy.retention_period"); + return this; + } + + /** Updates table automated backup policy frequency. */ + public UpdateTableRequest setAutomatedBackupFrequency(Duration frequency) { + requestBuilder + .getTableBuilder() + .setAutomatedBackupPolicy( + automatedPolicyBuilder + .setFrequency( + com.google.protobuf.Duration.newBuilder() + .setSeconds(frequency.getSeconds()) + .setNanos(frequency.getNano()) + .build()) + .build()); + requestBuilder.getUpdateMaskBuilder().addPaths("automated_backup_policy.frequency"); + return this; + } + @InternalApi public com.google.bigtable.admin.v2.UpdateTableRequest toProto( String projectId, String instanceId) { @@ -88,7 +159,13 @@ public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof UpdateTableRequest)) return false; UpdateTableRequest that = (UpdateTableRequest) o; - return Objects.equals(requestBuilder, that.requestBuilder); + if (requestBuilder == that.requestBuilder) { + return true; + } + if (requestBuilder == null || that.requestBuilder == null) { + return false; + } + return Objects.equals(requestBuilder.build(), that.requestBuilder.build()); } @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java new file mode 100644 index 0000000000..b4e42e2354 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java @@ -0,0 +1,222 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.stub; + +import com.google.api.core.ApiAsyncFunction; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.retrying.ExponentialPollAlgorithm; +import com.google.api.gax.retrying.NonCancellableFuture; +import com.google.api.gax.retrying.ResultRetryAlgorithmWithContext; +import com.google.api.gax.retrying.RetryAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.RetryingContext; +import com.google.api.gax.retrying.RetryingExecutor; +import com.google.api.gax.retrying.RetryingFuture; +import com.google.api.gax.retrying.ScheduledRetryingExecutor; +import com.google.api.gax.retrying.TimedAttemptSettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.bigtable.admin.v2.CheckConsistencyRequest; +import com.google.bigtable.admin.v2.CheckConsistencyResponse; +import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest; +import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.util.concurrent.MoreExecutors; +import java.util.concurrent.Callable; +import java.util.concurrent.CancellationException; + +/** + * Callable that waits until either replication or Data Boost has caught up to the point it was + * called. + * + *

    This callable wraps GenerateConsistencyToken and CheckConsistency RPCs. It will generate a + * token then poll until isConsistent is true. + */ +class AwaitConsistencyCallable extends UnaryCallable { + private final UnaryCallable + generateCallable; + private final UnaryCallable checkCallable; + private final RetryingExecutor executor; + + private final TableAdminRequestContext requestContext; + + static AwaitConsistencyCallable create( + UnaryCallable + generateCallable, + UnaryCallable checkCallable, + ClientContext clientContext, + RetrySettings pollingSettings, + TableAdminRequestContext requestContext) { + + RetryAlgorithm retryAlgorithm = + new RetryAlgorithm<>( + new PollResultAlgorithm(), + new ExponentialPollAlgorithm(pollingSettings, clientContext.getClock())); + + RetryingExecutor retryingExecutor = + new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor()); + + return new AwaitConsistencyCallable( + generateCallable, checkCallable, retryingExecutor, requestContext); + } + + @VisibleForTesting + AwaitConsistencyCallable( + UnaryCallable + generateCallable, + UnaryCallable checkCallable, + RetryingExecutor executor, + TableAdminRequestContext requestContext) { + this.generateCallable = generateCallable; + this.checkCallable = checkCallable; + this.executor = executor; + this.requestContext = requestContext; + } + + @Override + public ApiFuture futureCall( + final ConsistencyRequest consistencyRequest, final ApiCallContext apiCallContext) { + + // If the token is already provided, skip generation and poll directly. + if (consistencyRequest.getConsistencyToken() != null) { + CheckConsistencyRequest request = + consistencyRequest.toCheckConsistencyProto( + requestContext, consistencyRequest.getConsistencyToken()); + return pollToken(request, apiCallContext); + } + + ApiFuture tokenFuture = + generateToken(consistencyRequest.toGenerateTokenProto(requestContext), apiCallContext); + + return ApiFutures.transformAsync( + tokenFuture, + new ApiAsyncFunction() { + @Override + public ApiFuture apply(GenerateConsistencyTokenResponse input) { + CheckConsistencyRequest request = + consistencyRequest.toCheckConsistencyProto( + requestContext, input.getConsistencyToken()); + return pollToken(request, apiCallContext); + } + }, + MoreExecutors.directExecutor()); + } + + private ApiFuture generateToken( + GenerateConsistencyTokenRequest generateRequest, ApiCallContext context) { + return generateCallable.futureCall(generateRequest, context); + } + + private ApiFuture pollToken(CheckConsistencyRequest request, ApiCallContext context) { + AttemptCallable attemptCallable = + new AttemptCallable<>(checkCallable, request, context); + RetryingFuture retryingFuture = + executor.createFuture(attemptCallable); + attemptCallable.setExternalFuture(retryingFuture); + attemptCallable.call(); + + return ApiFutures.transform( + retryingFuture, + new ApiFunction() { + @Override + public Void apply(CheckConsistencyResponse input) { + return null; + } + }, + MoreExecutors.directExecutor()); + } + + /** A callable representing an attempt to make an RPC call. */ + private static class AttemptCallable implements Callable { + private final UnaryCallable callable; + private final RequestT request; + + private volatile RetryingFuture externalFuture; + private final ApiCallContext callContext; + + AttemptCallable( + UnaryCallable callable, RequestT request, ApiCallContext callContext) { + this.callable = callable; + this.request = request; + this.callContext = callContext; + } + + void setExternalFuture(RetryingFuture externalFuture) { + this.externalFuture = externalFuture; + } + + @Override + public ResponseT call() { + try { + // NOTE: unlike gax's AttemptCallable, this ignores rpc timeouts + externalFuture.setAttemptFuture(new NonCancellableFuture()); + if (externalFuture.isDone()) { + return null; + } + ApiFuture internalFuture = callable.futureCall(request, callContext); + externalFuture.setAttemptFuture(internalFuture); + } catch (Throwable e) { + externalFuture.setAttemptFuture(ApiFutures.immediateFailedFuture(e)); + } + + return null; + } + } + + /** + * A polling algorithm for waiting for a consistent {@link CheckConsistencyResponse}. Please note + * that this class doesn't handle retryable errors and expects the underlying callable chain to + * handle this. + */ + private static class PollResultAlgorithm + implements ResultRetryAlgorithmWithContext { + + @Override + public TimedAttemptSettings createNextAttempt( + Throwable prevThrowable, + CheckConsistencyResponse prevResponse, + TimedAttemptSettings prevSettings) { + return null; + } + + @Override + public TimedAttemptSettings createNextAttempt( + RetryingContext context, + Throwable previousThrowable, + CheckConsistencyResponse previousResponse, + TimedAttemptSettings previousSettings) { + return null; + } + + @Override + public boolean shouldRetry( + RetryingContext context, Throwable previousThrowable, CheckConsistencyResponse prevResponse) + throws CancellationException { + return prevResponse != null && !prevResponse.getConsistent(); + } + + @Override + public boolean shouldRetry(Throwable prevThrowable, CheckConsistencyResponse prevResponse) + throws CancellationException { + return prevResponse != null && !prevResponse.getConsistent(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallable.java index a09026f7f7..53b3be73e6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallable.java @@ -15,31 +15,12 @@ */ package com.google.cloud.bigtable.admin.v2.stub; -import com.google.api.core.ApiAsyncFunction; -import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.retrying.ExponentialPollAlgorithm; -import com.google.api.gax.retrying.NonCancellableFuture; -import com.google.api.gax.retrying.ResultRetryAlgorithm; -import com.google.api.gax.retrying.RetryAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.retrying.RetryingExecutor; -import com.google.api.gax.retrying.RetryingFuture; -import com.google.api.gax.retrying.ScheduledRetryingExecutor; -import com.google.api.gax.retrying.TimedAttemptSettings; import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.admin.v2.CheckConsistencyRequest; -import com.google.bigtable.admin.v2.CheckConsistencyResponse; -import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest; -import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.TableName; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; import com.google.common.annotations.VisibleForTesting; -import com.google.common.util.concurrent.MoreExecutors; -import java.util.concurrent.Callable; -import java.util.concurrent.CancellationException; /** * Callable that waits until replication has caught up to the point it was called. @@ -47,144 +28,27 @@ *

    This callable wraps GenerateConsistencyToken and CheckConsistency RPCs. It will generate a * token then poll until isConsistent is true. */ +/** + * @deprecated Please use {@link AwaitConsistencyCallable} instead. + */ +@Deprecated class AwaitReplicationCallable extends UnaryCallable { - private final UnaryCallable - generateCallable; - private final UnaryCallable checkCallable; - private final RetryingExecutor executor; - - static AwaitReplicationCallable create( - UnaryCallable - generateCallable, - UnaryCallable checkCallable, - ClientContext clientContext, - RetrySettings pollingSettings) { + private final AwaitConsistencyCallable awaitConsistencyCallable; - RetryAlgorithm retryAlgorithm = - new RetryAlgorithm<>( - new PollResultAlgorithm(), - new ExponentialPollAlgorithm(pollingSettings, clientContext.getClock())); + static AwaitReplicationCallable create(AwaitConsistencyCallable awaitConsistencyCallable) { - RetryingExecutor retryingExecutor = - new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor()); - - return new AwaitReplicationCallable(generateCallable, checkCallable, retryingExecutor); - } - - @VisibleForTesting - AwaitReplicationCallable( - UnaryCallable - generateCallable, - UnaryCallable checkCallable, - RetryingExecutor executor) { - this.generateCallable = generateCallable; - this.checkCallable = checkCallable; - this.executor = executor; + return new AwaitReplicationCallable(awaitConsistencyCallable); } @Override public ApiFuture futureCall(final TableName tableName, final ApiCallContext context) { - ApiFuture tokenFuture = generateToken(tableName, context); - - return ApiFutures.transformAsync( - tokenFuture, - new ApiAsyncFunction() { - @Override - public ApiFuture apply(GenerateConsistencyTokenResponse input) { - CheckConsistencyRequest request = - CheckConsistencyRequest.newBuilder() - .setName(tableName.toString()) - .setConsistencyToken(input.getConsistencyToken()) - .build(); - - return pollToken(request, context); - } - }, - MoreExecutors.directExecutor()); - } - - private ApiFuture generateToken( - TableName tableName, ApiCallContext context) { - GenerateConsistencyTokenRequest generateRequest = - GenerateConsistencyTokenRequest.newBuilder().setName(tableName.toString()).build(); - return generateCallable.futureCall(generateRequest, context); - } - - private ApiFuture pollToken(CheckConsistencyRequest request, ApiCallContext context) { - AttemptCallable attemptCallable = - new AttemptCallable<>(checkCallable, request, context); - RetryingFuture retryingFuture = - executor.createFuture(attemptCallable); - attemptCallable.setExternalFuture(retryingFuture); - attemptCallable.call(); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(tableName.getTable()); - return ApiFutures.transform( - retryingFuture, - new ApiFunction() { - @Override - public Void apply(CheckConsistencyResponse input) { - return null; - } - }, - MoreExecutors.directExecutor()); + return awaitConsistencyCallable.futureCall(consistencyRequest, context); } - /** A callable representing an attempt to make an RPC call. */ - private static class AttemptCallable implements Callable { - private final UnaryCallable callable; - private final RequestT request; - - private volatile RetryingFuture externalFuture; - private volatile ApiCallContext callContext; - - AttemptCallable( - UnaryCallable callable, RequestT request, ApiCallContext callContext) { - this.callable = callable; - this.request = request; - this.callContext = callContext; - } - - void setExternalFuture(RetryingFuture externalFuture) { - this.externalFuture = externalFuture; - } - - @Override - public ResponseT call() { - try { - // NOTE: unlike gax's AttemptCallable, this ignores rpc timeouts - externalFuture.setAttemptFuture(new NonCancellableFuture()); - if (externalFuture.isDone()) { - return null; - } - ApiFuture internalFuture = callable.futureCall(request, callContext); - externalFuture.setAttemptFuture(internalFuture); - } catch (Throwable e) { - externalFuture.setAttemptFuture(ApiFutures.immediateFailedFuture(e)); - } - - return null; - } - } - - /** - * A polling algorithm for waiting for a consistent {@link CheckConsistencyResponse}. Please note - * that this class doesn't handle retryable errors and expects the underlying callable chain to - * handle this. - */ - private static class PollResultAlgorithm - implements ResultRetryAlgorithm { - @Override - public TimedAttemptSettings createNextAttempt( - Throwable prevThrowable, - CheckConsistencyResponse prevResponse, - TimedAttemptSettings prevSettings) { - return null; - } - - @Override - public boolean shouldRetry(Throwable prevThrowable, CheckConsistencyResponse prevResponse) - throws CancellationException { - return prevResponse != null && !prevResponse.getConsistent(); - } + @VisibleForTesting + AwaitReplicationCallable(AwaitConsistencyCallable awaitConsistencyCallable) { + this.awaitConsistencyCallable = awaitConsistencyCallable; } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java index 7b066da10d..73db53f15e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,8 +18,9 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; @@ -30,12 +31,20 @@ import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewMetadata; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.ListAppProfilesRequest; import com.google.bigtable.admin.v2.ListAppProfilesResponse; @@ -45,6 +54,12 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.MaterializedView; import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; @@ -52,6 +67,10 @@ import com.google.bigtable.admin.v2.UpdateAppProfileRequest; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -63,9 +82,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Base stub class for the BigtableInstanceAdmin service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") public abstract class BigtableInstanceAdminStub implements BackgroundResource { public OperationsStub getOperationsStub() { @@ -199,6 +221,85 @@ public UnaryCallable listHotTable throw new UnsupportedOperationException("Not implemented: listHotTabletsCallable()"); } + public OperationCallable + createLogicalViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createLogicalViewOperationCallable()"); + } + + public UnaryCallable createLogicalViewCallable() { + throw new UnsupportedOperationException("Not implemented: createLogicalViewCallable()"); + } + + public UnaryCallable getLogicalViewCallable() { + throw new UnsupportedOperationException("Not implemented: getLogicalViewCallable()"); + } + + public UnaryCallable + listLogicalViewsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLogicalViewsPagedCallable()"); + } + + public UnaryCallable + listLogicalViewsCallable() { + throw new UnsupportedOperationException("Not implemented: listLogicalViewsCallable()"); + } + + public OperationCallable + updateLogicalViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateLogicalViewOperationCallable()"); + } + + public UnaryCallable updateLogicalViewCallable() { + throw new UnsupportedOperationException("Not implemented: updateLogicalViewCallable()"); + } + + public UnaryCallable deleteLogicalViewCallable() { + throw new UnsupportedOperationException("Not implemented: deleteLogicalViewCallable()"); + } + + public OperationCallable< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMaterializedViewOperationCallable()"); + } + + public UnaryCallable createMaterializedViewCallable() { + throw new UnsupportedOperationException("Not implemented: createMaterializedViewCallable()"); + } + + public UnaryCallable getMaterializedViewCallable() { + throw new UnsupportedOperationException("Not implemented: getMaterializedViewCallable()"); + } + + public UnaryCallable + listMaterializedViewsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMaterializedViewsPagedCallable()"); + } + + public UnaryCallable + listMaterializedViewsCallable() { + throw new UnsupportedOperationException("Not implemented: listMaterializedViewsCallable()"); + } + + public OperationCallable< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMaterializedViewOperationCallable()"); + } + + public UnaryCallable updateMaterializedViewCallable() { + throw new UnsupportedOperationException("Not implemented: updateMaterializedViewCallable()"); + } + + public UnaryCallable deleteMaterializedViewCallable() { + throw new UnsupportedOperationException("Not implemented: deleteMaterializedViewCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java index 7caeef5761..6fa3f1df05 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,8 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -35,6 +37,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; @@ -52,12 +55,20 @@ import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewMetadata; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.HotTablet; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.ListAppProfilesRequest; @@ -68,6 +79,12 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.MaterializedView; import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; @@ -75,6 +92,10 @@ import com.google.bigtable.admin.v2.UpdateAppProfileRequest; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -87,9 +108,9 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; +import java.time.Duration; import java.util.List; import javax.annotation.Generated; -import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -106,7 +127,9 @@ *

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

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

    For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getInstance: * *

    {@code
      * // This snippet has been automatically generated and should be regarded as a code template only.
    @@ -123,13 +146,51 @@
      *             .getInstanceSettings()
      *             .getRetrySettings()
      *             .toBuilder()
    - *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
      *             .build());
      * BigtableInstanceAdminStubSettings baseBigtableInstanceAdminSettings =
      *     baseBigtableInstanceAdminSettingsBuilder.build();
      * }
    + * + * Please refer to the [Client Side Retry + * 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 + * configure the RetrySettings for createInstance: + * + *

    {@code
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    + * BigtableInstanceAdminStubSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
    + *     BigtableInstanceAdminStubSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * baseBigtableInstanceAdminSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class BigtableInstanceAdminStubSettings extends StubSettings { /** The default scopes of the service. */ @@ -187,6 +248,38 @@ public class BigtableInstanceAdminStubSettings private final PagedCallSettings< ListHotTabletsRequest, ListHotTabletsResponse, ListHotTabletsPagedResponse> listHotTabletsSettings; + private final UnaryCallSettings createLogicalViewSettings; + private final OperationCallSettings< + CreateLogicalViewRequest, LogicalView, CreateLogicalViewMetadata> + createLogicalViewOperationSettings; + private final UnaryCallSettings getLogicalViewSettings; + private final PagedCallSettings< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings; + private final UnaryCallSettings updateLogicalViewSettings; + private final OperationCallSettings< + UpdateLogicalViewRequest, LogicalView, UpdateLogicalViewMetadata> + updateLogicalViewOperationSettings; + private final UnaryCallSettings deleteLogicalViewSettings; + private final UnaryCallSettings + createMaterializedViewSettings; + private final OperationCallSettings< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings; + private final UnaryCallSettings + getMaterializedViewSettings; + private final PagedCallSettings< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings; + private final UnaryCallSettings + updateMaterializedViewSettings; + private final OperationCallSettings< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings; + private final UnaryCallSettings + deleteMaterializedViewSettings; private static final PagedListDescriptor< ListAppProfilesRequest, ListAppProfilesResponse, AppProfile> @@ -221,9 +314,7 @@ public String extractNextToken(ListAppProfilesResponse payload) { @Override public Iterable extractResources(ListAppProfilesResponse payload) { - return payload.getAppProfilesList() == null - ? ImmutableList.of() - : payload.getAppProfilesList(); + return payload.getAppProfilesList(); } }; @@ -258,9 +349,84 @@ public String extractNextToken(ListHotTabletsResponse payload) { @Override public Iterable extractResources(ListHotTabletsResponse payload) { - return payload.getHotTabletsList() == null - ? ImmutableList.of() - : payload.getHotTabletsList(); + return payload.getHotTabletsList(); + } + }; + + private static final PagedListDescriptor< + ListLogicalViewsRequest, ListLogicalViewsResponse, LogicalView> + LIST_LOGICAL_VIEWS_PAGE_STR_DESC = + new PagedListDescriptor< + ListLogicalViewsRequest, ListLogicalViewsResponse, LogicalView>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLogicalViewsRequest injectToken( + ListLogicalViewsRequest payload, String token) { + return ListLogicalViewsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLogicalViewsRequest injectPageSize( + ListLogicalViewsRequest payload, int pageSize) { + return ListLogicalViewsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLogicalViewsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLogicalViewsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLogicalViewsResponse payload) { + return payload.getLogicalViewsList(); + } + }; + + private static final PagedListDescriptor< + ListMaterializedViewsRequest, ListMaterializedViewsResponse, MaterializedView> + LIST_MATERIALIZED_VIEWS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMaterializedViewsRequest, ListMaterializedViewsResponse, MaterializedView>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMaterializedViewsRequest injectToken( + ListMaterializedViewsRequest payload, String token) { + return ListMaterializedViewsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListMaterializedViewsRequest injectPageSize( + ListMaterializedViewsRequest payload, int pageSize) { + return ListMaterializedViewsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListMaterializedViewsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMaterializedViewsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListMaterializedViewsResponse payload) { + return payload.getMaterializedViewsList(); } }; @@ -298,6 +464,49 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + LIST_LOGICAL_VIEWS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLogicalViewsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_LOGICAL_VIEWS_PAGE_STR_DESC, request, context); + return ListLogicalViewsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + LIST_MATERIALIZED_VIEWS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListMaterializedViewsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListMaterializedViewsRequest, ListMaterializedViewsResponse, MaterializedView> + pageContext = + PageContext.create( + callable, LIST_MATERIALIZED_VIEWS_PAGE_STR_DESC, request, context); + return ListMaterializedViewsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createInstance. */ public UnaryCallSettings createInstanceSettings() { return createInstanceSettings; @@ -445,6 +654,91 @@ public UnaryCallSettings setIamPolicySettings() { return listHotTabletsSettings; } + /** Returns the object with the settings used for calls to createLogicalView. */ + public UnaryCallSettings createLogicalViewSettings() { + return createLogicalViewSettings; + } + + /** Returns the object with the settings used for calls to createLogicalView. */ + public OperationCallSettings + createLogicalViewOperationSettings() { + return createLogicalViewOperationSettings; + } + + /** Returns the object with the settings used for calls to getLogicalView. */ + public UnaryCallSettings getLogicalViewSettings() { + return getLogicalViewSettings; + } + + /** Returns the object with the settings used for calls to listLogicalViews. */ + public PagedCallSettings< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings() { + return listLogicalViewsSettings; + } + + /** Returns the object with the settings used for calls to updateLogicalView. */ + public UnaryCallSettings updateLogicalViewSettings() { + return updateLogicalViewSettings; + } + + /** Returns the object with the settings used for calls to updateLogicalView. */ + public OperationCallSettings + updateLogicalViewOperationSettings() { + return updateLogicalViewOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteLogicalView. */ + public UnaryCallSettings deleteLogicalViewSettings() { + return deleteLogicalViewSettings; + } + + /** Returns the object with the settings used for calls to createMaterializedView. */ + public UnaryCallSettings + createMaterializedViewSettings() { + return createMaterializedViewSettings; + } + + /** Returns the object with the settings used for calls to createMaterializedView. */ + public OperationCallSettings< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings() { + return createMaterializedViewOperationSettings; + } + + /** Returns the object with the settings used for calls to getMaterializedView. */ + public UnaryCallSettings + getMaterializedViewSettings() { + return getMaterializedViewSettings; + } + + /** Returns the object with the settings used for calls to listMaterializedViews. */ + public PagedCallSettings< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings() { + return listMaterializedViewsSettings; + } + + /** Returns the object with the settings used for calls to updateMaterializedView. */ + public UnaryCallSettings + updateMaterializedViewSettings() { + return updateMaterializedViewSettings; + } + + /** Returns the object with the settings used for calls to updateMaterializedView. */ + public OperationCallSettings< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings() { + return updateMaterializedViewOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteMaterializedView. */ + public UnaryCallSettings deleteMaterializedViewSettings() { + return deleteMaterializedViewSettings; + } + public BigtableInstanceAdminStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -555,6 +849,33 @@ protected BigtableInstanceAdminStubSettings(Builder settingsBuilder) throws IOEx setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); listHotTabletsSettings = settingsBuilder.listHotTabletsSettings().build(); + createLogicalViewSettings = settingsBuilder.createLogicalViewSettings().build(); + createLogicalViewOperationSettings = + settingsBuilder.createLogicalViewOperationSettings().build(); + getLogicalViewSettings = settingsBuilder.getLogicalViewSettings().build(); + listLogicalViewsSettings = settingsBuilder.listLogicalViewsSettings().build(); + updateLogicalViewSettings = settingsBuilder.updateLogicalViewSettings().build(); + updateLogicalViewOperationSettings = + settingsBuilder.updateLogicalViewOperationSettings().build(); + deleteLogicalViewSettings = settingsBuilder.deleteLogicalViewSettings().build(); + createMaterializedViewSettings = settingsBuilder.createMaterializedViewSettings().build(); + createMaterializedViewOperationSettings = + settingsBuilder.createMaterializedViewOperationSettings().build(); + getMaterializedViewSettings = settingsBuilder.getMaterializedViewSettings().build(); + listMaterializedViewsSettings = settingsBuilder.listMaterializedViewsSettings().build(); + updateMaterializedViewSettings = settingsBuilder.updateMaterializedViewSettings().build(); + updateMaterializedViewOperationSettings = + settingsBuilder.updateMaterializedViewOperationSettings().build(); + deleteMaterializedViewSettings = settingsBuilder.deleteMaterializedViewSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-bigtable") + .setRepository("googleapis/java-bigtable") + .setVersion(Version.VERSION) + .build(); } /** Builder for BigtableInstanceAdminStubSettings. */ @@ -612,6 +933,42 @@ public static class Builder private final PagedCallSettings.Builder< ListHotTabletsRequest, ListHotTabletsResponse, ListHotTabletsPagedResponse> listHotTabletsSettings; + private final UnaryCallSettings.Builder + createLogicalViewSettings; + private final OperationCallSettings.Builder< + CreateLogicalViewRequest, LogicalView, CreateLogicalViewMetadata> + createLogicalViewOperationSettings; + private final UnaryCallSettings.Builder + getLogicalViewSettings; + private final PagedCallSettings.Builder< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings; + private final UnaryCallSettings.Builder + updateLogicalViewSettings; + private final OperationCallSettings.Builder< + UpdateLogicalViewRequest, LogicalView, UpdateLogicalViewMetadata> + updateLogicalViewOperationSettings; + private final UnaryCallSettings.Builder + deleteLogicalViewSettings; + private final UnaryCallSettings.Builder + createMaterializedViewSettings; + private final OperationCallSettings.Builder< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings; + private final UnaryCallSettings.Builder + getMaterializedViewSettings; + private final PagedCallSettings.Builder< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings; + private final UnaryCallSettings.Builder + updateMaterializedViewSettings; + private final OperationCallSettings.Builder< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings; + private final UnaryCallSettings.Builder + deleteMaterializedViewSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -619,14 +976,14 @@ public static class Builder ImmutableMap.Builder> definitions = ImmutableMap.builder(); definitions.put( - "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( - "retry_policy_5_codes", + "retry_policy_6_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -638,31 +995,31 @@ public static class Builder RetrySettings settings = null; settings = RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(300000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(300000L)) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build(); - definitions.put("no_retry_4_params", settings); + definitions.put("no_retry_5_params", settings); settings = RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); - definitions.put("retry_policy_5_params", settings); + definitions.put("retry_policy_6_params", settings); settings = RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); - definitions.put("no_retry_6_params", settings); + definitions.put("no_retry_7_params", settings); settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); definitions.put("no_retry_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); @@ -702,6 +1059,21 @@ protected Builder(ClientContext clientContext) { setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listHotTabletsSettings = PagedCallSettings.newBuilder(LIST_HOT_TABLETS_PAGE_STR_FACT); + createLogicalViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createLogicalViewOperationSettings = OperationCallSettings.newBuilder(); + getLogicalViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLogicalViewsSettings = PagedCallSettings.newBuilder(LIST_LOGICAL_VIEWS_PAGE_STR_FACT); + updateLogicalViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateLogicalViewOperationSettings = OperationCallSettings.newBuilder(); + deleteLogicalViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMaterializedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMaterializedViewOperationSettings = OperationCallSettings.newBuilder(); + getMaterializedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listMaterializedViewsSettings = + PagedCallSettings.newBuilder(LIST_MATERIALIZED_VIEWS_PAGE_STR_FACT); + updateMaterializedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMaterializedViewOperationSettings = OperationCallSettings.newBuilder(); + deleteMaterializedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -725,7 +1097,17 @@ protected Builder(ClientContext clientContext) { getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, - listHotTabletsSettings); + listHotTabletsSettings, + createLogicalViewSettings, + getLogicalViewSettings, + listLogicalViewsSettings, + updateLogicalViewSettings, + deleteLogicalViewSettings, + createMaterializedViewSettings, + getMaterializedViewSettings, + listMaterializedViewsSettings, + updateMaterializedViewSettings, + deleteMaterializedViewSettings); initDefaults(this); } @@ -761,6 +1143,22 @@ protected Builder(BigtableInstanceAdminStubSettings settings) { setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); listHotTabletsSettings = settings.listHotTabletsSettings.toBuilder(); + createLogicalViewSettings = settings.createLogicalViewSettings.toBuilder(); + createLogicalViewOperationSettings = settings.createLogicalViewOperationSettings.toBuilder(); + getLogicalViewSettings = settings.getLogicalViewSettings.toBuilder(); + listLogicalViewsSettings = settings.listLogicalViewsSettings.toBuilder(); + updateLogicalViewSettings = settings.updateLogicalViewSettings.toBuilder(); + updateLogicalViewOperationSettings = settings.updateLogicalViewOperationSettings.toBuilder(); + deleteLogicalViewSettings = settings.deleteLogicalViewSettings.toBuilder(); + createMaterializedViewSettings = settings.createMaterializedViewSettings.toBuilder(); + createMaterializedViewOperationSettings = + settings.createMaterializedViewOperationSettings.toBuilder(); + getMaterializedViewSettings = settings.getMaterializedViewSettings.toBuilder(); + listMaterializedViewsSettings = settings.listMaterializedViewsSettings.toBuilder(); + updateMaterializedViewSettings = settings.updateMaterializedViewSettings.toBuilder(); + updateMaterializedViewOperationSettings = + settings.updateMaterializedViewOperationSettings.toBuilder(); + deleteMaterializedViewSettings = settings.deleteMaterializedViewSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -784,7 +1182,17 @@ protected Builder(BigtableInstanceAdminStubSettings settings) { getIamPolicySettings, setIamPolicySettings, testIamPermissionsSettings, - listHotTabletsSettings); + listHotTabletsSettings, + createLogicalViewSettings, + getLogicalViewSettings, + listLogicalViewsSettings, + updateLogicalViewSettings, + deleteLogicalViewSettings, + createMaterializedViewSettings, + getMaterializedViewSettings, + listMaterializedViewsSettings, + updateMaterializedViewSettings, + deleteMaterializedViewSettings); } private static Builder createDefault() { @@ -802,53 +1210,53 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { builder .createInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); builder .getInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .listInstancesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .updateInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .partialUpdateInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .deleteInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .createClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .getClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .listClustersSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .updateClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .partialUpdateClusterSettings() @@ -857,61 +1265,111 @@ private static Builder initDefaults(Builder builder) { builder .deleteClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .createAppProfileSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .getAppProfileSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .listAppProfilesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .updateAppProfileSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .deleteAppProfileSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .getIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .setIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); builder .testIamPermissionsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); builder .listHotTabletsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); + + builder + .createLogicalViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLogicalViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLogicalViewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateLogicalViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteLogicalViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createMaterializedViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getMaterializedViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listMaterializedViewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateMaterializedViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteMaterializedViewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); builder .createInstanceOperationSettings() .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) @@ -920,13 +1378,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -934,8 +1392,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) @@ -944,13 +1402,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -958,8 +1416,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) @@ -968,21 +1426,21 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(21600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(21600000L)) .build())); builder .updateClusterOperationSettings() .setInitialCallSettings( UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) @@ -991,13 +1449,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -1016,13 +1474,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -1030,8 +1488,8 @@ private static Builder initDefaults(Builder builder) { .setInitialCallSettings( UnaryCallSettings .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(AppProfile.class)) @@ -1040,13 +1498,113 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build())); + + builder + .createLogicalViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(LogicalView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateLogicalViewMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateLogicalViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(LogicalView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateLogicalViewMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createMaterializedViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MaterializedView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateMaterializedViewMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateMaterializedViewOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(MaterializedView.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateMaterializedViewMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); return builder; @@ -1222,6 +1780,96 @@ public UnaryCallSettings.Builder setIamPolicySettin return listHotTabletsSettings; } + /** Returns the builder for the settings used for calls to createLogicalView. */ + public UnaryCallSettings.Builder + createLogicalViewSettings() { + return createLogicalViewSettings; + } + + /** Returns the builder for the settings used for calls to createLogicalView. */ + public OperationCallSettings.Builder< + CreateLogicalViewRequest, LogicalView, CreateLogicalViewMetadata> + createLogicalViewOperationSettings() { + return createLogicalViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to getLogicalView. */ + public UnaryCallSettings.Builder getLogicalViewSettings() { + return getLogicalViewSettings; + } + + /** Returns the builder for the settings used for calls to listLogicalViews. */ + public PagedCallSettings.Builder< + ListLogicalViewsRequest, ListLogicalViewsResponse, ListLogicalViewsPagedResponse> + listLogicalViewsSettings() { + return listLogicalViewsSettings; + } + + /** Returns the builder for the settings used for calls to updateLogicalView. */ + public UnaryCallSettings.Builder + updateLogicalViewSettings() { + return updateLogicalViewSettings; + } + + /** Returns the builder for the settings used for calls to updateLogicalView. */ + public OperationCallSettings.Builder< + UpdateLogicalViewRequest, LogicalView, UpdateLogicalViewMetadata> + updateLogicalViewOperationSettings() { + return updateLogicalViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteLogicalView. */ + public UnaryCallSettings.Builder deleteLogicalViewSettings() { + return deleteLogicalViewSettings; + } + + /** Returns the builder for the settings used for calls to createMaterializedView. */ + public UnaryCallSettings.Builder + createMaterializedViewSettings() { + return createMaterializedViewSettings; + } + + /** Returns the builder for the settings used for calls to createMaterializedView. */ + public OperationCallSettings.Builder< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationSettings() { + return createMaterializedViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to getMaterializedView. */ + public UnaryCallSettings.Builder + getMaterializedViewSettings() { + return getMaterializedViewSettings; + } + + /** Returns the builder for the settings used for calls to listMaterializedViews. */ + public PagedCallSettings.Builder< + ListMaterializedViewsRequest, + ListMaterializedViewsResponse, + ListMaterializedViewsPagedResponse> + listMaterializedViewsSettings() { + return listMaterializedViewsSettings; + } + + /** Returns the builder for the settings used for calls to updateMaterializedView. */ + public UnaryCallSettings.Builder + updateMaterializedViewSettings() { + return updateMaterializedViewSettings; + } + + /** Returns the builder for the settings used for calls to updateMaterializedView. */ + public OperationCallSettings.Builder< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationSettings() { + return updateMaterializedViewOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteMaterializedView. */ + public UnaryCallSettings.Builder + deleteMaterializedViewSettings() { + return deleteMaterializedViewSettings; + } + @Override public BigtableInstanceAdminStubSettings build() throws IOException { return new BigtableInstanceAdminStubSettings(this); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java index df3bf12094..db34b67438 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,10 +18,10 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; @@ -35,11 +35,14 @@ import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupMetadata; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -47,12 +50,15 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -60,6 +66,7 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; @@ -69,6 +76,8 @@ import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.iam.v1.GetIamPolicyRequest; @@ -82,9 +91,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * Base stub class for the BigtableTableAdmin service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") public abstract class BigtableTableAdminStub implements BackgroundResource { public OperationsStub getOperationsStub() { @@ -284,6 +296,44 @@ public UnaryCallable setIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); } + public OperationCallable + createSchemaBundleOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createSchemaBundleOperationCallable()"); + } + + public UnaryCallable createSchemaBundleCallable() { + throw new UnsupportedOperationException("Not implemented: createSchemaBundleCallable()"); + } + + public OperationCallable + updateSchemaBundleOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateSchemaBundleOperationCallable()"); + } + + public UnaryCallable updateSchemaBundleCallable() { + throw new UnsupportedOperationException("Not implemented: updateSchemaBundleCallable()"); + } + + public UnaryCallable getSchemaBundleCallable() { + throw new UnsupportedOperationException("Not implemented: getSchemaBundleCallable()"); + } + + public UnaryCallable + listSchemaBundlesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSchemaBundlesPagedCallable()"); + } + + public UnaryCallable + listSchemaBundlesCallable() { + throw new UnsupportedOperationException("Not implemented: listSchemaBundlesCallable()"); + } + + public UnaryCallable deleteSchemaBundleCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSchemaBundleCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java index a9619f7b16..2443e8803c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; @@ -37,6 +38,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; @@ -57,11 +59,14 @@ import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupMetadata; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -69,12 +74,15 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -82,6 +90,7 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; @@ -91,6 +100,8 @@ import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.common.collect.ImmutableList; @@ -105,9 +116,9 @@ import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; +import java.time.Duration; import java.util.List; import javax.annotation.Generated; -import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** @@ -124,7 +135,9 @@ *

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

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

    For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of createTable: * *

    {@code
      * // This snippet has been automatically generated and should be regarded as a code template only.
    @@ -141,13 +154,51 @@
      *             .createTableSettings()
      *             .getRetrySettings()
      *             .toBuilder()
    - *             .setTotalTimeout(Duration.ofSeconds(30))
    + *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
    + *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
    + *             .setMaxAttempts(5)
    + *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
    + *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
    + *             .setRetryDelayMultiplier(1.3)
    + *             .setRpcTimeoutMultiplier(1.5)
    + *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
      *             .build());
      * BigtableTableAdminStubSettings baseBigtableTableAdminSettings =
      *     baseBigtableTableAdminSettingsBuilder.build();
      * }
    + * + * Please refer to the [Client Side Retry + * 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 + * configure the RetrySettings for createTableFromSnapshot: + * + *

    {@code
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    + * BigtableTableAdminStubSettings.Builder baseBigtableTableAdminSettingsBuilder =
    + *     BigtableTableAdminStubSettings.newBuilder();
    + * TimedRetryAlgorithm timedRetryAlgorithm =
    + *     OperationalTimedPollAlgorithm.create(
    + *         RetrySettings.newBuilder()
    + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
    + *             .setRetryDelayMultiplier(1.5)
    + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
    + *             .setTotalTimeoutDuration(Duration.ofHours(24))
    + *             .build());
    + * baseBigtableTableAdminSettingsBuilder
    + *     .createClusterOperationSettings()
    + *     .setPollingAlgorithm(timedRetryAlgorithm)
    + *     .build();
    + * }
    */ @Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") public class BigtableTableAdminStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -224,6 +275,19 @@ public class BigtableTableAdminStubSettings extends StubSettings setIamPolicySettings; private final UnaryCallSettings testIamPermissionsSettings; + private final UnaryCallSettings createSchemaBundleSettings; + private final OperationCallSettings< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationSettings; + private final UnaryCallSettings updateSchemaBundleSettings; + private final OperationCallSettings< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationSettings; + private final UnaryCallSettings getSchemaBundleSettings; + private final PagedCallSettings< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings; + private final UnaryCallSettings deleteSchemaBundleSettings; private static final PagedListDescriptor LIST_TABLES_PAGE_STR_DESC = @@ -255,9 +319,7 @@ public String extractNextToken(ListTablesResponse payload) { @Override public Iterable
    extractResources(ListTablesResponse payload) { - return payload.getTablesList() == null - ? ImmutableList.
    of() - : payload.getTablesList(); + return payload.getTablesList(); } }; @@ -295,9 +357,7 @@ public String extractNextToken(ListAuthorizedViewsResponse payload) { @Override public Iterable extractResources(ListAuthorizedViewsResponse payload) { - return payload.getAuthorizedViewsList() == null - ? ImmutableList.of() - : payload.getAuthorizedViewsList(); + return payload.getAuthorizedViewsList(); } }; @@ -331,9 +391,7 @@ public String extractNextToken(ListSnapshotsResponse payload) { @Override public Iterable extractResources(ListSnapshotsResponse payload) { - return payload.getSnapshotsList() == null - ? ImmutableList.of() - : payload.getSnapshotsList(); + return payload.getSnapshotsList(); } }; @@ -367,9 +425,45 @@ public String extractNextToken(ListBackupsResponse payload) { @Override public Iterable extractResources(ListBackupsResponse payload) { - return payload.getBackupsList() == null - ? ImmutableList.of() - : payload.getBackupsList(); + return payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, SchemaBundle> + LIST_SCHEMA_BUNDLES_PAGE_STR_DESC = + new PagedListDescriptor< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, SchemaBundle>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSchemaBundlesRequest injectToken( + ListSchemaBundlesRequest payload, String token) { + return ListSchemaBundlesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSchemaBundlesRequest injectPageSize( + ListSchemaBundlesRequest payload, int pageSize) { + return ListSchemaBundlesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSchemaBundlesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSchemaBundlesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSchemaBundlesResponse payload) { + return payload.getSchemaBundlesList(); } }; @@ -445,6 +539,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + LIST_SCHEMA_BUNDLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSchemaBundlesRequest, + ListSchemaBundlesResponse, + ListSchemaBundlesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSchemaBundlesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SCHEMA_BUNDLES_PAGE_STR_DESC, request, context); + return ListSchemaBundlesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createTable. */ public UnaryCallSettings createTableSettings() { return createTableSettings; @@ -661,6 +776,45 @@ public UnaryCallSettings setIamPolicySettings() { return testIamPermissionsSettings; } + /** Returns the object with the settings used for calls to createSchemaBundle. */ + public UnaryCallSettings createSchemaBundleSettings() { + return createSchemaBundleSettings; + } + + /** Returns the object with the settings used for calls to createSchemaBundle. */ + public OperationCallSettings + createSchemaBundleOperationSettings() { + return createSchemaBundleOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSchemaBundle. */ + public UnaryCallSettings updateSchemaBundleSettings() { + return updateSchemaBundleSettings; + } + + /** Returns the object with the settings used for calls to updateSchemaBundle. */ + public OperationCallSettings + updateSchemaBundleOperationSettings() { + return updateSchemaBundleOperationSettings; + } + + /** Returns the object with the settings used for calls to getSchemaBundle. */ + public UnaryCallSettings getSchemaBundleSettings() { + return getSchemaBundleSettings; + } + + /** Returns the object with the settings used for calls to listSchemaBundles. */ + public PagedCallSettings< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings() { + return listSchemaBundlesSettings; + } + + /** Returns the object with the settings used for calls to deleteSchemaBundle. */ + public UnaryCallSettings deleteSchemaBundleSettings() { + return deleteSchemaBundleSettings; + } + public BigtableTableAdminStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -784,6 +938,24 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + createSchemaBundleSettings = settingsBuilder.createSchemaBundleSettings().build(); + createSchemaBundleOperationSettings = + settingsBuilder.createSchemaBundleOperationSettings().build(); + updateSchemaBundleSettings = settingsBuilder.updateSchemaBundleSettings().build(); + updateSchemaBundleOperationSettings = + settingsBuilder.updateSchemaBundleOperationSettings().build(); + getSchemaBundleSettings = settingsBuilder.getSchemaBundleSettings().build(); + listSchemaBundlesSettings = settingsBuilder.listSchemaBundlesSettings().build(); + deleteSchemaBundleSettings = settingsBuilder.deleteSchemaBundleSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-bigtable") + .setRepository("googleapis/java-bigtable") + .setVersion(Version.VERSION) + .build(); } /** Builder for BigtableTableAdminStubSettings. */ @@ -862,6 +1034,23 @@ public static class Builder private final UnaryCallSettings.Builder setIamPolicySettings; private final UnaryCallSettings.Builder testIamPermissionsSettings; + private final UnaryCallSettings.Builder + createSchemaBundleSettings; + private final OperationCallSettings.Builder< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationSettings; + private final UnaryCallSettings.Builder + updateSchemaBundleSettings; + private final OperationCallSettings.Builder< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationSettings; + private final UnaryCallSettings.Builder + getSchemaBundleSettings; + private final PagedCallSettings.Builder< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings; + private final UnaryCallSettings.Builder + deleteSchemaBundleSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -877,7 +1066,12 @@ public static class Builder Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); @@ -890,39 +1084,50 @@ public static class Builder RetrySettings settings = null; settings = RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(300000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(300000L)) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build(); definitions.put("no_retry_0_params", settings); settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); definitions.put("no_retry_params", settings); settings = RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); definitions.put("retry_policy_2_params", settings); settings = RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(3600000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(3600000L)) - .setTotalTimeout(Duration.ofMillis(3600000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L)) + .setTotalTimeoutDuration(Duration.ofMillis(3600000L)) .build(); - definitions.put("no_retry_3_params", settings); + definitions.put("no_retry_4_params", settings); settings = RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L)) + .setTotalTimeoutDuration(Duration.ofMillis(3600000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) .build(); definitions.put("no_retry_1_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); @@ -975,6 +1180,13 @@ protected Builder(ClientContext clientContext) { getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSchemaBundleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSchemaBundleOperationSettings = OperationCallSettings.newBuilder(); + updateSchemaBundleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSchemaBundleOperationSettings = OperationCallSettings.newBuilder(); + getSchemaBundleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSchemaBundlesSettings = PagedCallSettings.newBuilder(LIST_SCHEMA_BUNDLES_PAGE_STR_FACT); + deleteSchemaBundleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1007,7 +1219,12 @@ protected Builder(ClientContext clientContext) { copyBackupSettings, getIamPolicySettings, setIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + createSchemaBundleSettings, + updateSchemaBundleSettings, + getSchemaBundleSettings, + listSchemaBundlesSettings, + deleteSchemaBundleSettings); initDefaults(this); } @@ -1056,6 +1273,15 @@ protected Builder(BigtableTableAdminStubSettings settings) { getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + createSchemaBundleSettings = settings.createSchemaBundleSettings.toBuilder(); + createSchemaBundleOperationSettings = + settings.createSchemaBundleOperationSettings.toBuilder(); + updateSchemaBundleSettings = settings.updateSchemaBundleSettings.toBuilder(); + updateSchemaBundleOperationSettings = + settings.updateSchemaBundleOperationSettings.toBuilder(); + getSchemaBundleSettings = settings.getSchemaBundleSettings.toBuilder(); + listSchemaBundlesSettings = settings.listSchemaBundlesSettings.toBuilder(); + deleteSchemaBundleSettings = settings.deleteSchemaBundleSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1088,7 +1314,12 @@ protected Builder(BigtableTableAdminStubSettings settings) { copyBackupSettings, getIamPolicySettings, setIamPolicySettings, - testIamPermissionsSettings); + testIamPermissionsSettings, + createSchemaBundleSettings, + updateSchemaBundleSettings, + getSchemaBundleSettings, + listSchemaBundlesSettings, + deleteSchemaBundleSettings); } private static Builder createDefault() { @@ -1171,8 +1402,8 @@ private static Builder initDefaults(Builder builder) { builder .dropRowRangeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params")); builder .generateConsistencyTokenSettings() @@ -1181,8 +1412,8 @@ private static Builder initDefaults(Builder builder) { builder .checkConsistencySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); builder .snapshotTableSettings() @@ -1254,6 +1485,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + builder + .createSchemaBundleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateSchemaBundleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getSchemaBundleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listSchemaBundlesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteSchemaBundleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createTableFromSnapshotOperationSettings() .setInitialCallSettings( @@ -1270,13 +1526,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(60000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(3600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(3600000L)) .build())); builder @@ -1293,13 +1549,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder @@ -1317,13 +1573,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder @@ -1342,13 +1598,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder @@ -1367,13 +1623,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); builder @@ -1391,13 +1647,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -1415,13 +1671,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -1439,13 +1695,13 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) + .setInitialRetryDelayDuration(Duration.ofMillis(500L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(5000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(600000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) .build())); builder @@ -1462,13 +1718,63 @@ private static Builder initDefaults(Builder builder) { .setPollingAlgorithm( OperationTimedPollAlgorithm.create( RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createSchemaBundleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(SchemaBundle.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateSchemaBundleMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSchemaBundleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(SchemaBundle.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateSchemaBundleMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); return builder; @@ -1715,6 +2021,51 @@ public UnaryCallSettings.Builder setIamPolicySettin return testIamPermissionsSettings; } + /** Returns the builder for the settings used for calls to createSchemaBundle. */ + public UnaryCallSettings.Builder + createSchemaBundleSettings() { + return createSchemaBundleSettings; + } + + /** Returns the builder for the settings used for calls to createSchemaBundle. */ + public OperationCallSettings.Builder< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationSettings() { + return createSchemaBundleOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSchemaBundle. */ + public UnaryCallSettings.Builder + updateSchemaBundleSettings() { + return updateSchemaBundleSettings; + } + + /** Returns the builder for the settings used for calls to updateSchemaBundle. */ + public OperationCallSettings.Builder< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationSettings() { + return updateSchemaBundleOperationSettings; + } + + /** Returns the builder for the settings used for calls to getSchemaBundle. */ + public UnaryCallSettings.Builder + getSchemaBundleSettings() { + return getSchemaBundleSettings; + } + + /** Returns the builder for the settings used for calls to listSchemaBundles. */ + public PagedCallSettings.Builder< + ListSchemaBundlesRequest, ListSchemaBundlesResponse, ListSchemaBundlesPagedResponse> + listSchemaBundlesSettings() { + return listSchemaBundlesSettings; + } + + /** Returns the builder for the settings used for calls to deleteSchemaBundle. */ + public UnaryCallSettings.Builder + deleteSchemaBundleSettings() { + return deleteSchemaBundleSettings; + } + @Override public BigtableTableAdminStubSettings build() throws IOException { return new BigtableTableAdminStubSettings(this); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub.java index 0a6e8efec3..e68cafca54 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub.java @@ -31,6 +31,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata; import com.google.bigtable.admin.v2.TableName; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; @@ -52,27 +54,43 @@ public class EnhancedBigtableTableAdminStub extends GrpcBigtableTableAdminStub { private final BigtableTableAdminStubSettings settings; private final ClientContext clientContext; - private final AwaitReplicationCallable awaitReplicationCallable; + private final TableAdminRequestContext requestContext; + + @Deprecated private final AwaitReplicationCallable awaitReplicationCallable; + + private final AwaitConsistencyCallable awaitConsistencyCallable; private final OperationCallable optimizeRestoredTableOperationBaseCallable; public static EnhancedBigtableTableAdminStub createEnhanced( - BigtableTableAdminStubSettings settings) throws IOException { - return new EnhancedBigtableTableAdminStub(settings, ClientContext.create(settings)); + BigtableTableAdminStubSettings settings, TableAdminRequestContext requestContext) + throws IOException { + return new EnhancedBigtableTableAdminStub( + settings, ClientContext.create(settings), requestContext); } private EnhancedBigtableTableAdminStub( - BigtableTableAdminStubSettings settings, ClientContext clientContext) throws IOException { + BigtableTableAdminStubSettings settings, + ClientContext clientContext, + TableAdminRequestContext requestContext) + throws IOException { super(settings, clientContext); this.settings = settings; this.clientContext = clientContext; + this.requestContext = requestContext; + this.awaitConsistencyCallable = createAwaitConsistencyCallable(); this.awaitReplicationCallable = createAwaitReplicationCallable(); this.optimizeRestoredTableOperationBaseCallable = createOptimizeRestoredTableOperationBaseCallable(); } + @Deprecated private AwaitReplicationCallable createAwaitReplicationCallable() { + return AwaitReplicationCallable.create(awaitConsistencyCallable); + } + + private AwaitConsistencyCallable createAwaitConsistencyCallable() { // TODO(igorbernstein2): expose polling settings RetrySettings pollingSettings = RetrySettings.newBuilder() @@ -84,7 +102,6 @@ private AwaitReplicationCallable createAwaitReplicationCallable() { .setInitialRetryDelay(Duration.ofSeconds(10)) .setRetryDelayMultiplier(1.0) .setMaxRetryDelay(Duration.ofSeconds(10)) - .setJittered(true) // These rpc timeouts are ignored, instead the rpc timeouts defined for // generateConsistencyToken and checkConsistency callables will be used. .setInitialRpcTimeout(Duration.ZERO) @@ -92,11 +109,12 @@ private AwaitReplicationCallable createAwaitReplicationCallable() { .setRpcTimeoutMultiplier(1.0) .build(); - return AwaitReplicationCallable.create( + return AwaitConsistencyCallable.create( generateConsistencyTokenCallable(), checkConsistencyCallable(), clientContext, - pollingSettings); + pollingSettings, + requestContext); } // Plug into gax operation infrastructure @@ -190,10 +208,15 @@ public Empty apply(OperationSnapshot input) { unusedInitialCallSettings, operationCallSettings, clientContext, getOperationsStub()); } + @Deprecated public UnaryCallable awaitReplicationCallable() { return awaitReplicationCallable; } + public UnaryCallable awaitConsistencyCallable() { + return awaitConsistencyCallable; + } + public OperationCallable awaitOptimizeRestoredTableCallable() { return optimizeRestoredTableOperationBaseCallable; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java index b76b0933ca..c3df944086 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,6 @@ package com.google.cloud.bigtable.admin.v2.stub; -import com.google.api.core.InternalApi; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcCallableFactory; import com.google.api.gax.grpc.GrpcStubCallableFactory; @@ -37,9 +36,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * gRPC callable factory implementation for the BigtableInstanceAdmin service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") public class GrpcBigtableInstanceAdminCallableFactory implements GrpcStubCallableFactory { @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java index 76d82e57ea..110b421d95 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,8 +18,9 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -35,12 +36,20 @@ import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceMetadata; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewMetadata; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.ListAppProfilesRequest; import com.google.bigtable.admin.v2.ListAppProfilesResponse; @@ -50,6 +59,12 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.MaterializedView; import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; @@ -57,6 +72,10 @@ import com.google.bigtable.admin.v2.UpdateAppProfileRequest; import com.google.bigtable.admin.v2.UpdateClusterMetadata; import com.google.bigtable.admin.v2.UpdateInstanceMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewMetadata; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -72,9 +91,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * gRPC stub implementation for the BigtableInstanceAdmin service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { private static final MethodDescriptor createInstanceMethodDescriptor = @@ -84,6 +106,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getInstanceMethodDescriptor = @@ -92,6 +115,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance") .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -103,6 +127,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateInstanceMethodDescriptor = @@ -111,6 +136,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance") .setRequestMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -122,6 +148,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(PartialUpdateInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -132,6 +159,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -142,6 +170,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getClusterMethodDescriptor = @@ -150,6 +179,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster") .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -160,6 +190,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateClusterMethodDescriptor = @@ -168,6 +199,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster") .setRequestMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -179,6 +211,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(PartialUpdateClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteClusterMethodDescriptor = @@ -187,6 +220,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster") .setRequestMarshaller(ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -197,6 +231,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateAppProfileRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AppProfile.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -207,6 +242,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(GetAppProfileRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AppProfile.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -218,6 +254,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { ProtoUtils.marshaller(ListAppProfilesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListAppProfilesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -228,6 +265,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateAppProfileRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -238,6 +276,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteAppProfileRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -246,6 +285,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -254,6 +294,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -266,6 +307,7 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -277,6 +319,124 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { ProtoUtils.marshaller(ListHotTabletsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListHotTabletsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createLogicalViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/CreateLogicalView") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateLogicalViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getLogicalViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/GetLogicalView") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLogicalViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogicalView.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLogicalViewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/ListLogicalViews") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLogicalViewsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLogicalViewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateLogicalViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateLogicalView") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateLogicalViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteLogicalViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteLogicalView") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteLogicalViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createMaterializedViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.bigtable.admin.v2.BigtableInstanceAdmin/CreateMaterializedView") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateMaterializedViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getMaterializedViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.bigtable.admin.v2.BigtableInstanceAdmin/GetMaterializedView") + .setRequestMarshaller( + ProtoUtils.marshaller(GetMaterializedViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(MaterializedView.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listMaterializedViewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.bigtable.admin.v2.BigtableInstanceAdmin/ListMaterializedViews") + .setRequestMarshaller( + ProtoUtils.marshaller(ListMaterializedViewsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListMaterializedViewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateMaterializedViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateMaterializedView") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateMaterializedViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteMaterializedViewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteMaterializedView") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteMaterializedViewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createInstanceCallable; @@ -320,6 +480,35 @@ public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub { private final UnaryCallable listHotTabletsCallable; private final UnaryCallable listHotTabletsPagedCallable; + private final UnaryCallable createLogicalViewCallable; + private final OperationCallable + createLogicalViewOperationCallable; + private final UnaryCallable getLogicalViewCallable; + private final UnaryCallable + listLogicalViewsCallable; + private final UnaryCallable + listLogicalViewsPagedCallable; + private final UnaryCallable updateLogicalViewCallable; + private final OperationCallable + updateLogicalViewOperationCallable; + private final UnaryCallable deleteLogicalViewCallable; + private final UnaryCallable + createMaterializedViewCallable; + private final OperationCallable< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationCallable; + private final UnaryCallable + getMaterializedViewCallable; + private final UnaryCallable + listMaterializedViewsCallable; + private final UnaryCallable + listMaterializedViewsPagedCallable; + private final UnaryCallable + updateMaterializedViewCallable; + private final OperationCallable< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationCallable; + private final UnaryCallable deleteMaterializedViewCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -374,6 +563,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getInstanceTransportSettings = GrpcCallSettings.newBuilder() @@ -384,6 +574,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listInstancesTransportSettings = GrpcCallSettings.newBuilder() @@ -394,6 +585,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings updateInstanceTransportSettings = GrpcCallSettings.newBuilder() @@ -404,6 +596,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings partialUpdateInstanceTransportSettings = @@ -425,6 +618,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings createClusterTransportSettings = GrpcCallSettings.newBuilder() @@ -435,6 +629,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getClusterTransportSettings = GrpcCallSettings.newBuilder() @@ -445,6 +640,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listClustersTransportSettings = GrpcCallSettings.newBuilder() @@ -455,6 +651,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings updateClusterTransportSettings = GrpcCallSettings.newBuilder() @@ -465,6 +662,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings partialUpdateClusterTransportSettings = GrpcCallSettings.newBuilder() @@ -485,6 +683,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings createAppProfileTransportSettings = GrpcCallSettings.newBuilder() @@ -495,6 +694,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getAppProfileTransportSettings = GrpcCallSettings.newBuilder() @@ -505,6 +705,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listAppProfilesTransportSettings = @@ -516,6 +717,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings updateAppProfileTransportSettings = GrpcCallSettings.newBuilder() @@ -537,6 +739,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -547,6 +750,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -557,6 +761,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings testIamPermissionsTransportSettings = @@ -568,6 +773,7 @@ protected GrpcBigtableInstanceAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings listHotTabletsTransportSettings = @@ -579,7 +785,125 @@ protected GrpcBigtableInstanceAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listLogicalViewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLogicalViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "logical_view.name", String.valueOf(request.getLogicalView().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteLogicalViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteLogicalViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + createMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listMaterializedViewsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listMaterializedViewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + updateMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "materialized_view.name", + String.valueOf(request.getMaterializedView().getName())); + return builder.build(); + }) .build(); + GrpcCallSettings deleteMaterializedViewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMaterializedViewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); this.createInstanceCallable = callableFactory.createUnaryCallable( @@ -692,6 +1016,84 @@ protected GrpcBigtableInstanceAdminStub( this.listHotTabletsPagedCallable = callableFactory.createPagedCallable( listHotTabletsTransportSettings, settings.listHotTabletsSettings(), clientContext); + this.createLogicalViewCallable = + callableFactory.createUnaryCallable( + createLogicalViewTransportSettings, + settings.createLogicalViewSettings(), + clientContext); + this.createLogicalViewOperationCallable = + callableFactory.createOperationCallable( + createLogicalViewTransportSettings, + settings.createLogicalViewOperationSettings(), + clientContext, + operationsStub); + this.getLogicalViewCallable = + callableFactory.createUnaryCallable( + getLogicalViewTransportSettings, settings.getLogicalViewSettings(), clientContext); + this.listLogicalViewsCallable = + callableFactory.createUnaryCallable( + listLogicalViewsTransportSettings, settings.listLogicalViewsSettings(), clientContext); + this.listLogicalViewsPagedCallable = + callableFactory.createPagedCallable( + listLogicalViewsTransportSettings, settings.listLogicalViewsSettings(), clientContext); + this.updateLogicalViewCallable = + callableFactory.createUnaryCallable( + updateLogicalViewTransportSettings, + settings.updateLogicalViewSettings(), + clientContext); + this.updateLogicalViewOperationCallable = + callableFactory.createOperationCallable( + updateLogicalViewTransportSettings, + settings.updateLogicalViewOperationSettings(), + clientContext, + operationsStub); + this.deleteLogicalViewCallable = + callableFactory.createUnaryCallable( + deleteLogicalViewTransportSettings, + settings.deleteLogicalViewSettings(), + clientContext); + this.createMaterializedViewCallable = + callableFactory.createUnaryCallable( + createMaterializedViewTransportSettings, + settings.createMaterializedViewSettings(), + clientContext); + this.createMaterializedViewOperationCallable = + callableFactory.createOperationCallable( + createMaterializedViewTransportSettings, + settings.createMaterializedViewOperationSettings(), + clientContext, + operationsStub); + this.getMaterializedViewCallable = + callableFactory.createUnaryCallable( + getMaterializedViewTransportSettings, + settings.getMaterializedViewSettings(), + clientContext); + this.listMaterializedViewsCallable = + callableFactory.createUnaryCallable( + listMaterializedViewsTransportSettings, + settings.listMaterializedViewsSettings(), + clientContext); + this.listMaterializedViewsPagedCallable = + callableFactory.createPagedCallable( + listMaterializedViewsTransportSettings, + settings.listMaterializedViewsSettings(), + clientContext); + this.updateMaterializedViewCallable = + callableFactory.createUnaryCallable( + updateMaterializedViewTransportSettings, + settings.updateMaterializedViewSettings(), + clientContext); + this.updateMaterializedViewOperationCallable = + callableFactory.createOperationCallable( + updateMaterializedViewTransportSettings, + settings.updateMaterializedViewOperationSettings(), + clientContext, + operationsStub); + this.deleteMaterializedViewCallable = + callableFactory.createUnaryCallable( + deleteMaterializedViewTransportSettings, + settings.deleteMaterializedViewSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -855,6 +1257,96 @@ public UnaryCallable listHotTable return listHotTabletsPagedCallable; } + @Override + public UnaryCallable createLogicalViewCallable() { + return createLogicalViewCallable; + } + + @Override + public OperationCallable + createLogicalViewOperationCallable() { + return createLogicalViewOperationCallable; + } + + @Override + public UnaryCallable getLogicalViewCallable() { + return getLogicalViewCallable; + } + + @Override + public UnaryCallable + listLogicalViewsCallable() { + return listLogicalViewsCallable; + } + + @Override + public UnaryCallable + listLogicalViewsPagedCallable() { + return listLogicalViewsPagedCallable; + } + + @Override + public UnaryCallable updateLogicalViewCallable() { + return updateLogicalViewCallable; + } + + @Override + public OperationCallable + updateLogicalViewOperationCallable() { + return updateLogicalViewOperationCallable; + } + + @Override + public UnaryCallable deleteLogicalViewCallable() { + return deleteLogicalViewCallable; + } + + @Override + public UnaryCallable createMaterializedViewCallable() { + return createMaterializedViewCallable; + } + + @Override + public OperationCallable< + CreateMaterializedViewRequest, MaterializedView, CreateMaterializedViewMetadata> + createMaterializedViewOperationCallable() { + return createMaterializedViewOperationCallable; + } + + @Override + public UnaryCallable getMaterializedViewCallable() { + return getMaterializedViewCallable; + } + + @Override + public UnaryCallable + listMaterializedViewsCallable() { + return listMaterializedViewsCallable; + } + + @Override + public UnaryCallable + listMaterializedViewsPagedCallable() { + return listMaterializedViewsPagedCallable; + } + + @Override + public UnaryCallable updateMaterializedViewCallable() { + return updateMaterializedViewCallable; + } + + @Override + public OperationCallable< + UpdateMaterializedViewRequest, MaterializedView, UpdateMaterializedViewMetadata> + updateMaterializedViewOperationCallable() { + return updateMaterializedViewOperationCallable; + } + + @Override + public UnaryCallable deleteMaterializedViewCallable() { + return deleteMaterializedViewCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java index 70559ba873..9826dedb73 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,6 @@ package com.google.cloud.bigtable.admin.v2.stub; -import com.google.api.core.InternalApi; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcCallableFactory; import com.google.api.gax.grpc.GrpcStubCallableFactory; @@ -37,9 +36,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * gRPC callable factory implementation for the BigtableTableAdmin service API. + * + *

    This class is for advanced usage. + */ +@Generated("by gapic-generator-java") public class GrpcBigtableTableAdminCallableFactory implements GrpcStubCallableFactory { @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java index 82319941ee..8b1bc39910 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,10 +18,10 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; -import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -40,11 +40,14 @@ import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupMetadata; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -52,12 +55,15 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -65,6 +71,7 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableMetadata; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableMetadata; import com.google.bigtable.admin.v2.SnapshotTableRequest; @@ -74,6 +81,8 @@ import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.iam.v1.GetIamPolicyRequest; @@ -91,9 +100,12 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. -/** For internal use only. */ -@Generated("by gapic-generator") -@InternalApi +/** + * gRPC stub implementation for the BigtableTableAdmin service API. + * + *

    This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { private static final MethodDescriptor createTableMethodDescriptor = MethodDescriptor.newBuilder() @@ -101,6 +113,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/CreateTable") .setRequestMarshaller(ProtoUtils.marshaller(CreateTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Table.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -112,6 +125,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateTableFromSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -121,6 +135,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/ListTables") .setRequestMarshaller(ProtoUtils.marshaller(ListTablesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTablesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getTableMethodDescriptor = @@ -129,6 +144,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetTable") .setRequestMarshaller(ProtoUtils.marshaller(GetTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Table.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateTableMethodDescriptor = @@ -137,6 +153,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UpdateTable") .setRequestMarshaller(ProtoUtils.marshaller(UpdateTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTableMethodDescriptor = @@ -145,6 +162,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -155,6 +173,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(UndeleteTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -165,6 +184,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateAuthorizedViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -176,6 +196,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(ListAuthorizedViewsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListAuthorizedViewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -186,6 +207,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(GetAuthorizedViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AuthorizedView.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -196,6 +218,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateAuthorizedViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -206,6 +229,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteAuthorizedViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -216,6 +240,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(ModifyColumnFamiliesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Table.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor dropRowRangeMethodDescriptor = @@ -224,6 +249,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange") .setRequestMarshaller(ProtoUtils.marshaller(DropRowRangeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -238,6 +264,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(GenerateConsistencyTokenRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(GenerateConsistencyTokenResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -249,6 +276,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(CheckConsistencyRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CheckConsistencyResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -259,6 +287,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(SnapshotTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSnapshotMethodDescriptor = @@ -267,6 +296,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot") .setRequestMarshaller(ProtoUtils.marshaller(GetSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -278,6 +308,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(ListSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -288,6 +319,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -297,6 +329,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/CreateBackup") .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getBackupMethodDescriptor = @@ -305,6 +338,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetBackup") .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateBackupMethodDescriptor = @@ -313,6 +347,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup") .setRequestMarshaller(ProtoUtils.marshaller(UpdateBackupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteBackupMethodDescriptor = @@ -321,6 +356,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/DeleteBackup") .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -331,6 +367,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -340,6 +377,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/RestoreTable") .setRequestMarshaller(ProtoUtils.marshaller(RestoreTableRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor copyBackupMethodDescriptor = @@ -348,6 +386,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/CopyBackup") .setRequestMarshaller(ProtoUtils.marshaller(CopyBackupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -356,6 +395,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -364,6 +404,7 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -375,6 +416,63 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createSchemaBundleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/CreateSchemaBundle") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSchemaBundleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateSchemaBundleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UpdateSchemaBundle") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSchemaBundleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getSchemaBundleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetSchemaBundle") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSchemaBundleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SchemaBundle.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listSchemaBundlesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/ListSchemaBundles") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSchemaBundlesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSchemaBundlesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteSchemaBundleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/DeleteSchemaBundle") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSchemaBundleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createTableCallable; @@ -440,6 +538,20 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub { private final UnaryCallable setIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; + private final UnaryCallable createSchemaBundleCallable; + private final OperationCallable< + CreateSchemaBundleRequest, SchemaBundle, CreateSchemaBundleMetadata> + createSchemaBundleOperationCallable; + private final UnaryCallable updateSchemaBundleCallable; + private final OperationCallable< + UpdateSchemaBundleRequest, SchemaBundle, UpdateSchemaBundleMetadata> + updateSchemaBundleOperationCallable; + private final UnaryCallable getSchemaBundleCallable; + private final UnaryCallable + listSchemaBundlesCallable; + private final UnaryCallable + listSchemaBundlesPagedCallable; + private final UnaryCallable deleteSchemaBundleCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -494,6 +606,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings createTableFromSnapshotTransportSettings = @@ -505,6 +618,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings listTablesTransportSettings = GrpcCallSettings.newBuilder() @@ -515,6 +629,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getTableTransportSettings = GrpcCallSettings.newBuilder() @@ -525,6 +640,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings updateTableTransportSettings = GrpcCallSettings.newBuilder() @@ -545,6 +661,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings undeleteTableTransportSettings = GrpcCallSettings.newBuilder() @@ -555,6 +672,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings createAuthorizedViewTransportSettings = GrpcCallSettings.newBuilder() @@ -565,6 +683,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings listAuthorizedViewsTransportSettings = @@ -576,6 +695,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getAuthorizedViewTransportSettings = GrpcCallSettings.newBuilder() @@ -586,6 +706,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings updateAuthorizedViewTransportSettings = GrpcCallSettings.newBuilder() @@ -608,6 +729,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings modifyColumnFamiliesTransportSettings = GrpcCallSettings.newBuilder() @@ -618,6 +740,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings dropRowRangeTransportSettings = GrpcCallSettings.newBuilder() @@ -628,6 +751,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings generateConsistencyTokenTransportSettings = @@ -640,6 +764,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings checkConsistencyTransportSettings = @@ -651,6 +776,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings snapshotTableTransportSettings = GrpcCallSettings.newBuilder() @@ -661,6 +787,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings getSnapshotTransportSettings = GrpcCallSettings.newBuilder() @@ -671,6 +798,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listSnapshotsTransportSettings = GrpcCallSettings.newBuilder() @@ -681,6 +809,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings deleteSnapshotTransportSettings = GrpcCallSettings.newBuilder() @@ -691,6 +820,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings createBackupTransportSettings = GrpcCallSettings.newBuilder() @@ -701,6 +831,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getBackupTransportSettings = GrpcCallSettings.newBuilder() @@ -711,6 +842,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings updateBackupTransportSettings = GrpcCallSettings.newBuilder() @@ -731,6 +863,7 @@ protected GrpcBigtableTableAdminStub( builder.add("name", String.valueOf(request.getName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings listBackupsTransportSettings = GrpcCallSettings.newBuilder() @@ -741,6 +874,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings restoreTableTransportSettings = GrpcCallSettings.newBuilder() @@ -751,6 +885,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings copyBackupTransportSettings = GrpcCallSettings.newBuilder() @@ -761,6 +896,7 @@ protected GrpcBigtableTableAdminStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getParent()) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -771,6 +907,7 @@ protected GrpcBigtableTableAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() @@ -781,6 +918,7 @@ protected GrpcBigtableTableAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) .build(); GrpcCallSettings testIamPermissionsTransportSettings = @@ -792,7 +930,64 @@ protected GrpcBigtableTableAdminStub( builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings createSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "schema_bundle.name", String.valueOf(request.getSchemaBundle().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listSchemaBundlesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSchemaBundlesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) .build(); + GrpcCallSettings deleteSchemaBundleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSchemaBundleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); this.createTableCallable = callableFactory.createUnaryCallable( @@ -970,6 +1165,46 @@ protected GrpcBigtableTableAdminStub( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); + this.createSchemaBundleCallable = + callableFactory.createUnaryCallable( + createSchemaBundleTransportSettings, + settings.createSchemaBundleSettings(), + clientContext); + this.createSchemaBundleOperationCallable = + callableFactory.createOperationCallable( + createSchemaBundleTransportSettings, + settings.createSchemaBundleOperationSettings(), + clientContext, + operationsStub); + this.updateSchemaBundleCallable = + callableFactory.createUnaryCallable( + updateSchemaBundleTransportSettings, + settings.updateSchemaBundleSettings(), + clientContext); + this.updateSchemaBundleOperationCallable = + callableFactory.createOperationCallable( + updateSchemaBundleTransportSettings, + settings.updateSchemaBundleOperationSettings(), + clientContext, + operationsStub); + this.getSchemaBundleCallable = + callableFactory.createUnaryCallable( + getSchemaBundleTransportSettings, settings.getSchemaBundleSettings(), clientContext); + this.listSchemaBundlesCallable = + callableFactory.createUnaryCallable( + listSchemaBundlesTransportSettings, + settings.listSchemaBundlesSettings(), + clientContext); + this.listSchemaBundlesPagedCallable = + callableFactory.createPagedCallable( + listSchemaBundlesTransportSettings, + settings.listSchemaBundlesSettings(), + clientContext); + this.deleteSchemaBundleCallable = + callableFactory.createUnaryCallable( + deleteSchemaBundleTransportSettings, + settings.deleteSchemaBundleSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1212,6 +1447,50 @@ public UnaryCallable setIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public UnaryCallable createSchemaBundleCallable() { + return createSchemaBundleCallable; + } + + @Override + public OperationCallable + createSchemaBundleOperationCallable() { + return createSchemaBundleOperationCallable; + } + + @Override + public UnaryCallable updateSchemaBundleCallable() { + return updateSchemaBundleCallable; + } + + @Override + public OperationCallable + updateSchemaBundleOperationCallable() { + return updateSchemaBundleOperationCallable; + } + + @Override + public UnaryCallable getSchemaBundleCallable() { + return getSchemaBundleCallable; + } + + @Override + public UnaryCallable + listSchemaBundlesCallable() { + return listSchemaBundlesCallable; + } + + @Override + public UnaryCallable + listSchemaBundlesPagedCallable() { + return listSchemaBundlesPagedCallable; + } + + @Override + public UnaryCallable deleteSchemaBundleCallable() { + return deleteSchemaBundleCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/Version.java new file mode 100644 index 0000000000..9b8579a471 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/Version.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 + * + * 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.bigtable.admin.v2.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-bigtable:current} + static final String VERSION = "2.76.1-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Status.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Status.java index d0ca6fd127..8ee3f54b07 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Status.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Status.java @@ -107,6 +107,7 @@ public com.google.rpc.Status toProto() { return proto; } + @Override public String toString() { return proto.toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java index df5c6dcd95..8d283af11b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/common/Type.java @@ -21,10 +21,16 @@ import com.google.cloud.bigtable.data.v2.internal.ColumnToIndexMapper; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.common.base.Objects; +import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; +import com.google.protobuf.Parser; +import com.google.protobuf.ProtocolMessageEnum; +import java.time.Instant; import java.util.List; -import org.threeten.bp.Instant; +import java.util.function.Function; +import javax.annotation.Nonnull; /** * Shared type implementations. Right now this is only used by SqlType but this will become a shared @@ -36,6 +42,7 @@ */ @BetaApi @InternalApi +@SuppressWarnings({"SameNameButDifferent", "JavaLangClash"}) public interface Type { @AutoValue @@ -51,7 +58,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -68,7 +75,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -85,7 +92,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -102,7 +109,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -119,7 +126,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -136,7 +143,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -153,7 +160,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -170,7 +177,7 @@ public Code getCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -209,29 +216,33 @@ public Code getCode() { @Override public List getFields() { throw new UnsupportedOperationException( - "Attempting to access schema of Schemaless Struct. These structs should only be used for typing of StructReader data access calls."); + "Attempting to access schema of Schemaless Struct. These structs should only be used for" + + " typing of StructReader data access calls."); } @Override public SqlType getType(int fieldIndex) { throw new UnsupportedOperationException( - "Attempting to access schema of Schemaless Struct. These structs should only be used for typing of StructReader data access calls."); + "Attempting to access schema of Schemaless Struct. These structs should only be used for" + + " typing of StructReader data access calls."); } @Override public SqlType getType(java.lang.String fieldName) { throw new UnsupportedOperationException( - "Attempting to access schema of Schemaless Struct. These structs should only be used for typing of StructReader data access calls."); + "Attempting to access schema of Schemaless Struct. These structs should only be used for" + + " typing of StructReader data access calls."); } @Override public int getColumnIndex(java.lang.String fieldName) { throw new UnsupportedOperationException( - "Attempting to access schema of Schemaless Struct. These structs should only be used for typing of StructReader data access calls."); + "Attempting to access schema of Schemaless Struct. These structs should only be used for" + + " typing of StructReader data access calls."); } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name(); } } @@ -295,6 +306,7 @@ public SqlType getType(java.lang.String fieldName) { } @Override + @SuppressWarnings("EqualsGetClass") public boolean equals(Object obj) { if (this == obj) { return true; @@ -314,7 +326,7 @@ public int hashCode() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name() + "{fields=" + fields.toString() + "}"; } } @@ -339,7 +351,7 @@ public SqlType getElementType() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name() + "{elementType=" + getElementType().getCode() + "}"; } } @@ -371,7 +383,7 @@ public SqlType getValueType() { } @Override - public java.lang.String toString() { + public final java.lang.String toString() { return getCode().name() + "{keyType=" + getKeyType().toString() @@ -381,10 +393,208 @@ public java.lang.String toString() { } } + @AutoValue + abstract class Proto implements Type, SqlType.Proto { + + public static SqlType.Proto create(T message) { + Preconditions.checkNotNull( + message, + "Proto message may not be null. Use 'MyProtoMessage::getDefaultInstance()' as a parameter" + + " value."); + return new AutoValue_Type_Proto<>(message); + } + + @Nonnull + abstract T getMessage(); + + @Override + public Code getCode() { + return Code.PROTO; + } + + @Nonnull + @Override + public Parser getParserForType() { + return (Parser) getMessage().getParserForType(); + } + + @Override + public java.lang.String getMessageName() { + return getMessage().getDescriptorForType().getFullName(); + } + + @Override + public final java.lang.String toString() { + return getCode().name() + "{message=" + getMessageName() + "}"; + } + } + + @AutoValue + abstract class Enum implements Type, SqlType.Enum { + + public static SqlType.Enum create( + Function forNumber) { + Preconditions.checkNotNull( + forNumber, "Method may not be null. Use 'MyProtoEnum::forNumber' as a parameter value."); + return new AutoValue_Type_Enum<>(forNumber); + } + + @Nonnull + @Override + public abstract Function getForNumber(); + + @Override + public java.lang.String getEnumName() { + T thisEnum = getForNumber().apply(0); + if (thisEnum == null) { + return ""; + } + return thisEnum.getDescriptorForType().getFullName(); + } + + @Override + public Code getCode() { + return Code.ENUM; + } + + @Override + public final java.lang.String toString() { + return getCode().name() + "{enum=" + getEnumName() + "}"; + } + + @Override + public final boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Type.Enum)) { + return false; + } + Type.Enum that = (Type.Enum) o; + // We don't want to compare functions directly, so try to get the enum descriptor and compare + // those. + T thisEnum = getForNumber().apply(0); + Object thatEnum = that.getForNumber().apply(0); + + if (thisEnum == null || thatEnum == null) { + // Can't determine equality, fallback to object equality on the function. + return getForNumber().equals(that.getForNumber()); + } + return thisEnum + .getDescriptorForType() + .getFullName() + .equals(((ProtocolMessageEnum) thatEnum).getDescriptorForType().getFullName()); + } + + @Override + public final int hashCode() { + T thisEnum = getForNumber().apply(0); + if (thisEnum == null) { + return getForNumber().hashCode(); + } + return java.util.Objects.hash(getCode(), thisEnum.getDescriptorForType().getFullName()); + } + } + + /** + * This is a special version of proto that is intended to only be used internally, to facilitate + * proto schema parsing, which does not have the full information required to parse the protobuf + * messages. + * + *

    Any attempts to call getParserForType() will throw an exception. + */ + @AutoValue + abstract class SchemalessProto implements SqlType.Proto { + + public static SchemalessProto fromProto(com.google.bigtable.v2.Type.Proto proto) { + return create(proto.getMessageName(), proto.getSchemaBundleId()); + } + + public static SchemalessProto create( + java.lang.String messageName, java.lang.String schemaBundleId) { + return new AutoValue_Type_SchemalessProto(messageName, schemaBundleId); + } + + @Override + public abstract java.lang.String getMessageName(); + + public abstract java.lang.String schemaBundleId(); + + @Override + public Parser getParserForType() { + throw new UnsupportedOperationException( + "Cannot get parser for unresolved proto type. Please use the getProtoMessage overload" + + " that takes a message instance."); + } + + @Override + public Code getCode() { + return Code.PROTO; + } + + @Override + public final java.lang.String toString() { + return getCode().name() + + "{messageName=" + + getMessageName() + + ", schemaBundleId=" + + schemaBundleId() + + "}"; + } + } + + /** + * This is a special version of enum that is intended to only be used internally, to facilitate + * enum schema parsing, which does not have the full information required to parse the protobuf + * enum messages. + * + *

    Any attempts to call getForNumber() will throw an exception. + */ + @AutoValue + abstract class SchemalessEnum implements SqlType.Enum { + + public static SchemalessEnum fromProto(com.google.bigtable.v2.Type.Enum proto) { + return create(proto.getEnumName(), proto.getSchemaBundleId()); + } + + public static SchemalessEnum create( + java.lang.String enumName, java.lang.String schemaBundleId) { + return new AutoValue_Type_SchemalessEnum(enumName, schemaBundleId); + } + + @Override + public abstract java.lang.String getEnumName(); + + public abstract java.lang.String schemaBundleId(); + + @Override + public Function getForNumber() { + throw new UnsupportedOperationException( + "Cannot get forNumber for unresolved enum type. Please use the getProtoEnum overload that" + + " takes a forNumber function."); + } + + @Override + public Code getCode() { + return Code.ENUM; + } + + @Override + public final java.lang.String toString() { + return getCode().name() + + "{enumName=" + + getEnumName() + + ", schemaBundleId=" + + schemaBundleId() + + "}"; + } + } + // Implementation detail to make singleton instances private without referencing the concrete // autovalue generated class from the abstract base classes. @InternalApi class DefaultInstances { + private static final Bytes BYTES = new AutoValue_Type_Bytes(); private static final String STRING = new AutoValue_Type_String(); private static final Int64 INT64 = new AutoValue_Type_Int64(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index 61f51924f1..85529de8d9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -25,11 +25,13 @@ import com.google.api.gax.batching.Batcher; import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.rpc.ApiExceptions; -import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl; import com.google.cloud.bigtable.data.v2.internal.ResultSetImpl; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; @@ -48,14 +50,17 @@ import com.google.cloud.bigtable.data.v2.models.SampleRowKeysRequest; import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.models.TargetId; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream; import com.google.common.util.concurrent.MoreExecutors; import com.google.protobuf.ByteString; import java.io.IOException; import java.util.List; +import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -174,18 +179,6 @@ public static BigtableDataClient create(BigtableDataSettings settings) throws IO return new BigtableDataClient(stub); } - /** - * Constructs an instance of BigtableDataClient with the provided client context. This is used by - * {@link BigtableDataClientFactory} and the client context will not be closed unless {@link - * BigtableDataClientFactory#close()} is called. - */ - static BigtableDataClient createWithClientContext( - BigtableDataSettings settings, ClientContext context) throws IOException { - EnhancedBigtableStub stub = - EnhancedBigtableStub.createWithClientContext(settings.getStubSettings(), context); - return new BigtableDataClient(stub); - } - @InternalApi("Visible for testing") BigtableDataClient(EnhancedBigtableStub stub) { this.stub = stub; @@ -1279,6 +1272,53 @@ public ServerStreamingCallable readRowsCallable() { return stub.readRowsCallable(); } + /** + * Streams back the results of the read query & omits large rows. The returned callable object + * allows for customization of api invocation. + * + *

    Sample code: + * + *

    {@code
    +   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    +   *   String tableId = "[TABLE]";
    +   *
    +   *   Query query = Query.create(tableId)
    +   *          .range("[START KEY]", "[END KEY]")
    +   *          .filter(FILTERS.qualifier().regex("[COLUMN PREFIX].*"));
    +   *
    +   *   // Iterator style
    +   *   try {
    +   *     for(Row row : bigtableDataClient.skipLargeRowsCallable().call(query)) {
    +   *       // Do something with row
    +   *     }
    +   *   } catch (NotFoundException e) {
    +   *     System.out.println("Tried to read a non-existent table");
    +   *   } catch (RuntimeException e) {
    +   *     e.printStackTrace();
    +   *   }
    +   *
    +   *   // Sync style
    +   *   try {
    +   *     List rows = bigtableDataClient.skipLargeRowsCallable().all().call(query);
    +   *   } catch (NotFoundException e) {
    +   *     System.out.println("Tried to read a non-existent table");
    +   *   } catch (RuntimeException e) {
    +   *     e.printStackTrace();
    +   *   }
    +   *
    +   *   // etc
    +   * }
    +   * }
    + * + * @see ServerStreamingCallable For call styles. + * @see Query For query options. + * @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL. + */ + @InternalApi("only to be used by Bigtable beam connector") + public ServerStreamingCallable skipLargeRowsCallable() { + return stub.skipLargeRowsCallable(); + } + /** * Streams back the results of the query. This callable allows for customization of the logical * representation of a row. It's meant for advanced use cases. @@ -1314,6 +1354,46 @@ public ServerStreamingCallable readRowsCallable(RowAdapterStreams back the results of the query skipping the large-rows. This callable allows for + * customization of the logical representation of a row. It's meant for advanced use cases. + * + *

    Sample code: + * + *

    {@code
    +   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
    +   *   String tableId = "[TABLE]";
    +   *
    +   *   Query query = Query.create(tableId)
    +   *          .range("[START KEY]", "[END KEY]")
    +   *          .filter(FILTERS.qualifier().regex("[COLUMN PREFIX].*"));
    +   *
    +   *   // Iterator style
    +   *   try {
    +   *     for(CustomRow row : bigtableDataClient.skipLargeRowsCallable(new CustomRowAdapter()).call(query)) {
    +   *       // Do something with row
    +   *     }
    +   *   } catch (NotFoundException e) {
    +   *     System.out.println("Tried to read a non-existent table");
    +   *   } catch (RuntimeException e) {
    +   *     e.printStackTrace();
    +   *   }
    +   * }
    +   * }
    + * + * @see ServerStreamingCallable For call styles. + * @see Query For query options. + * @see com.google.cloud.bigtable.data.v2.models.Filters For the filter building DSL. + */ + @InternalApi("only to be used by Bigtable beam connector") + public ServerStreamingCallable skipLargeRowsCallable( + RowAdapter rowAdapter) { + return stub.createSkipLargeRowsCallable(rowAdapter); + } + /** * Convenience method to synchronously return a sample of row keys in the table. The returned row * keys will delimit contiguous sections of the table of approximately equal size, which can be @@ -1703,10 +1783,9 @@ public Batcher newBulkMutationBatcher(@Nonnull String ta * GrpcCallContext)} instead. */ @Deprecated - @BetaApi("This surface is likely to change as the batching surface evolves.") public Batcher newBulkMutationBatcher( @Nonnull String tableId, @Nullable GrpcCallContext ctx) { - return stub.newMutateRowsBatcher(tableId, ctx); + return stub.newMutateRowsBatcher(TableId.of(tableId), ctx); } /** @@ -2618,30 +2697,63 @@ public void readChangeStreamAsync( * Executes a SQL Query and returns a ResultSet to iterate over the results. The returned * ResultSet instance is not threadsafe, it can only be used from single thread. * + *

    The {@link BoundStatement} must be built from a {@link PreparedStatement} created using the + * same instance and app profile. + * *

    Sample code: * *

    {@code
        * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
        *   String query = "SELECT CAST(cf['stringCol'] AS STRING) FROM [TABLE]";
    -   *
    -   *   try (ResultSet resultSet = bigtableDataClient.executeQuery(Statement.of(query))) {
    -   *     while (resultSet.next()) {
    -   *        String s = resultSet.getString("stringCol");
    -   *        // do something with data
    -   *     }
    -   *   } catch (RuntimeException e) {
    -   *     e.printStackTrace();
    +   *   Map> paramTypes = new HashMap<>();
    +   *   PreparedStatement preparedStatement = bigtableDataClient.prepareStatement(query, paramTypes));
    +   *   // Ideally one PreparedStatement should be reused across requests
    +   *   BoundStatement boundStatement = preparedStatement.bind()
    +   *      // set any query params before calling build
    +   *      .build();
    +   *   try (ResultSet resultSet = bigtableDataClient.executeQuery(boundStatement)) {
    +   *       while (resultSet.next()) {
    +   *           String s = resultSet.getString("stringCol");
    +   *            // do something with data
    +   *       }
    +   *    } catch (RuntimeException e) {
    +   *        e.printStackTrace();
        *   }
    +   * }
        * }
    * - * @see Statement For query options. + * @see PreparedStatement for query options. + * @see BoundStatement for query options. */ - @BetaApi - public ResultSet executeQuery(Statement statement) { - SqlServerStream stream = stub.createExecuteQueryCallable().call(statement); + public ResultSet executeQuery(BoundStatement boundStatement) { + boundStatement.assertUsingSameStub(stub); + SqlServerStream stream = stub.createExecuteQueryCallable().call(boundStatement); return ResultSetImpl.create(stream); } + /** + * Prepares a query for execution. If possible this should be called once and reused across + * requests. This will amortize the cost of query preparation. + * + *

    A parameterized query should contain placeholders in the form of {@literal @} followed by + * the parameter name. Parameter names may consist of any combination of letters, numbers, and + * underscores. + * + *

    Parameters can appear anywhere that a literal value is expected. The same parameter name can + * be used more than once, for example: {@code WHERE cf["qualifier1"] = @value OR cf["qualifier2"] + * = @value } + * + * @param query sql query string to prepare + * @param paramTypes a Map of the parameter names and the corresponding {@link SqlType} for all + * query parameters in 'query' + * @return {@link PreparedStatement} which is used to create {@link BoundStatement}s to execute + */ + public PreparedStatement prepareStatement(String query, Map> paramTypes) { + PrepareQueryRequest request = PrepareQueryRequest.create(query, paramTypes); + PrepareResponse response = stub.prepareQueryCallable().call(request); + return PreparedStatementImpl.create(response, paramTypes, request, stub); + } + /** Close the clients and releases all associated resources. */ @Override public void close() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactory.java index 9b2f2e345f..61ab4cc12c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactory.java @@ -16,13 +16,11 @@ package com.google.cloud.bigtable.data.v2; import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.ClientContext; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.stub.BigtableClientContext; +import com.google.cloud.bigtable.data.v2.stub.ClientOperationSettings; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; -import io.opentelemetry.api.OpenTelemetry; import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.annotation.Nonnull; /** @@ -65,12 +63,8 @@ */ @BetaApi("This feature is currently experimental and can change in the future") public final class BigtableDataClientFactory implements AutoCloseable { - - private static final Logger logger = Logger.getLogger(BigtableDataClientFactory.class.getName()); - - private final BigtableDataSettings defaultSettings; - private final ClientContext sharedClientContext; - private final OpenTelemetry openTelemetry; + private final BigtableClientContext sharedClientContext; + private final ClientOperationSettings perOpSettings; /** * Create a instance of this factory. @@ -80,30 +74,20 @@ public final class BigtableDataClientFactory implements AutoCloseable { */ public static BigtableDataClientFactory create(BigtableDataSettings defaultSettings) throws IOException { - ClientContext sharedClientContext = - EnhancedBigtableStub.createClientContext(defaultSettings.getStubSettings()); - OpenTelemetry openTelemetry = null; - try { - // We don't want client side metrics to crash the client, so catch any exception when getting - // the OTEL instance and log the exception instead. - openTelemetry = - EnhancedBigtableStub.getOpenTelemetry( - defaultSettings.getProjectId(), - defaultSettings.getMetricsProvider(), - sharedClientContext.getCredentials()); - } catch (Throwable t) { - logger.log(Level.WARNING, "Failed to get OTEL, will skip exporting client side metrics", t); - } - return new BigtableDataClientFactory(sharedClientContext, defaultSettings, openTelemetry); + BigtableDataSettings.Builder builder = defaultSettings.toBuilder(); + builder.stubSettings().setSessionsEnabled(false); + defaultSettings = builder.build(); + + BigtableClientContext sharedClientContext = + BigtableClientContext.create(defaultSettings.getStubSettings()); + ClientOperationSettings perOpSettings = defaultSettings.getStubSettings().getPerOpSettings(); + return new BigtableDataClientFactory(sharedClientContext, perOpSettings); } private BigtableDataClientFactory( - ClientContext sharedClientContext, - BigtableDataSettings defaultSettings, - OpenTelemetry openTelemetry) { + BigtableClientContext sharedClientContext, ClientOperationSettings perOpSettings) { this.sharedClientContext = sharedClientContext; - this.defaultSettings = defaultSettings; - this.openTelemetry = openTelemetry; + this.perOpSettings = perOpSettings; } /** @@ -113,9 +97,7 @@ private BigtableDataClientFactory( */ @Override public void close() throws Exception { - for (BackgroundResource resource : sharedClientContext.getBackgroundResources()) { - resource.close(); - } + sharedClientContext.close(); } /** @@ -129,15 +111,12 @@ public void close() throws Exception { */ public BigtableDataClient createDefault() { try { - ClientContext clientContext = - sharedClientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - defaultSettings.getStubSettings(), openTelemetry)) - .build(); + BigtableClientContext ctx = + sharedClientContext.createChild( + sharedClientContext.getClientInfo().getInstanceName(), + sharedClientContext.getClientInfo().getAppProfileId()); - return BigtableDataClient.createWithClientContext(defaultSettings, clientContext); + return new BigtableDataClient(new EnhancedBigtableStub(perOpSettings, ctx)); } catch (IOException e) { // Should never happen because the connection has been established already throw new RuntimeException( @@ -155,17 +134,11 @@ public BigtableDataClient createDefault() { * release all resources, first close all of the created clients and then this factory instance. */ public BigtableDataClient createForAppProfile(@Nonnull String appProfileId) throws IOException { - BigtableDataSettings settings = - defaultSettings.toBuilder().setAppProfileId(appProfileId).build(); + BigtableClientContext ctx = + sharedClientContext.createChild( + sharedClientContext.getClientInfo().getInstanceName(), appProfileId); - ClientContext clientContext = - sharedClientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) - .build(); - return BigtableDataClient.createWithClientContext(settings, clientContext); + return new BigtableDataClient(new EnhancedBigtableStub(perOpSettings, ctx)); } /** @@ -179,23 +152,10 @@ public BigtableDataClient createForAppProfile(@Nonnull String appProfileId) thro */ public BigtableDataClient createForInstance(@Nonnull String projectId, @Nonnull String instanceId) throws IOException { - BigtableDataSettings settings = - defaultSettings - .toBuilder() - .setProjectId(projectId) - .setInstanceId(instanceId) - .setDefaultAppProfileId() - .build(); + BigtableClientContext ctx = + sharedClientContext.createChild(InstanceName.of(projectId, instanceId), ""); - ClientContext clientContext = - sharedClientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) - .build(); - - return BigtableDataClient.createWithClientContext(settings, clientContext); + return new BigtableDataClient(new EnhancedBigtableStub(perOpSettings, ctx)); } /** @@ -210,20 +170,9 @@ public BigtableDataClient createForInstance(@Nonnull String projectId, @Nonnull public BigtableDataClient createForInstance( @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String appProfileId) throws IOException { - BigtableDataSettings settings = - defaultSettings - .toBuilder() - .setProjectId(projectId) - .setInstanceId(instanceId) - .setAppProfileId(appProfileId) - .build(); - ClientContext clientContext = - sharedClientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), openTelemetry)) - .build(); - return BigtableDataClient.createWithClientContext(settings, clientContext); + BigtableClientContext ctx = + sharedClientContext.createChild(InstanceName.of(projectId, instanceId), appProfileId); + + return new BigtableDataClient(new EnhancedBigtableStub(perOpSettings, ctx)); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java index 928159aa6d..96aef5334a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java @@ -30,6 +30,7 @@ import com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.common.base.MoreObjects; import com.google.common.base.Strings; import io.grpc.ManagedChannelBuilder; @@ -38,7 +39,6 @@ import java.util.logging.Logger; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** * Settings class to configure an instance of {@link BigtableDataClient}. @@ -119,63 +119,69 @@ public static Builder newBuilderForEmulator(int port) { * port number. */ public static Builder newBuilderForEmulator(String hostname, int port) { - Builder builder = new Builder(); - - builder - .stubSettings() - .setCredentialsProvider(NoCredentialsProvider.create()) - .setEndpoint(hostname + ":" + port) - // disable channel refreshing when creating an emulator - .setRefreshingChannel(false) - .setTransportChannelProvider( - InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(256 * 1024 * 1024) - .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) - .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .setKeepAliveTime(Duration.ofSeconds(61)) // sends ping in this interval - .setKeepAliveTimeout( - Duration.ofSeconds(10)) // wait this long before considering the connection dead - .build()); + BigtableDataSettings.Builder builder = new BigtableDataSettings.Builder(); + + // TODO: remove the suppression once setRefreshingChannel is no longer necessary + @SuppressWarnings({"deprecation", "VariableUnused"}) + EnhancedBigtableStubSettings.Builder ignored = + builder + .stubSettings() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setEndpoint(hostname + ":" + port) + // disable channel refreshing when creating an emulator + .setRefreshingChannel(false) + .setMetricsProvider( + NoopMetricsProvider.INSTANCE) // disable exporting metrics for emulator + .disableInternalMetrics() + .setSessionsEnabled(false) + .setTransportChannelProvider( + InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(256 * 1024 * 1024) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .setKeepAliveTimeDuration( + java.time.Duration.ofSeconds(61)) // sends ping in this interval + .setKeepAliveTimeoutDuration( + java.time.Duration.ofSeconds( + 10)) // wait this long before considering the connection dead + .build()); LOGGER.info("Connecting to the Bigtable emulator at " + hostname + ":" + port); return builder; } /** - * Enables OpenCensus metric aggregations. + * @deprecated OpenCensus support is deprecated and will be removed in a future version Enables + * OpenCensus metric aggregations. + *

    This will register Bigtable client relevant {@link io.opencensus.stats.View}s. When + * coupled with an exporter, it allows users to monitor client behavior. + *

    Please note that in addition to calling this method, the application must: + *

      + *
    • Include openensus-impl dependency on the classpath + *
    • Configure an exporter like opencensus-exporter-stats-stackdriver + *
    + *

    Example usage for maven: + *

    {@code
    +   * 
    +   *   io.opencensus
    +   *   opencensus-impl
    +   *   ${opencensus.version}
    +   *   runtime
    +   * 
        *
    -   * 

    This will register Bigtable client relevant {@link io.opencensus.stats.View}s. When coupled - * with an exporter, it allows users to monitor client behavior. - * - *

    Please note that in addition to calling this method, the application must: - *

      - *
    • Include openensus-impl dependency on the classpath - *
    • Configure an exporter like opencensus-exporter-stats-stackdriver - *
    - * - *

    Example usage for maven: - *

    {@code
    -   *   
    -   *     io.opencensus
    -   *     opencensus-impl
    -   *     ${opencensus.version}
    -   *     runtime
    -   *   
    -   *
    -   *   
    -   *     io.opencensus
    -   *     opencensus-exporter-stats-stackdriver
    -   *     ${opencensus.version}
    -   *   
    -   * 
    - * - * Java: - *
    {@code
    -   *   StackdriverStatsExporter.createAndRegister();
    -   *   BigtableDataSettings.enableOpenCensusStats();
    +   * 
    +   *   io.opencensus
    +   *   opencensus-exporter-stats-stackdriver
    +   *   ${opencensus.version}
    +   * 
    +   * }
    + * Java: + *
    {@code
    +   * StackdriverStatsExporter.createAndRegister();
    +   * BigtableDataSettings.enableOpenCensusStats();
        * }
    */ - @BetaApi("OpenCensus stats integration is currently unstable and may change in the future") + @Deprecated public static void enableOpenCensusStats() { com.google.cloud.bigtable.data.v2.stub.metrics.RpcViews.registerBigtableClientViews(); // TODO(igorbernstein): Enable grpc views once we upgrade to grpc-java 1.24.0 @@ -184,15 +190,14 @@ public static void enableOpenCensusStats() { } /** - * Enables OpenCensus GFE metric aggregations. - * - *

    This will register views for gfe_latency and gfe_header_missing_count metrics. - * - *

    gfe_latency measures the latency between Google's network receives an RPC and reads back the - * first byte of the response. gfe_header_missing_count is a counter of the number of RPC - * responses received without the server-timing header. + * @deprecated OpenCensus support is deprecated and will be removed in a future version Enables + * OpenCensus GFE metric aggregations. + *

    This will register views for gfe_latency and gfe_header_missing_count metrics. + *

    gfe_latency measures the latency between Google's network receives an RPC and reads back + * the first byte of the response. gfe_header_missing_count is a counter of the number of RPC + * responses received without the server-timing header. */ - @BetaApi("OpenCensus stats integration is currently unstable and may change in the future") + @Deprecated public static void enableGfeOpenCensusStats() { com.google.cloud.bigtable.data.v2.stub.metrics.RpcViews.registerBigtableClientGfeViews(); } @@ -294,6 +299,11 @@ public MetricsProvider getMetricsProvider() { return stubSettings.getMetricsProvider(); } + /** Checks if internal metrics are enabled */ + public boolean areInternalMetricsEnabled() { + return stubSettings.areInternalMetricsEnabled(); + } + /** Returns the underlying RPC settings. */ public EnhancedBigtableStubSettings getStubSettings() { return stubSettings; @@ -317,6 +327,7 @@ public Builder toBuilder() { /** Builder for BigtableDataSettings. */ public static class Builder { private final EnhancedBigtableStubSettings.Builder stubSettings; + /** * Initializes a new Builder with sane defaults for all settings. * @@ -440,7 +451,6 @@ public boolean isRefreshingChannel() { */ @Deprecated public Builder setPrimingTableIds(String... tableIds) { - stubSettings.setPrimedTableIds(tableIds); return this; } @@ -567,6 +577,15 @@ public MetricsProvider getMetricsProvider() { return stubSettings.getMetricsProvider(); } + public Builder disableInternalMetrics() { + stubSettings.disableInternalMetrics(); + return this; + } + + public boolean areInternalMetricsEnabled() { + return stubSettings.areInternalMetricsEnabled(); + } + /** * Returns the underlying settings for making RPC calls. The settings should be changed with * care. diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json index 1134631db2..5bc262fb5c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json @@ -28,6 +28,9 @@ "PingAndWarm": { "methods": ["pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarmCallable"] }, + "PrepareQuery": { + "methods": ["prepareQuery", "prepareQuery", "prepareQuery", "prepareQuery", "prepareQuery", "prepareQueryCallable"] + }, "ReadChangeStream": { "methods": ["readChangeStreamCallable"] }, diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReader.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReader.java index dff4d4e0b2..166da1b553 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReader.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReader.java @@ -23,14 +23,17 @@ import com.google.cloud.bigtable.data.v2.models.sql.Struct; import com.google.cloud.bigtable.data.v2.models.sql.StructReader; import com.google.common.base.Preconditions; +import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.ProtocolMessageEnum; +import java.time.Instant; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.threeten.bp.Instant; +import java.util.function.Function; @InternalApi public abstract class AbstractProtoStructReader implements StructReader { @@ -38,8 +41,10 @@ public abstract class AbstractProtoStructReader implements StructReader { abstract List values(); // Force subclasses to override equals and hashcode. We need this for tests. + @Override public abstract boolean equals(Object other); + @Override public abstract int hashCode(); /** @@ -169,7 +174,7 @@ public boolean getBoolean(String columnName) { public Instant getTimestamp(int columnIndex) { checkNonNullOfType(columnIndex, SqlType.timestamp(), columnIndex); Value value = values().get(columnIndex); - return toInstant(value.getTimestampValue()); + return TimestampUtil.toInstant(value.getTimestampValue()); } @Override @@ -177,7 +182,7 @@ public Instant getTimestamp(String columnName) { int columnIndex = getColumnIndex(columnName); checkNonNullOfType(columnIndex, SqlType.timestamp(), columnName); Value value = values().get(columnIndex); - return toInstant(value.getTimestampValue()); + return TimestampUtil.toInstant(value.getTimestampValue()); } @Override @@ -221,6 +226,12 @@ public List getList(int columnIndex, SqlType.Array actualType = getColumnType(columnIndex); checkNonNullOfType(columnIndex, arrayType, actualType, columnIndex); Value value = values().get(columnIndex); + // If the element type is proto/enum, we should use the user passed type, which contains the + // schema. Otherwise, we should use the type from metadata. + SqlType elementType = arrayType.getElementType(); + if (elementType.getCode() == SqlType.Code.PROTO || elementType.getCode() == SqlType.Code.ENUM) { + return (List) decodeValue(value, arrayType); + } return (List) decodeValue(value, actualType); } @@ -232,6 +243,12 @@ public List getList(String columnName, SqlType.Array actualType = getColumnType(columnIndex); checkNonNullOfType(columnIndex, arrayType, actualType, columnName); Value value = values().get(columnIndex); + // If the element type is proto/enum, we should use the user passed type, which contains the + // schema. Otherwise, we should use the type from metadata. + SqlType elementType = arrayType.getElementType(); + if (elementType.getCode() == SqlType.Code.PROTO || elementType.getCode() == SqlType.Code.ENUM) { + return (List) decodeValue(value, arrayType); + } return (List) decodeValue(value, actualType); } @@ -242,6 +259,12 @@ public Map getMap(int columnIndex, SqlType.Map mapType) { SqlType actualType = getColumnType(columnIndex); checkNonNullOfType(columnIndex, mapType, actualType, columnIndex); Value value = values().get(columnIndex); + // If the value type is proto/enum, we should use the user passed type, which contains the + // schema. Otherwise, we should use the type from metadata. + SqlType valueType = mapType.getValueType(); + if (valueType.getCode() == SqlType.Code.PROTO || valueType.getCode() == SqlType.Code.ENUM) { + return (Map) decodeValue(value, mapType); + } return (Map) decodeValue(value, actualType); } @@ -253,9 +276,61 @@ public Map getMap(String columnName, SqlType.Map mapType) { SqlType actualType = getColumnType(columnIndex); checkNonNullOfType(columnIndex, mapType, actualType, columnName); Value value = values().get(columnIndex); + // If the value type is proto/enum, we should use the user passed type, which contains the + // schema. Otherwise, we should use the type from metadata. + SqlType valueType = mapType.getValueType(); + if (valueType.getCode() == SqlType.Code.PROTO || valueType.getCode() == SqlType.Code.ENUM) { + return (Map) decodeValue(value, mapType); + } return (Map) decodeValue(value, actualType); } + @Override + public MsgType getProtoMessage( + int columnIndex, MsgType message) { + // Note it is import that we use the user passed message object to decode, because the type in + // the corresponding column metadata only have a message name and doesn't have schemas + SqlType.Proto actualType = SqlType.protoOf(message); + checkNonNullOfType(columnIndex, getColumnType(columnIndex), actualType, columnIndex); + Value value = values().get(columnIndex); + return (MsgType) decodeValue(value, actualType); + } + + @Override + public MsgType getProtoMessage( + String columnName, MsgType message) { + int columnIndex = getColumnIndex(columnName); + // Note it is import that we use the user passed message object to decode, because the type in + // the corresponding column metadata only have a message name and doesn't have schemas + SqlType.Proto actualType = SqlType.protoOf(message); + checkNonNullOfType(columnIndex, getColumnType(columnIndex), actualType, columnName); + Value value = values().get(columnIndex); + return (MsgType) decodeValue(value, actualType); + } + + @Override + public EnumType getProtoEnum( + int columnIndex, Function forNumber) { + // Note it is import that we use the user passed function to decode, because the type in + // the corresponding column metadata only have an enum message name and doesn't have schemas + SqlType.Enum actualType = SqlType.enumOf(forNumber); + checkNonNullOfType(columnIndex, getColumnType(columnIndex), actualType, columnIndex); + Value value = values().get(columnIndex); + return (EnumType) decodeValue(value, actualType); + } + + @Override + public EnumType getProtoEnum( + String columnName, Function forNumber) { + int columnIndex = getColumnIndex(columnName); + // Note it is import that we use the user passed function to decode, because the type in + // the corresponding column metadata only have an enum message name and doesn't have schemas + SqlType.Enum actualType = SqlType.enumOf(forNumber); + checkNonNullOfType(columnIndex, getColumnType(columnIndex), actualType, columnName); + Value value = values().get(columnIndex); + return (EnumType) decodeValue(value, actualType); + } + Object decodeValue(Value value, SqlType type) { if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { return null; @@ -275,13 +350,22 @@ Object decodeValue(Value value, SqlType type) { case BOOL: return value.getBoolValue(); case TIMESTAMP: - return toInstant(value.getTimestampValue()); + return TimestampUtil.toInstant(value.getTimestampValue()); case DATE: return fromProto(value.getDateValue()); case STRUCT: SqlType.Struct schema = (SqlType.Struct) type; // A struct value is represented as an array return ProtoStruct.create(schema, value.getArrayValue()); + case PROTO: + try { + SqlType.Proto protoType = (SqlType.Proto) type; + return protoType.getParserForType().parseFrom(value.getBytesValue()); + } catch (InvalidProtocolBufferException e) { + throw new IllegalStateException("Unable to parse value to proto " + type, e); + } + case ENUM: + return ((SqlType.Enum) type).getForNumber().apply((int) value.getIntValue()); case ARRAY: ArrayList listBuilder = new ArrayList<>(); SqlType.Array arrayType = (SqlType.Array) type; @@ -329,10 +413,6 @@ private void checkNonNullOfType( } } - private Instant toInstant(Timestamp timestamp) { - return Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos()); - } - private Date fromProto(com.google.type.Date proto) { return Date.fromYearMonthDay(proto.getYear(), proto.getMonth(), proto.getDay()); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/JwtCredentialsWithAudience.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/JwtCredentialsWithAudience.java index a886527698..4456e278e2 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/JwtCredentialsWithAudience.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/JwtCredentialsWithAudience.java @@ -76,4 +76,9 @@ public boolean hasRequestMetadataOnly() { public void refresh() throws IOException { delegate.refresh(); } + + @Override + public String getUniverseDomain() { + return delegate.getUniverseDomain(); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java index 68c66067b1..b53f235d7b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/NameUtil.java @@ -17,6 +17,7 @@ import com.google.api.core.InternalApi; import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; +import com.google.cloud.bigtable.data.v2.models.MaterializedViewId; import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.models.TargetId; import java.util.regex.Matcher; @@ -35,6 +36,8 @@ public class NameUtil { Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)"); private static final Pattern AUTHORIZED_VIEW_PATTERN = Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)/authorizedViews/([^/]+)"); + private static final Pattern MATERIALIZED_VIEW_PATTERN = + Pattern.compile("projects/([^/]+)/instances/([^/]+)/materializedViews/([^/]+)"); public static String formatInstanceName(@Nonnull String projectId, @Nonnull String instanceId) { return "projects/" + projectId + "/instances/" + instanceId; @@ -45,6 +48,11 @@ public static String formatTableName( return formatInstanceName(projectId, instanceId) + "/tables/" + tableId; } + public static String formatTableName( + @Nonnull String projectId, @Nonnull String instanceId, @Nonnull TableId tableId) { + return formatTableName(projectId, instanceId, tableId.getTableId()); + } + public static String formatAuthorizedViewName( @Nonnull String projectId, @Nonnull String instanceId, @@ -53,6 +61,29 @@ public static String formatAuthorizedViewName( return formatTableName(projectId, instanceId, tableId) + "/authorizedViews/" + authorizedViewId; } + public static String formatAuthorizedViewName( + @Nonnull String projectId, + @Nonnull String instanceId, + @Nonnull AuthorizedViewId authorizedViewId) { + return formatTableName(projectId, instanceId, authorizedViewId.getTableId()) + + "/authorizedViews/" + + authorizedViewId.getAuthorizedViewId(); + } + + public static String formatMaterializedViewName( + @Nonnull String projectId, @Nonnull String instanceId, @Nonnull String materializedViewId) { + return formatInstanceName(projectId, instanceId) + "/materializedViews/" + materializedViewId; + } + + public static String formatMaterializedViewName( + @Nonnull String projectId, + @Nonnull String instanceId, + @Nonnull MaterializedViewId materializedViewId) { + return formatInstanceName(projectId, instanceId) + + "/materializedViews/" + + materializedViewId.getMaterializedViewId(); + } + public static String extractTableIdFromTableName(@Nonnull String fullTableName) { Matcher matcher = TABLE_PATTERN.matcher(fullTableName); if (!matcher.matches()) { @@ -88,31 +119,71 @@ public static String extractAuthorizedViewIdFromAuthorizedViewName( return matcher.group(4); } - /** A helper to convert fully qualified tableName and authorizedViewName to a {@link TargetId} */ + public static String extractMaterializedViewIdFromMaterializedViewName( + @Nonnull String fullMaterializedViewName) { + Matcher matcher = MATERIALIZED_VIEW_PATTERN.matcher(fullMaterializedViewName); + if (!matcher.matches()) { + throw new IllegalArgumentException( + "Invalid materialized view name: " + fullMaterializedViewName); + } + return matcher.group(3); + } + + /** A helper to convert fully qualified tableName andauthorizedViewName to a {@link TargetId} */ public static TargetId extractTargetId( @Nonnull String tableName, @Nonnull String authorizedViewName) { - if (tableName.isEmpty() && authorizedViewName.isEmpty()) { + return extractTargetId(tableName, authorizedViewName, ""); + } + + /** + * A helper to convert fully qualified tableName, authorizedViewName and materializedViewName to a + * {@link TargetId} + */ + public static TargetId extractTargetId( + @Nonnull String tableName, + @Nonnull String authorizedViewName, + @Nonnull String materializedViewName) { + if (tableName.isEmpty() && authorizedViewName.isEmpty() && materializedViewName.isEmpty()) { throw new IllegalArgumentException( - "Either table name or authorized view name must be specified. Table name: " + "Either table name, authorized view name or materialized view name must be specified." + + " Table name: " + tableName + ", authorized view name: " - + authorizedViewName); + + authorizedViewName + + ", materialized view name: " + + materializedViewName); + } + int names = 0; + if (!tableName.isEmpty()) { + ++names; + } + if (!authorizedViewName.isEmpty()) { + ++names; + } + if (!materializedViewName.isEmpty()) { + ++names; } - if (!tableName.isEmpty() && !authorizedViewName.isEmpty()) { + if (names > 1) { throw new IllegalArgumentException( - "Table name and authorized view name cannot be specified at the same time. Table name: " + "Only one of table name, authorized view name and materialized view name can be specified" + + " at the same time. Table name: " + tableName + ", authorized view name: " - + authorizedViewName); + + authorizedViewName + + ", materialized view name: " + + materializedViewName); } if (!tableName.isEmpty()) { String tableId = extractTableIdFromTableName(tableName); return TableId.of(tableId); - } else { + } else if (!authorizedViewName.isEmpty()) { String tableId = extractTableIdFromAuthorizedViewName(authorizedViewName); String authorizedViewId = extractAuthorizedViewIdFromAuthorizedViewName(authorizedViewName); return AuthorizedViewId.of(tableId, authorizedViewId); } + String materializedViewId = + extractMaterializedViewIdFromMaterializedViewName(materializedViewName); + return MaterializedViewId.of(materializedViewId); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequest.java new file mode 100644 index 0000000000..0a330d32c6 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequest.java @@ -0,0 +1,59 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.Type; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import java.util.HashMap; +import java.util.Map; + +/** + * Internal representation of PrepareQueryRequest that handles conversion from user-facing types to + * proto. + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +@AutoValue +public abstract class PrepareQueryRequest { + + public abstract String query(); + + public abstract Map> paramTypes(); + + public static PrepareQueryRequest create(String query, Map> paramTypes) { + return new AutoValue_PrepareQueryRequest(query, paramTypes); + } + + public com.google.bigtable.v2.PrepareQueryRequest toProto(RequestContext requestContext) { + HashMap protoParamTypes = new HashMap<>(paramTypes().size()); + for (Map.Entry> entry : paramTypes().entrySet()) { + Type proto = QueryParamUtil.convertToQueryParamProto(entry.getValue()); + protoParamTypes.put(entry.getKey(), proto); + } + + return com.google.bigtable.v2.PrepareQueryRequest.newBuilder() + .setInstanceName( + NameUtil.formatInstanceName( + requestContext.getProjectId(), requestContext.getInstanceId())) + .setAppProfileId(requestContext.getAppProfileId()) + .setQuery(query()) + .putAllParamTypes(protoParamTypes) + .build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareResponse.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareResponse.java new file mode 100644 index 0000000000..35247e2dc9 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PrepareResponse.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.PrepareQueryResponse; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.protobuf.ByteString; +import java.time.Instant; + +/** + * Wrapper for results of a PrepareQuery call. + * + *

    This should only be managed by {@link + * com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement}, and never used directly by users + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +@AutoValue +public abstract class PrepareResponse { + public abstract ResultSetMetadata resultSetMetadata(); + + public abstract ByteString preparedQuery(); + + public abstract Instant validUntil(); + + public static PrepareResponse fromProto(PrepareQueryResponse proto) { + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(proto.getMetadata()); + Instant validUntil = TimestampUtil.toInstant(proto.getValidUntil()); + return new AutoValue_PrepareResponse(metadata, proto.getPreparedQuery(), validUntil); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImpl.java new file mode 100644 index 0000000000..ea0de5bf8f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImpl.java @@ -0,0 +1,285 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.util.concurrent.Futures; +import java.time.Duration; +import java.time.Instant; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicReference; + +/** + * Implementation of PreparedStatement that handles PreparedQuery refresh. + * + *

    This allows for both hard refresh and background refresh of the current PreparedQueryData. + * When the server returns an error indicating that a plan is expired, hardRefresh should be used. + * Otherwise this will handle updating the PreparedQuery in the background, whenever it is accessed + * within one second of expiry. + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +public class PreparedStatementImpl implements PreparedStatement { + // Time before plan expiry to trigger background refresh + private static final Duration EXPIRY_REFRESH_WINDOW = Duration.ofSeconds(1L); + private final AtomicReference currentState; + private final Map> paramTypes; + private final PrepareQueryRequest prepareRequest; + private final EnhancedBigtableStub stub; + + @VisibleForTesting + protected PreparedStatementImpl( + PrepareResponse response, + Map> paramTypes, + PrepareQueryRequest request, + EnhancedBigtableStub stub) { + this.currentState = new AtomicReference<>(PrepareQueryState.createInitialState(response)); + this.paramTypes = paramTypes; + this.prepareRequest = request; + this.stub = stub; + } + + public static PreparedStatement create( + PrepareResponse response, + Map> paramTypes, + PrepareQueryRequest request, + EnhancedBigtableStub stub) { + return new PreparedStatementImpl(response, paramTypes, request, stub); + } + + @Override + public BoundStatement.Builder bind() { + return new BoundStatement.Builder(this, paramTypes); + } + + /** + * Asserts that the given stub matches the stub used for plan refresh. This is necessary to ensure + * that the request comes from the same client and uses the same configuration. We enforce this + * make sure plan refresh will continue to work as expected throughout the lifecycle of + * executeQuery requests. + */ + public void assertUsingSameStub(EnhancedBigtableStub stub) { + Preconditions.checkArgument( + this.stub == stub, + "executeQuery must be called from the same client instance that created the" + + " PreparedStatement being used."); + } + + /** + * When the client receives an error indicating the current plan has expired, it should call + * immediate refresh with the version of the expired plan. UID is used to handle concurrent + * refresh without making duplicate calls. + * + * @param expiredPreparedQueryVersion version of the PreparedQuery used to make the request that + * triggered immediate refresh + * @return refreshed PreparedQuery to use for retry. + */ + public synchronized PreparedQueryData markExpiredAndStartRefresh( + PreparedQueryVersion expiredPreparedQueryVersion) { + PrepareQueryState localState = this.currentState.get(); + // Check if the expired plan is the current plan. If it's not, then the plan has already + // been refreshed by another thread. + if (!(localState.current().version() == expiredPreparedQueryVersion)) { + return localState.current(); + } + startBackgroundRefresh(expiredPreparedQueryVersion); + // Immediately promote the refresh we just started + return promoteBackgroundRefreshingPlan(expiredPreparedQueryVersion); + } + + private synchronized PreparedQueryData promoteBackgroundRefreshingPlan( + PreparedQueryVersion expiredPreparedQueryVersion) { + PrepareQueryState localState = this.currentState.get(); + // If the expired plan has already been removed, return the current plan + if (!(localState.current().version() == expiredPreparedQueryVersion)) { + return localState.current(); + } + // There is a chance that the background plan could be expired if the PreparedStatement + // isn't used for a long time. It will be refreshed on the next retry if necessary. + PrepareQueryState nextState = localState.promoteBackgroundPlan(); + this.currentState.set(nextState); + return nextState.current(); + } + + /** + * If planNearExpiry is still the latest plan, and there is no ongoing background refresh, start a + * background refresh. Otherwise, refresh has already been triggered for this plan, so do nothing. + */ + private synchronized void startBackgroundRefresh(PreparedQueryVersion planVersionNearExpiry) { + PrepareQueryState localState = this.currentState.get(); + // We've already updated the plan we are triggering refresh based on + if (!(localState.current().version() == planVersionNearExpiry)) { + return; + } + // Another thread already started the refresh + if (localState.maybeBackgroundRefresh().isPresent()) { + return; + } + ApiFuture nextPlanFuture = getFreshPlan(); + PrepareQueryState withRefresh = localState.withBackgroundPlan(nextPlanFuture); + this.currentState.set(withRefresh); + } + + ApiFuture getFreshPlan() { + return this.stub.prepareQueryCallable().futureCall(this.prepareRequest); + } + + /** + * Check the expiry of the current plan, if it's future is resolved. If we are within 1s of + * expiry, call startBackgroundRefresh with the version of the latest PrepareQuery. + */ + void backgroundRefreshIfNeeded() { + PrepareQueryState localState = this.currentState.get(); + if (localState.maybeBackgroundRefresh().isPresent()) { + // We already have an ongoing refresh + return; + } + PreparedQueryData currentPlan = localState.current(); + // Can't access ttl until the current prepare future has resolved + if (!currentPlan.prepareFuture().isDone()) { + return; + } + try { + // Trigger a background refresh if within 1 second of TTL + Instant currentPlanExpireTime = Futures.getDone(currentPlan.prepareFuture()).validUntil(); + Instant backgroundRefreshTime = currentPlanExpireTime.minus(EXPIRY_REFRESH_WINDOW); + if (Instant.now().isAfter(backgroundRefreshTime)) { + // Initiate a background refresh. startBackgroundRefresh handles deduplication. + startBackgroundRefresh(currentPlan.version()); + } + } catch (ExecutionException | CancellationException e) { + // Do nothing if we can't get the future result, a refresh will be done when it's actually + // needed, or during the next call to this method + } + } + + /** + * Returns the most recently refreshed PreparedQueryData. It may still be refreshing if the + * previous plan has expired. + */ + public PreparedQueryData getLatestPrepareResponse() { + PrepareQueryState localState = currentState.get(); + if (localState.maybeBackgroundRefresh().isPresent() + && localState.maybeBackgroundRefresh().get().prepareFuture().isDone()) { + // TODO: consider checking if background plan has already expired and triggering + // a new refresh if so. Right now we are ok with attempting a request w an expired + // plan + + // Current background refresh has completed, so we should make it the current plan. + // promoteBackgroundRefreshingPlan handles duplicate calls. + return promoteBackgroundRefreshingPlan(localState.current().version()); + } else { + backgroundRefreshIfNeeded(); + return localState.current(); + } + } + + /** + * Used to compare different versions of a PreparedQuery by comparing reference equality. + * + *

    This is considered an internal implementation detail and not meant to be used by + * applications. + */ + @InternalApi("For internal use only") + public static class PreparedQueryVersion {} + + /** + * Manages the data around the latest prepared query + * + *

    This is considered an internal implementation detail and not meant to be used by + * applications. + */ + @InternalApi("For internal use only") + @AutoValue + public abstract static class PreparedQueryData { + /** + * Unique identifier for each version of a PreparedQuery. Changes each time the plan is + * refreshed + */ + public abstract PreparedQueryVersion version(); + + /** + * A future holding the prepareResponse. It will never fail, so the caller is responsible for + * timing out requests based on the retry settings of the execute query request + */ + public abstract ApiFuture prepareFuture(); + + public static PreparedQueryData create(ApiFuture prepareFuture) { + return new AutoValue_PreparedStatementImpl_PreparedQueryData( + new PreparedQueryVersion(), prepareFuture); + } + } + + /** + * Encapsulates the state needed to for PreparedStatementImpl. This is both the latest + * PrepareQuery response and, when present, any ongoing background refresh. + * + *

    This is stored together because it is accessed concurrently. This makes it easy to reason + * about and mutate the state atomically. + */ + @AutoValue + abstract static class PrepareQueryState { + /** The data representing the latest PrepareQuery response */ + abstract PreparedQueryData current(); + + /** An Optional, that if present represents an ongoing background refresh attempt */ + abstract Optional maybeBackgroundRefresh(); + + /** Creates a fresh state, using initialPlan as current, with no backgroundRefresh */ + static PrepareQueryState createInitialState(PrepareResponse initialPlan) { + PreparedQueryData initialData = + PreparedQueryData.create(ApiFutures.immediateFuture(initialPlan)); + return new AutoValue_PreparedStatementImpl_PrepareQueryState(initialData, Optional.empty()); + } + + /** + * Returns a new state with the same current PreparedQueryData, using the given PrepareResponse + * future to add a backgroundRefresh + */ + PrepareQueryState withBackgroundPlan(ApiFuture backgroundPlan) { + return new AutoValue_PreparedStatementImpl_PrepareQueryState( + current(), Optional.of(PreparedQueryData.create(backgroundPlan))); + } + + /** + * Returns a new state with the background plan promoted to current, and without a new + * background refresh. This should be used to update the state once a backgroundRefresh has + * completed. + */ + PrepareQueryState promoteBackgroundPlan() { + if (maybeBackgroundRefresh().isPresent()) { + return new AutoValue_PreparedStatementImpl_PrepareQueryState( + maybeBackgroundRefresh().get(), Optional.empty()); + } + // We don't expect this to happen, but if so returning the current plan allows retry on + // subsequent attempts + return this; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadata.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadata.java index 36bbdf5008..45542d96e6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadata.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ProtoResultSetMetadata.java @@ -22,6 +22,7 @@ import com.google.cloud.bigtable.data.v2.models.sql.ColumnMetadata; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import java.util.List; @@ -94,4 +95,9 @@ public boolean equals(@Nullable Object other) { } return false; } + + @Override + public int hashCode() { + return Objects.hashCode(columns); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtil.java new file mode 100644 index 0000000000..439f8f7205 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtil.java @@ -0,0 +1,98 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.Type; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType.Array; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType.Code; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Helper to convert SqlTypes to protobuf query parameter representation + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +public class QueryParamUtil { + private static final Type STRING_TYPE = + Type.newBuilder().setStringType(Type.String.getDefaultInstance()).build(); + private static final Type BYTES_TYPE = + Type.newBuilder().setBytesType(Type.Bytes.getDefaultInstance()).build(); + private static final Type INT64_TYPE = + Type.newBuilder().setInt64Type(Type.Int64.getDefaultInstance()).build(); + private static final Type FLOAT32_TYPE = + Type.newBuilder().setFloat32Type(Type.Float32.getDefaultInstance()).build(); + private static final Type FLOAT64_TYPE = + Type.newBuilder().setFloat64Type(Type.Float64.getDefaultInstance()).build(); + private static final Type BOOL_TYPE = + Type.newBuilder().setBoolType(Type.Bool.getDefaultInstance()).build(); + private static final Type TIMESTAMP_TYPE = + Type.newBuilder().setTimestampType(Type.Timestamp.getDefaultInstance()).build(); + private static final Type DATE_TYPE = + Type.newBuilder().setDateType(Type.Date.getDefaultInstance()).build(); + + private static final Set VALID_ARRAY_ELEMENT_TYPES = + new HashSet<>( + Arrays.asList( + Code.STRING, + Code.BYTES, + Code.INT64, + Code.FLOAT64, + Code.FLOAT32, + Code.BOOL, + Code.TIMESTAMP, + Code.DATE)); + + public static Type convertToQueryParamProto(SqlType sqlType) { + switch (sqlType.getCode()) { + case BYTES: + return BYTES_TYPE; + case STRING: + return STRING_TYPE; + case INT64: + return INT64_TYPE; + case FLOAT64: + return FLOAT64_TYPE; + case FLOAT32: + return FLOAT32_TYPE; + case BOOL: + return BOOL_TYPE; + case TIMESTAMP: + return TIMESTAMP_TYPE; + case DATE: + return DATE_TYPE; + case STRUCT: + throw new IllegalArgumentException("STRUCT is not a supported query parameter type"); + case MAP: + throw new IllegalArgumentException("MAP is not a supported query parameter type"); + case ARRAY: + SqlType.Array arrayType = (Array) sqlType; + if (!VALID_ARRAY_ELEMENT_TYPES.contains(arrayType.getElementType().getCode())) { + throw new IllegalArgumentException( + "Unsupported query parameter Array element type: " + arrayType.getElementType()); + } + Type elementType = convertToQueryParamProto(arrayType.getElementType()); + Type.Array arrayProto = Type.Array.newBuilder().setElementType(elementType).build(); + return Type.newBuilder().setArrayType(arrayProto).build(); + default: + throw new IllegalArgumentException("Unsupported Query parameter type: " + sqlType); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RegexUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RegexUtil.java index c348ec7408..00cebcf462 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RegexUtil.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RegexUtil.java @@ -33,13 +33,14 @@ */ @InternalApi public final class RegexUtil { - private static final byte[] NULL_BYTES = "\\x00".getBytes(); + private static final byte[] NULL_BYTES = {0}; private RegexUtil() {} public static String literalRegex(final String value) { return literalRegex(ByteString.copyFromUtf8(value)).toStringUtf8(); } + /** Converts the value to a quoted regular expression. */ public static ByteString literalRegex(ByteString value) { ByteString.Output output = ByteString.newOutput(value.size() * 2); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java index fc015186aa..7058ae137c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RequestContext.java @@ -17,6 +17,7 @@ import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; import java.io.Serializable; /** @@ -33,6 +34,13 @@ @AutoValue public abstract class RequestContext implements Serializable { + public static RequestContext create(ClientInfo clientInfo) { + return create( + clientInfo.getInstanceName().getProjectId(), + clientInfo.getInstanceName().getInstanceId(), + clientInfo.getAppProfileId()); + } + /** Creates a new instance of the {@link RequestContext}. */ public static RequestContext create(String projectId, String instanceId, String appProfileId) { return new AutoValue_RequestContext(projectId, instanceId, appProfileId); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java index 1d2bd37f2d..77bc0ebd6b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImpl.java @@ -27,11 +27,14 @@ import com.google.cloud.bigtable.data.v2.models.sql.StructReader; import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream; import com.google.common.base.Preconditions; +import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; +import com.google.protobuf.ProtocolMessageEnum; +import java.time.Instant; import java.util.Iterator; import java.util.List; import java.util.Map; -import org.threeten.bp.Instant; +import java.util.function.Function; /** * The primary implementation of a ResultSet. @@ -215,4 +218,28 @@ public Map getMap(int columnIndex, SqlType.Map mapType) { public Map getMap(String columnName, SqlType.Map mapType) { return getCurrentRow().getMap(columnName, mapType); } + + @Override + public EnumType getProtoEnum( + int columnIndex, Function forNumber) { + return getCurrentRow().getProtoEnum(columnIndex, forNumber); + } + + @Override + public EnumType getProtoEnum( + String columnName, Function forNumber) { + return getCurrentRow().getProtoEnum(columnName, forNumber); + } + + @Override + public MsgType getProtoMessage( + int columnIndex, MsgType message) { + return getCurrentRow().getProtoMessage(columnIndex, message); + } + + @Override + public MsgType getProtoMessage( + String columnName, MsgType message) { + return getCurrentRow().getProtoMessage(columnName, message); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtil.java index 68f81cc56f..2c4ce914bb 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtil.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtil.java @@ -49,6 +49,36 @@ public final class RowSetUtil { private RowSetUtil() {} + /** Removes the {@code #excludePoint} rowkey from the {@code RowSet} */ + public static RowSet eraseLargeRow(RowSet rowSet, ByteString excludePoint) { + + RowSet.Builder newRowSet = RowSet.newBuilder(); + + if (rowSet.getRowKeysList().isEmpty() && rowSet.getRowRangesList().isEmpty()) { + // querying range (, excludePoint) and (excludePoint, ) + newRowSet.addRowRanges(RowRange.newBuilder().setEndKeyOpen(excludePoint).build()); + newRowSet.addRowRanges(RowRange.newBuilder().setStartKeyOpen(excludePoint).build()); + } + + // remove large row key from point reads + rowSet.getRowKeysList().stream() + .filter(k -> !k.equals(excludePoint)) + .forEach(newRowSet::addRowKeys); + + // Handle ranges + for (RowRange rowRange : rowSet.getRowRangesList()) { + List afterSplit = splitOnLargeRowKey(rowRange, excludePoint); + if (!afterSplit.isEmpty()) { + afterSplit.forEach(newRowSet::addRowRanges); + } + } + + if (newRowSet.getRowKeysList().isEmpty() && newRowSet.getRowRangesList().isEmpty()) { + return null; + } + return newRowSet.build(); + } + /** * Removes all the keys and range parts that fall on or before the splitPoint. * @@ -125,6 +155,51 @@ private static RowRange truncateRange(RowRange range, ByteString split, boolean return newRange.build(); } + /** This method erases the {@code #split} key from the range */ + private static List splitOnLargeRowKey(RowRange range, ByteString largeRowKey) { + List rowRanges = new ArrayList<>(); + + ByteString startKey = StartPoint.extract(range).value; + ByteString endKey = EndPoint.extract(range).value; + + // Empty endKey means it's unbounded + boolean boundedEnd = !endKey.isEmpty(); + + // if end key is on the left of large row key, don't split. + if (boundedEnd && ByteStringComparator.INSTANCE.compare(endKey, largeRowKey) < 0) { + rowRanges.add(range); + return rowRanges; + } + + // if start key is on the right of the large row key, don't split + if (ByteStringComparator.INSTANCE.compare(startKey, largeRowKey) > 0) { + rowRanges.add(range); + return rowRanges; + } + + // if start key is on the left of the large row key, set the end key to be large row key open + if (ByteStringComparator.INSTANCE.compare(startKey, largeRowKey) < 0) { + RowRange beforeSplit = range.toBuilder().setEndKeyOpen(largeRowKey).build(); + rowRanges.add(beforeSplit); + } + + // if the end key is on the right of the large row key, set the start key to be large row key + // open. + if (!boundedEnd || ByteStringComparator.INSTANCE.compare(endKey, largeRowKey) > 0) { + // handle the edge case where (key, key\0) is an empty range and should be excluded + ByteString nextKey = largeRowKey.concat(ByteString.copyFrom(new byte[] {0})); + EndPoint endPoint = EndPoint.extract(range); + boolean isEmptyRange = !endPoint.isClosed && endPoint.value.equals(nextKey); + + if (!isEmptyRange) { + RowRange afterSplit = range.toBuilder().setStartKeyOpen(largeRowKey).build(); + rowRanges.add(afterSplit); + } + } + + return rowRanges; + } + /** * Splits the provided {@link RowSet} into segments partitioned by the provided {@code * splitPoints}. The split points will be treated as start keys of the segments. The primary diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil.java index edb8cf6dcf..90631f3bbd 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtil.java @@ -18,6 +18,7 @@ import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.bigtable.v2.ResultSetMetadata; import com.google.cloud.bigtable.data.v2.stub.sql.SqlRowMerger; import com.google.common.collect.ImmutableList; import java.util.List; @@ -33,8 +34,8 @@ public class SqlRowMergerUtil implements AutoCloseable { private final SqlRowMerger merger; - public SqlRowMergerUtil() { - merger = new SqlRowMerger(); + public SqlRowMergerUtil(ResultSetMetadata metadata) { + merger = new SqlRowMerger(() -> ProtoResultSetMetadata.fromProto(metadata)); } @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TableAdminRequestContext.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TableAdminRequestContext.java new file mode 100644 index 0000000000..05554425b4 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TableAdminRequestContext.java @@ -0,0 +1,46 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import java.io.Serializable; + +/** + * Contains information necessary to construct Bigtable protobuf requests from user facing models. + * + *

    The intention is to extract repetitive details like instance names into a configurable values + * in {@link com.google.cloud.bigtable.data.v2.BigtableDataSettings} and expose them (via this + * class) to each wrapper's toProto method. + * + *

    This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +@AutoValue +public abstract class TableAdminRequestContext implements Serializable { + + /** Creates a new instance of the {@link TableAdminRequestContext}. */ + public static TableAdminRequestContext create(String projectId, String instanceId) { + return new AutoValue_TableAdminRequestContext(projectId, instanceId); + } + + /** The project id that the client is configured to target. */ + public abstract String getProjectId(); + + /** The instance id that the client is configured to target. */ + public abstract String getInstanceId(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtil.java new file mode 100644 index 0000000000..d659e03c2c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtil.java @@ -0,0 +1,28 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import com.google.api.core.InternalApi; +import com.google.protobuf.Timestamp; +import java.time.Instant; + +/** For internal use only. Utility for converting proto timestamps to appropriate Java types. */ +@InternalApi("For internal use only") +public class TimestampUtil { + public static Instant toInstant(Timestamp timestamp) { + return Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos()); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewAsync.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewAsync.java new file mode 100644 index 0000000000..3edacf7766 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewAsync.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import java.io.Closeable; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; + +public class AuthorizedViewAsync implements AutoCloseable, Closeable { + + private final TableBase base; + + static AuthorizedViewAsync createAndStart( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + String tableId, + String viewId, + Permission permission, + Metrics metrics, + ScheduledExecutorService executorService) { + + AuthorizedViewName viewName = + AuthorizedViewName.builder() + .setProjectId(clientInfo.getInstanceName().getProjectId()) + .setInstanceId(clientInfo.getInstanceName().getInstanceId()) + .setTableId(tableId) + .setAuthorizedViewId(viewId) + .build(); + + OpenAuthorizedViewRequest openRequest = + OpenAuthorizedViewRequest.newBuilder() + .setAuthorizedViewName(viewName.toString()) + .setAppProfileId(clientInfo.getAppProfileId()) + .setPermission(permission) + .build(); + + TableBase base = + TableBase.createAndStart( + openRequest, + VRpcDescriptor.AUTHORIZED_VIEW_SESSION, + VRpcDescriptor.READ_ROW_AUTH_VIEW, + VRpcDescriptor.MUTATE_ROW_AUTH_VIEW, + featureFlags, + clientInfo, + configManager, + channelPool, + callOptions, + viewName.toString(), + metrics, + executorService); + + return new AuthorizedViewAsync(base); + } + + AuthorizedViewAsync(TableBase viewBase) { + this.base = viewBase; + } + + public SessionPool getSessionPool() { + return base.getSessionPool(); + } + + public CompletableFuture readRow( + SessionReadRowRequest req, Deadline deadline) { + UnaryResponseFuture f = new UnaryResponseFuture<>(); + base.readRow(req, f, deadline); + return f; + } + + public CompletableFuture mutateRow( + SessionMutateRowRequest req, Deadline deadline) { + UnaryResponseFuture f = new UnaryResponseFuture<>(); + base.mutateRow(req, f, deadline); + return f; + } + + @Override + public void close() { + this.base.close(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewName.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewName.java new file mode 100644 index 0000000000..dd90a70683 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewName.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auto.value.AutoValue; +import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; +import java.util.List; + +@AutoValue +public abstract class AuthorizedViewName { + + public abstract String getProjectId(); + + public abstract String getInstanceId(); + + public abstract String getTableId(); + + public abstract String getAuthorizedViewId(); + + public InstanceName getInstanceName() { + return InstanceName.builder() + .setProjectId(getProjectId()) + .setInstanceId(getInstanceId()) + .build(); + } + + public TableName getTableName() { + return TableName.builder() + .setProjectId(getProjectId()) + .setInstanceId(getInstanceId()) + .setTableId(getTableId()) + .build(); + } + + @Override + public final String toString() { + return String.format("%s/authorizedViews/%s", getTableName(), getAuthorizedViewId()); + } + + public static AuthorizedViewName of( + String projectId, String instanceId, String tableId, String viewId) { + return builder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .setTableId(tableId) + .setAuthorizedViewId(viewId) + .build(); + } + + public static Builder builder() { + return new AutoValue_AuthorizedViewName.Builder(); + } + + public static AuthorizedViewName parse(String name) { + List parts = Splitter.on('/').splitToList(name); + Preconditions.checkArgument(parts.size() == 8, "Invalid authorized view name: %s", name); + Preconditions.checkArgument( + "projects".equals(parts.get(0)), + "Invalid authorized view name: %s, must start with projects/", + name); + Preconditions.checkArgument( + !parts.get(1).isEmpty(), "Invalid authorized view name %s, must have a project id", name); + Preconditions.checkArgument( + "instances".equals(parts.get(2)), + "Invalid authorized view name: %s, must start with projects/$PROJECT_ID/instances/", + name); + Preconditions.checkArgument( + !parts.get(3).isEmpty(), "Invalid authorized view name %s, must have an instance id", name); + Preconditions.checkArgument( + "tables".equals(parts.get(4)), + "Invalid authorized view name: %s, must start with" + + " projects/$PROJECT_ID/instances/$INSTANCE_ID/tables", + name); + Preconditions.checkArgument( + !parts.get(5).isEmpty(), "Invalid authorized view name %s, must have table id", name); + Preconditions.checkArgument( + "authorizedViews".equals(parts.get(6)), + "Invalid authorized view name: %s, must start with" + + " projects/$PROJECT_ID/instances/$INSTANCE_ID/tables/$TABLE_ID/authorizedViews", + name); + Preconditions.checkArgument( + !parts.get(7).isEmpty(), + "Invalid authorized view name %s, must have authorized view id", + name); + + return builder() + .setProjectId(parts.get(1)) + .setInstanceId(parts.get(3)) + .setTableId(parts.get(5)) + .setAuthorizedViewId(parts.get(7)) + .build(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setProjectId(String projectId); + + public abstract Builder setInstanceId(String instanceId); + + public abstract Builder setTableId(String tableId); + + public abstract Builder setAuthorizedViewId(String viewId); + + public abstract AuthorizedViewName build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ChannelProviders.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ChannelProviders.java new file mode 100644 index 0000000000..945e08ab47 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ChannelProviders.java @@ -0,0 +1,319 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auth.Credentials; +import com.google.auth.oauth2.GoogleCredentials; +import com.google.bigtable.v2.FeatureFlags; +import com.google.cloud.bigtable.data.v2.internal.channels.DirectPathIpInterceptor; +import com.google.common.base.MoreObjects; +import com.google.common.base.MoreObjects.ToStringHelper; +import com.google.common.collect.ImmutableList; +import io.grpc.ChannelCredentials; +import io.grpc.CompositeChannelCredentials; +import io.grpc.Grpc; +import io.grpc.ManagedChannelBuilder; +import io.grpc.TlsChannelCredentials; +import io.grpc.alts.AltsChannelCredentials; +import io.grpc.alts.GoogleDefaultChannelCredentials; +import io.grpc.auth.MoreCallCredentials; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.Random; +import java.util.function.Function; + +public abstract class ChannelProviders { + public static final String DEFAULT_HOST = "bigtable.googleapis.com"; + + public interface ChannelProvider { + + ManagedChannelBuilder newChannelBuilder(); + + Optional getFallback(); + + FeatureFlags updateFeatureFlags(FeatureFlags featureFlags); + + boolean isSingleEndpoint(); + } + + public static class CloudPath implements ChannelProvider { + private final String host; + private final int port; + private final ChannelCredentials credentials; + + public CloudPath(String endpoint) throws IOException { + this(endpoint, GoogleCredentials.getApplicationDefault()); + } + + public CloudPath(String endpoint, Credentials credentials) { + this.credentials = + CompositeChannelCredentials.create( + TlsChannelCredentials.create(), MoreCallCredentials.from(credentials)); + String host = endpoint; + int port = 443; + + int sepI = endpoint.lastIndexOf(":"); + if (sepI > 0) { + host = endpoint.substring(0, sepI); + port = Integer.parseInt(endpoint.substring(sepI + 1)); + } + this.host = host; + this.port = port; + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + return Grpc.newChannelBuilderForAddress(host, port, credentials); + } + + @Override + public boolean isSingleEndpoint() { + return false; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .addValue(String.format("%s:%d", host, port)) + .toString(); + } + + @Override + public Optional getFallback() { + return Optional.empty(); + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags; + } + } + + public static class DirectAccess implements ChannelProvider { + private final String endpoint; + private final ChannelCredentials credentials; + private final Optional fallback; + + public DirectAccess(String endpoint) throws IOException { + this(endpoint, GoogleCredentials.getApplicationDefault()); + } + + public DirectAccess(String endpoint, Credentials credentials) { + this(endpoint, credentials, Optional.empty()); + } + + private DirectAccess( + String endpoint, Credentials credentials, Optional fallback) { + this.endpoint = endpoint; + this.credentials = + GoogleDefaultChannelCredentials.newBuilder() + .callCredentials(MoreCallCredentials.from(credentials)) + .build(); + this.fallback = fallback; + } + + public static DirectAccess withFallback(String endpoint) throws IOException { + return DirectAccess.withFallback(endpoint, GoogleCredentials.getApplicationDefault()); + } + + public static DirectAccess withFallback(String endpoint, Credentials credentials) { + Optional fallback = Optional.of(new CloudPath(endpoint, credentials)); + return new DirectAccess(endpoint, credentials, fallback); + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + return Grpc.newChannelBuilder("google-c2p:///" + endpoint, credentials) + .intercept(new DirectPathIpInterceptor(true)); + } + + public String getEndpoint() { + return endpoint; + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags.toBuilder() + .setTrafficDirectorEnabled(true) + .setDirectAccessRequested(true) + .build(); + } + + @Override + public boolean isSingleEndpoint() { + return false; + } + + @Override + public Optional getFallback() { + return fallback; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this).addValue(endpoint).toString(); + } + } + + public static class RawDirectPath implements ChannelProvider { + private final List endpoints; + ChannelCredentials credentials; + + public RawDirectPath(List endpoints) throws IOException { + this(endpoints, GoogleCredentials.getApplicationDefault()); + } + + public RawDirectPath(List endpoints, Credentials credentials) { + this.endpoints = ImmutableList.copyOf(endpoints); + this.credentials = + CompositeChannelCredentials.create( + AltsChannelCredentials.create(), MoreCallCredentials.from(credentials)); + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + int endpointI = new Random().nextInt(endpoints.size()); + String endpoint = endpoints.get(endpointI); + int portSplit = endpoint.lastIndexOf(":"); + String host = endpoint.substring(0, portSplit); + int port = Integer.parseInt(endpoint.substring(portSplit + 1)); + + return Grpc.newChannelBuilderForAddress(host, port, credentials); + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags.toBuilder().setDirectAccessRequested(true).build(); + } + + @Override + public boolean isSingleEndpoint() { + return endpoints.size() <= 1; + } + + @Override + public String toString() { + ToStringHelper stringHelper = MoreObjects.toStringHelper(this); + endpoints.forEach(stringHelper::addValue); + return stringHelper.toString(); + } + + @Override + public Optional getFallback() { + return Optional.empty(); + } + } + + public static class EmulatorChannelProvider implements ChannelProvider { + + private final String host; + private final int port; + + public EmulatorChannelProvider(String host, int port) { + this.host = host; + this.port = port; + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + return ManagedChannelBuilder.forAddress(host, port).usePlaintext(); + } + + @Override + public boolean isSingleEndpoint() { + return true; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .addValue(String.format("%s:%d", host, port)) + .toString(); + } + + @Override + public Optional getFallback() { + return Optional.empty(); + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags; + } + } + + public static class ForwardingChannelProvider implements ChannelProvider { + private final ChannelProvider delegate; + + public ForwardingChannelProvider(ChannelProvider delegate) { + this.delegate = delegate; + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + return delegate.newChannelBuilder(); + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return delegate.updateFeatureFlags(featureFlags); + } + + @Override + public boolean isSingleEndpoint() { + return delegate.isSingleEndpoint(); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this).addValue(delegate).toString(); + } + + @Override + public Optional getFallback() { + return delegate.getFallback(); + } + } + + /** + * ConfiguredChannelProvider is responsible for applying a custom options to the channel builder. + * It is meant to be used only during client construction phase and not during client + * configuration phase. + */ + public static class ConfiguredChannelProvider extends ForwardingChannelProvider { + private final Function, ManagedChannelBuilder> configurator; + + public ConfiguredChannelProvider( + ChannelProvider delegate, + Function, ManagedChannelBuilder> configurator) { + super(delegate); + this.configurator = configurator; + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + return configurator.apply(super.newChannelBuilder()); + } + + @Override + public Optional getFallback() { + return super.getFallback() + .flatMap(cb -> Optional.of(new ConfiguredChannelProvider(cb, configurator))); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Client.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Client.java new file mode 100644 index 0000000000..82ddff08c3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Client.java @@ -0,0 +1,284 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.api.gax.tracing.BaseApiTracerFactory; +import com.google.auth.oauth2.GoogleCredentials; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenMaterializedViewRequest; +import com.google.bigtable.v2.OpenTableRequest.Permission; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ConfiguredChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SwitchingChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricsImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import io.grpc.CallOptions; +import io.opencensus.stats.Stats; +import io.opencensus.tags.Tags; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import java.io.IOException; +import java.util.Collections; +import java.util.Set; +import java.util.WeakHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +public class Client implements AutoCloseable { + public static final FeatureFlags BASE_FEATURE_FLAGS = + FeatureFlags.newBuilder() + .setReverseScans(false) + .setMutateRowsRateLimit(false) + .setMutateRowsRateLimit2(false) + .setLastScannedRowResponses(false) + .setRoutingCookie(true) + .setRetryInfo(true) + .setClientSideMetricsEnabled(true) + // These are set by the channel provider + // .setTrafficDirectorEnabled(true) + // .setDirectAccessRequested(true) + .setPeerInfo(true) + .setSessionsCompatible(true) + .build(); + // gRPC keep-alive interval 60 seconds. + public static final int KEEPALIVE_TIME_MS = 60000; + // gRPC keep-alive timeout 10 seconds. + public static final int KEEPALIVE_TIMEOUT_MS = 10000; + + private final FeatureFlags featureFlags; + private final ClientInfo clientInfo; + private final Resource backgroundExecutor; + + private final CallOptions defaultCallOptions; + private final ChannelPool channelPool; + private final Resource metrics; + private final Resource configManager; + + private final Set> sessionPools = Collections.newSetFromMap(new WeakHashMap<>()); + + public static Client create(ClientSettings settings) throws IOException { + FeatureFlags featureFlags = + settings.getChannelProvider().updateFeatureFlags(BASE_FEATURE_FLAGS); + + ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(settings.getInstanceName()) + .setAppProfileId(settings.getAppProfileId()) + .build(); + + ScheduledExecutorService backgroundExecutor = Executors.newScheduledThreadPool(4); + + // TODO: compat layer: get this from settings + String universeDomain = "googleapis.com"; + + Metrics metrics; + if (settings.getChannelProvider() instanceof ChannelProviders.EmulatorChannelProvider) { + metrics = new NoopMetrics(); + } else { + GoogleCredentials credentials = GoogleCredentials.getApplicationDefault(); + MetricRegistry registry = new MetricRegistry(); + OpenTelemetrySdk otel = + MetricsImpl.createBuiltinOtel( + registry, clientInfo, credentials, null, universeDomain, backgroundExecutor); + metrics = + new MetricsImpl( + registry, + clientInfo, + BaseApiTracerFactory.getInstance(), + otel, + null, + Tags.getTagger(), + Stats.getStatsRecorder(), + backgroundExecutor); + metrics.start(); + } + + ClientConfigurationManager configManager = null; + + try { + configManager = + new ClientConfigurationManager( + featureFlags, + clientInfo, + settings.getChannelProvider(), + metrics.getDebugTagTracer(), + backgroundExecutor); + configManager.start().get(); + metrics.getDebugTagTracer().setClientConfigurationManager(configManager); + } catch (Exception e) { + if (e instanceof InterruptedException) { + Thread.currentThread().interrupt(); + } + if (configManager != null) { + configManager.close(); + } + metrics.close(); + backgroundExecutor.shutdown(); + throw new RuntimeException("Failed to fetch initial config", e); + } + + if (configManager.areSessionsRequired()) { + featureFlags = featureFlags.toBuilder().setSessionsCompatible(true).build(); + } + + return new Client( + featureFlags, + clientInfo, + settings.getChannelProvider(), + Resource.createOwned(metrics, metrics::close), + Resource.createOwned(configManager, configManager::close), + Resource.createOwned(backgroundExecutor, backgroundExecutor::shutdown)); + } + + public Client( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ChannelProvider channelProvider, + Resource metrics, + Resource configManager, + Resource bgExecutor) + throws IOException { + this.featureFlags = featureFlags; + this.clientInfo = clientInfo; + this.metrics = metrics; + this.configManager = configManager; + this.backgroundExecutor = bgExecutor; + + defaultCallOptions = CallOptions.DEFAULT; + + ChannelProvider configuredChannelProvider = + new ConfiguredChannelProvider( + channelProvider, + channelBuilder -> + metrics + .get() + .configureGrpcChannel(channelBuilder) + .keepAliveTime(KEEPALIVE_TIME_MS, TimeUnit.MILLISECONDS) + .keepAliveTimeout(KEEPALIVE_TIMEOUT_MS, TimeUnit.MILLISECONDS) + // TODO: consider localizing this for large reads + .maxInboundMessageSize(256 * 1024 * 1024)); + + channelPool = + new SwitchingChannelPool( + configuredChannelProvider, + configManager.get(), + metrics.get(), + backgroundExecutor.get()); + channelPool.start(); + } + + @Override + public void close() { + sessionPools.forEach( + pool -> + pool.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("Client closing") + .build())); + metrics.close(); + channelPool.close(); + configManager.close(); + backgroundExecutor.close(); + } + + public TableAsync openTableAsync(String tableId, Permission permission) { + TableAsync tableAsync = + TableAsync.createAndStart( + featureFlags, + clientInfo, + configManager.get(), + channelPool, + defaultCallOptions, + tableId, + permission, + metrics.get(), + backgroundExecutor.get()); + sessionPools.add(tableAsync.getSessionPool()); + return tableAsync; + } + + public AuthorizedViewAsync openAuthorizedViewAsync( + String tableId, String viewId, OpenAuthorizedViewRequest.Permission permission) { + AuthorizedViewAsync viewAsync = + AuthorizedViewAsync.createAndStart( + featureFlags, + clientInfo, + configManager.get(), + channelPool, + defaultCallOptions, + tableId, + viewId, + permission, + metrics.get(), + backgroundExecutor.get()); + sessionPools.add(viewAsync.getSessionPool()); + return viewAsync; + } + + public MaterializedViewAsync openMaterializedViewAsync( + String viewId, OpenMaterializedViewRequest.Permission permission) { + MaterializedViewAsync viewAsync = + MaterializedViewAsync.createAndStart( + featureFlags, + clientInfo, + configManager.get(), + channelPool, + defaultCallOptions, + viewId, + permission, + metrics.get(), + backgroundExecutor.get()); + sessionPools.add(viewAsync.getSessionPool()); + return viewAsync; + } + + public static class Resource { + private T value; + private Runnable closer; + + public static Resource createOwned(T value, Runnable closer) { + return new Resource<>(value, closer); + } + + public static Resource createShared(T value) { + return new Resource<>(value, () -> {}); + } + + private Resource(T value, Runnable closer) { + this.value = value; + this.closer = closer; + } + + public void close() { + this.closer.run(); + } + + public T get() { + return value; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ClientSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ClientSettings.java new file mode 100644 index 0000000000..6b4448945e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/ClientSettings.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auth.Credentials; +import com.google.auth.oauth2.GoogleCredentials; +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.DirectAccess; +import java.io.IOException; +import javax.annotation.Nullable; + +@AutoValue +public abstract class ClientSettings { + public abstract ChannelProvider getChannelProvider(); + + public abstract InstanceName getInstanceName(); + + public abstract String getAppProfileId(); + + public static Builder builder() { + return new AutoValue_ClientSettings.Builder(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setChannelProvider(ChannelProvider channelProvider); + + @Nullable + abstract ChannelProvider getChannelProvider(); + + public abstract Builder setInstanceName(InstanceName name); + + public abstract Builder setAppProfileId(String appProfileId); + + abstract ClientSettings autoBuild(); // not public + + public ClientSettings build() { + if (getChannelProvider() != null) { + return autoBuild(); + } + + Credentials creds; + try { + creds = GoogleCredentials.getApplicationDefault(); + } catch (IOException e) { + throw new RuntimeException("Failed to create default credentials"); + } + + if (getChannelProvider() == null) { + setChannelProvider(DirectAccess.withFallback(ChannelProviders.DEFAULT_HOST, creds)); + } + return autoBuild(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceName.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceName.java new file mode 100644 index 0000000000..e30710362a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceName.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auto.value.AutoValue; +import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; +import java.util.List; + +@AutoValue +public abstract class InstanceName { + public abstract String getProjectId(); + + public abstract String getInstanceId(); + + @Override + public final String toString() { + return String.format("projects/%s/instances/%s", getProjectId(), getInstanceId()); + } + + public static InstanceName of(String projectId, String instanceId) { + return InstanceName.builder().setProjectId(projectId).setInstanceId(instanceId).build(); + } + + public static Builder builder() { + return new AutoValue_InstanceName.Builder(); + } + + public static InstanceName parse(String name) { + List parts = Splitter.on('/').splitToList(name); + Preconditions.checkArgument(parts.size() == 4, "Invalid instance name: %s", name); + Preconditions.checkArgument( + "projects".equals(parts.get(0)), + "Invalid instance name: %s, must start with projects/", + name); + Preconditions.checkArgument( + !parts.get(1).isEmpty(), "Invalid instance name %s, must have a project id", name); + Preconditions.checkArgument( + "instances".equals(parts.get(2)), + "Invalid instance name: %s, must start with projects/$PROJECT_ID/instances/", + name); + Preconditions.checkArgument( + !parts.get(3).isEmpty(), "Invalid instance name %s, must have an instance id", name); + + return builder().setProjectId(parts.get(1)).setInstanceId(parts.get(3)).build(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setProjectId(String projectId); + + public abstract Builder setInstanceId(String instanceId); + + public abstract InstanceName build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewAsync.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewAsync.java new file mode 100644 index 0000000000..70023645ef --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewAsync.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.OpenMaterializedViewRequest; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import java.io.Closeable; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; + +public class MaterializedViewAsync implements AutoCloseable, Closeable { + + private final TableBase base; + + public static MaterializedViewAsync createAndStart( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + String viewId, + OpenMaterializedViewRequest.Permission permission, + Metrics metrics, + ScheduledExecutorService executorService) { + + MaterializedViewName viewName = + MaterializedViewName.builder() + .setProjectId(clientInfo.getInstanceName().getProjectId()) + .setInstanceId(clientInfo.getInstanceName().getInstanceId()) + .setMaterializedViewId(viewId) + .build(); + + OpenMaterializedViewRequest openReq = + OpenMaterializedViewRequest.newBuilder() + .setMaterializedViewName(viewName.toString()) + .setAppProfileId(clientInfo.getAppProfileId()) + .setPermission(permission) + .build(); + + TableBase base = + TableBase.createAndStart( + openReq, + VRpcDescriptor.MATERIALIZED_VIEW_SESSION, + VRpcDescriptor.READ_ROW_MAT_VIEW, + null, + featureFlags, + clientInfo, + configManager, + channelPool, + callOptions, + viewId, + metrics, + executorService); + + return new MaterializedViewAsync(base); + } + + MaterializedViewAsync(TableBase base) { + this.base = base; + } + + public SessionPool getSessionPool() { + return base.getSessionPool(); + } + + @Override + public void close() { + base.close(); + } + + public CompletableFuture readRow( + SessionReadRowRequest req, Deadline deadline) { + UnaryResponseFuture f = new UnaryResponseFuture<>(); + base.readRow(req, f, deadline); + return f; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewName.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewName.java new file mode 100644 index 0000000000..30f4b85d2f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewName.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auto.value.AutoValue; +import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; +import java.util.List; + +@AutoValue +public abstract class MaterializedViewName { + public abstract String getProjectId(); + + public abstract String getInstanceId(); + + public abstract String getMaterializedViewId(); + + public InstanceName getInstanceName() { + return InstanceName.builder() + .setProjectId(getProjectId()) + .setInstanceId(getInstanceId()) + .build(); + } + + public static MaterializedViewName of(String projectId, String instanceId, String viewId) { + return builder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .setMaterializedViewId(viewId) + .build(); + } + + public static Builder builder() { + return new AutoValue_MaterializedViewName.Builder(); + } + + public static MaterializedViewName parse(String name) { + List parts = Splitter.on('/').splitToList(name); + Preconditions.checkArgument(parts.size() == 6, "Invalid materialized view name: %s", name); + Preconditions.checkArgument( + "projects".equals(parts.get(0)), + "Invalid materialized view name: %s, must start with projects/", + name); + Preconditions.checkArgument( + !parts.get(1).isEmpty(), "Invalid materialized view name %s, must have a project id", name); + Preconditions.checkArgument( + "instances".equals(parts.get(2)), + "Invalid materialized view name: %s, must start with projects/$PROJECT_ID/instances/", + name); + Preconditions.checkArgument( + !parts.get(3).isEmpty(), + "Invalid materialized view name %s, must have an instance id", + name); + Preconditions.checkArgument( + "materializedViews".equals(parts.get(4)), + "Invalid materialized view name: %s, must start with" + + " projects/$PROJECT_ID/instances/$INSTANCE_ID/materializedViews", + name); + Preconditions.checkArgument( + !parts.get(5).isEmpty(), "Invalid materialized view name %s, must have table id", name); + return MaterializedViewName.builder() + .setProjectId(parts.get(1)) + .setInstanceId(parts.get(3)) + .setMaterializedViewId(parts.get(5)) + .build(); + } + + @Override + public final String toString() { + return String.format("%s/materializedViews/%s", getInstanceName(), getMaterializedViewId()); + } + + @AutoValue.Builder + public abstract static class Builder { + + public abstract Builder setProjectId(String projectId); + + public abstract Builder setInstanceId(String instanceId); + + public abstract Builder setMaterializedViewId(String viewId); + + public abstract MaterializedViewName build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableAsync.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableAsync.java new file mode 100644 index 0000000000..0bc699d4f1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableAsync.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 + * + * 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.bigtable.data.v2.internal.api; + +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.OpenTableRequest; +import com.google.bigtable.v2.OpenTableRequest.Permission; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import java.io.Closeable; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; + +public class TableAsync implements AutoCloseable, Closeable { + private final TableBase base; + + public static TableAsync createAndStart( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + String tableId, + Permission permission, + Metrics metrics, + ScheduledExecutorService executorService) { + + TableName tableName = + TableName.builder() + .setProjectId(clientInfo.getInstanceName().getProjectId()) + .setInstanceId(clientInfo.getInstanceName().getInstanceId()) + .setTableId(tableId) + .build(); + + OpenTableRequest openReq = + OpenTableRequest.newBuilder() + .setTableName(tableName.toString()) + .setAppProfileId(clientInfo.getAppProfileId()) + .setPermission(permission) + .build(); + + TableBase base = + TableBase.createAndStart( + openReq, + VRpcDescriptor.TABLE_SESSION, + VRpcDescriptor.READ_ROW, + VRpcDescriptor.MUTATE_ROW, + featureFlags, + clientInfo, + configManager, + channelPool, + callOptions, + tableId, + metrics, + executorService); + + return new TableAsync(base); + } + + TableAsync(TableBase base) { + this.base = base; + } + + @Override + public void close() { + base.close(); + } + + public SessionPool getSessionPool() { + return base.getSessionPool(); + } + + // TODO: get deadline from compatibility layer + // Currently these are the deadlines from gax: + // ApiCallContext#timeout (attempt timeout) + // ApiCallContext#RetrySettings#totalTimeout + // ApiCallContext#RetrySettings#attemptTimeout + // GrpcApiCallContext#Calloptions#Deadline + // attemptTimeout will be ignored + // {totalTimeout and CallOptions deadline} -> deadline on this call + public CompletableFuture readRow( + SessionReadRowRequest req, Deadline deadline) { + UnaryResponseFuture f = new UnaryResponseFuture<>(); + base.readRow(req, f, deadline); + return f; + } + + // TODO: get deadline from compatibility layer + public CompletableFuture mutateRow( + SessionMutateRowRequest req, Deadline deadline) { + UnaryResponseFuture f = new UnaryResponseFuture<>(); + base.mutateRow(req, f, deadline); + return f; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableBase.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableBase.java new file mode 100644 index 0000000000..8feef399d6 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableBase.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.CancellableVRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.RetryingVRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcCallContext; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcListener; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolImpl; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.common.annotations.VisibleForTesting; +import com.google.protobuf.Message; +import io.grpc.CallOptions; +import io.grpc.Context; +import io.grpc.Deadline; +import io.grpc.Metadata; +import java.util.concurrent.ScheduledExecutorService; + +class TableBase implements AutoCloseable { + private final SessionPool sessionPool; + private final ScheduledExecutorService backgroundExecutor; + private final Metrics metrics; + private final VRpcDescriptor readRowDescriptor; + private final VRpcDescriptor + mutateRowDescriptor; + + static TableBase createAndStart( + ReqT openReq, + VRpcDescriptor.SessionDescriptor sessionDescriptor, + VRpcDescriptor readRowDescriptor, + VRpcDescriptor mutateRowDescriptor, + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + String sessionPoolName, + Metrics metrics, + ScheduledExecutorService executor) { + + SessionPool sessionPool = + new SessionPoolImpl<>( + metrics, + featureFlags, + clientInfo, + configManager, + channelPool, + callOptions, + sessionDescriptor, + sessionPoolName, + executor); + + sessionPool.start(openReq, new Metadata()); + + return new TableBase(sessionPool, readRowDescriptor, mutateRowDescriptor, metrics, executor); + } + + @VisibleForTesting + TableBase( + SessionPool sessionPool, + VRpcDescriptor readRowDescriptor, + VRpcDescriptor mutateRowDescriptor, + Metrics metrics, + ScheduledExecutorService executor) { + this.sessionPool = sessionPool; + this.readRowDescriptor = readRowDescriptor; + this.mutateRowDescriptor = mutateRowDescriptor; + this.metrics = metrics; + this.backgroundExecutor = executor; + } + + @Override + public void close() { + sessionPool.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("user closed session") + .build()); + } + + public SessionPool getSessionPool() { + return sessionPool; + } + + public void readRow( + SessionReadRowRequest req, VRpcListener listener, Deadline deadline) { + RetryingVRpc retry = + new RetryingVRpc<>(() -> sessionPool.newCall(readRowDescriptor), backgroundExecutor); + + VRpcTracer tracer = metrics.newTableTracer(sessionPool.getInfo(), readRowDescriptor, deadline); + VRpcCallContext ctx = VRpcCallContext.create(deadline, true, tracer); + + CancellableVRpc cancellableVRpc = + new CancellableVRpc<>(retry, Context.current()); + + cancellableVRpc.start(req, ctx, listener); + } + + public void mutateRow( + SessionMutateRowRequest req, + VRpcListener listener, + Deadline deadline) { + RetryingVRpc retry = + new RetryingVRpc<>(() -> sessionPool.newCall(mutateRowDescriptor), backgroundExecutor); + + boolean idempotent = Util.isIdempotent(req.getMutationsList()); + + VRpcTracer tracer = + metrics.newTableTracer(sessionPool.getInfo(), mutateRowDescriptor, deadline); + VRpcCallContext ctx = VRpcCallContext.create(deadline, idempotent, tracer); + + CancellableVRpc cancellable = + new CancellableVRpc<>(retry, Context.current()); + + cancellable.start(req, ctx, listener); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableName.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableName.java new file mode 100644 index 0000000000..7a094f8550 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/TableName.java @@ -0,0 +1,90 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.auto.value.AutoValue; +import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; +import java.util.List; + +@AutoValue +public abstract class TableName { + public abstract String getProjectId(); + + public abstract String getInstanceId(); + + public abstract String getTableId(); + + public InstanceName getInstanceName() { + return InstanceName.builder() + .setProjectId(getProjectId()) + .setInstanceId(getInstanceId()) + .build(); + } + + @Override + public final String toString() { + return String.format("%s/tables/%s", getInstanceName(), getTableId()); + } + + public static TableName of(String projectId, String instanceId, String tableId) { + return builder().setProjectId(projectId).setInstanceId(instanceId).setTableId(tableId).build(); + } + + public static Builder builder() { + return new AutoValue_TableName.Builder(); + } + + public static TableName parse(String name) { + List parts = Splitter.on('/').splitToList(name); + Preconditions.checkArgument(parts.size() == 6, "Invalid table name: %s", name); + Preconditions.checkArgument( + "projects".equals(parts.get(0)), "Invalid table name: %s, must start with projects/", name); + Preconditions.checkArgument( + !parts.get(1).isEmpty(), "Invalid table name %s, must have a project id", name); + Preconditions.checkArgument( + "instances".equals(parts.get(2)), + "Invalid table name: %s, must start with projects/$PROJECT_ID/instances/", + name); + Preconditions.checkArgument( + !parts.get(3).isEmpty(), "Invalid table name %s, must have an instance id", name); + Preconditions.checkArgument( + "tables".equals(parts.get(4)), + "Invalid table name: %s, must start with" + + " projects/$PROJECT_ID/instances/$INSTANCE_ID/tables", + name); + Preconditions.checkArgument( + !parts.get(5).isEmpty(), "Invalid table name %s, must have table id", name); + + return builder() + .setProjectId(parts.get(1)) + .setInstanceId(parts.get(3)) + .setTableId(parts.get(5)) + .build(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setProjectId(String projectId); + + public abstract Builder setInstanceId(String instanceId); + + public abstract Builder setTableId(String tableId); + + public abstract TableName build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/UnaryResponseFuture.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/UnaryResponseFuture.java new file mode 100644 index 0000000000..18ccfd6e09 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/UnaryResponseFuture.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcListener; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.common.base.Preconditions; +import java.util.concurrent.CompletableFuture; +import java.util.logging.Logger; + +public class UnaryResponseFuture extends CompletableFuture implements VRpcListener { + private static final Logger DEFAULT_LOGGER = + Logger.getLogger(UnaryResponseFuture.class.getName()); + private Logger logger = DEFAULT_LOGGER; + + private T msg = null; + private boolean hasMsg = false; + + @Override + public void onMessage(T msg) { + Preconditions.checkState(!hasMsg, "Unary rpc received duplicated message"); + hasMsg = true; + this.msg = msg; + } + + @Override + public void onClose(VRpcResult result) { + if (result.getStatus().isOk()) { + if (!hasMsg) { + completeExceptionally( + new IllegalStateException("Unary rpc completed OK but missing result")); + } else { + complete(msg); + } + } else { + if (!completeExceptionally(VRpcException.create(result))) { + logger.warning("Unary rpc got error after it was resolved: " + result); + } + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Util.java new file mode 100644 index 0000000000..fba8bd0b87 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/Util.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.Mutation; +import io.grpc.Metadata; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class Util { + private static final Metadata.Key REQUEST_PARAMS_KEY = + Metadata.Key.of("x-goog-request-params", Metadata.ASCII_STRING_MARSHALLER); + private static final Metadata.Key FEATURE_FLAGS_KEY = + Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER); + + public static Metadata composeMetadata( + FeatureFlags featureFlags, Map headerParams) { + Metadata metadata = new Metadata(); + + // Configure FeatureFlags for RLS + { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + featureFlags.writeTo(baos); + } catch (IOException e) { + throw new IllegalStateException("ByteArrayOutputStream should never throw an IOException"); + } + String encodedFeatureFlags = + new String(Base64.getUrlEncoder().encode(baos.toByteArray()), StandardCharsets.UTF_8); + metadata.put(FEATURE_FLAGS_KEY, encodedFeatureFlags); + } + + // Configure resource names for RLS + metadata.put( + REQUEST_PARAMS_KEY, + headerParams.entrySet().stream() + .map(e -> String.format("%s=%s", e.getKey(), urlEncode(e.getValue()))) + .collect(Collectors.joining("&"))); + + return metadata; + } + + public static boolean isIdempotent(List mutations) { + for (Mutation mutation : mutations) { + // aggregates are not idempotent + if (mutation.hasAddToCell() || mutation.hasMergeToCell()) { + return false; + } + // mutations with system timestamps are not idempotent + if (mutation.hasSetCell() && mutation.getSetCell().getTimestampMicros() == -1) { + return false; + } + } + return true; + } + + private static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new IllegalStateException("Should never happen", e); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/VRpcException.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/VRpcException.java new file mode 100644 index 0000000000..be212be1cc --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/api/VRpcException.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; + +// TODO: capture caller stack - this will be mostly created by a gRPC response threads, which loses +// the caller stacktrace, which isnt helpful +public class VRpcException extends StatusRuntimeException { + private final VRpcResult result; + + public static VRpcException create(VRpcResult result) { + if (result.getStatus().isOk()) { + return new VRpcException( + Status.INTERNAL.withDescription("Unexpected OK status used for an exception"), result); + } + return new VRpcException(result); + } + + private VRpcException(Status overridenStatus, VRpcResult result) { + super(overridenStatus); + this.result = result; + } + + private VRpcException(VRpcResult result) { + super(result.getStatus()); + this.result = result; + } + + public VRpcResult getResult() { + return result; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPool.java new file mode 100644 index 0000000000..0c041be523 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPool.java @@ -0,0 +1,36 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import io.grpc.CallOptions; +import io.grpc.MethodDescriptor; + +public interface ChannelPool extends AutoCloseable { + + void start(); + + @Override + void close(); + + SessionStream newStream( + MethodDescriptor desc, CallOptions callOptions); + + void updateConfig(ChannelPoolConfiguration config); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImpl.java new file mode 100644 index 0000000000..28a05523f2 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImpl.java @@ -0,0 +1,513 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multiset; +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 io.grpc.Status.Code; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Deque; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Objects; +import java.util.Optional; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +/** + * Proof of concept channel pool that avoids parallel channels to the same afe. The pool is + * dynamically sized based on outstanding streams and tries to limit each channel to at most 10 + * streams. + */ +public class ChannelPoolDpImpl implements ChannelPool { + private static final Logger LOGGER = Logger.getLogger(ChannelPoolDpImpl.class.getName()); + private static final String DEFAULT_LOG_NAME = "pool"; + private static final AtomicInteger INDEX = new AtomicInteger(); + + private final String poolLogId; + + @VisibleForTesting volatile int minGroups; + @VisibleForTesting volatile int maxGroups; + @VisibleForTesting volatile int softMaxPerGroup; + + private final Clock clock; + private final Supplier channelSupplier; + private final ScheduledExecutorService executor; + + private final DebugTagTracer debugTagTracer; + + @GuardedBy("this") + private final List channelGroups; + + @GuardedBy("this") + private final AfeChannelGroup startingGroup; + + @GuardedBy("this") + private int totalStreams = 0; + + // TODO: replace SocketAddress with AfeId + @GuardedBy("this") + private final Multiset sessionsPerAfeId = HashMultiset.create(); + + private ScheduledFuture serviceFuture = null; + + @GuardedBy("this") + private boolean closed = false; + + public ChannelPoolDpImpl( + Supplier channelSupplier, + ChannelPoolConfiguration config, + DebugTagTracer debugTagTracer, + ScheduledExecutorService executor) { + this(channelSupplier, config, DEFAULT_LOG_NAME, debugTagTracer, executor, Clock.systemUTC()); + } + + public ChannelPoolDpImpl( + Supplier channelSupplier, + ChannelPoolConfiguration config, + String logName, + DebugTagTracer debugTagTracer, + ScheduledExecutorService executor) { + this(channelSupplier, config, logName, debugTagTracer, executor, Clock.systemUTC()); + } + + public ChannelPoolDpImpl( + Supplier channelSupplier, + ChannelPoolConfiguration config, + String logName, + DebugTagTracer debugTagTracer, + ScheduledExecutorService executor, + Clock clock) { + this.poolLogId = String.format("%d-%s", INDEX.getAndIncrement(), logName); + this.clock = clock; + this.channelSupplier = channelSupplier; + this.executor = executor; + updateConfig(config); + channelGroups = new ArrayList<>(); + startingGroup = new AfeChannelGroup(null); + this.debugTagTracer = debugTagTracer; + } + + @Override + public void updateConfig(ChannelPoolConfiguration config) { + this.minGroups = config.getMinServerCount(); + this.maxGroups = config.getMaxServerCount(); + this.softMaxPerGroup = config.getPerServerSessionCount(); + } + + @Override + public synchronized void start() { + serviceChannels(); + serviceFuture = executor.scheduleAtFixedRate(this::serviceChannels, 1, 1, TimeUnit.MINUTES); + } + + @Override + public synchronized void close() { + closed = true; + + if (serviceFuture != null) { + serviceFuture.cancel(false); + } + + channelGroups.stream() + .flatMap(g -> g.channels.stream()) + .forEach(channelWrapper -> channelWrapper.channel.shutdown()); + } + + @Override + public synchronized SessionStream newStream( + MethodDescriptor desc, CallOptions callOptions) { + if (closed) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "channel_pool_new_stream_failed"); + return new FailingSessionStream(Status.UNAVAILABLE.withDescription("ChannelPool is closed")); + } + // Find the AFE with the fewest sessions + Optional maybeGroup = + channelGroups.stream() + .filter(g -> g.numStreams < softMaxPerGroup) + .min(Comparator.comparingInt(a -> a.numStreams)); + + // Find the first channel that has capacity + Optional maybeChannel = + maybeGroup.flatMap(g -> g.channels.stream().findFirst()); + + // try to find a channel that has capacity in the least loaded afe + final ChannelWrapper channelWrapper = + maybeChannel.orElseGet( + () -> { + log( + Level.FINE, + "Couldn't find an existing channel with capacity, num outstanding streams across" + + " all channel groups: %d, num groups: %d", + channelGroups.stream().mapToInt(g -> g.numStreams).sum(), + channelGroups.size()); + + // If there is no such channel, then try to add a channel that being resolved + // and if no channel is in the process of being added or its already nearing 50% + // utilization + // during initialization, then add a new channel + return startingGroup.channels.stream() + .filter(w -> w.numOutstanding < softMaxPerGroup / 2) + .min(Comparator.comparingInt(w -> w.numOutstanding)) + .map( + (w) -> { + log(Level.FINE, "Using a channel thats already connecting"); + return w; + }) + .orElseGet( + () -> { + log(Level.FINE, "Creating a new channel"); + return addChannel(); + }); + }); + + channelWrapper.numOutstanding++; + channelWrapper.group.numStreams++; + totalStreams++; + + ClientCall innerCall = + channelWrapper.channel.newCall(desc, callOptions); + + return new SessionStreamImpl(innerCall) { + // mark as null so that onClose can tell if onBeforeSessionStart was never called + @Nullable AfeId afeId = null; + + @Override + public void start(Listener responseListener, Metadata headers) { + super.start( + new ForwardingListener(responseListener) { + @Override + public void onBeforeSessionStart(PeerInfo peerInfo) { + afeId = AfeId.extract(peerInfo); + synchronized (ChannelPoolDpImpl.this) { + rehomeChannel(channelWrapper, afeId); + sessionsPerAfeId.add(afeId); + } + super.onBeforeSessionStart(peerInfo); + } + + @Override + public void onClose(Status status, Metadata trailers) { + synchronized (ChannelPoolDpImpl.this) { + if (afeId != null) { + sessionsPerAfeId.remove(afeId); + } + releaseChannel(channelWrapper, status); + } + super.onClose(status, trailers); + } + }, + headers); + } + }; + } + + @GuardedBy("this") + private ChannelWrapper addChannel() { + debugTagTracer.checkPrecondition( + !closed, "channel_pool_add_channel_failure", "Channel pool is closed"); + log(Level.FINE, "Adding a new channel"); + ChannelWrapper wrapped = new ChannelWrapper(startingGroup, channelSupplier.get(), clock); + startingGroup.channels.addFirst(wrapped); + return wrapped; + } + + @GuardedBy("this") + private void removeGroup(AfeChannelGroup group) { + log(Level.FINE, "Removing group: %s", group.afeId); + group.channels.forEach(c -> c.channel.shutdown()); + channelGroups.remove(group); + // TODO: need to handle a group being added right after it was removed with lingering sessions + } + + @GuardedBy("this") + private AfeChannelGroup rehomeChannel(ChannelWrapper channelWrapper, AfeId afeId) { + AfeChannelGroup origGroup = channelWrapper.group; + + if (Objects.equals(origGroup.afeId, afeId)) { + return origGroup; + } + + log(Level.FINE, "Rehoming channel from: %s to %s", origGroup.afeId, afeId); + + // Re-home the channel + AfeChannelGroup newGroup = + channelGroups.stream() + .filter(g -> Objects.equals(g.afeId, afeId)) + .findAny() + .orElseGet( + () -> { + AfeChannelGroup g = new AfeChannelGroup(afeId); + channelGroups.add(g); + return g; + }); + channelWrapper.group = newGroup; + origGroup.channels.remove(channelWrapper); + if (origGroup.channels.isEmpty()) { + channelGroups.remove(origGroup); + } + origGroup.numStreams -= channelWrapper.numOutstanding; + newGroup.channels.add(channelWrapper); + newGroup.numStreams += channelWrapper.numOutstanding; + + return newGroup; + } + + // Update accounting when a stream is closed and releases its channel + @GuardedBy("this") + private void releaseChannel(ChannelWrapper channelWrapper, Status status) { + totalStreams--; + channelWrapper.group.numStreams--; + channelWrapper.numOutstanding--; + + if (shouldRecycleChannel(status)) { + recycleChannel(channelWrapper); + } + } + + private static boolean shouldRecycleChannel(Status status) { + if (status.getCode() == Code.UNIMPLEMENTED) { + return true; + } + + // TODO: replace this with a flag in the ErrorDetails + if (status.getDescription() != null + && status.getDescription().toLowerCase(Locale.ENGLISH).contains("server is draining")) { + return true; + } + + return false; + } + + @GuardedBy("this") + private void recycleChannel(ChannelWrapper channelWrapper) { + channelWrapper.group.channels.remove(channelWrapper); + channelWrapper.channel.shutdown(); + // Checking for starting group because we don't want to delete the stating group. + if (channelWrapper.group.channels.isEmpty() && channelWrapper.group != startingGroup) { + removeGroup(channelWrapper.group); + } + addChannel(); + } + + @VisibleForTesting + void serviceChannels() { + try { + serviceChannelsSafe(); + } catch (Exception e) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "service_channel_failure"); + log(Level.WARNING, "Failed to service channels", e); + } + } + + /* + - add new group if existing groups are overflowing + - shutdown older channels within a group + */ + private synchronized void serviceChannelsSafe() { + log(Level.FINE, "Servicing channels"); + dumpState(); + + Instant now = Instant.now(clock); + Instant createdAtThreshold = now.minus(Duration.ofMinutes(50)); + + // Thin out the channels in each group, so that each AFEGroup only has 1 channel + for (AfeChannelGroup group : channelGroups) { + if (LOGGER.isLoggable(Level.FINEST) && group.channels.size() > 1) { + log( + Level.FINEST, + "Shutting down %d parallel channels for %s", + group.channels.size() - 1, + group.afeId); + } + while (group.channels.size() > 1) { + // Clean up parallel channels. + // Recent channels added to the end, thus removing the oldest from the beginning. + group.channels.removeFirst().channel.shutdown(); + } + } + + // try to adjust the groups + int desiredGroups = (int) Math.ceil(((float) totalStreams / softMaxPerGroup) * 2); + if (desiredGroups > maxGroups) { + desiredGroups = maxGroups; + } else if (desiredGroups < minGroups) { + desiredGroups = minGroups; + } + + // Right size the groups + if (desiredGroups < channelGroups.size()) { + // Remove extra groups, oldest first + Iterator it = + channelGroups.stream() + .sorted(Comparator.comparing(g -> g.channels.peek().createdAt)) + .limit(channelGroups.size() - desiredGroups) + .iterator(); + + while (it.hasNext()) { + AfeChannelGroup group = it.next(); + log( + Level.FINE, + "Removing %d channel for %s due to lack of concurrency", + group.channels.size(), + group.afeId); + removeGroup(group); + } + } else if (desiredGroups > channelGroups.size() + startingGroup.channels.size()) { + log(Level.FINE, "Adding %d channels", desiredGroups - channelGroups.size()); + for (int i = channelGroups.size(); i < desiredGroups; i++) { + addChannel(); + } + } + + log(Level.FINE, "Done servicing channels"); + dumpState(); + } + + private void log(Level level, String msg, Throwable throwable) { + LOGGER.log(level, String.format("[%s] %s", poolLogId, msg), throwable); + } + + private void log(Level level, String format, Object... args) { + LOGGER.log(level, String.format("[%s] %s", poolLogId, String.format(format, args))); + } + + @GuardedBy("this") + void dumpState() { + if (!LOGGER.isLoggable(Level.FINE)) { + return; + } + + int channels = + channelGroups.stream().mapToInt((AfeChannelGroup chg) -> chg.channels.size()).sum(); + String s = + sessionsPerAfeId.entrySet().stream() + .sorted(Comparator.comparing(e -> e.getElement().toString())) + .map(e -> String.format("%d", e.getCount())) + .collect(Collectors.joining(", ")); + + log( + Level.FINE, + "ChannelPool channelGroups: " + + channelGroups.size() + + ", channels: " + + channels + + ", starting channels: " + + startingGroup.channels.size() + + ", totalStreams: " + + totalStreams + + ", AFEs: " + + sessionsPerAfeId.entrySet().size() + + ", distribution: [" + + s + + "]"); + + if (LOGGER.isLoggable(Level.FINEST)) { + String afeToSessions = + sessionsPerAfeId.entrySet().stream() + .sorted(Comparator.comparing(e -> e.getElement().toString())) + .map(e -> String.format("%s: %d", e.getElement(), e.getCount())) + .collect(Collectors.joining("\n")); + log(Level.FINEST, "ChannelPool session distribution:\n%s", afeToSessions); + } + } + + static class AfeChannelGroup { + private final AfeId afeId; + private final Deque channels; + private int numStreams; + + public AfeChannelGroup(AfeId afeId) { + this.afeId = afeId; + channels = new ArrayDeque<>(); + numStreams = 0; + } + } + + static class ChannelWrapper { + private AfeChannelGroup group; + private final ManagedChannel channel; + private final Instant createdAt; + private int numOutstanding = 0; + + public ChannelWrapper(AfeChannelGroup group, ManagedChannel channel, Clock clock) { + this.group = group; + this.channel = channel; + createdAt = Instant.now(clock); + } + } + + private static class AfeId { + private final long id; + + static AfeId extract(PeerInfo peerInfo) { + return new AfeId(peerInfo.getApplicationFrontendId()); + } + + private AfeId(long id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof AfeId)) { + return false; + } + return id == ((AfeId) o).id; + } + + @Override + public int hashCode() { + return com.google.common.base.Objects.hashCode(id); + } + + @Override + public String toString() { + return Long.toString(id); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectPathIpInterceptor.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectPathIpInterceptor.java new file mode 100644 index 0000000000..e22588858e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectPathIpInterceptor.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; +import io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener; +import io.grpc.Grpc; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.logging.Logger; + +public class DirectPathIpInterceptor implements ClientInterceptor { + private static final Logger LOGGER = Logger.getLogger(DirectPathIpInterceptor.class.getName()); + + private static final String DP_IPV6_PREFIX = "2001:4860:8040"; + private static final String DP_IPV4_PREFIX = "34.126"; + + private static final AtomicInteger nextObjectId = new AtomicInteger(); + private final int myId = nextObjectId.getAndIncrement(); + + private AtomicReference lastIp = new AtomicReference<>(); + private final boolean expectDirectPath; + + public DirectPathIpInterceptor(boolean expectDirectPath) { + this.expectDirectPath = expectDirectPath; + } + + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + ClientCall clientCall = channel.newCall(methodDescriptor, callOptions); + return new SimpleForwardingClientCall(clientCall) { + @Override + public void start(Listener responseListener, Metadata headers) { + super.start( + new SimpleForwardingClientCallListener(responseListener) { + @Override + public void onHeaders(Metadata headers) { + SocketAddress socketAddress = + clientCall.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR); + + if (socketAddress != null + && !socketAddress.equals(lastIp.getAndSet(socketAddress))) { + boolean directPathActive = isDirectPath(socketAddress); + if (directPathActive != expectDirectPath) { + LOGGER.warning( + String.format( + "Channel %d, Unexpected DirectPath status: %s, expected: %s. ip: %s", + myId, directPathActive, expectDirectPath, socketAddress)); + } + } + super.onHeaders(headers); + } + }, + headers); + } + }; + } + + private static boolean isDirectPath(SocketAddress remoteAddress) { + InetAddress inetAddress = ((InetSocketAddress) remoteAddress).getAddress(); + String addr = inetAddress.getHostAddress(); + + return addr.startsWith(DP_IPV6_PREFIX) || addr.startsWith(DP_IPV4_PREFIX); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectpathEnforcer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectpathEnforcer.java new file mode 100644 index 0000000000..7aad36e8f8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/DirectpathEnforcer.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ForwardingClientCall; +import io.grpc.ForwardingClientCallListener; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import io.grpc.alts.AltsContextUtil; + +public class DirectpathEnforcer implements ClientInterceptor { + private final String reason; + + public DirectpathEnforcer(String reason) { + this.reason = reason; + } + + @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) { + super.start( + new ForwardingClientCallListener.SimpleForwardingClientCallListener( + responseListener) { + @Override + public void onHeaders(Metadata headers) { + if (!AltsContextUtil.check(getAttributes())) { + // Non-ALTS. Despite configuring a channel for directpath + // on a lower level a fallback may happen. We detect it here + // and bubble up the exception for the channel pool to react. + throw Status.UNAVAILABLE.augmentDescription(reason).asRuntimeException(); + } + super.onHeaders(headers); + } + }, + headers); + } + }; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FailingSessionStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FailingSessionStream.java new file mode 100644 index 0000000000..df2ae9ad35 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FailingSessionStream.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 + * + * 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionRequest; +import io.grpc.Metadata; +import io.grpc.Status; +import javax.annotation.Nullable; + +class FailingSessionStream implements SessionStream { + private final Status status; + + FailingSessionStream(Status status) { + this.status = status; + } + + @Override + public PeerInfo getPeerInfo() { + return DISCONNECTED_PEER_INFO; + } + + @Override + public void start(Listener responseListener, Metadata headers) { + responseListener.onClose(status, new Metadata()); + } + + @Override + public void sendMessage(SessionRequest request) { + // noop + } + + @Override + public void halfClose() { + // noop + } + + @Override + public void forceClose(@Nullable String message, @Nullable Throwable cause) { + // noop + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPool.java new file mode 100644 index 0000000000..2ae8772b97 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPool.java @@ -0,0 +1,212 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener.ChannelFallbackReason; +import com.google.common.base.Preconditions; +import io.grpc.CallOptions; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import java.time.Duration; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +public class FallbackChannelPool implements ChannelPool { + private FallbackConfiguration config; + private final ChannelPool primary; + private final ChannelPool secondary; + private final PoolFallbackListener poolFallbackListener; + private final ScheduledExecutorService exec; + + @GuardedBy("this") + private ScheduledFuture checkTask; + + private final AtomicReference currentPool; + + private final AtomicInteger successCount = new AtomicInteger(); + private final AtomicInteger failureCount = new AtomicInteger(); + + public FallbackChannelPool( + FallbackConfiguration config, + PoolFallbackListener poolFallbackListener, + ScheduledExecutorService exec) { + Preconditions.checkNotNull(config); + Preconditions.checkNotNull(poolFallbackListener); + Preconditions.checkNotNull(exec); + this.config = config; + this.primary = config.getPrimaryChannelPool(); + this.secondary = config.getFallbackChannelPool(); + currentPool = new AtomicReference(primary); + this.poolFallbackListener = poolFallbackListener; + this.exec = exec; + } + + @Override + public void start() { + scheduleCheckRates(); + primary.start(); + secondary.start(); + } + + @Override + public void updateConfig(ChannelPoolConfiguration newConfig) { + if (!newConfig.hasDirectAccessWithFallback()) { + return; + } + + DirectAccessWithFallback directAccessWithFallback = newConfig.getDirectAccessWithFallback(); + updateConfig( + config.toBuilder() + .setEnabled(true) + .setErrorRate(directAccessWithFallback.getErrorRateThreshold()) + .setCheckInterval( + Duration.ofSeconds(directAccessWithFallback.getCheckInterval().getSeconds())) + .build()); + + // Propagate further. + primary.updateConfig(newConfig); + secondary.updateConfig(newConfig); + } + + // For now only updates error rate, interval, and is enabled. + synchronized void updateConfig(FallbackConfiguration newConfig) { + config = + config.toBuilder() + .setEnabled(newConfig.isEnabled()) + .setCheckInterval(newConfig.getCheckInterval()) + .setErrorRate(newConfig.getErrorRate()) + .build(); + + if (!config.isEnabled()) { + if (currentPool.compareAndSet(secondary, primary)) { + poolFallbackListener.onFallback( + config.getFallbackName(), + config.getPrimaryName(), + ChannelFallbackReason.FALLBACK_DISABLE); + } + } + } + + @Override + public synchronized void close() { + if (checkTask != null) { + checkTask.cancel(false); + } + primary.close(); + secondary.close(); + } + + @Override + public SessionStream newStream( + MethodDescriptor desc, CallOptions callOptions) { + final ChannelPool current = currentPool.get(); + final SessionStream stream = current.newStream(desc, callOptions); + + return new ForwardingSessionStream(stream) { + private boolean ignoreError; + + @Override + public void start(Listener responseListener, Metadata headers) { + try { + super.start( + new SessionStream.ForwardingListener(responseListener) { + @Override + public void onBeforeSessionStart(PeerInfo peerInfo) { + if (current == primary) { + // Count successful session establishment as success. + successCount.incrementAndGet(); + // peerInfo received successfully, session is established, + // this is a successful start, thus ignoring any following errors. + ignoreError = true; + } + super.onBeforeSessionStart(peerInfo); + } + + @Override + public void onClose(Status status, Metadata trailers) { + // Already using fallback. + if (current != primary) { + super.onClose(status, trailers); + return; + } + + if (!status.isOk() && !ignoreError) { + failureCount.incrementAndGet(); + } + super.onClose(status, trailers); + } + }, + headers); + } catch (Exception e) { + if (current == primary) { + // Any exception on newStream start is a failure. + failureCount.incrementAndGet(); + } + throw e; + } + } + + @Override + public void forceClose(@Nullable String message, @Nullable Throwable cause) { + // Force closing the session, thus ignoring the error caused by that. + ignoreError = true; + super.forceClose(message, cause); + } + }; + } + + private synchronized void scheduleCheckRates() { + checkTask = + exec.schedule( + this::checkRatesAndReschedule, + config.getCheckInterval().toMillis(), + TimeUnit.MILLISECONDS); + } + + private void checkRatesAndReschedule() { + checkRates(); + scheduleCheckRates(); + } + + private synchronized void checkRates() { + int successes = successCount.getAndSet(0); + int failures = failureCount.getAndSet(0); + int total = successes + failures; + + if (!config.isEnabled()) { + return; + } + + if (total > 0 && ((double) failures) / total >= config.getErrorRate()) { + if (currentPool.compareAndSet(primary, secondary)) { + poolFallbackListener.onFallback( + config.getPrimaryName(), config.getFallbackName(), ChannelFallbackReason.ERROR_RATE); + } + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackConfiguration.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackConfiguration.java new file mode 100644 index 0000000000..058dfdcaeb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackConfiguration.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.auto.value.AutoValue; +import java.time.Duration; + +@AutoValue +public abstract class FallbackConfiguration { + public abstract boolean isEnabled(); + + public abstract double getErrorRate(); + + public abstract Duration getCheckInterval(); + + public abstract String getPrimaryName(); + + public abstract String getFallbackName(); + + public abstract ChannelPool getPrimaryChannelPool(); + + public abstract ChannelPool getFallbackChannelPool(); + + public abstract Builder toBuilder(); + + public static Builder builder() { + return new AutoValue_FallbackConfiguration.Builder(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setEnabled(boolean enabled); + + public abstract Builder setErrorRate(double errorRate); + + public abstract Builder setCheckInterval(Duration checkInterval); + + protected abstract Builder setPrimaryName(String primaryName); + + protected abstract Builder setFallbackName(String fallbackName); + + protected abstract Builder setPrimaryChannelPool(ChannelPool primaryChannelPool); + + protected abstract Builder setFallbackChannelPool(ChannelPool fallbackChannelPool); + + public Builder setPrimary(String name, ChannelPool pool) { + return setPrimaryName(name).setPrimaryChannelPool(pool); + } + + public Builder setFallback(String name, ChannelPool pool) { + return setFallbackName(name).setFallbackChannelPool(pool); + } + + public abstract FallbackConfiguration build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ForwardingSessionStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ForwardingSessionStream.java new file mode 100644 index 0000000000..54652c044e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/ForwardingSessionStream.java @@ -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 + * + * 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionRequest; +import io.grpc.Metadata; +import javax.annotation.Nullable; + +public class ForwardingSessionStream implements SessionStream { + private final SessionStream delegate; + + public ForwardingSessionStream(SessionStream delegate) { + this.delegate = delegate; + } + + @Override + public PeerInfo getPeerInfo() { + return delegate.getPeerInfo(); + } + + @Override + public void start(Listener responseListener, Metadata headers) { + delegate.start(responseListener, headers); + } + + @Override + public void sendMessage(SessionRequest request) { + delegate.sendMessage(request); + } + + @Override + public void halfClose() { + delegate.halfClose(); + } + + @Override + public void forceClose(@Nullable String message, @Nullable Throwable cause) { + delegate.forceClose(message, cause); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStream.java new file mode 100644 index 0000000000..ebbc39af7f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStream.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import io.grpc.Metadata; +import io.grpc.Status; +import javax.annotation.Nullable; + +public interface SessionStream { + public static final PeerInfo DISCONNECTED_PEER_INFO = + PeerInfo.newBuilder().setTransportType(TransportType.TRANSPORT_TYPE_SESSION_UNKNOWN).build(); + + public PeerInfo getPeerInfo(); + + public void start(Listener responseListener, Metadata headers); + + public void sendMessage(SessionRequest request); + + public void halfClose(); + + public void forceClose(@Nullable String message, @Nullable Throwable cause); + + public interface Listener { + void onBeforeSessionStart(PeerInfo peerInfo); + + void onMessage(SessionResponse msg); + + void onClose(Status status, Metadata trailers); + } + + public static class ForwardingListener implements Listener { + private final Listener delegate; + + public ForwardingListener(Listener delegate) { + this.delegate = delegate; + } + + @Override + public void onBeforeSessionStart(PeerInfo peerInfo) { + delegate.onBeforeSessionStart(peerInfo); + } + + @Override + public void onMessage(SessionResponse msg) { + delegate.onMessage(msg); + } + + @Override + public void onClose(Status status, Metadata trailers) { + delegate.onClose(status, trailers); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStreamImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStreamImpl.java new file mode 100644 index 0000000000..fa46914df0 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SessionStreamImpl.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.base.Strings; +import io.grpc.ClientCall; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.alts.AltsContextUtil; +import java.util.Base64; +import javax.annotation.Nullable; + +public class SessionStreamImpl implements SessionStream { + private final ClientCall call; + private volatile PeerInfo peerInfo = DISCONNECTED_PEER_INFO; + + @VisibleForTesting + static final Metadata.Key PEER_INFO_KEY = + Metadata.Key.of("bigtable-peer-info", Metadata.ASCII_STRING_MARSHALLER); + + public SessionStreamImpl(ClientCall call) { + this.call = call; + } + + @Override + public PeerInfo getPeerInfo() { + return peerInfo; + } + + @Override + public void start(Listener responseListener, Metadata headers) { + call.start( + new ClientCall.Listener() { + @Override + public void onHeaders(Metadata headers) { + String encodedStr = headers.get(PEER_INFO_KEY); + Preconditions.checkArgument( + !Strings.isNullOrEmpty(encodedStr), + "Session open response headers missing %s", + PEER_INFO_KEY.name()); + + PeerInfo newPeerInfo; + + try { + byte[] decoded = Base64.getUrlDecoder().decode(encodedStr); + newPeerInfo = PeerInfo.parseFrom(decoded); + } catch (Exception e) { + throw new IllegalArgumentException( + "Failed to parse " + + PEER_INFO_KEY.name() + + " from the response header value: " + + encodedStr); + } + // TODO: remove these fallbacks once PeerInfo is properly populated on the server + if (newPeerInfo.getTransportType() == TransportType.TRANSPORT_TYPE_UNKNOWN) { + if (AltsContextUtil.check(call.getAttributes())) { + newPeerInfo = + newPeerInfo.toBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS) + .build(); + } else { + newPeerInfo = + newPeerInfo.toBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_UNKNOWN) + .build(); + } + } + SessionStreamImpl.this.peerInfo = newPeerInfo; + responseListener.onBeforeSessionStart(peerInfo); + super.onHeaders(headers); + } + + @Override + public void onMessage(SessionResponse message) { + responseListener.onMessage(message); + } + + @Override + public void onClose(Status status, Metadata trailers) { + responseListener.onClose(status, trailers); + } + }, + headers); + call.request(Integer.MAX_VALUE); + } + + @Override + public void sendMessage(SessionRequest request) { + call.sendMessage(request); + } + + @Override + public void halfClose() { + call.halfClose(); + } + + @Override + public void forceClose(@Nullable String message, @Nullable Throwable cause) { + call.cancel("Force closed: " + message, cause); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SingleChannelPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SingleChannelPool.java new file mode 100644 index 0000000000..6d40b58d53 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SingleChannelPool.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 + * + * 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.bigtable.data.v2.internal.channels; + +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import io.grpc.CallOptions; +import io.grpc.ManagedChannel; +import io.grpc.MethodDescriptor; +import java.util.function.Supplier; + +public class SingleChannelPool implements ChannelPool { + private final Supplier channelSupplier; + private ManagedChannel channel; + + public SingleChannelPool(Supplier channelSupplier) { + this.channelSupplier = channelSupplier; + } + + @Override + public void start() { + channel = channelSupplier.get(); + } + + @Override + public void close() { + channel.shutdown(); + } + + @Override + public SessionStream newStream( + MethodDescriptor desc, CallOptions callOptions) { + return new SessionStreamImpl(channel.newCall(desc, callOptions)); + } + + @Override + public void updateConfig(ChannelPoolConfiguration config) { + // No-op. + return; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java new file mode 100644 index 0000000000..428a0080d8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/channels/SwitchingChannelPool.java @@ -0,0 +1,213 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import static com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util.transportTypeToString; + +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager.ListenerHandle; +import io.grpc.CallOptions; +import io.grpc.ClientInterceptor; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.MethodDescriptor; +import java.time.Duration; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Supplier; +import javax.annotation.concurrent.GuardedBy; + +/** + * SwitchingChannelPool reads channel pool configuration from configManager on initialization, + * creates underlying channel pool according to the configuration, and subscribes to configuration + * updates. When update happens, it propagates updated configuration to the underlying channel pool + * or creates a different channel pool if channel pool mode has changed. + */ +public class SwitchingChannelPool implements ChannelPool { + @GuardedBy("this") + private ChannelPool delegate; + + private ChannelPoolConfiguration currentConfiguration; + + private final boolean fallbackAvailable; + private final ListenerHandle configListener; + + @GuardedBy("this") + private boolean isClosed; + + private final ChannelProvider channelProvider; + private final Metrics metrics; + private final ScheduledExecutorService backgroundExecutor; + + public SwitchingChannelPool( + ChannelProvider channelProvider, + ClientConfigurationManager configManager, + Metrics metrics, + ScheduledExecutorService backgroundExecutor) { + this.channelProvider = channelProvider; + this.metrics = metrics; + this.backgroundExecutor = backgroundExecutor; + + currentConfiguration = + configManager.getClientConfiguration().getSessionConfiguration().getChannelConfiguration(); + + if (channelProvider.getFallback().isPresent()) { + fallbackAvailable = true; + delegate = createChannelPoolForCurrentMode(); + } else { + // Depending on whether DirectAccess is avaialbe, the channelProvider + // is either a DirectAccess with fallback to Cloudpath + // or a basic Cloudpath. + // If it's a basic cloudpath we can't do any fallback, + // and we can't do directaccess without fallback. + // Essentially, fallback configuration is not applicable here. + fallbackAvailable = false; + delegate = newChannelPoolFromProvider(channelProvider); + } + + // Subscribe to config changes. + configListener = + configManager.addListener( + cfg -> cfg.getSessionConfiguration().getChannelConfiguration(), this::updateConfig); + } + + @Override + public synchronized void updateConfig(ChannelPoolConfiguration newConfig) { + if (isClosed) { + return; + } + + if (fallbackAvailable && currentConfiguration.getModeCase() != newConfig.getModeCase()) { + // Mode has changed and we can change modes. + currentConfiguration = newConfig; + ChannelPool cp = createChannelPoolForCurrentMode(); + replaceChannelPool(cp); + return; + } + + currentConfiguration = newConfig; + delegate.updateConfig(currentConfiguration); + } + + private ChannelPool createChannelPoolForCurrentMode() { + switch (currentConfiguration.getModeCase()) { + default: + case MODE_NOT_SET: + case CLOUD_PATH_ONLY: + return newChannelPoolFromProvider(channelProvider.getFallback().get()); + case DIRECT_ACCESS_ONLY: + return newChannelPoolFromProvider(channelProvider); + case DIRECT_ACCESS_WITH_FALLBACK: + ChannelPool primaryChannelPool = + newChannelPoolFromProvider( + channelProvider, + "primary", + new DirectpathEnforcer( + "Non-directpath connections are not allowed in the directpath channel " + + "pool when a fallback channel pool is available.")); + ChannelPool fallbackChannelPool = + newChannelPoolFromProvider(channelProvider.getFallback().get(), "fallback"); + FallbackConfiguration fallbackConfiguration = + FallbackConfiguration.builder() + .setPrimary( + transportTypeToString(TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS), + primaryChannelPool) + .setFallback( + transportTypeToString(TransportType.TRANSPORT_TYPE_SESSION_CLOUD_PATH), + fallbackChannelPool) + .setEnabled(true) + .setCheckInterval( + Duration.ofSeconds( + currentConfiguration + .getDirectAccessWithFallback() + .getCheckInterval() + .getSeconds())) + .setErrorRate( + currentConfiguration.getDirectAccessWithFallback().getErrorRateThreshold()) + .build(); + return new FallbackChannelPool( + fallbackConfiguration, metrics.getPoolFallbackListener(), backgroundExecutor); + } + } + + private synchronized void replaceChannelPool(ChannelPool newChannelPool) { + newChannelPool.start(); + ChannelPool prev = delegate; + delegate = newChannelPool; + prev.close(); + } + + @Override + public synchronized void start() { + delegate.start(); + } + + @Override + public synchronized void close() { + if (isClosed) { + return; + } + + configListener.close(); + delegate.close(); + isClosed = true; + } + + @Override + public synchronized SessionStream newStream( + MethodDescriptor desc, CallOptions callOptions) { + return delegate.newStream(desc, callOptions); + } + + private ChannelPool newChannelPoolFromProvider( + ChannelProvider channelProvider, ClientInterceptor... interceptors) { + return newChannelPoolFromProvider(channelProvider, null, interceptors); + } + + private ChannelPool newChannelPoolFromProvider( + ChannelProvider channelProvider, String logName, ClientInterceptor... interceptors) { + if (channelProvider.isSingleEndpoint()) { + return new SingleChannelPool( + channelBuilderToSupplier(channelProvider.newChannelBuilder(), interceptors)); + } + + if (logName != null) { + return new ChannelPoolDpImpl( + channelBuilderToSupplier(channelProvider.newChannelBuilder(), interceptors), + currentConfiguration, + logName, + metrics.getDebugTagTracer(), + backgroundExecutor); + } + + return new ChannelPoolDpImpl( + channelBuilderToSupplier(channelProvider.newChannelBuilder(), interceptors), + currentConfiguration, + metrics.getDebugTagTracer(), + backgroundExecutor); + } + + private Supplier channelBuilderToSupplier( + ManagedChannelBuilder channelBuilder, ClientInterceptor... interceptors) { + return () -> channelBuilder.intercept(interceptors).build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/DisabledShim.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/DisabledShim.java new file mode 100644 index 0000000000..b4d3cc305c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/DisabledShim.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.models.RowMutation; + +public class DisabledShim implements Shim { + + @Override + public void close() {} + + @Override + public UnaryCallable decorateReadRow( + UnaryCallable classic, + RowAdapter rowAdapter, + UnaryCallSettings settings) { + return classic; + } + + @Override + public UnaryCallable decorateMutateRow( + UnaryCallable classic, UnaryCallSettings settings) { + return classic; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapter.java new file mode 100644 index 0000000000..4db1249369 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapter.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.core.ApiFuture; +import io.grpc.Context.CancellableContext; +import java.util.concurrent.CancellationException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import javax.annotation.Nonnull; + +public class FutureAdapter implements ApiFuture { + private final CompletableFuture inner; + private final CancellableContext ambientCtx; + + public FutureAdapter(CompletableFuture inner, CancellableContext ambientCtx) { + this.inner = inner; + this.ambientCtx = ambientCtx; + + CompletableFuture ignored = inner.whenComplete((ignored1, ignored2) -> ambientCtx.close()); + } + + @Override + public void addListener(Runnable listener, Executor executor) { + @SuppressWarnings("UnusedVariable") + CompletableFuture ignored = inner.whenCompleteAsync((v, t) -> listener.run(), executor); + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + boolean wasCancelled = inner.cancel(mayInterruptIfRunning); + ambientCtx.cancel(new CancellationException("Operation Future was cancelled by the end user")); + return wasCancelled; + } + + @Override + public boolean isCancelled() { + return inner.isCancelled(); + } + + @Override + public boolean isDone() { + return inner.isDone(); + } + + @Override + public V get() throws InterruptedException, ExecutionException { + return inner.get(); + } + + @Override + public V get(long timeout, @Nonnull TimeUnit unit) + throws InterruptedException, ExecutionException, TimeoutException { + return inner.get(timeout, unit); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxBasicChannelProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxBasicChannelProvider.java new file mode 100644 index 0000000000..26d7857aaf --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxBasicChannelProvider.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.auth.Credentials; +import com.google.bigtable.v2.FeatureFlags; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import io.grpc.CallCredentials; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ManagedChannelBuilder; +import io.grpc.MethodDescriptor; +import io.grpc.auth.MoreCallCredentials; +import java.io.IOException; +import java.util.Optional; +import javax.annotation.Nullable; + +public class GaxBasicChannelProvider implements ChannelProvider { + private final InstantiatingGrpcChannelProvider inner; + private final @Nullable CallCredentials credentials; + + public GaxBasicChannelProvider( + InstantiatingGrpcChannelProvider inner, @Nullable Credentials credentials) { + this.inner = inner.toBuilder().setAttemptDirectPath(false).build(); + this.credentials = Optional.ofNullable(credentials).map(MoreCallCredentials::from).orElse(null); + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags.toBuilder() + .setTrafficDirectorEnabled(false) + .setDirectAccessRequested(false) + .build(); + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + try { + ManagedChannelBuilder builder = inner.createChannelBuilder(); + if (credentials != null) { + builder.intercept(new CredInterceptor(credentials)); + } + return builder; + } catch (IOException e) { + throw new RuntimeException("Gax channel provider failed to provide a channel builder", e); + } + } + + @Override + public boolean isSingleEndpoint() { + return false; + } + + private static class CredInterceptor implements ClientInterceptor { + private final CallCredentials callCredentials; + + private CredInterceptor(CallCredentials callCredentials) { + this.callCredentials = callCredentials; + } + + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + return next.newCall(method, callOptions.withCallCredentials(callCredentials)); + } + } + + @Override + public Optional getFallback() { + return Optional.empty(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxDirectAccessChannelProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxDirectAccessChannelProvider.java new file mode 100644 index 0000000000..bfc4dfd7bf --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/GaxDirectAccessChannelProvider.java @@ -0,0 +1,99 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.auth.Credentials; +import com.google.bigtable.v2.FeatureFlags; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import io.grpc.ManagedChannelBuilder; +import java.io.IOException; +import java.util.Optional; +import javax.annotation.Nullable; + +public class GaxDirectAccessChannelProvider implements ChannelProvider { + private final InstantiatingGrpcChannelProvider inner; + private final Optional fallback; + + public static ChannelProvider create( + InstantiatingGrpcChannelProvider outer, @Nullable Credentials credentials) { + InstantiatingGrpcChannelProvider directAccessProvider = + outer.toBuilder().setAttemptDirectPath(true).setAttemptDirectPathXds().build(); + + InstantiatingGrpcChannelProvider cloudPathProvider = + outer.toBuilder().setAttemptDirectPath(false).build(); + + if (directAccessProvider.canUseDirectPath()) { + return new GaxDirectAccessChannelProvider( + directAccessProvider, credentials, Optional.empty()); + } else { + return new GaxBasicChannelProvider(cloudPathProvider, credentials); + } + } + + public static ChannelProvider createWithFallback( + InstantiatingGrpcChannelProvider outer, @Nullable Credentials credentials) { + InstantiatingGrpcChannelProvider directAccessProvider = + outer.toBuilder().setAttemptDirectPath(true).setAttemptDirectPathXds().build(); + + InstantiatingGrpcChannelProvider cloudPathProvider = + outer.toBuilder().setAttemptDirectPath(false).build(); + + if (directAccessProvider.canUseDirectPath()) { + return new GaxDirectAccessChannelProvider( + directAccessProvider, + credentials, + Optional.of(new GaxBasicChannelProvider(cloudPathProvider, credentials))); + } else { + return new GaxBasicChannelProvider(cloudPathProvider, credentials); + } + } + + private GaxDirectAccessChannelProvider( + InstantiatingGrpcChannelProvider directAccessProvider, + @SuppressWarnings("unused") @Nullable Credentials credentials, + Optional fallback) { + this.inner = directAccessProvider; + this.fallback = fallback; + } + + @Override + public FeatureFlags updateFeatureFlags(FeatureFlags featureFlags) { + return featureFlags.toBuilder() + .setTrafficDirectorEnabled(true) + .setDirectAccessRequested(true) + .build(); + } + + @Override + public ManagedChannelBuilder newChannelBuilder() { + try { + return inner.createChannelBuilder(); + } catch (IOException e) { + throw new RuntimeException("Gax channel provider failed to provide a channel builder", e); + } + } + + @Override + public boolean isSingleEndpoint() { + return false; + } + + @Override + public Optional getFallback() { + return fallback; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Shim.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Shim.java new file mode 100644 index 0000000000..b15e4003af --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Shim.java @@ -0,0 +1,35 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.models.RowMutation; + +public interface Shim { + + void close(); + + UnaryCallable decorateReadRow( + UnaryCallable classic, + RowAdapter rowAdapter, + UnaryCallSettings settings); + + UnaryCallable decorateMutateRow( + UnaryCallable classic, UnaryCallSettings settings); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ShimImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ShimImpl.java new file mode 100644 index 0000000000..353973dc8e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ShimImpl.java @@ -0,0 +1,276 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.auth.Credentials; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.BigtableGrpc.BigtableBlockingV2Stub; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.GetClientConfigurationRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ConfiguredChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.Client; +import com.google.cloud.bigtable.data.v2.internal.api.Client.Resource; +import com.google.cloud.bigtable.data.v2.internal.compat.ops.DivertingUnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.compat.ops.MutateRowShim; +import com.google.cloud.bigtable.data.v2.internal.compat.ops.ReadRowShim; +import com.google.cloud.bigtable.data.v2.internal.compat.ops.ReadRowShimInner; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.common.base.Strings; +import com.google.common.collect.ImmutableMap; +import io.grpc.ClientInterceptor; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.stub.MetadataUtils; +import java.io.IOException; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * Implementation of a shim to fork off traffic to session based apis. It acts as a factory for + * callable decorators. + */ +public class ShimImpl implements Shim { + private static final Logger logger = Logger.getLogger(ShimImpl.class.getName()); + + // TODO: this should be a client config + public static final int MAX_CONSECUTIVE_UNIMPLEMENTED_FAILURES = 30; + private static final Duration DA_CHECK_TIMEOUT = Duration.ofSeconds(5); + + private final ClientConfigurationManager configManager; + private final Client client; + + private final ReadRowShimInner readRowShimInner; + private final MutateRowShim mutateRowShim; + + public static Shim create( + ClientInfo clientInfo, + @Nullable Credentials callCreds, + Metrics metrics, + ScheduledExecutorService bgExecutor, + StubSettings stubSettings) + throws IOException { + + TransportChannelProvider transportProvider = stubSettings.getTransportChannelProvider(); + if (!(transportProvider instanceof InstantiatingGrpcChannelProvider)) { + return new DisabledShim(); + } + + transportProvider = + ((InstantiatingGrpcChannelProvider) transportProvider) + .toBuilder() + .setHeaderProvider(ImmutableMap::of) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) + .setAttemptDirectPath(true) + .setAttemptDirectPathXds() + .build(); + + if (transportProvider.needsEndpoint()) { + transportProvider = transportProvider.withEndpoint(stubSettings.getEndpoint()); + } + if (callCreds != null && transportProvider.needsCredentials()) { + transportProvider = transportProvider.withCredentials(callCreds); + } + if (transportProvider.needsBackgroundExecutor()) { + transportProvider = transportProvider.withBackgroundExecutor(bgExecutor); + } + if (transportProvider.needsMtlsEndpoint() + && !Strings.isNullOrEmpty(stubSettings.getMtlsEndpoint())) { + transportProvider = transportProvider.withMtlsEndpoint(stubSettings.getMtlsEndpoint()); + } + + // Channel provider for the client. DirectAccess with fallback by default. + ChannelProvider clientChannelProvider = + configureChannelProvider( + GaxDirectAccessChannelProvider.createWithFallback( + (InstantiatingGrpcChannelProvider) transportProvider, callCreds), + metrics); + + if (!checkDirectAccessAvailable( + Client.BASE_FEATURE_FLAGS, clientInfo, clientChannelProvider, metrics, bgExecutor)) { + // Directpath failed, revert to basic channel provider for the client. + clientChannelProvider = + configureChannelProvider( + new GaxBasicChannelProvider( + (InstantiatingGrpcChannelProvider) transportProvider, callCreds), + metrics); + } + + // ChannelProvider for configuration manager. + ChannelProvider configChannelProvider = + configureChannelProvider( + new GaxBasicChannelProvider( + (InstantiatingGrpcChannelProvider) transportProvider, callCreds), + metrics); + + ClientConfigurationManager configManager = + new ClientConfigurationManager( + configChannelProvider.updateFeatureFlags(Client.BASE_FEATURE_FLAGS), + clientInfo, + configChannelProvider, + metrics.getDebugTagTracer(), + bgExecutor); + + try { + configManager.start().get(); + metrics.getDebugTagTracer().setClientConfigurationManager(configManager); + } catch (Exception e) { + logger.log(Level.WARNING, "Failed to fetch initial client configuration", e); + configManager.close(); + return new DisabledShim(); + } + + FeatureFlags featureFlags = Client.BASE_FEATURE_FLAGS; + + if (configManager.areSessionsRequired()) { + featureFlags = featureFlags.toBuilder().setSessionsRequired(true).build(); + } + + Client client = + new Client( + clientChannelProvider.updateFeatureFlags(featureFlags), + clientInfo, + clientChannelProvider, + Resource.createShared(metrics), + Resource.createShared(configManager), + Resource.createShared(bgExecutor)); + + return new ShimImpl(configManager, client); + } + + public ShimImpl(ClientConfigurationManager configManager, Client client) { + this.configManager = configManager; + this.client = client; + + this.readRowShimInner = new ReadRowShimInner(client); + this.mutateRowShim = new MutateRowShim(client); + } + + private static ChannelProvider configureChannelProvider( + ChannelProvider channelProvider, Metrics metrics) { + return new ConfiguredChannelProvider( + channelProvider, + channelBuilder -> + metrics + .configureGrpcChannel(channelBuilder) + .keepAliveTime(Client.KEEPALIVE_TIME_MS, TimeUnit.MILLISECONDS) + .keepAliveTimeout(Client.KEEPALIVE_TIMEOUT_MS, TimeUnit.MILLISECONDS) + // TODO: consider localizing this for large reads + .maxInboundMessageSize(256 * 1024 * 1024)); + } + + private static boolean checkDirectAccessAvailable( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ChannelProvider channelProvider, + Metrics metrics, + ScheduledExecutorService bgExecutor) { + ManagedChannel channel = channelProvider.newChannelBuilder().build(); + DirectPathCompatibleTracer tracer = metrics.getDirectPathCompatibleTracer(); + + Metadata metadata = + com.google.cloud.bigtable.data.v2.internal.api.Util.composeMetadata( + channelProvider.updateFeatureFlags(featureFlags), + ImmutableMap.of( + "instance_name", clientInfo.getInstanceName().toString(), + "app_profile_id", clientInfo.getAppProfileId())); + ClientInterceptor attachMetadata = MetadataUtils.newAttachHeadersInterceptor(metadata); + MetadataExtractorInterceptor metaInterceptor = new MetadataExtractorInterceptor(); + + BigtableBlockingV2Stub stub = + BigtableGrpc.newBlockingV2Stub(channel).withInterceptors(attachMetadata, metaInterceptor); + + try { + stub.withDeadlineAfter(DA_CHECK_TIMEOUT) + .getClientConfiguration( + GetClientConfigurationRequest.newBuilder() + .setInstanceName(clientInfo.getInstanceName().toString()) + .setAppProfileId(clientInfo.getAppProfileId()) + .build()); + } catch (Exception e) { + logger.log(Level.FINE, "DirectAccess check RPC failed.", e); + // Spin up investigation. + bgExecutor.execute(() -> DirectAccessInvestigator.investigateAndReport(tracer, e)); + return false; + } finally { + channel.shutdownNow(); + } + + TransportType tt = + Optional.ofNullable(metaInterceptor.getSidebandData().getPeerInfo()) + .map(PeerInfo::getTransportType) + .orElse(TransportType.TRANSPORT_TYPE_UNKNOWN); + + boolean result = + tt == TransportType.TRANSPORT_TYPE_DIRECT_ACCESS + || tt == TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS; + + if (result) { + tracer.recordSuccess(metaInterceptor.getSidebandData().getIpProtocol()); + } else { + // Spin up investigation. + bgExecutor.execute(() -> DirectAccessInvestigator.investigateAndReport(tracer, null)); + } + + return result; + } + + @Override + public void close() { + client.close(); + configManager.close(); + } + + @Override + public UnaryCallable decorateReadRow( + UnaryCallable classic, + RowAdapter rowAdapter, + UnaryCallSettings settings) { + return new DivertingUnaryCallable<>( + configManager, + classic, + new ReadRowShim<>(readRowShimInner, rowAdapter), + Util.extractTimeout(settings)); + } + + @Override + public UnaryCallable decorateMutateRow( + UnaryCallable classic, UnaryCallSettings settings) { + return new DivertingUnaryCallable<>( + configManager, classic, mutateRowShim, Util.extractTimeout(settings)); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Util.java new file mode 100644 index 0000000000..42fa0b9b1d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/Util.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; +import com.google.common.cache.RemovalListener; +import io.grpc.Context; +import io.grpc.Deadline; +import java.io.Closeable; +import java.io.IOException; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; +import javax.annotation.Nonnull; + +public class Util { + public static LoadingCache createSessionMap( + Function factory) { + return CacheBuilder.newBuilder() + .expireAfterAccess(Duration.ofMinutes(5)) + .removalListener( + (RemovalListener) + notification -> { + try { + @SuppressWarnings("DataFlowIssue") + @Nonnull + V value = notification.getValue(); + //noinspection DataFlowIssue + value.close(); + } catch (IOException e) { + // TODO log + } + }) + .build( + new CacheLoader() { + @Override + @Nonnull + public V load(@Nonnull K key) { + return factory.apply(key); + } + }); + } + + public static Duration extractTimeout(UnaryCallSettings settings) { + return settings.getRetrySettings().getTotalTimeoutDuration(); + } + + public static Deadline extractDeadline(GrpcCallContext callContext, Duration defaultDeadline) { + // NOTE: ignoring callContext.timeout because its an attempt timeout + Optional ambientDeadline = Optional.ofNullable(Context.current().getDeadline()); + Optional retryTotalTimeout = + Optional.ofNullable(callContext) + .flatMap(ctx -> Optional.ofNullable(ctx.getRetrySettings())) + .map(RetrySettings::getTotalTimeoutDuration); + Optional grpcCallDeadline = + Optional.ofNullable(callContext) + .flatMap(ctx -> Optional.ofNullable(ctx.getCallOptions())) + .flatMap(ctx -> Optional.ofNullable(ctx.getDeadline())); + + Deadline effectiveDeadline = null; + if (ambientDeadline.isPresent()) { + effectiveDeadline = ambientDeadline.get(); + } + if (grpcCallDeadline.isPresent()) { + if (effectiveDeadline == null || grpcCallDeadline.get().isBefore(effectiveDeadline)) { + effectiveDeadline = grpcCallDeadline.get(); + } + } + if (retryTotalTimeout.isPresent()) { + Deadline retryDeadline = + Deadline.after(retryTotalTimeout.get().toMillis(), TimeUnit.MILLISECONDS); + if (effectiveDeadline == null || retryDeadline.isBefore(effectiveDeadline)) { + effectiveDeadline = retryDeadline; + } + } + if (effectiveDeadline == null) { + effectiveDeadline = Deadline.after(defaultDeadline.toMillis(), TimeUnit.MILLISECONDS); + } + return effectiveDeadline; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/DivertingUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/DivertingUnaryCallable.java new file mode 100644 index 0000000000..b7c7f815f9 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/DivertingUnaryCallable.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat.ops; + +import com.google.api.core.ApiFuture; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.compat.FutureAdapter; +import com.google.cloud.bigtable.data.v2.internal.compat.Util; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.common.base.Throwables; +import io.grpc.Context; +import io.grpc.Context.CancellableContext; +import io.grpc.Deadline; +import io.grpc.Status; +import io.grpc.StatusException; +import io.grpc.StatusRuntimeException; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ThreadLocalRandom; + +/** A callable to fork traffic between classic and session based operations. */ +public class DivertingUnaryCallable extends UnaryCallable { + private final ClientConfigurationManager configurationManager; + + private final UnaryCallable classic; + private final UnaryShim experimental; + + private final Duration defaultTimeout; + + public DivertingUnaryCallable( + ClientConfigurationManager configurationManager, + UnaryCallable classic, + UnaryShim experimental, + Duration defaultTimeout) { + this.configurationManager = configurationManager; + this.classic = classic; + this.experimental = experimental; + this.defaultTimeout = defaultTimeout; + } + + @Override + public ApiFuture futureCall(ReqT request, ApiCallContext context) { + if (!useExperimental(request)) { + return classic.futureCall(request, context); + } + + Deadline deadline = Util.extractDeadline((GrpcCallContext) context, defaultTimeout); + + // Java8 futures dont chain cancellations + // ApiFutures do, so we pipe cancellation via the ambient Context + // futureCall is responsible for attaching/detaching + // FutureAdapter is responsible for cleaning up the context + CancellableContext ambientCtx = Context.current().withCancellation(); + + CompletableFuture f; + + try { + f = ambientCtx.call(() -> experimental.call(request, deadline)); + } catch (Throwable e) { + ambientCtx.close(); + + Throwables.throwIfUnchecked(e); + throw new RuntimeException(e); + } + + f = + f.handle( + (r, e) -> { + if (e != null) { + throw translateException(e); + } + return r; + }); + + return new FutureAdapter<>(f, ambientCtx); + } + + private boolean useExperimental(ReqT req) { + if (!experimental.supports(req)) { + return false; + } + + float ratio = + configurationManager.getClientConfiguration().getSessionConfiguration().getSessionLoad(); + if (ratio == 0) { + return false; + } + if (ratio != 1.0 && ThreadLocalRandom.current().nextFloat() > ratio) { + return false; + } + return true; + } + + ApiException translateException(Throwable e) { + Status.Code code = Status.Code.UNKNOWN; + + if (e instanceof StatusRuntimeException) { + code = ((StatusRuntimeException) e).getStatus().getCode(); + } + if (e instanceof StatusException) { + code = ((StatusException) e).getStatus().getCode(); + } + + return ApiExceptionFactory.createException(e.getMessage(), e, GrpcStatusCode.of(code), false); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/MutateRowShim.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/MutateRowShim.java new file mode 100644 index 0000000000..9102714457 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/MutateRowShim.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat.ops; + +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenTableRequest.Permission; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.cloud.bigtable.data.v2.internal.api.AuthorizedViewAsync; +import com.google.cloud.bigtable.data.v2.internal.api.Client; +import com.google.cloud.bigtable.data.v2.internal.api.TableAsync; +import com.google.cloud.bigtable.data.v2.internal.compat.ShimImpl; +import com.google.cloud.bigtable.data.v2.internal.compat.Util; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.TargetId; +import com.google.common.cache.LoadingCache; +import io.grpc.Deadline; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; + +public class MutateRowShim implements UnaryShim { + + private final LoadingCache tables; + private final LoadingCache authViews; + + public MutateRowShim(Client client) { + tables = + Util.createSessionMap( + k -> client.openTableAsync(k.getTableId(), Permission.PERMISSION_WRITE)); + authViews = + Util.createSessionMap( + k -> + client.openAuthorizedViewAsync( + k.getTableId(), + k.getAuthorizedViewId(), + OpenAuthorizedViewRequest.Permission.PERMISSION_WRITE)); + } + + @Override + public void close() throws IOException { + tables.invalidateAll(); + authViews.invalidateAll(); + } + + @Override + public boolean supports(RowMutation request) { + TargetId targetId = request.getTargetId(); + SessionPool pool; + // TODO: avoid double lookup + if (targetId instanceof TableId) { + pool = tables.getUnchecked((TableId) targetId).getSessionPool(); + } else if (targetId instanceof AuthorizedViewId) { + pool = authViews.getUnchecked((AuthorizedViewId) targetId).getSessionPool(); + } else { + return false; + } + // Currently this will only fallback in case RLS is misconfigured. If the AFE + // pool is unavailable, it'll be controlled by ClientConfiguration. + return pool.getConsecutiveUnimplementedFailures() + < ShimImpl.MAX_CONSECUTIVE_UNIMPLEMENTED_FAILURES + || pool.hasSession(); + } + + @Override + public CompletableFuture call(RowMutation request, Deadline deadline) { + TargetId targetId = request.getTargetId(); + + SessionMutateRowRequest innerReq = request.toSessionProto(); + + if (targetId instanceof TableId) { + return tables + .getUnchecked((TableId) targetId) + .mutateRow(innerReq, deadline) + .thenApply(r -> null); + } + if (targetId instanceof AuthorizedViewId) { + return authViews + .getUnchecked((AuthorizedViewId) targetId) + .mutateRow(innerReq, deadline) + .thenApply(r -> null); + } + + CompletableFuture f = new CompletableFuture<>(); + f.completeExceptionally( + new UnsupportedOperationException("Unsupported targetId type: " + targetId)); + return f; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShim.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShim.java new file mode 100644 index 0000000000..68d9b9443c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShim.java @@ -0,0 +1,90 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat.ops; + +import com.google.bigtable.v2.Cell; +import com.google.bigtable.v2.Column; +import com.google.bigtable.v2.Family; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.models.RowAdapter.RowBuilder; +import io.grpc.Deadline; +import java.io.IOException; +import java.util.concurrent.CompletableFuture; + +/** + * Stateless wrapper around {@link ReadRowShimInner}. It primary purpose is to pair a {@link + * RowAdapter} with a stateful {@link ReadRowShimInner}. + */ +public class ReadRowShim implements UnaryShim { + private static final RowAdapter DEFAULT_ADAPTER = new DefaultRowAdapter(); + + private final ReadRowShimInner inner; + private final RowAdapter adapter; + + public static ReadRowShim createDefault(ReadRowShimInner inner) { + return new ReadRowShim<>(inner, DEFAULT_ADAPTER); + } + + public ReadRowShim(ReadRowShimInner inner, RowAdapter adapter) { + this.inner = inner; + this.adapter = adapter; + } + + @Override + public boolean supports(Query request) { + return inner.supports(request); + } + + @Override + public CompletableFuture call(Query request, Deadline deadline) { + CompletableFuture f = inner.call(request, deadline); + return f.thenApply(r -> buildRow(adapter.createRowBuilder(), r)); + } + + @Override + public void close() throws IOException { + inner.close(); + } + + private static T buildRow(RowBuilder adapter, SessionReadRowResponse input) { + if (!input.hasRow()) { + return null; + } + com.google.bigtable.v2.Row protoRow = input.getRow(); + + adapter.startRow(protoRow.getKey()); + + for (Family family : protoRow.getFamiliesList()) { + for (Column column : family.getColumnsList()) { + for (Cell cell : column.getCellsList()) { + adapter.startCell( + family.getName(), + column.getQualifier(), + cell.getTimestampMicros(), + cell.getLabelsList(), + 0); + adapter.cellValue(cell.getValue()); + adapter.finishCell(); + } + } + } + return adapter.finishRow(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShimInner.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShimInner.java new file mode 100644 index 0000000000..9dc134bd23 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/ReadRowShimInner.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat.ops; + +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenMaterializedViewRequest; +import com.google.bigtable.v2.OpenTableRequest.Permission; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.cloud.bigtable.data.v2.internal.api.AuthorizedViewAsync; +import com.google.cloud.bigtable.data.v2.internal.api.Client; +import com.google.cloud.bigtable.data.v2.internal.api.MaterializedViewAsync; +import com.google.cloud.bigtable.data.v2.internal.api.TableAsync; +import com.google.cloud.bigtable.data.v2.internal.compat.ShimImpl; +import com.google.cloud.bigtable.data.v2.internal.compat.Util; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; +import com.google.cloud.bigtable.data.v2.models.MaterializedViewId; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.TargetId; +import com.google.common.cache.LoadingCache; +import io.grpc.Deadline; +import java.util.concurrent.CompletableFuture; + +public class ReadRowShimInner implements UnaryShim { + private final LoadingCache tables; + private final LoadingCache authViews; + private final LoadingCache matViews; + + public ReadRowShimInner(Client client) { + tables = + Util.createSessionMap( + k -> client.openTableAsync(k.getTableId(), Permission.PERMISSION_READ)); + authViews = + Util.createSessionMap( + k -> + client.openAuthorizedViewAsync( + k.getTableId(), + k.getAuthorizedViewId(), + OpenAuthorizedViewRequest.Permission.PERMISSION_READ)); + matViews = + Util.createSessionMap( + k -> + client.openMaterializedViewAsync( + k.getMaterializedViewId(), + OpenMaterializedViewRequest.Permission.PERMISSION_READ)); + } + + @Override + public void close() { + tables.invalidateAll(); + authViews.invalidateAll(); + matViews.invalidateAll(); + } + + @Override + public boolean supports(Query request) { + TargetId targetId = request.getTargetId(); + SessionPool pool; + // TODO avoid double lookup + if (targetId instanceof TableId) { + pool = tables.getUnchecked((TableId) targetId).getSessionPool(); + } else if (targetId instanceof AuthorizedViewId) { + pool = authViews.getUnchecked((AuthorizedViewId) targetId).getSessionPool(); + } else if (targetId instanceof MaterializedViewId) { + pool = matViews.getUnchecked((MaterializedViewId) targetId).getSessionPool(); + } else { + return false; + } + // Currently this will only fallback in case RLS is misconfigured. If the AFE + // pool is unavailable, it'll be controlled by ClientConfiguration. + return pool.getConsecutiveUnimplementedFailures() + < ShimImpl.MAX_CONSECUTIVE_UNIMPLEMENTED_FAILURES + || pool.hasSession(); + } + + @Override + public CompletableFuture call(Query query, Deadline deadline) { + TargetId targetId = query.getTargetId(); + + SessionReadRowRequest innerReq = query.toSessionPointProto(); + + if (targetId instanceof TableId) { + return tables.getUnchecked((TableId) targetId).readRow(innerReq, deadline); + } + if (targetId instanceof AuthorizedViewId) { + return authViews.getUnchecked((AuthorizedViewId) targetId).readRow(innerReq, deadline); + } + if (targetId instanceof MaterializedViewId) { + return matViews.getUnchecked((MaterializedViewId) targetId).readRow(innerReq, deadline); + } + + CompletableFuture f = new CompletableFuture<>(); + f.completeExceptionally( + new UnsupportedOperationException("Unsupported targetId type: " + targetId)); + return f; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/UnaryShim.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/UnaryShim.java new file mode 100644 index 0000000000..864e765b2c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/compat/ops/UnaryShim.java @@ -0,0 +1,36 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat.ops; + +import io.grpc.Deadline; +import java.io.Closeable; +import java.util.concurrent.CompletableFuture; + +/** + * Wrapper interface for session operations. It will own a set of {@link + * com.google.cloud.bigtable.data.v2.internal.session.SessionPool}s and wil dispatch vRPCs. It's + * responsible for creating these {@link + * com.google.cloud.bigtable.data.v2.internal.session.SessionPool}s on the fly and garbage + * collecting them when they are no longer used. Each logical operation will implement this + * interface. + */ +public interface UnaryShim extends Closeable { + CompletableFuture call(ReqT request, Deadline deadline); + + default boolean supports(ReqT request) { + return true; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistry.java new file mode 100644 index 0000000000..c37259b022 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistry.java @@ -0,0 +1,265 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm; + +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientBatchWriteFlowControlFactor; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientBatchWriteFlowControlTargetQps; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientChannelPoolFallbackCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientChannelPoolOutstandingRpcs; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientDebugTagCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientDpCompatGuage; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientPerConnectionErrorCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientSessionDuration; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientSessionOpenLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientSessionUptime; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientTransportLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.GrpcMetric; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.MetricWrapper; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.PacemakerDelay; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableApplicationBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency2; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableClientBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableConnectivityErrorCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableFirstResponseLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableOperationLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRemainingDeadline; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRetryCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableServerLatency; +import com.google.common.collect.ImmutableList; +import io.opentelemetry.api.metrics.Meter; +import io.opentelemetry.api.metrics.MeterProvider; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Repository for all client metrics. This class has 2 audiences: + * + *

      + *
    • VRpcTracer, which reference each metric directly + *
    • Exporter, which will look up each metric by name and use the {@link MetricWrapper} + * interface to augment the {@code MonitoredResource} and {@code Metric Labels} + *
    + */ +public class MetricRegistry { + public static final String METER_NAME = "bigtable.googleapis.com/internal/client/"; + + final TableOperationLatency operationLatencyMetric; + final TableAttemptLatency attemptLatencyMetric; + final TableAttemptLatency2 attemptLatency2Metric; + final TableRetryCount retryCountMetric; + final TableFirstResponseLatency firstResponseLantencyMetric; + final TableServerLatency serverLatencyMetric; + final ClientChannelPoolOutstandingRpcs channelPoolOutstandingRpcsMetric; + final TableConnectivityErrorCount connectivityErrorCountMetric; + final ClientDpCompatGuage dpCompatGuageMetric; + final TableApplicationBlockingLatency applicationBlockingLatencyMetric; + final TableClientBlockingLatency clientBlockingLatencyMetric; + final ClientPerConnectionErrorCount perConnectionErrorCountMetric; + final TableRemainingDeadline remainingDeadlineMetric; + final ClientBatchWriteFlowControlFactor batchWriteFlowControlFactorMetric; + final ClientBatchWriteFlowControlTargetQps batchWriteFlowControlTargetQpsMetric; + + final ClientTransportLatency transportLatencyMetric; + + final ClientSessionUptime sessionUptimeMetric; + final ClientSessionDuration sessionDurationMetric; + final ClientSessionOpenLatency sessionOpenLatencyMetric; + + final ClientDebugTagCount debugTagCountMetric; + final PacemakerDelay pacemakerDelayMetric; + + final ClientChannelPoolFallbackCount channelFallbackCountMetric; + + private final Map> metrics = new HashMap<>(); + private final List grpcMetricNames = new ArrayList<>(); + + public MetricRegistry() { + operationLatencyMetric = register(new TableOperationLatency()); + attemptLatencyMetric = register(new TableAttemptLatency()); + attemptLatency2Metric = register(new TableAttemptLatency2()); + retryCountMetric = register(new TableRetryCount()); + firstResponseLantencyMetric = register(new TableFirstResponseLatency()); + serverLatencyMetric = register(new TableServerLatency()); + channelPoolOutstandingRpcsMetric = register(new ClientChannelPoolOutstandingRpcs()); + connectivityErrorCountMetric = register(new TableConnectivityErrorCount()); + applicationBlockingLatencyMetric = register(new TableApplicationBlockingLatency()); + clientBlockingLatencyMetric = register(new TableClientBlockingLatency()); + perConnectionErrorCountMetric = register(new ClientPerConnectionErrorCount()); + dpCompatGuageMetric = register(new ClientDpCompatGuage()); + remainingDeadlineMetric = register(new TableRemainingDeadline()); + batchWriteFlowControlFactorMetric = register(new ClientBatchWriteFlowControlFactor()); + batchWriteFlowControlTargetQpsMetric = register(new ClientBatchWriteFlowControlTargetQps()); + + sessionUptimeMetric = register(new ClientSessionUptime()); + sessionDurationMetric = register(new ClientSessionDuration()); + sessionOpenLatencyMetric = register(new ClientSessionOpenLatency()); + transportLatencyMetric = register(new ClientTransportLatency()); + + debugTagCountMetric = register(new ClientDebugTagCount()); + pacemakerDelayMetric = register(new PacemakerDelay()); + + channelFallbackCountMetric = register(new ClientChannelPoolFallbackCount()); + + // From + // https://github.com/grpc/grpc-java/blob/31fdb6c2268b4b1c8ba6c995ee46c58e84a831aa/rls/src/main/java/io/grpc/rls/CachingRlsLbClient.java#L138-L165 + registerGrpcMetric( + "grpc.client.attempt.duration", + ImmutableList.of("grpc.lb.locality", "grpc.status", "grpc.method", "grpc.target")); + registerGrpcMetric( + "grpc.lb.rls.default_target_picks", + ImmutableList.of( + "grpc.target", + "grpc.lb.rls.server_target", + "grpc.lb.rls.data_plane_target", + "grpc.lb.pick_result")); + registerGrpcMetric( + "grpc.lb.rls.target_picks", + ImmutableList.of( + "grpc.target", + "grpc.lb.rls.server_target", + "grpc.lb.rls.data_plane_target", + "grpc.lb.pick_result")); + registerGrpcMetric( + "grpc.lb.rls.failed_picks", ImmutableList.of("grpc.target", "grpc.lb.rls.server_target")); + + // From + // https://github.com/grpc/grpc-java/blob/31fdb6c2268b4b1c8ba6c995ee46c58e84a831aa/xds/src/main/java/io/grpc/xds/XdsClientMetricReporterImpl.java#L67-L94 + // TODO: "grpc.xds_client.connected" + registerGrpcMetric( + "grpc.xds_client.server_failure", ImmutableList.of("grpc.target", "grpc.xds.server")); + // TODO: "grpc.xds_client.resource_updates_valid", + registerGrpcMetric( + "grpc.xds_client.resource_updates_invalid", + ImmutableList.of("grpc.target", "grpc.xds.server", "grpc.xds.resource_type")); + // TODO: "grpc.xds_client.resources" + + // From + // https://github.com/grpc/proposal/blob/86990145a7cef9e5473a132709b2556fec00c4c6/A94-subchannel-otel-metrics.md + registerGrpcMetric( + "grpc.subchannel.disconnections", + ImmutableList.of( + "grpc.target", "grpc.lb.backend_service", "grpc.lb.locality", "grpc.disconnect_error")); + + registerGrpcMetric( + "grpc.subchannel.connection_attempts_succeeded", + ImmutableList.of("grpc.target", "grpc.lb.backend_service", "grpc.lb.locality")); + + registerGrpcMetric( + "grpc.subchannel.connection_attempts_failed", + ImmutableList.of("grpc.target", "grpc.lb.backend_service", "grpc.lb.locality")); + + registerGrpcMetric( + "grpc.subchannel.open_connections", + ImmutableList.of( + "grpc.target", "grpc.security_level", "grpc.lb.backend_service", "grpc.lb.locality")); + } + + private void registerGrpcMetric(String name, List labels) { + grpcMetricNames.add(name); + register(new GrpcMetric(name, labels)); + } + + private > T register(T instrument) { + metrics.put(instrument.getName(), instrument); + return instrument; + } + + List getGrpcMetricNames() { + return ImmutableList.copyOf(grpcMetricNames); + } + + public MetricWrapper getMetric(String name) { + return metrics.get(name); + } + + public RecorderRegistry newInternalRecorderRegistry(MeterProvider meterProvider) { + return new RecorderRegistry(meterProvider.get(METER_NAME), false); + } + + public RecorderRegistry newUserRecorderRegistry(MeterProvider meterProvider) { + return new RecorderRegistry(meterProvider.get(METER_NAME), true); + } + + public class RecorderRegistry { + public final TableOperationLatency.Recorder operationLatency; + public final TableAttemptLatency.Recorder attemptLatency; + public final TableAttemptLatency2.Recorder attemptLatency2; + public final TableRetryCount.Recorder retryCount; + public final TableFirstResponseLatency.Recorder firstResponseLantency; + public final TableServerLatency.Recorder serverLatency; + public final ClientChannelPoolOutstandingRpcs.Recorder channelPoolOutstandingRpcs; + public final TableConnectivityErrorCount.Recorder connectivityErrorCount; + public final ClientDpCompatGuage.Recorder dpCompatGuage; + public final TableApplicationBlockingLatency.Recorder applicationBlockingLatency; + public final TableClientBlockingLatency.Recorder clientBlockingLatency; + public final ClientPerConnectionErrorCount.Recorder perConnectionErrorCount; + public final TableRemainingDeadline.Recorder remainingDeadline; + public final ClientBatchWriteFlowControlTargetQps.Recorder batchWriteFlowControlTargetQps; + public final ClientBatchWriteFlowControlFactor.Recorder batchWriteFlowControlFactor; + + public final ClientTransportLatency.Recorder transportLatency; + + public final ClientSessionUptime.Recorder sessionUptime; + public final ClientSessionDuration.Recorder sessionDuration; + public final ClientSessionOpenLatency.Recorder sessionOpenLatency; + + public final ClientDebugTagCount.Recorder debugTagCount; + + public final PacemakerDelay.Recorder pacemakerDelay; + + public final ClientChannelPoolFallbackCount.Recorder channelFallbackCount; + + private RecorderRegistry(Meter meter, boolean disableInternalMetrics) { + // Public metrics + operationLatency = operationLatencyMetric.newRecorder(meter); + attemptLatency = attemptLatencyMetric.newRecorder(meter); + retryCount = retryCountMetric.newRecorder(meter); + firstResponseLantency = firstResponseLantencyMetric.newRecorder(meter); + serverLatency = serverLatencyMetric.newRecorder(meter); + connectivityErrorCount = connectivityErrorCountMetric.newRecorder(meter); + applicationBlockingLatency = applicationBlockingLatencyMetric.newRecorder(meter); + clientBlockingLatency = clientBlockingLatencyMetric.newRecorder(meter); + + // Internal Metrics - only recorded by internalOtel, when configuring userOtel instances, + // internal metrics get registered on a noop provider + if (disableInternalMetrics) { + meter = MeterProvider.noop().get(METER_NAME); + } + attemptLatency2 = attemptLatency2Metric.newRecorder(meter); + channelPoolOutstandingRpcs = channelPoolOutstandingRpcsMetric.newRecorder(meter); + dpCompatGuage = dpCompatGuageMetric.newRecorder(meter); + perConnectionErrorCount = perConnectionErrorCountMetric.newRecorder(meter); + remainingDeadline = remainingDeadlineMetric.newRecorder(meter); + batchWriteFlowControlTargetQps = batchWriteFlowControlTargetQpsMetric.newRecorder(meter); + batchWriteFlowControlFactor = batchWriteFlowControlFactorMetric.newRecorder(meter); + + transportLatency = transportLatencyMetric.newRecorder(meter); + + sessionUptime = sessionUptimeMetric.newRecorder(meter); + sessionDuration = sessionDurationMetric.newRecorder(meter); + sessionOpenLatency = sessionOpenLatencyMetric.newRecorder(meter); + + debugTagCount = debugTagCountMetric.newRecorder(meter); + pacemakerDelay = pacemakerDelayMetric.newRecorder(meter); + + channelFallbackCount = channelFallbackCountMetric.newRecorder(meter); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/Metrics.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/Metrics.java new file mode 100644 index 0000000000..8f736a5da8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/Metrics.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 + * + * 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.bigtable.data.v2.internal.csm; + +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.ChannelPoolMetricsTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.SessionTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import io.grpc.Deadline; +import io.grpc.ManagedChannelBuilder; +import java.io.Closeable; +import java.io.IOException; +import javax.annotation.Nullable; + +public interface Metrics extends Closeable { + @Nullable + ChannelPoolMetricsTracer getChannelPoolMetricsTracer(); + + DirectPathCompatibleTracer getDirectPathCompatibleTracer(); + + VRpcTracer newTableTracer(SessionPoolInfo poolInfo, VRpcDescriptor descriptor, Deadline deadline); + + SessionTracer newSessionTracer(SessionPoolInfo poolInfo); + + PoolFallbackListener getPoolFallbackListener(); + + ApiTracerFactory createTracerFactory(ClientInfo clientInfo) throws IOException; + + > T configureGrpcChannel(T channelBuilder); + + DebugTagTracer getDebugTagTracer(); + + void start(); + + @Override + void close(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsImpl.java new file mode 100644 index 0000000000..3595f67d88 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsImpl.java @@ -0,0 +1,350 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm; + +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.ApiTracerFactory.OperationType; +import com.google.api.gax.tracing.OpencensusTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.auth.Credentials; +import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics.NoopPoolFallbackListener; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics.NoopSessionTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics.NoopVrpcTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.exporter.BigtableCloudMonitoringExporter; +import com.google.cloud.bigtable.data.v2.internal.csm.exporter.BigtablePeriodicReader; +import com.google.cloud.bigtable.data.v2.internal.csm.opencensus.MetricsTracerFactory; +import com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.BuiltinMetricsTracerFactory; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.ChannelPoolMetricsTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.CompositeTracerFactory; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.CompositeVRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracerImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracerImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.Pacemaker; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListenerImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.SessionTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.SessionTracerImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.UserApiVRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracerImpl; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; +import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import io.grpc.Deadline; +import io.grpc.ManagedChannelBuilder; +import io.grpc.opentelemetry.GrpcOpenTelemetry; +import io.opencensus.stats.StatsRecorder; +import io.opencensus.tags.TagKey; +import io.opencensus.tags.TagValue; +import io.opencensus.tags.Tagger; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; +import java.io.Closeable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +public class MetricsImpl implements Metrics, Closeable { + private final ApiTracerFactory userTracerFactory; + private final @Nullable OpenTelemetrySdk internalOtel; + private final @Nullable MetricRegistry.RecorderRegistry internalRecorder; + private final @Nullable MetricRegistry.RecorderRegistry userRecorder; + private final ScheduledExecutorService executor; + private final Tagger ocTagger; + private final StatsRecorder ocRecorder; + + @Nullable private final GrpcOpenTelemetry grpcOtel; + @Nullable private final ChannelPoolMetricsTracer channelPoolMetricsTracer; + private final DirectPathCompatibleTracer directPathCompatibleTracer; + private final DebugTagTracer debugTagTracer; + @Nullable private final Pacemaker pacemaker; + private final PoolFallbackListener poolFallbackListener; + private final Object sessionLock = new Object(); + + @GuardedBy("sessionLock") + private final List sessionTracers = new ArrayList<>(); + + private final List> tasks = new ArrayList<>(); + + public MetricsImpl( + MetricRegistry metricRegistry, + ClientInfo clientInfo, + ApiTracerFactory userTracerFactory, + @Nullable OpenTelemetrySdk internalOtel, + @Nullable OpenTelemetry userOtel, + Tagger ocTagger, + StatsRecorder ocRecorder, + ScheduledExecutorService executor) { + this.userTracerFactory = Preconditions.checkNotNull(userTracerFactory); + + this.internalOtel = internalOtel; + + this.ocTagger = ocTagger; + this.ocRecorder = ocRecorder; + + this.executor = executor; + + if (internalOtel != null) { + this.internalRecorder = + metricRegistry.newInternalRecorderRegistry(internalOtel.getMeterProvider()); + this.pacemaker = new Pacemaker(internalRecorder, clientInfo, "background"); + this.channelPoolMetricsTracer = new ChannelPoolMetricsTracer(internalRecorder, clientInfo); + this.directPathCompatibleTracer = + new DirectPathCompatibleTracerImpl(clientInfo, internalRecorder); + this.debugTagTracer = new DebugTagTracerImpl(clientInfo, internalRecorder); + // Session based channel pool tracer + this.poolFallbackListener = new PoolFallbackListenerImpl(internalRecorder, clientInfo); + this.grpcOtel = + GrpcOpenTelemetry.newBuilder() + .sdk(internalOtel) + .addOptionalLabel("grpc.lb.locality") + // Disable default grpc metrics + .disableAllMetrics() + // Enable specific grpc metrics + .enableMetrics(metricRegistry.getGrpcMetricNames()) + .build(); + + } else { + this.internalRecorder = null; + this.grpcOtel = null; + this.pacemaker = null; + this.channelPoolMetricsTracer = null; + this.directPathCompatibleTracer = NoopMetricsProvider.NoopDirectPathCompatibleTracer.INSTANCE; + this.debugTagTracer = NoopMetrics.NoopDebugTracer.INSTANCE; + this.poolFallbackListener = new NoopPoolFallbackListener(); + } + + if (userOtel != null) { + this.userRecorder = metricRegistry.newUserRecorderRegistry(userOtel.getMeterProvider()); + } else { + this.userRecorder = null; + } + } + + @Override + public void close() { + for (ScheduledFuture task : tasks) { + task.cancel(false); + } + if (internalOtel != null) { + internalOtel.close(); + } + } + + @Override + public void start() { + if (channelPoolMetricsTracer != null) { + tasks.add(channelPoolMetricsTracer.start(executor)); + } + if (pacemaker != null) { + tasks.add(pacemaker.start(executor)); + } + if (internalOtel != null) { + tasks.add( + executor.scheduleAtFixedRate(this::recordAsyncSessionMetrics, 1, 1, TimeUnit.MINUTES)); + } + } + + @Override + public > T configureGrpcChannel(T channelBuilder) { + if (grpcOtel == null) { + return channelBuilder; + } + grpcOtel.configureChannelBuilder(channelBuilder); + return channelBuilder; + } + + @Override + public VRpcTracer newTableTracer( + SessionPoolInfo poolInfo, VRpcDescriptor descriptor, Deadline deadline) { + if (internalRecorder == null) { + return new NoopVrpcTracer(); + } + ImmutableList.Builder builder = ImmutableList.builder(); + builder.add( + new VRpcTracerImpl(internalRecorder, poolInfo, descriptor.getMethodInfo(), deadline)); + if (userRecorder != null) { + builder.add(new VRpcTracerImpl(userRecorder, poolInfo, descriptor.getMethodInfo(), deadline)); + } + if (userTracerFactory != null) { + List nameStrings = Splitter.on('.').splitToList(descriptor.getMethodInfo().getName()); + builder.add( + new UserApiVRpcTracer( + userTracerFactory.newTracer( + null, + SpanName.of(nameStrings.get(0), nameStrings.get(1)), + descriptor.getMethodInfo().getStreaming() + ? OperationType.ServerStreaming + : OperationType.Unary), + poolInfo, + descriptor)); + } + return new CompositeVRpcTracer(builder.build()); + } + + @Override + public SessionTracer newSessionTracer(SessionPoolInfo poolInfo) { + if (internalRecorder == null) { + return new NoopSessionTracer(); + } + + SessionTracerImpl tracer = new SessionTracerImpl(internalRecorder, poolInfo); + synchronized (sessionLock) { + sessionTracers.add(tracer); + } + return tracer; + } + + private void recordAsyncSessionMetrics() { + synchronized (sessionLock) { + sessionTracers.removeIf(tracer -> !tracer.recordAsyncMetrics()); + } + } + + @Override + public PoolFallbackListener getPoolFallbackListener() { + return poolFallbackListener; + } + + @Override + public ApiTracerFactory createTracerFactory(ClientInfo clientInfo) { + ImmutableList.Builder tracerFactories = ImmutableList.builder(); + tracerFactories + .add(createOCTracingFactory(clientInfo)) + .add(createOCMetricsFactory(clientInfo, ocTagger, ocRecorder)) + .add(userTracerFactory); + + if (internalRecorder != null) { + tracerFactories.add(createOtelMetricsFactory(internalRecorder, clientInfo)); + } + if (userRecorder != null) { + tracerFactories.add(createOtelMetricsFactory(userRecorder, clientInfo)); + } + + return new CompositeTracerFactory(tracerFactories.build()); + } + + @Override + @Nullable + public ChannelPoolMetricsTracer getChannelPoolMetricsTracer() { + return channelPoolMetricsTracer; + } + + @Override + public DirectPathCompatibleTracer getDirectPathCompatibleTracer() { + return directPathCompatibleTracer; + } + + @Override + public DebugTagTracer getDebugTagTracer() { + return debugTagTracer; + } + + public static OpenTelemetrySdk createBuiltinOtel( + MetricRegistry metricRegistry, + ClientInfo clientInfo, + @Nullable Credentials defaultCredentials, + @Nullable String metricsEndpoint, + String universeDomain, + ScheduledExecutorService executor) + throws IOException { + + Credentials credentials = + BigtableDataSettings.getMetricsCredentials() != null + ? BigtableDataSettings.getMetricsCredentials() + : defaultCredentials; + + SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder(); + + BigtableCloudMonitoringExporter exporter = + BigtableCloudMonitoringExporter.create( + metricRegistry, + // Lazily compute EnvInfo, but memoize it to make sure it stays constant + Suppliers.memoize(EnvInfo::detect), + clientInfo, + credentials, + metricsEndpoint, + universeDomain); + + meterProvider.registerMetricReader(new BigtablePeriodicReader(exporter, executor)); + + return OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); + } + + private static ApiTracerFactory createOCTracingFactory(ClientInfo clientInfo) { + return new OpencensusTracerFactory( + ImmutableMap.builder() + // Annotate traces with the same tags as metrics + .put( + RpcMeasureConstants.BIGTABLE_PROJECT_ID.getName(), + clientInfo.getInstanceName().getProjectId()) + .put( + RpcMeasureConstants.BIGTABLE_INSTANCE_ID.getName(), + clientInfo.getInstanceName().getInstanceId()) + .put( + RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID.getName(), clientInfo.getAppProfileId()) + // Also annotate traces with library versions + .put("gax", GaxGrpcProperties.getGaxGrpcVersion()) + .put("grpc", GaxGrpcProperties.getGrpcVersion()) + .put("gapic", Version.VERSION) + .build()); + } + + private static ApiTracerFactory createOCMetricsFactory( + ClientInfo clientInfo, Tagger tagger, StatsRecorder stats) { + + ImmutableMap attributes = + ImmutableMap.builder() + .put( + RpcMeasureConstants.BIGTABLE_PROJECT_ID, + TagValue.create(clientInfo.getInstanceName().getProjectId())) + .put( + RpcMeasureConstants.BIGTABLE_INSTANCE_ID, + TagValue.create(clientInfo.getInstanceName().getInstanceId())) + .put( + RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID, + TagValue.create(clientInfo.getAppProfileId())) + .build(); + return MetricsTracerFactory.create(tagger, stats, attributes); + } + + private static BuiltinMetricsTracerFactory createOtelMetricsFactory( + RecorderRegistry recorder, ClientInfo clientInfo) { + + return BuiltinMetricsTracerFactory.create(recorder, clientInfo); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/NoopMetrics.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/NoopMetrics.java new file mode 100644 index 0000000000..4990987ea3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/NoopMetrics.java @@ -0,0 +1,154 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm; + +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.ChannelPoolMetricsTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.CompositeTracerFactory; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.SessionTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider.NoopDirectPathCompatibleTracer; +import com.google.common.collect.ImmutableList; +import io.grpc.Deadline; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Status; +import java.io.IOException; +import java.time.Duration; +import javax.annotation.Nullable; + +public class NoopMetrics implements Metrics { + + @Override + public void start() {} + + @Override + public void close() {} + + @Override + public VRpcTracer newTableTracer( + SessionPoolInfo poolInfo, VRpcDescriptor descriptor, Deadline deadline) { + return NoopVrpcTracer.INSTANCE; + } + + @Override + public SessionTracer newSessionTracer(SessionPoolInfo poolInfo) { + return new NoopSessionTracer(); + } + + @Override + public DirectPathCompatibleTracer getDirectPathCompatibleTracer() { + return NoopDirectPathCompatibleTracer.INSTANCE; + } + + @Override + public DebugTagTracer getDebugTagTracer() { + return NoopDebugTracer.INSTANCE; + } + + @Override + public PoolFallbackListener getPoolFallbackListener() { + return new NoopPoolFallbackListener(); + } + + @Nullable + @Override + public ChannelPoolMetricsTracer getChannelPoolMetricsTracer() { + return null; + } + + @Override + public ApiTracerFactory createTracerFactory(ClientInfo clientInfo) throws IOException { + return new CompositeTracerFactory(ImmutableList.of()); + } + + @Override + public > T configureGrpcChannel(T channelBuilder) { + return channelBuilder; + } + + public static class NoopVrpcTracer implements VRpcTracer { + + public static final NoopVrpcTracer INSTANCE = new NoopVrpcTracer(); + + @Override + public void onOperationStart() {} + + @Override + public void onAttemptStart(Object request) {} + + @Override + public void onRequestSent(PeerInfo peerInfo) {} + + @Override + public void onResponseReceived() {} + + @Override + public void recordApplicationBlockingLatencies(Duration elapsed) {} + + @Override + public void onAttemptFinish(VRpc.VRpcResult result) {} + + @Override + public void onOperationFinish(VRpc.VRpcResult result) {} + } + + public static class NoopSessionTracer implements SessionTracer { + + @Override + public void onStart() {} + + @Override + public void onOpen(PeerInfo peerInfo) {} + + @Override + public void onVRpcClose(Status.Code code) {} + + @Override + public void onClose( + PeerInfo peerInfo, CloseSessionRequest.CloseSessionReason reason, Status status) {} + + @Override + public boolean recordAsyncMetrics() { + return false; + } + } + + public static class NoopPoolFallbackListener implements PoolFallbackListener { + @Override + public void onFallback(String from, String to, ChannelFallbackReason reason) {} + } + + public static class NoopDebugTracer extends DebugTagTracer { + public static final NoopDebugTracer INSTANCE = new NoopDebugTracer(); + + @Override + public void record(TelemetryConfiguration.Level level, String tag) {} + + @Override + public void setClientConfigurationManager(ClientConfigurationManager manager) {} + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfo.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfo.java new file mode 100644 index 0000000000..b1d90f593c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfo.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.attributes; + +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; + +/** + * A value class to capture parameters that the client was instantiated with. These parameters will + * be used by the Exporter to derive MonitoredResource for GrpcMetrics. + */ +@AutoValue +public abstract class ClientInfo { + /** The name and version of the client. */ + public abstract String getClientName(); + + /** A unique identifier to disambiguate TimeSeries from multiple processes on the same VM. */ + public abstract InstanceName getInstanceName(); + + public abstract String getAppProfileId(); + + public abstract Builder toBuilder(); + + public static Builder builder() { + return new AutoValue_ClientInfo.Builder().setClientName("java-bigtable/" + Version.VERSION); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setClientName(String name); + + public abstract Builder setInstanceName(InstanceName name); + + public abstract Builder setAppProfileId(String appProfileId); + + public abstract ClientInfo build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfo.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfo.java new file mode 100644 index 0000000000..e45ea2607f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfo.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. + */ + +package com.google.cloud.bigtable.data.v2.internal.csm.attributes; + +import com.google.auto.value.AutoValue; +import com.google.cloud.opentelemetry.detection.AttributeKeys; +import com.google.cloud.opentelemetry.detection.DetectedPlatform; +import com.google.cloud.opentelemetry.detection.GCPPlatformDetector; +import com.google.common.base.Function; +import com.google.common.base.Splitter; +import com.google.common.base.Supplier; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import java.lang.management.ManagementFactory; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +/** + * Environment attributes, lazily extracted by the Exporter. + * + *

    The information will be extracted from the GCE metadata service and environment. + */ +@AutoValue +public abstract class EnvInfo { + private static final Logger logger = Logger.getLogger(EnvInfo.class.getName()); + + private static final Map SUPPORTED_PLATFORM_MAP = + ImmutableMap.of( + GCPPlatformDetector.SupportedPlatform.GOOGLE_COMPUTE_ENGINE, "gcp_compute_engine", + GCPPlatformDetector.SupportedPlatform.GOOGLE_KUBERNETES_ENGINE, "gcp_kubernetes_engine"); + + private static final AtomicLong uidSuffix = new AtomicLong(0); + + public abstract String getUid(); + + /** The Google platform running this client. ie. gcp_compute_engine */ + public abstract String getPlatform(); + + /** The Google project that the VM belongs to. */ + public abstract String getProject(); + + /** The geographic region that the VM is located in. */ + public abstract String getRegion(); + + /** The numeric GCE vm instance id. */ + public abstract String getHostId(); + + /** The hostname of the vm or container running the client. For gke, this will be the pod name. */ + public abstract String getHostName(); + + public static Builder builder() { + return new AutoValue_EnvInfo.Builder().setUid(computeUid() + "-" + uidSuffix.getAndIncrement()); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setUid(String uid); + + public abstract Builder setPlatform(String platform); + + public abstract Builder setProject(String project); + + public abstract Builder setRegion(String region); + + public abstract Builder setHostId(String hostId); + + public abstract Builder setHostName(String hostName); + + public abstract EnvInfo build(); + } + + private static String computeUid() { + final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); + // If jvm doesn't have the expected format, fallback to the local hostname + if (jvmName.indexOf('@') < 1) { + String hostname = "localhost"; + try { + hostname = InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + logger.log(Level.INFO, "Unable to get the hostname.", e); + } + // Generate a random number and use the same format "random_number@hostname". + return "java-" + UUID.randomUUID() + "@" + hostname; + } + return "java-" + UUID.randomUUID() + jvmName; + } + + public static EnvInfo detect() { + return detect( + GCPPlatformDetector.DEFAULT_INSTANCE.detectPlatform(), + System::getenv, + () -> { + try { + return InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + throw new RuntimeException(e); + } + }); + } + + @Nullable + static EnvInfo detect( + DetectedPlatform detectedPlatform, + Function envGetter, + Supplier hostnameSupplier) { + @Nullable + String cloud_platform = SUPPORTED_PLATFORM_MAP.get(detectedPlatform.getSupportedPlatform()); + if (cloud_platform == null) { + return EnvInfo.builder() + .setPlatform("unknown") + .setHostName(detectHostname(envGetter, hostnameSupplier)) + .setRegion("global") + .setProject("") + .setHostId("") + .build(); + } + + Map attrs = detectedPlatform.getAttributes(); + ImmutableList locationKeys = + ImmutableList.of( + AttributeKeys.GCE_CLOUD_REGION, + AttributeKeys.GCE_AVAILABILITY_ZONE, + AttributeKeys.GKE_LOCATION_TYPE_REGION, + AttributeKeys.GKE_CLUSTER_LOCATION); + + String region = + locationKeys.stream().map(attrs::get).filter(Objects::nonNull).findFirst().orElse("global"); + + // Deal with possibility of a zone. Zones are of the form us-east1-c, but we want a region + // which, which is us-east1. + region = Splitter.on('-').splitToStream(region).limit(2).collect(Collectors.joining("-")); + + String hostname = attrs.get(AttributeKeys.GCE_INSTANCE_NAME); + // TODO: add support for cloud run & gae by looking at SERVERLESS_COMPUTE_NAME & GAE_MODULE_NAME + if (hostname == null) { + hostname = detectHostname(envGetter, hostnameSupplier); + } + + String hostId = Optional.ofNullable(attrs.get(AttributeKeys.GCE_INSTANCE_ID)).orElse(""); + + return builder() + .setPlatform(cloud_platform) + .setProject(detectedPlatform.getProjectId()) + .setRegion(region) + .setHostId(hostId) + .setHostName(hostname) + .build(); + } + + private static String detectHostname( + Function envGetter, Supplier hostnameSupplier) { + String hostname = envGetter.apply("HOSTNAME"); + + if (hostname == null) { + try { + hostname = hostnameSupplier.get(); + } catch (RuntimeException e) { + logger.log(Level.WARNING, "failed to detect hostname", e); + } + } + if (hostname == null) { + hostname = ""; + } + return hostname; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/MethodInfo.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/MethodInfo.java new file mode 100644 index 0000000000..59b76077f2 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/MethodInfo.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.attributes; + +import com.google.auto.value.AutoValue; + +/** Method specific attributes. */ +@AutoValue +public abstract class MethodInfo { + + /** The name of the method. ie "Bigtable.ReadRow" */ + public abstract String getName(); + + /** If the method is streaming (ie a scan). */ + public abstract boolean getStreaming(); + + public static MethodInfo of(String name, boolean streaming) { + return builder().setName(name).setStreaming(streaming).build(); + } + + public static Builder builder() { + return new AutoValue_MethodInfo.Builder(); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setName(String name); + + public abstract Builder setStreaming(boolean isStreaming); + + public abstract MethodInfo build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/Util.java new file mode 100644 index 0000000000..ade147caea --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/Util.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. + */ + +package com.google.cloud.bigtable.data.v2.internal.csm.attributes; + +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import com.google.bigtable.v2.AuthorizedViewName; +import com.google.bigtable.v2.CheckAndMutateRowRequest; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.MaterializedViewName; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowsRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadModifyWriteRowRequest; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.SampleRowKeysRequest; +import com.google.bigtable.v2.TableName; +import com.google.common.annotations.VisibleForTesting; +import io.grpc.Status; +import java.util.Locale; +import java.util.Optional; +import java.util.concurrent.CancellationException; +import javax.annotation.Nullable; + +public class Util { + public enum IpProtocol { + IPV4("ipv4"), + IPV6("ipv6"), + UNKNOWN("unknown"); + + private final String value; + + IpProtocol(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + } + + static final String TRANSPORT_TYPE_PREFIX = "TRANSPORT_TYPE_"; + + public static String formatTransportRegion(@Nullable PeerInfo peerInfo) { + return Optional.ofNullable(peerInfo).map(PeerInfo::getApplicationFrontendRegion).orElse(""); + } + + @SuppressWarnings("deprecation") + // TODO: server is still sending back zone instead of region. Update this after server is updated + public static String formatTransportZone(@Nullable PeerInfo peerInfo) { + return Optional.ofNullable(peerInfo).map(PeerInfo::getApplicationFrontendZone).orElse(""); + } + + public static String formatTransportSubzone(@Nullable PeerInfo peerInfo) { + return Optional.ofNullable(peerInfo).map(PeerInfo::getApplicationFrontendSubzone).orElse(""); + } + + public static String formatTransportType(@Nullable PeerInfo peerInfo) { + return transportTypeToString( + Optional.ofNullable(peerInfo) + .map(PeerInfo::getTransportType) + .orElse(TransportType.TRANSPORT_TYPE_UNKNOWN)); + } + + public static String transportTypeToString(TransportType transportType) { + String label = transportTypeToStringWithoutFallback(transportType); + if (label != null) { + return label; + } + // In case the client is running with a newer version of protos + if (transportType.name().startsWith(TRANSPORT_TYPE_PREFIX)) { + return transportType + .name() + .substring(TRANSPORT_TYPE_PREFIX.length()) + .toLowerCase(Locale.ENGLISH); + } else { + return transportType.name(); + } + } + + @VisibleForTesting + static String transportTypeToStringWithoutFallback(TransportType transportType) { + if (transportType == null) { + return "null"; + } + switch (transportType) { + case TRANSPORT_TYPE_UNKNOWN: + return "unknown"; + case TRANSPORT_TYPE_EXTERNAL: + return "external"; + case TRANSPORT_TYPE_CLOUD_PATH: + return "cloudpath"; + case TRANSPORT_TYPE_DIRECT_ACCESS: + return "directpath"; + case TRANSPORT_TYPE_SESSION_UNKNOWN: + return "session_unknown"; + case TRANSPORT_TYPE_SESSION_EXTERNAL: + return "session_external"; + case TRANSPORT_TYPE_SESSION_CLOUD_PATH: + return "session_cloudpath"; + case TRANSPORT_TYPE_SESSION_DIRECT_ACCESS: + return "session_directpath"; + case UNRECOGNIZED: + return "unrecognized"; + default: + return null; + } + } + + public static String formatClusterIdMetricLabel(@Nullable ClusterInformation clusterInfo) { + return Optional.ofNullable(clusterInfo) + .map(ClusterInformation::getClusterId) + .filter(s -> !s.isEmpty()) + .orElse(""); + } + + public static String formatZoneIdMetricLabel(@Nullable ClusterInformation clusterInfo) { + return Optional.ofNullable(clusterInfo) + .map(ClusterInformation::getZoneId) + .filter(s -> !s.isEmpty()) + .orElse("global"); + } + + public static Status.Code extractStatus(@Nullable Throwable error) { + if (error == null) { + return Status.Code.OK; + } + // Handle java CancellationException as if it was a gax CancelledException + if (error instanceof CancellationException) { + return Status.Code.CANCELLED; + } + if (error instanceof ApiException) { + ApiException apiException = (ApiException) error; + if (apiException.getStatusCode() instanceof GrpcStatusCode) { + return ((GrpcStatusCode) apiException.getStatusCode()).getTransportCode(); + } + } + + Status s = Status.fromThrowable(error); + if (s != null) { + return s.getCode(); + } + return Status.Code.UNKNOWN; + } + + public static String extractTableId(Object request) { + String tableName = null; + String authorizedViewName = null; + String materializedViewName = null; + if (request instanceof ReadRowsRequest) { + tableName = ((ReadRowsRequest) request).getTableName(); + authorizedViewName = ((ReadRowsRequest) request).getAuthorizedViewName(); + materializedViewName = ((ReadRowsRequest) request).getMaterializedViewName(); + } else if (request instanceof MutateRowsRequest) { + tableName = ((MutateRowsRequest) request).getTableName(); + authorizedViewName = ((MutateRowsRequest) request).getAuthorizedViewName(); + } else if (request instanceof MutateRowRequest) { + tableName = ((MutateRowRequest) request).getTableName(); + authorizedViewName = ((MutateRowRequest) request).getAuthorizedViewName(); + } else if (request instanceof SampleRowKeysRequest) { + tableName = ((SampleRowKeysRequest) request).getTableName(); + authorizedViewName = ((SampleRowKeysRequest) request).getAuthorizedViewName(); + materializedViewName = ((SampleRowKeysRequest) request).getMaterializedViewName(); + } else if (request instanceof CheckAndMutateRowRequest) { + tableName = ((CheckAndMutateRowRequest) request).getTableName(); + authorizedViewName = ((CheckAndMutateRowRequest) request).getAuthorizedViewName(); + } else if (request instanceof ReadModifyWriteRowRequest) { + tableName = ((ReadModifyWriteRowRequest) request).getTableName(); + authorizedViewName = ((ReadModifyWriteRowRequest) request).getAuthorizedViewName(); + } else if (request instanceof GenerateInitialChangeStreamPartitionsRequest) { + tableName = ((GenerateInitialChangeStreamPartitionsRequest) request).getTableName(); + } else if (request instanceof ReadChangeStreamRequest) { + tableName = ((ReadChangeStreamRequest) request).getTableName(); + } + if (tableName != null && !tableName.isEmpty()) { + return TableName.parse(tableName).getTable(); + } + if (authorizedViewName != null && !authorizedViewName.isEmpty()) { + return AuthorizedViewName.parse(authorizedViewName).getTable(); + } + if (materializedViewName != null && !materializedViewName.isEmpty()) { + return MaterializedViewName.parse(materializedViewName).getMaterializedView(); + } + return ""; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter.java new file mode 100644 index 0000000000..635cd6d271 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter.java @@ -0,0 +1,276 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.exporter; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutureCallback; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.CredentialsProvider; +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.rpc.PermissionDeniedException; +import com.google.auth.Credentials; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.cloud.monitoring.v3.MetricServiceSettings; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.collect.Iterables; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.monitoring.v3.CreateTimeSeriesRequest; +import com.google.monitoring.v3.ProjectName; +import com.google.monitoring.v3.TimeSeries; +import com.google.protobuf.Empty; +import io.opentelemetry.sdk.common.CompletableResultCode; +import io.opentelemetry.sdk.metrics.InstrumentType; +import io.opentelemetry.sdk.metrics.data.AggregationTemporality; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.metrics.export.MetricExporter; +import java.io.IOException; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +public class BigtableCloudMonitoringExporter implements MetricExporter { + private static final Logger LOGGER = + Logger.getLogger(BigtableCloudMonitoringExporter.class.getName()); + + // This system property can be used to override the monitoring endpoint + // to a different environment. It's meant for internal testing only and + // will be removed in future versions. Use settings in EnhancedBigtableStubSettings + // to override the endpoint. + @Deprecated @Nullable + private static final String MONITORING_ENDPOINT_OVERRIDE_SYS_PROP = + System.getProperty("bigtable.test-monitoring-endpoint"); + + // This the quota limit from Cloud Monitoring. More details in + // https://cloud.google.com/monitoring/quotas#custom_metrics_quotas. + private static final int EXPORT_BATCH_SIZE_LIMIT = 200; + + private final Supplier envInfo; + private final ClientInfo clientInfo; + private final MetricRegistry metricRegistry; + private final MetricServiceClient client; + + private final AtomicReference state; + private CompletableResultCode lastExportCode; + private final AtomicBoolean exportFailureLogged = new AtomicBoolean(false); + + private enum State { + Running, + Closing, + Closed + } + + public static BigtableCloudMonitoringExporter create( + MetricRegistry metricRegistry, + Supplier envInfo, + ClientInfo clientInfo, + @Nullable Credentials credentials, + @Nullable String endpoint, + String universeDomain) + throws IOException { + + Preconditions.checkNotNull(universeDomain); + + MetricServiceSettings.Builder settingsBuilder = + MetricServiceSettings.newBuilder() + .setUniverseDomain(universeDomain) + .setCredentialsProvider( + Optional.ofNullable(credentials) + .map(FixedCredentialsProvider::create) + .orElse(NoCredentialsProvider.create())); + + if (MONITORING_ENDPOINT_OVERRIDE_SYS_PROP != null) { + LOGGER.warning( + "Setting the monitoring endpoint through system variable will be removed in future" + + " versions"); + settingsBuilder.setEndpoint(MONITORING_ENDPOINT_OVERRIDE_SYS_PROP); + } + + if (endpoint != null) { + settingsBuilder.setEndpoint(endpoint); + } + + Duration timeout = Duration.ofMinutes(1); + // TODO: createServiceTimeSeries needs special handling if the request failed. Leaving + // it as not retried for now. + settingsBuilder.createServiceTimeSeriesSettings().setSimpleTimeoutNoRetriesDuration(timeout); + + return new BigtableCloudMonitoringExporter( + metricRegistry, envInfo, clientInfo, MetricServiceClient.create(settingsBuilder.build())); + } + + @VisibleForTesting + public BigtableCloudMonitoringExporter( + MetricRegistry metricRegistry, + Supplier envInfo, + ClientInfo clientInfo, + MetricServiceClient client) { + this.metricRegistry = metricRegistry; + this.envInfo = envInfo; + this.clientInfo = clientInfo; + this.client = client; + this.state = new AtomicReference<>(State.Running); + } + + @Override + public void close() { + client.close(); + } + + @Override + public CompletableResultCode export(Collection metricData) { + Preconditions.checkState(state.get() != State.Closed, "Exporter is closed"); + + lastExportCode = doExport(metricData); + return lastExportCode; + } + + private CompletableResultCode doExport(Collection metricData) { + Map> converted; + + try { + converted = new Converter(metricRegistry, envInfo.get(), clientInfo).convertAll(metricData); + } catch (Throwable t) { + if (exportFailureLogged.compareAndSet(false, true)) { + LOGGER.log(Level.WARNING, "Failed to compose metrics for export", t); + } + + return CompletableResultCode.ofExceptionalFailure(t); + } + + List> futures = new ArrayList<>(); + + for (Entry> e : converted.entrySet()) { + futures.addAll(exportTimeSeries(e.getKey(), e.getValue())); + } + + CompletableResultCode exportCode = new CompletableResultCode(); + + StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + + ApiFutures.addCallback( + ApiFutures.allAsList(futures), + new ApiFutureCallback>() { + @Override + public void onFailure(Throwable throwable) { + if (exportFailureLogged.compareAndSet(false, true)) { + String msg = "createServiceTimeSeries request failed"; + if (throwable instanceof PermissionDeniedException) { + msg += + String.format( + " Need monitoring metric writer permission on project=%s. Follow" + + " https://cloud.google.com/bigtable/docs/client-side-metrics-setup" + + " to set up permissions.", + clientInfo.getInstanceName().getProjectId()); + } + RuntimeException asyncWrapper = new RuntimeException("export failed", throwable); + asyncWrapper.setStackTrace(stackTrace); + + if (state.get() != State.Closing && state.get() != State.Closed) { + // ignore the export warning when client is shutting down + LOGGER.log(Level.WARNING, msg, asyncWrapper); + } + } + exportCode.fail(); + } + + @Override + public void onSuccess(List objects) { + exportFailureLogged.set(false); + exportCode.succeed(); + } + }, + MoreExecutors.directExecutor()); + return exportCode; + } + + private List> exportTimeSeries( + ProjectName projectName, Collection timeSeries) { + List> batchResults = new ArrayList<>(); + + for (List batch : Iterables.partition(timeSeries, EXPORT_BATCH_SIZE_LIMIT)) { + CreateTimeSeriesRequest req = + CreateTimeSeriesRequest.newBuilder() + .setName(projectName.toString()) + .addAllTimeSeries(batch) + .build(); + ApiFuture f = this.client.createServiceTimeSeriesCallable().futureCall(req); + batchResults.add(f); + } + + return batchResults; + } + + @Override + public CompletableResultCode flush() { + if (lastExportCode != null) { + return lastExportCode; + } + return CompletableResultCode.ofSuccess(); + } + + @Override + public CompletableResultCode shutdown() { + State prevState = state.getAndSet(State.Closed); + if (prevState == State.Closed) { + LOGGER.log(Level.WARNING, "shutdown is called multiple times"); + return CompletableResultCode.ofSuccess(); + } + CompletableResultCode flushResult = flush(); + CompletableResultCode shutdownResult = new CompletableResultCode(); + flushResult.whenComplete( + () -> { + Throwable throwable = null; + try { + client.shutdown(); + } catch (Throwable e) { + LOGGER.log(Level.WARNING, "failed to shutdown the monitoring client", e); + throwable = e; + } + if (throwable != null) { + shutdownResult.fail(); + } else { + shutdownResult.succeed(); + } + }); + + return CompletableResultCode.ofAll(Arrays.asList(flushResult, shutdownResult)); + } + + @Override + public AggregationTemporality getAggregationTemporality(InstrumentType instrumentType) { + return AggregationTemporality.CUMULATIVE; + } + + public void prepareForShutdown() { + state.compareAndSet(State.Running, State.Closing); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtablePeriodicReader.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtablePeriodicReader.java new file mode 100644 index 0000000000..e536f2ca7b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtablePeriodicReader.java @@ -0,0 +1,109 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.exporter; + +import io.opentelemetry.sdk.common.CompletableResultCode; +import io.opentelemetry.sdk.common.export.MemoryMode; +import io.opentelemetry.sdk.metrics.Aggregation; +import io.opentelemetry.sdk.metrics.InstrumentType; +import io.opentelemetry.sdk.metrics.data.AggregationTemporality; +import io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector; +import io.opentelemetry.sdk.metrics.export.CollectionRegistration; +import io.opentelemetry.sdk.metrics.export.DefaultAggregationSelector; +import io.opentelemetry.sdk.metrics.export.MetricReader; +import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader; +import java.io.IOException; +import java.util.concurrent.ScheduledExecutorService; + +/** + * Wrapper around a {@link PeriodicMetricReader} that will notify the exporter when it's shutting + * down. This is necessary to filter out noisy error logs on shutdown. + */ +public class BigtablePeriodicReader implements MetricReader { + private final MetricReader delegate; + private final BigtableCloudMonitoringExporter exporter; + + public BigtablePeriodicReader( + BigtableCloudMonitoringExporter exporter, ScheduledExecutorService executor) { + delegate = PeriodicMetricReader.builder(exporter).setExecutor(executor).build(); + this.exporter = exporter; + } + + @Override + public void register(CollectionRegistration registration) { + delegate.register(registration); + } + + @Override + public Aggregation getDefaultAggregation(InstrumentType instrumentType) { + return delegate.getDefaultAggregation(instrumentType); + } + + @Override + public MemoryMode getMemoryMode() { + return delegate.getMemoryMode(); + } + + @Override + public CompletableResultCode forceFlush() { + return delegate.forceFlush(); + } + + @Override + public CompletableResultCode shutdown() { + exporter.prepareForShutdown(); + return delegate.shutdown(); + } + + @Override + public void close() throws IOException { + delegate.close(); + } + + public static AggregationTemporalitySelector alwaysCumulative() { + return AggregationTemporalitySelector.alwaysCumulative(); + } + + public static AggregationTemporalitySelector deltaPreferred() { + return AggregationTemporalitySelector.deltaPreferred(); + } + + public static AggregationTemporalitySelector lowMemory() { + return AggregationTemporalitySelector.lowMemory(); + } + + @Override + public AggregationTemporality getAggregationTemporality(InstrumentType instrumentType) { + return delegate.getAggregationTemporality(instrumentType); + } + + public static String asString(AggregationTemporalitySelector selector) { + return AggregationTemporalitySelector.asString(selector); + } + + public static DefaultAggregationSelector getDefault() { + return DefaultAggregationSelector.getDefault(); + } + + @Override + public DefaultAggregationSelector with(InstrumentType instrumentType, Aggregation aggregation) { + return delegate.with(instrumentType, aggregation); + } + + public static String asString(DefaultAggregationSelector selector) { + return DefaultAggregationSelector.asString(selector); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/Converter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/Converter.java new file mode 100644 index 0000000000..cbb9cd3701 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/Converter.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.exporter; + +import static com.google.api.MetricDescriptor.MetricKind.CUMULATIVE; +import static com.google.api.MetricDescriptor.MetricKind.GAUGE; +import static com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED; +import static com.google.api.MetricDescriptor.ValueType.DISTRIBUTION; +import static com.google.api.MetricDescriptor.ValueType.DOUBLE; +import static com.google.api.MetricDescriptor.ValueType.INT64; + +import com.google.api.Distribution; +import com.google.api.Distribution.BucketOptions; +import com.google.api.Distribution.BucketOptions.Explicit; +import com.google.api.Metric; +import com.google.api.MetricDescriptor.MetricKind; +import com.google.api.MetricDescriptor.ValueType; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.MetricWrapper; +import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.Multimap; +import com.google.monitoring.v3.Point; +import com.google.monitoring.v3.ProjectName; +import com.google.monitoring.v3.TimeInterval; +import com.google.monitoring.v3.TimeSeries; +import com.google.monitoring.v3.TypedValue; +import com.google.protobuf.util.Timestamps; +import io.opentelemetry.sdk.metrics.data.AggregationTemporality; +import io.opentelemetry.sdk.metrics.data.DoublePointData; +import io.opentelemetry.sdk.metrics.data.HistogramData; +import io.opentelemetry.sdk.metrics.data.HistogramPointData; +import io.opentelemetry.sdk.metrics.data.LongPointData; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.metrics.data.MetricDataType; +import io.opentelemetry.sdk.metrics.data.PointData; +import io.opentelemetry.sdk.metrics.data.SumData; +import java.util.Collection; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Helper for exporting metrics from Opentelemetry to Cloud Monitoring. + * + *

    Takes collection {@link MetricData} and uses the {@link MetricWrapper}s defined in {@link + * MetricRegistry} to compose both the {@link com.google.api.MonitoredResource} and {@link Point}. + */ +class Converter { + private static final Logger LOGGER = Logger.getLogger(Converter.class.getName()); + + private final MetricRegistry metricRegistry; + private final EnvInfo envInfo; + private final ClientInfo clientInfo; + + Converter(MetricRegistry metricRegistry, EnvInfo envInfo, ClientInfo clientInfo) { + this.metricRegistry = metricRegistry; + this.envInfo = envInfo; + this.clientInfo = clientInfo; + } + + Map> convertAll(Collection otelMetrics) { + ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); + + for (MetricData metricData : otelMetrics) { + Multimap perProject = convertMetricData(metricData); + builder.putAll(perProject); + } + return builder.build().asMap(); + } + + private Multimap convertMetricData(MetricData metricData) { + MetricWrapper metricDef = metricRegistry.getMetric(metricData.getName()); + if (metricDef == null) { + LOGGER.log(Level.FINE, "Skipping unexpected metric: {}", metricData.getName()); + return ImmutableListMultimap.of(); + } + + ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); + MetricKind metricKind = convertMetricKind(metricData); + for (PointData pd : metricData.getData().getPoints()) { + ProjectName projectName = + metricDef.getSchema().extractProjectName(pd.getAttributes(), envInfo, clientInfo); + + TimeSeries timeSeries = + TimeSeries.newBuilder() + .setMetricKind(metricKind) + .setValueType(convertValueType(metricData.getType())) + .setResource( + metricDef + .getSchema() + .extractMonitoredResource(pd.getAttributes(), envInfo, clientInfo)) + .setMetric( + Metric.newBuilder() + .setType(metricDef.getExternalName()) + .putAllLabels( + metricDef.extractMetricLabels(pd.getAttributes(), envInfo, clientInfo))) + .addPoints(convertPointData(metricData.getType(), pd, metricKind)) + .build(); + + builder.put(projectName, timeSeries); + } + return builder.build(); + } + + private Point convertPointData(MetricDataType type, PointData pointData, MetricKind metricKind) { + long startNanos = + metricKind == GAUGE ? pointData.getEpochNanos() : pointData.getStartEpochNanos(); + + TimeInterval timeInterval = + TimeInterval.newBuilder() + .setStartTime(Timestamps.fromNanos(startNanos)) + .setEndTime(Timestamps.fromNanos(pointData.getEpochNanos())) + .build(); + + Point.Builder builder = Point.newBuilder().setInterval(timeInterval); + switch (type) { + case HISTOGRAM: + case EXPONENTIAL_HISTOGRAM: + return builder + .setValue( + TypedValue.newBuilder() + .setDistributionValue(convertHistogramData((HistogramPointData) pointData)) + .build()) + .build(); + case DOUBLE_GAUGE: + case DOUBLE_SUM: + return builder + .setValue( + TypedValue.newBuilder() + .setDoubleValue(((DoublePointData) pointData).getValue()) + .build()) + .build(); + case LONG_GAUGE: + case LONG_SUM: + return builder + .setValue(TypedValue.newBuilder().setInt64Value(((LongPointData) pointData).getValue())) + .build(); + default: + LOGGER.log(Level.WARNING, "unsupported metric type %s", type); + return builder.build(); + } + } + + private static Distribution convertHistogramData(HistogramPointData pointData) { + return Distribution.newBuilder() + .setCount(pointData.getCount()) + .setMean(pointData.getCount() == 0L ? 0.0D : pointData.getSum() / pointData.getCount()) + .setBucketOptions( + BucketOptions.newBuilder() + .setExplicitBuckets(Explicit.newBuilder().addAllBounds(pointData.getBoundaries()))) + .addAllBucketCounts(pointData.getCounts()) + .build(); + } + + private static MetricKind convertMetricKind(MetricData metricData) { + switch (metricData.getType()) { + case HISTOGRAM: + case EXPONENTIAL_HISTOGRAM: + return convertHistogramType(metricData.getHistogramData()); + case LONG_GAUGE: + case DOUBLE_GAUGE: + return GAUGE; + case LONG_SUM: + return convertSumDataType(metricData.getLongSumData()); + case DOUBLE_SUM: + return convertSumDataType(metricData.getDoubleSumData()); + default: + return UNRECOGNIZED; + } + } + + private static MetricKind convertHistogramType(HistogramData histogramData) { + if (histogramData.getAggregationTemporality() == AggregationTemporality.CUMULATIVE) { + return CUMULATIVE; + } + return UNRECOGNIZED; + } + + private static MetricKind convertSumDataType(SumData sum) { + if (!sum.isMonotonic()) { + return GAUGE; + } + if (sum.getAggregationTemporality() == AggregationTemporality.CUMULATIVE) { + return CUMULATIVE; + } + return UNRECOGNIZED; + } + + private static ValueType convertValueType(MetricDataType metricDataType) { + switch (metricDataType) { + case LONG_GAUGE: + case LONG_SUM: + return INT64; + case DOUBLE_GAUGE: + case DOUBLE_SUM: + return DOUBLE; + case HISTOGRAM: + case EXPONENTIAL_HISTOGRAM: + return DISTRIBUTION; + default: + return ValueType.UNRECOGNIZED; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlFactor.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlFactor.java new file mode 100644 index 0000000000..c4c6d97118 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlFactor.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleGauge; +import io.opentelemetry.api.metrics.Meter; + +public class ClientBatchWriteFlowControlFactor extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/batch_write_flow_control_factor"; + + public ClientBatchWriteFlowControlFactor() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleGauge instrument; + + private Recorder(Meter meter) { + this.instrument = + meter + .gaugeBuilder(NAME) + .setDescription( + "The distribution of batch write flow control factors received from the server.") + .setUnit("1") + .build(); + } + + public void record( + ClientInfo clientInfo, + Status.Code code, + boolean applied, + MethodInfo methodInfo, + double factor) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.APPLIED_KEY, applied) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .build(); + + instrument.set(factor, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlTargetQps.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlTargetQps.java new file mode 100644 index 0000000000..a15189aa4a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientBatchWriteFlowControlTargetQps.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleGauge; +import io.opentelemetry.api.metrics.Meter; + +public class ClientBatchWriteFlowControlTargetQps extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/batch_write_flow_control_target_qps"; + + public ClientBatchWriteFlowControlTargetQps() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleGauge instrument; + + private Recorder(Meter meter) { + this.instrument = + meter + .gaugeBuilder(NAME) + .setDescription( + "The current target QPS of the client under batch write flow control.") + .setUnit("1") + .build(); + } + + public void record(ClientInfo clientInfo, MethodInfo methodInfo, double qps) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .build(); + + instrument.set(qps, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolFallbackCount.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolFallbackCount.java new file mode 100644 index 0000000000..1a5a5b3122 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolFallbackCount.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.PoolFallbackListener.ChannelFallbackReason; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongCounter; +import io.opentelemetry.api.metrics.Meter; + +public class ClientChannelPoolFallbackCount extends MetricWrapper { + + private static final String NAME = + "bigtable.googleapis.com/internal/client/channel_fallback_count"; + private static final AttributeKey FROM_KEY = AttributeKey.stringKey("from"); + private static final AttributeKey TO_KEY = AttributeKey.stringKey("to"); + private static final AttributeKey REASON_KEY = AttributeKey.stringKey("reason"); + + public ClientChannelPoolFallbackCount() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongCounter instrument; + + private Recorder(Meter meter) { + instrument = + meter + .counterBuilder(NAME) + .setDescription("Number of fallback occurrences.") + .setUnit(Units.COUNT) + .build(); + } + + public void record( + ClientInfo clientInfo, long count, String from, String to, ChannelFallbackReason reason) { + Attributes attrs = + getSchema() + .createResourceAttrs(clientInfo) + .put(FROM_KEY, from) + .put(TO_KEY, to) + .put(REASON_KEY, reason.name()) + .build(); + instrument.add(count, attrs); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolOutstandingRpcs.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolOutstandingRpcs.java new file mode 100644 index 0000000000..c5c1589c4f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientChannelPoolOutstandingRpcs.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 + * + * 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings.LoadBalancingStrategy; +import io.opentelemetry.api.metrics.LongHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.util.List; +import java.util.stream.Collectors; + +public class ClientChannelPoolOutstandingRpcs extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/connection_pool/outstanding_rpcs"; + + private static final List BUCKETS = + Buckets.generateLinearSeq(0d, 200d, 5).stream() + .map(Double::longValue) + .collect(Collectors.toList()); + + public ClientChannelPoolOutstandingRpcs() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongHistogram instrument; + + private Recorder(Meter meter) { + this.instrument = + meter + .histogramBuilder(NAME) + .ofLongs() + .setExplicitBucketBoundariesAdvice(BUCKETS) + .setDescription( + "A distribution of the number of outstanding RPCs per connection in the client" + + " pool, sampled periodically.") + .setUnit("1") + .build(); + } + + public void record( + ClientInfo clientInfo, + TransportType transportType, + LoadBalancingStrategy lbPolicy, + boolean isStreaming, + long rpcCount) { + instrument.record( + rpcCount, + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.TRANSPORT_TYPE, Util.transportTypeToString(transportType)) + .put(MetricLabels.CHANNEL_POOL_LB_POLICY, lbPolicy.name()) + .put(MetricLabels.STREAMING_KEY, isStreaming) + .build()); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDebugTagCount.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDebugTagCount.java new file mode 100644 index 0000000000..3abdc751c2 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDebugTagCount.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongCounter; +import io.opentelemetry.api.metrics.Meter; + +public class ClientDebugTagCount extends MetricWrapper { + private static final String NAME = "bigtable.googleapis.com/internal/client/debug_tags"; + + public ClientDebugTagCount() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongCounter instrument; + + private Recorder(Meter meter) { + instrument = + meter + .counterBuilder(NAME) + .setDescription("A counter of internal client events used for debugging.") + .setUnit(Units.COUNT) + .build(); + } + + public void record(ClientInfo clientInfo, String tag, long amount) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + .put(MetricLabels.DEBUG_TAG_KEY, tag) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .build(); + instrument.add(amount, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDpCompatGuage.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDpCompatGuage.java new file mode 100644 index 0000000000..26bc493ed1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientDpCompatGuage.java @@ -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 + * + * 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator; +import io.opentelemetry.api.metrics.LongGauge; +import io.opentelemetry.api.metrics.Meter; + +public class ClientDpCompatGuage extends MetricWrapper { + private static final String NAME = + "bigtable.googleapis.com/internal/client/direct_access/compatible"; + + public ClientDpCompatGuage() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongGauge instrument; + + private Recorder(Meter meter) { + this.instrument = + meter + .gaugeBuilder(NAME) + .ofLongs() + .setDescription( + "Reports 1 if the environment is eligible for DirectPath, 0 otherwise. Based on" + + " an attempt at startup.") + .setUnit("1") + .build(); + } + + // TODO: replace ipPreference with an enum + public void recordSuccess(ClientInfo clientInfo, String ipPreference) { + instrument.set( + 1, + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.DP_REASON_KEY, "") + .put(MetricLabels.DP_IP_PREFERENCE_KEY, ipPreference) + .build()); + } + + // TODO: replace reason with an enum + public void recordFailure( + ClientInfo clientInfo, DirectAccessInvestigator.FailureReason reason) { + instrument.set( + 1, + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.DP_REASON_KEY, reason.getValue()) + .put(MetricLabels.DP_IP_PREFERENCE_KEY, "") + .build()); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientPerConnectionErrorCount.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientPerConnectionErrorCount.java new file mode 100644 index 0000000000..6637795e23 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientPerConnectionErrorCount.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.util.List; +import java.util.Set; + +public class ClientPerConnectionErrorCount extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/per_connection_error_count"; + + static final List BUCKETS = + ImmutableList.builder() + .add(0L) + .addAll(Buckets.generateGeometricSeq(1, 64)) + .addAll(Buckets.generateGeometricSeq(125, 1_000_000L)) + .build(); + + // This metric migrated from gce/gke schemas to bigtable_client + // So a lot of the metric labels overlap with the resource labels. + // we need special handling since the logic in MetricWrapper assumes that there is no + // overlap. + @SuppressWarnings("deprecation") + private static final Set> METRIC_LABELS = + ImmutableSet.of( + MetricLabels.BIGTABLE_PROJECT_ID_KEY, + MetricLabels.CLIENT_UID, + MetricLabels.INSTANCE_ID_KEY, + MetricLabels.CLIENT_NAME, + MetricLabels.APP_PROFILE_KEY); + + public ClientPerConnectionErrorCount() { + super(ClientSchema.INSTANCE, NAME); + } + + // Override the default metric labels to account for backwards compatibility. + // This metric used to live under bigtable_table, and has moved to bigtable_client + // The new schema duplicates some of the metric labels. However the default implementation + // in MetricWrapper will remove all resource labels from the metric labels. + // To maintain backwards compatibility, this metric override the extractMetricLabels + // to always emit the duplicate metric labels. + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + ImmutableMap.Builder builder = ImmutableMap.builder(); + metricAttrs.forEach( + (k, v) -> { + if (METRIC_LABELS.contains(k) && v != null) { + builder.put(k.getKey(), v.toString()); + } + }); + builder.put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()); + return builder.build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .ofLongs() + .setDescription("Distribution of counts of channels per 'error count per minute'.") + .setUnit("1") + .setExplicitBucketBoundariesAdvice(BUCKETS) + .build(); + } + + public void record(ClientInfo clientInfo, long value) { + @SuppressWarnings("deprecation") + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo) + .put( + MetricLabels.BIGTABLE_PROJECT_ID_KEY, clientInfo.getInstanceName().getProjectId()) + .put(MetricLabels.INSTANCE_ID_KEY, clientInfo.getInstanceName().getInstanceId()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .build(); + instrument.record(value, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionDuration.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionDuration.java new file mode 100644 index 0000000000..0a51ad16d3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionDuration.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.common.collect.ImmutableSortedSet; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + +public class ClientSessionDuration extends MetricWrapper { + private static final String NAME = "bigtable.googleapis.com/internal/client/session/durations"; + + public static final List BUCKETS_MS = + ImmutableSortedSet.naturalOrder() + .add(0L) + .addAll(Buckets.generateGeometricSeq(1, TimeUnit.MINUTES.toMillis(20))) + .build() + .asList(); + + public enum SessionCloseVRpcState { + None("none", false, false), + SomeOk("some_ok", true, true), + AllOk("all_ok", true, false), + AllError("all_error", false, true); + + private final String label; + private final boolean hasOk; + private final boolean hasError; + + SessionCloseVRpcState(String label, boolean hasOk, boolean hasError) { + this.label = label; + this.hasOk = hasOk; + this.hasError = hasError; + } + + public static SessionCloseVRpcState find(boolean hasOk, boolean hasError) { + for (SessionCloseVRpcState v : SessionCloseVRpcState.values()) { + if (v.hasOk == hasOk && v.hasError == hasError) { + return v; + } + } + throw new IllegalStateException( + String.format( + "Failed to find SessionCloseVRpcState variant for hasOk: %b, hasError: %b", + hasOk, hasError)); + } + } + + public ClientSessionDuration() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("Client observed latency for establishing a new session") + .setUnit(Units.MILLISECOND) + .ofLongs() + .setExplicitBucketBoundariesAdvice(BUCKETS_MS) + .build(); + } + + public void record( + SessionPoolInfo poolInfo, + @Nullable PeerInfo peerInfo, + Status.Code code, + CloseSessionReason closeReason, + SessionCloseVRpcState vrpcState, + boolean isReady, + Duration latency) { + Attributes attributes = + getSchema() + .createResourceAttrs(poolInfo.getClientInfo()) + // Shared session labels + .put(MetricLabels.SESSION_TYPE_KEY, poolInfo.getTypeLabel()) + .put(MetricLabels.SESSION_NAME, poolInfo.getName()) + .put(MetricLabels.TRANSPORT_TYPE, Util.formatTransportType(peerInfo)) + .put(MetricLabels.AFE_LOCATION_KEY, Util.formatTransportSubzone(peerInfo)) + // metric specific + .put(MetricLabels.SESSION_READY_KEY, isReady) + .put(MetricLabels.STATUS_KEY, code.name()) // gRPC stream status + .put(MetricLabels.REASON_KEY, closeReason.name()) + .put(MetricLabels.VRPCS_KEY, vrpcState.label) + .build(); + + instrument.record((long) toMillis(latency), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionOpenLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionOpenLatency.java new file mode 100644 index 0000000000..a8fc77e4cb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionOpenLatency.java @@ -0,0 +1,90 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.common.collect.ImmutableSortedSet; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +public class ClientSessionOpenLatency extends MetricWrapper { + private static final String NAME = + "bigtable.googleapis.com/internal/client/session/open_latencies"; + + public static final List BUCKETS_MS = + ImmutableSortedSet.naturalOrder() + .addAll(Buckets.generateLinearSeq(0, 3, 0.1)) + .addAll(Buckets.generateLinearSeq(3, 9, 1)) + .addAll( + Buckets.generateGeometricSeq(10, TimeUnit.MINUTES.toMillis(5)).stream() + .map(Long::doubleValue) + .collect(Collectors.toList())) + .build() + .asList(); + + public ClientSessionOpenLatency() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("Client observed latency for establishing a new session") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(BUCKETS_MS) + .build(); + } + + public void record( + SessionPoolInfo poolInfo, @Nullable PeerInfo peerInfo, Status.Code code, Duration latency) { + Attributes attributes = + getSchema() + .createResourceAttrs(poolInfo.getClientInfo()) + // Shared session labels + .put(MetricLabels.SESSION_TYPE_KEY, poolInfo.getTypeLabel()) + .put(MetricLabels.SESSION_NAME, poolInfo.getName()) + .put(MetricLabels.TRANSPORT_TYPE, Util.formatTransportType(peerInfo)) + .put(MetricLabels.AFE_LOCATION_KEY, Util.formatTransportSubzone(peerInfo)) + // metric specific + .put(MetricLabels.STATUS_KEY, code.name()) + .build(); + + instrument.record(toMillis(latency), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionUptime.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionUptime.java new file mode 100644 index 0000000000..1a0acb1bf8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientSessionUptime.java @@ -0,0 +1,83 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.common.collect.ImmutableSortedSet; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + +public class ClientSessionUptime extends MetricWrapper { + private static final String NAME = "bigtable.googleapis.com/internal/client/session/uptime"; + + public static final List BUCKETS_MS = + ImmutableSortedSet.naturalOrder() + .add(0L) + .addAll(Buckets.generateGeometricSeq(1, TimeUnit.MINUTES.toMillis(20))) + .build() + .asList(); + + public ClientSessionUptime() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("A distribution age of all active sessions") + .setUnit(Units.MILLISECOND) + .ofLongs() + .setExplicitBucketBoundariesAdvice(BUCKETS_MS) + .build(); + } + + public void record( + SessionPoolInfo poolInfo, @Nullable PeerInfo peerInfo, boolean isReady, Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(poolInfo.getClientInfo()) + // Shared session labels + .put(MetricLabels.SESSION_TYPE_KEY, poolInfo.getTypeLabel()) + .put(MetricLabels.SESSION_NAME, poolInfo.getName()) + .put(MetricLabels.TRANSPORT_TYPE, Util.formatTransportType(peerInfo)) + .put(MetricLabels.AFE_LOCATION_KEY, Util.formatTransportSubzone(peerInfo)) + .put(MetricLabels.SESSION_READY_KEY, isReady) + .build(); + + instrument.record((long) toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientTransportLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientTransportLatency.java new file mode 100644 index 0000000000..9ff2d25000 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/ClientTransportLatency.java @@ -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 + * + * 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class ClientTransportLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/transport_latencies"; + + public ClientTransportLatency() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("The latency measured from e2e latencies minus node latencies.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + SessionPoolInfo poolInfo, + @Nullable PeerInfo peerInfo, + MethodInfo methodInfo, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(poolInfo.getClientInfo()) + // Shared session labels + .put(MetricLabels.SESSION_TYPE_KEY, poolInfo.getTypeLabel()) + .put(MetricLabels.SESSION_NAME, poolInfo.getName()) + .put(MetricLabels.TRANSPORT_TYPE, Util.formatTransportType(peerInfo)) + .put(MetricLabels.AFE_LOCATION_KEY, Util.formatTransportSubzone(peerInfo)) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/Constants.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/Constants.java new file mode 100644 index 0000000000..010dbfc3df --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/Constants.java @@ -0,0 +1,130 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.common.collect.ImmutableList; +import io.opentelemetry.api.common.AttributeKey; +import java.util.ArrayList; +import java.util.List; + +public final class Constants { + private Constants() {} + + public static final class MetricLabels { + private MetricLabels() {} + + // TODO: remove overlapping attributes + // Project & Instance overlap with resource labels because they were migrated from + // an old gce/gke schema to support per_connection_error_count metric + @Deprecated + public static final AttributeKey BIGTABLE_PROJECT_ID_KEY = + AttributeKey.stringKey("project_id"); + + @Deprecated + public static final AttributeKey INSTANCE_ID_KEY = AttributeKey.stringKey("instance"); + + public static final AttributeKey TRANSPORT_TYPE = + AttributeKey.stringKey("transport_type"); + public static final AttributeKey TRANSPORT_REGION = + AttributeKey.stringKey("transport_region"); + public static final AttributeKey TRANSPORT_ZONE = + AttributeKey.stringKey("transport_zone"); + public static final AttributeKey TRANSPORT_SUBZONE = + AttributeKey.stringKey("transport_subzone"); + + public static final AttributeKey CLIENT_UID = AttributeKey.stringKey("client_uid"); + public static final AttributeKey CLIENT_NAME = AttributeKey.stringKey("client_name"); + public static final AttributeKey METHOD_KEY = AttributeKey.stringKey("method"); + public static final AttributeKey STREAMING_KEY = AttributeKey.booleanKey("streaming"); + public static final AttributeKey APP_PROFILE_KEY = + AttributeKey.stringKey("app_profile"); + public static final AttributeKey DEBUG_TAG_KEY = AttributeKey.stringKey("tag"); + + public static final AttributeKey APPLIED_KEY = AttributeKey.booleanKey("applied"); + + static final AttributeKey CHANNEL_POOL_LB_POLICY = AttributeKey.stringKey("lb_policy"); + static final AttributeKey DP_REASON_KEY = AttributeKey.stringKey("reason"); + static final AttributeKey DP_IP_PREFERENCE_KEY = + AttributeKey.stringKey("ip_preference"); + + static final AttributeKey SESSION_TYPE_KEY = AttributeKey.stringKey("session_type"); + static final AttributeKey SESSION_NAME = AttributeKey.stringKey("session_name"); + static final AttributeKey AFE_LOCATION_KEY = AttributeKey.stringKey("afe_location"); + + static final AttributeKey REASON_KEY = AttributeKey.stringKey("closing_reason"); + static final AttributeKey VRPCS_KEY = AttributeKey.stringKey("vrpcs"); + static final AttributeKey SESSION_READY_KEY = AttributeKey.booleanKey("ready"); + + public static final AttributeKey STATUS_KEY = AttributeKey.stringKey("status"); + + static final AttributeKey EXECUTOR_KEY = AttributeKey.stringKey("executor"); + } + + static final class Units { + private Units() {} + + static final String MILLISECOND = "ms"; + static final String MICROSECOND = "us"; + static final String COUNT = "1"; + } + + static final class Buckets { + static final List AGGREGATION_WITH_MILLIS_HISTOGRAM = + ImmutableList.builder() + // Match `bigtable.googleapis.com/frontend_server/handler_latencies` buckets + .addAll(generateLinearSeq(0, 3.0, 0.1)) + .add(4.0, 5.0, 6.0, 8.0, 10.0, 13.0, 16.0, 20.0, 25.0, 30.0, 40.0, 50.0, 65.0, 80.0) + .add(100.0, 130.0, 160.0, 200.0, 250.0, 300.0, 400.0, 500.0, 650.0, 800.0, 900.0) + .add(1000.0, 2000.0, 3000.0, 4000.0, 5000.0, 6000.0, 10000.0, 20000.0, 50000.0) + .add(100000.0, 200000.0, 500000.0, 1000000.0, 2000000.0, 5000000.0) + .build(); + + @SuppressWarnings("SameParameterValue") + static List generateLinearSeq(double start, double end, double increment) { + ImmutableList.Builder builder = ImmutableList.builder(); + for (int i = 0; true; i++) { + double next = start + (increment * i); + if (next > end) { + break; + } + builder.add(next); + } + + return builder.build(); + } + + @SuppressWarnings("SameParameterValue") + static List generateExponentialSeq(double start, int count, double factor) { + List buckets = new ArrayList<>(); + + for (int i = 0; i < count; i++) { + buckets.add(start); + start *= factor; + } + + return buckets; + } + + static List generateGeometricSeq(long startClose, long endClosed) { + ImmutableList.Builder builder = ImmutableList.builder(); + for (long i = startClose; i <= endClosed; i *= 2) { + builder.add(i); + } + return builder.build(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/GrpcMetric.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/GrpcMetric.java new file mode 100644 index 0000000000..517ab454e8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/GrpcMetric.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.GrpcClientSchema; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import java.util.List; + +/** + * Base class for gRpc metrics that are exported using bigtable_client schema. + * + *

    gRPC doesn't record the bigtable specific metric labels, so they must be passed to the + * exporter via a side channel. + */ +public class GrpcMetric extends MetricWrapper { + public static final String METER_SCOPE = "grpc-java"; + + private final List> metricKeys; + + public GrpcMetric(String name, List metricKeys) { + super(GrpcClientSchema.INSTANCE, name); + this.metricKeys = + metricKeys.stream().map(AttributeKey::stringKey).collect(ImmutableList.toImmutableList()); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo ignored1, ClientInfo ignored2) { + ImmutableMap.Builder attributes = ImmutableMap.builder(); + + for (AttributeKey key : metricKeys) { + String newKeyName = key.getKey().replace('.', '_'); + Object value = metricAttrs.get(key); + if (value != null) { + attributes.put(newKeyName, value.toString()); + } + } + + return attributes.build(); + } + + @Override + public String getExternalName() { + return "bigtable.googleapis.com/internal/client/" + getName().replace('.', '/'); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/MetricWrapper.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/MetricWrapper.java new file mode 100644 index 0000000000..3947d3e680 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/MetricWrapper.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.api.MonitoredResource; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.Schema; +import com.google.common.collect.ImmutableMap; +import io.opentelemetry.api.common.Attributes; +import java.time.Duration; +import java.util.concurrent.TimeUnit; + +/** + * Base class for all the metrics. + * + *

    Each metric is composed of an OpenTelemetry instrument (ie histogram), and a set of resource + * and metric attributes. Since some of the resource attributes are dynamic, all the resource + * attributes are sent to the instrument as metric {@link Attributes}. Then during the export phase, + * a {@link MonitoredResource} and a set of metric labels are extracted from the collected + * attributes. + * + *

    This base class implements the foundation of this lifecycle: + * + *

      + *
    • The instrument for recording is passed in during construction + *
    • The concrete subclass will define a metric specific typesafe record method to populate the + * metric labels for the instrument + *
    • The list of resource attribute keys are defined by a resource specific subclass and passed + * in during construction. These will be used by {@code MetricWrapper.createMonitoredResource} + * to create the monitored resource during the export phase + *
    • The remaining attributes will be added as metric labels + *
    + */ +public abstract class MetricWrapper { + private final SchemaT schema; + private final String name; + + public MetricWrapper(SchemaT schema, String name) { + this.schema = schema; + this.name = name; + } + + public SchemaT getSchema() { + return schema; + } + + /** + * Used by the Exporter to compose metric labels to be sent to Cloud Monitoring. + * + *

    Extracts metric labels from metric {@link Attributes}. By default, all keys that are not + * listed in {@code resourceKeys} are extracted. However, subclasses can override this method to + * inject data from {@link EnvInfo} and {@link ClientInfo}. + */ + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + ImmutableMap.Builder builder = ImmutableMap.builder(); + metricAttrs.forEach( + (k, v) -> { + if (!getSchema().getResourceKeys().contains(k) && v != null) { + builder.put(k.getKey(), v.toString()); + } + }); + return builder.build(); + } + + /** + * Used by the Exporter to match an instance of this class to the aggregated timeseries to export. + * + *

    Gets the name of the metric. This is used by the exporter to look up this metric definition + * in MetricRegistry during export. + */ + public String getName() { + return name; + } + + /** + * Used by the exporter to post process the metric name from grpc conventions to Cloud Monitoring. + */ + public String getExternalName() { + return getName(); + } + + /** Converts a duration in fractional milliseconds. */ + protected static double toMillis(Duration duration) { + return Math.round(((double) duration.toNanos()) / TimeUnit.MILLISECONDS.toNanos(1) * 100.0) + / 100.0; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/PacemakerDelay.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/PacemakerDelay.java new file mode 100644 index 0000000000..ec081f2afd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/PacemakerDelay.java @@ -0,0 +1,76 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.common.collect.ImmutableList; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import java.util.List; + +/** + * Pacemaker delay records the delta between the pacemaker scheduled time and the actual time. When + * the delay is high, it could indicate issues with the machine that the client is running on like + * CPU saturation. + */ +public class PacemakerDelay extends MetricWrapper { + private static final String NAME = "bigtable.googleapis.com/internal/client/pacemaker_delays"; + + private static final List BUCKETS = + ImmutableList.builder() + // Up to 67,108,864, ~1 minute in microseconds + .addAll(Buckets.generateExponentialSeq(1.0, 13, 4)) + .build(); + + public PacemakerDelay() { + super(ClientSchema.INSTANCE, NAME); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "Distribution of the delay between the pacemaker firing and the pacemaker task" + + " being scheduled.") + .setUnit(Units.MICROSECOND) + .setExplicitBucketBoundariesAdvice(BUCKETS) + .build(); + } + + public void record(ClientInfo clientInfo, String executorName, Duration delta) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo) + .put(MetricLabels.EXECUTOR_KEY, executorName) + .build(); + instrument.record(delta.toNanos() / 1000.0, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableApplicationBlockingLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableApplicationBlockingLatency.java new file mode 100644 index 0000000000..464a4138d1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableApplicationBlockingLatency.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableApplicationBlockingLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/application_latencies"; + + public TableApplicationBlockingLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + this.instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "The latency of the client application consuming available response data.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency.java new file mode 100644 index 0000000000..fa7666c740 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableAttemptLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/attempt_latencies"; + + public TableAttemptLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("Client observed latency per RPC attempt.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + @Nullable ClusterInformation clusterInfo, + MethodInfo methodInfo, + Status.Code code, + Duration latency) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STREAMING_KEY, methodInfo.getStreaming()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(latency), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency2.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency2.java new file mode 100644 index 0000000000..090e386eec --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableAttemptLatency2.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableAttemptLatency2 extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/attempt_latencies2"; + + public TableAttemptLatency2() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription("Client observed latency per RPC attempt.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + @Nullable PeerInfo peerInfo, + @Nullable ClusterInformation clusterInfo, + MethodInfo methodInfo, + Status.Code code, + Duration latency) { + + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.TRANSPORT_TYPE, Util.formatTransportType(peerInfo)) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.TRANSPORT_REGION, Util.formatTransportRegion(peerInfo)) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .put(MetricLabels.TRANSPORT_ZONE, Util.formatTransportZone(peerInfo)) + .put(MetricLabels.TRANSPORT_SUBZONE, Util.formatTransportSubzone(peerInfo)) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.STREAMING_KEY, methodInfo.getStreaming()) + .build(); + + instrument.record(toMillis(latency), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableClientBlockingLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableClientBlockingLatency.java new file mode 100644 index 0000000000..74ec711c2f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableClientBlockingLatency.java @@ -0,0 +1,87 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableClientBlockingLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/throttling_latencies"; + + public TableClientBlockingLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "The latency introduced by the client queuing the RPC due to an unavailable" + + " transport or overload.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableConnectivityErrorCount.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableConnectivityErrorCount.java new file mode 100644 index 0000000000..228b2c88b0 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableConnectivityErrorCount.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongCounter; +import io.opentelemetry.api.metrics.Meter; +import javax.annotation.Nullable; + +public class TableConnectivityErrorCount extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/connectivity_error_count"; + + public TableConnectivityErrorCount() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongCounter instrument; + + private Recorder(Meter meter) { + instrument = + meter + .counterBuilder(NAME) + .setDescription( + "Number of requests that failed to reach the Google datacenter. (Requests without" + + " google response headers)") + .setUnit(Units.COUNT) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + long count) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.add(count, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableFirstResponseLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableFirstResponseLatency.java new file mode 100644 index 0000000000..2c64b53cf4 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableFirstResponseLatency.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableFirstResponseLatency extends MetricWrapper { + public static final String NAME = + "bigtable.googleapis.com/internal/client/first_response_latencies"; + + public TableFirstResponseLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "Latency from operation start until the response headers were received. The" + + " publishing of the measurement will be delayed until the attempt response" + + " has been received.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableOperationLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableOperationLatency.java new file mode 100644 index 0000000000..b66f1e2b37 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableOperationLatency.java @@ -0,0 +1,91 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableOperationLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/operation_latencies"; + + public TableOperationLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "Total time until final operation success or failure, including retries and" + + " backoff.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STREAMING_KEY, methodInfo.getStreaming()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRemainingDeadline.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRemainingDeadline.java new file mode 100644 index 0000000000..1d5d081912 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRemainingDeadline.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableRemainingDeadline extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/remaining_deadline"; + + public TableRemainingDeadline() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "The remaining deadline when the request is sent to grpc. This will either be the" + + " operation timeout, or the remaining deadline from operation timeout after" + + " retries and back offs.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.STATUS_KEY, code.name()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.STREAMING_KEY, methodInfo.getStreaming()) + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRetryCount.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRetryCount.java new file mode 100644 index 0000000000..eb6e394afb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableRetryCount.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.LongCounter; +import io.opentelemetry.api.metrics.Meter; +import javax.annotation.Nullable; + +public class TableRetryCount extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/retry_count"; + + public TableRetryCount() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final LongCounter instrument; + + private Recorder(Meter meter) { + instrument = + meter + .counterBuilder(NAME) + .setDescription("The number of additional RPCs sent after the initial attempt.") + .setUnit(Units.COUNT) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + long amount) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + instrument.add(amount, attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableServerLatency.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableServerLatency.java new file mode 100644 index 0000000000..6535def001 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/TableServerLatency.java @@ -0,0 +1,91 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Buckets; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.Units; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.common.collect.ImmutableMap; +import io.grpc.Status; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.metrics.DoubleHistogram; +import io.opentelemetry.api.metrics.Meter; +import java.time.Duration; +import javax.annotation.Nullable; + +public class TableServerLatency extends MetricWrapper { + public static final String NAME = "bigtable.googleapis.com/internal/client/server_latencies"; + + public TableServerLatency() { + super(TableSchema.INSTANCE, NAME); + } + + @Override + public ImmutableMap extractMetricLabels( + Attributes metricAttrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ImmutableMap.builder() + .putAll(super.extractMetricLabels(metricAttrs, envInfo, clientInfo)) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build(); + } + + public Recorder newRecorder(Meter meter) { + return new Recorder(meter); + } + + public class Recorder { + private final DoubleHistogram instrument; + + private Recorder(Meter meter) { + instrument = + meter + .histogramBuilder(NAME) + .setDescription( + "The latency measured from the moment that the RPC entered the Google data center" + + " until the RPC was completed.") + .setUnit(Units.MILLISECOND) + .setExplicitBucketBoundariesAdvice(Buckets.AGGREGATION_WITH_MILLIS_HISTOGRAM) + .build(); + } + + public void record( + ClientInfo clientInfo, + String tableId, + MethodInfo methodInfo, + @Nullable ClusterInformation clusterInfo, + Status.Code code, + Duration duration) { + Attributes attributes = + getSchema() + .createResourceAttrs(clientInfo, tableId, clusterInfo) + .put(MetricLabels.METHOD_KEY, methodInfo.getName()) + .put(MetricLabels.APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(MetricLabels.STREAMING_KEY, methodInfo.getStreaming()) + .put(MetricLabels.STATUS_KEY, code.name()) + .put(MetricLabels.CLIENT_NAME, clientInfo.getClientName()) + // To maintain backwards compat CLIENT_UID is set using sideband data in the exporter + .build(); + + instrument.record(toMillis(duration), attributes); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/package-info.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/package-info.java new file mode 100644 index 0000000000..e6e4fb388c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/metrics/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.metrics; + +// Implements the metrics from bigtable_googleapis_com/metrics/aliased_metrics.gcl & +// cloud_pulse_monarch/bigtable/metrics diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracer.java similarity index 78% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracer.java index 0ffabe2606..b430cb8119 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracer.java @@ -13,11 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; + +import com.google.api.core.ObsoleteApi; import com.google.api.gax.retrying.ServerStreamingAttemptException; import com.google.api.gax.tracing.ApiTracerFactory.OperationType; import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; import com.google.common.base.Stopwatch; import io.opencensus.stats.MeasureMap; import io.opencensus.stats.StatsRecorder; @@ -31,8 +37,8 @@ import java.util.concurrent.CancellationException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; import javax.annotation.Nullable; -import org.threeten.bp.Duration; class MetricsTracer extends BigtableTracer { @@ -50,17 +56,16 @@ class MetricsTracer extends BigtableTracer { private final AtomicBoolean opFinished = new AtomicBoolean(); private final Stopwatch operationTimer = Stopwatch.createStarted(); private final Stopwatch firstResponsePerOpTimer = Stopwatch.createStarted(); - private long operationResponseCount = 0; // Attempt level metrics private int attemptCount = 0; private Stopwatch attemptTimer; - private long attemptResponseCount = 0; private volatile int attempt = 0; private volatile boolean reportBatchingLatency = false; - private volatile long batchThrottledLatency = 0; + private final AtomicLong batchThrottledLatency = new AtomicLong(0); + private MetadataExtractorInterceptor.SidebandData sidebandData; MetricsTracer( OperationType operationType, @@ -84,6 +89,12 @@ public void close() {} }; } + @Override + public void operationFinishEarly() { + attemptTimer.stop(); + operationTimer.stop(); + } + @Override public void operationSucceeded() { recordOperationCompletion(null); @@ -103,7 +114,6 @@ private void recordOperationCompletion(@Nullable Throwable throwable) { if (!opFinished.compareAndSet(false, true)) { return; } - operationTimer.stop(); long elapsed = operationTimer.elapsed(TimeUnit.MILLISECONDS); @@ -124,7 +134,7 @@ private void recordOperationCompletion(@Nullable Throwable throwable) { newTagCtxBuilder() .putLocal( RpcMeasureConstants.BIGTABLE_STATUS, - TagValue.create(Util.extractStatus(throwable))); + TagValue.create(Util.extractStatus(throwable).name())); measures.record(tagCtx.build()); } @@ -134,7 +144,6 @@ public void attemptStarted(int attemptNumber) { attempt = attemptNumber; attemptCount++; attemptTimer = Stopwatch.createStarted(); - attemptResponseCount = 0; } @Override @@ -147,8 +156,18 @@ public void attemptCancelled() { recordAttemptCompletion(new CancellationException()); } + /** + * This method is obsolete. Use {@link #attemptFailedDuration(Throwable, java.time.Duration)} + * instead. + */ + @ObsoleteApi("Use attemptFailedDuration(Throwable, java.time.Duration) instead") @Override - public void attemptFailed(Throwable throwable, Duration duration) { + public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) { + attemptFailedDuration(error, toJavaTimeDuration(delay)); + } + + @Override + public void attemptFailedDuration(Throwable throwable, java.time.Duration duration) { recordAttemptCompletion(throwable); } @@ -170,12 +189,20 @@ private void recordAttemptCompletion(@Nullable Throwable throwable) { RpcMeasureConstants.BIGTABLE_ATTEMPT_LATENCY, attemptTimer.elapsed(TimeUnit.MILLISECONDS)); + if (sidebandData != null && sidebandData.getGfeTiming() != null) { + measures + .put(RpcMeasureConstants.BIGTABLE_GFE_LATENCY, sidebandData.getGfeTiming().toMillis()) + .put(RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT, 0L); + } else { + measures.put(RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT, 1L); + } + if (reportBatchingLatency) { - measures.put(RpcMeasureConstants.BIGTABLE_BATCH_THROTTLED_TIME, batchThrottledLatency); + measures.put(RpcMeasureConstants.BIGTABLE_BATCH_THROTTLED_TIME, batchThrottledLatency.get()); // Reset batch throttling latency for next attempt. This can't be done in attemptStarted // because batching flow control will add batching latency before the attempt has started. - batchThrottledLatency = 0; + batchThrottledLatency.set(0); } // Patch the throwable until it's fixed in gax. When an attempt failed, @@ -189,7 +216,7 @@ private void recordAttemptCompletion(@Nullable Throwable throwable) { newTagCtxBuilder() .putLocal( RpcMeasureConstants.BIGTABLE_STATUS, - TagValue.create(Util.extractStatus(throwable))); + TagValue.create(Util.extractStatus(throwable).name())); measures.record(tagCtx.build()); } @@ -199,8 +226,6 @@ public void responseReceived() { if (firstResponsePerOpTimer.isRunning()) { firstResponsePerOpTimer.stop(); } - attemptResponseCount++; - operationResponseCount++; } @Override @@ -209,32 +234,19 @@ public int getAttempt() { } @Override - public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwable) { - MeasureMap measures = stats.newMeasureMap(); - if (latency != null) { - measures - .put(RpcMeasureConstants.BIGTABLE_GFE_LATENCY, latency) - .put(RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT, 0L); - } else { - measures.put(RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT, 1L); - } - measures.record( - newTagCtxBuilder() - .putLocal( - RpcMeasureConstants.BIGTABLE_STATUS, TagValue.create(Util.extractStatus(throwable))) - .build()); + public void setSidebandData(MetadataExtractorInterceptor.SidebandData sidebandData) { + this.sidebandData = sidebandData; } @Override public void batchRequestThrottled(long totalThrottledMs) { reportBatchingLatency = true; - batchThrottledLatency += totalThrottledMs; + batchThrottledLatency.addAndGet(totalThrottledMs); } private TagContextBuilder newTagCtxBuilder() { TagContextBuilder tagCtx = - tagger - .toBuilder(parentContext) + tagger.toBuilder(parentContext) .putLocal(RpcMeasureConstants.BIGTABLE_OP, TagValue.create(spanName.toString())); // Copy client level tags in diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerFactory.java similarity index 96% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerFactory.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerFactory.java index e0c173a2be..0f557e6536 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import com.google.api.core.InternalApi; import com.google.api.gax.tracing.ApiTracer; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcMeasureConstants.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcMeasureConstants.java similarity index 94% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcMeasureConstants.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcMeasureConstants.java index edd73fc81d..39c9bb0e99 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcMeasureConstants.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcMeasureConstants.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import com.google.api.core.InternalApi; import io.opencensus.stats.Measure.MeasureLong; @@ -79,14 +79,16 @@ public class RpcMeasureConstants { public static final MeasureLong BIGTABLE_GFE_LATENCY = MeasureLong.create( "cloud.google.com/java/bigtable/gfe_latency", - "Latency between Google's network receives an RPC and reads back the first byte of the response", + "Latency between Google's network receives an RPC and reads back the first byte of the" + + " response", MILLISECOND); /** Number of responses without the server-timing header. */ public static final MeasureLong BIGTABLE_GFE_HEADER_MISSING_COUNT = MeasureLong.create( "cloud.google.com/java/bigtable/gfe_header_missing_count", - "Number of RPC responses received without the server-timing header, most likely means that the RPC never reached Google's network", + "Number of RPC responses received without the server-timing header, most likely means" + + " that the RPC never reached Google's network", COUNT); /** Total throttled time of a batch in msecs. */ diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViewConstants.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcViewConstants.java similarity index 70% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViewConstants.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcViewConstants.java index 0d85c75e9c..1db8b443ec 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViewConstants.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/RpcViewConstants.java @@ -13,22 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_ATTEMPT_LATENCY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_BATCH_THROTTLED_TIME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_GFE_LATENCY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_INSTANCE_ID; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_OP; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_OP_ATTEMPT_COUNT; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_OP_LATENCY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_PROJECT_ID; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_READ_ROWS_FIRST_ROW_LATENCY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants.BIGTABLE_STATUS; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_ATTEMPT_LATENCY; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_BATCH_THROTTLED_TIME; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_GFE_LATENCY; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_INSTANCE_ID; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_OP; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_OP_ATTEMPT_COUNT; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_OP_LATENCY; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_PROJECT_ID; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_READ_ROWS_FIRST_ROW_LATENCY; +import static com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcMeasureConstants.BIGTABLE_STATUS; +import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import io.opencensus.stats.Aggregation; import io.opencensus.stats.Aggregation.Count; import io.opencensus.stats.Aggregation.Distribution; @@ -37,7 +39,7 @@ import io.opencensus.stats.View; import java.util.Arrays; -class RpcViewConstants { +public class RpcViewConstants { // Aggregations private static final Aggregation COUNT = Count.create(); private static final Aggregation SUM = Sum.create(); @@ -58,14 +60,6 @@ class RpcViewConstants { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 100.0))); - private static final Aggregation AGGREGATION_WITH_POWERS_OF_2 = - Distribution.create( - BucketBoundaries.create( - ImmutableList.of( - 0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, - 4096.0, 8192.0, 16384.0, 32768.0, 65536.0, 131072.0, 262144.0, 524288.0, - 1048576.0, 2097152.0))); - /** * {@link View} for Bigtable client roundtrip latency in milliseconds including all retry * attempts. @@ -133,7 +127,8 @@ class RpcViewConstants { static final View BIGTABLE_GFE_LATENCY_VIEW = View.create( View.Name.create("cloud.google.com/java/bigtable/gfe_latency"), - "Latency between Google's network receives an RPC and reads back the first byte of the response", + "Latency between Google's network receives an RPC and reads back the first byte of the" + + " response", BIGTABLE_GFE_LATENCY, AGGREGATION_WITH_MILLIS_HISTOGRAM, ImmutableList.of( @@ -146,7 +141,8 @@ class RpcViewConstants { static final View BIGTABLE_GFE_HEADER_MISSING_COUNT_VIEW = View.create( View.Name.create("cloud.google.com/java/bigtable/gfe_header_missing_count"), - "Number of RPC responses received without the server-timing header, most likely means that the RPC never reached Google's network", + "Number of RPC responses received without the server-timing header, most likely means" + + " that the RPC never reached Google's network", BIGTABLE_GFE_HEADER_MISSING_COUNT, SUM, ImmutableList.of( @@ -165,4 +161,19 @@ class RpcViewConstants { AGGREGATION_WITH_MILLIS_HISTOGRAM, ImmutableList.of( BIGTABLE_INSTANCE_ID, BIGTABLE_PROJECT_ID, BIGTABLE_APP_PROFILE_ID, BIGTABLE_OP)); + + @VisibleForTesting + public static final ImmutableSet BIGTABLE_CLIENT_VIEWS_SET = + ImmutableSet.of( + RpcViewConstants.BIGTABLE_OP_LATENCY_VIEW, + RpcViewConstants.BIGTABLE_COMPLETED_OP_VIEW, + RpcViewConstants.BIGTABLE_READ_ROWS_FIRST_ROW_LATENCY_VIEW, + RpcViewConstants.BIGTABLE_ATTEMPT_LATENCY_VIEW, + RpcViewConstants.BIGTABLE_ATTEMPTS_PER_OP_VIEW, + RpcViewConstants.BIGTABLE_BATCH_THROTTLED_TIME_VIEW); + + public static final ImmutableSet GFE_VIEW_SET = + ImmutableSet.of( + RpcViewConstants.BIGTABLE_GFE_LATENCY_VIEW, + RpcViewConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT_VIEW); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/package-info.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/package-info.java new file mode 100644 index 0000000000..86fc15faea --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/package-info.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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. + */ + +/** + * Clientside metrics apis + * + *

    Bigtable clientside metrics are implemented using Opentelemetry. However unlike most libraries + * that use Opentelemetry, the Bigtable client bundles its own exporter that is on by default. The + * metrics collected are exported to Cloud Monitoring. + * + *

    There are 3 types of metrics that are collected: + * + *

      + *
    • Table based metrics - these metrics are meant to be the clientside counterpart of the + * serverside bigtable_table metrics. The are tied to Table-bound RPCs. + *
    • Client based metrics - these metrics are internal and used to monitor the e2e health of the + * client. They are tied to the bigtable_client resource. + *
    • Client based gRPC metrics - these are metrics collected by the underlying gRPC library and + * are exported using the bigtable_client resource + *
    + * + *

    The client will attach relevant attributes to the measurement when it is being recorded. There + * are 2 types of attributes: resource and metric. Some of the table based resource attributes are + * dynamic and are extracted from an RPC response. To facilitate this, the resource attributes will + * be sent into Opentelemetry as metric attributes and then during export, the attributes will be + * split between the monitored resource and metric labels. + * + *

    Client based metrics use a schema that's mostly static, however some of the attributes are + * slow to resolve. The resolution of those attributes will be deferred until the export phase in + * the Exporter. While the non-expensive ones will be sent as metric attributes same as table based + * metrics + * + *

    Client based gRPC metrics are recorded by gRPC and don't have access to the any Bigtable + * attributes. All of the Bigtable attributes will be filled in by the Exporter. + * + *

    To make this manageable, attributes from different sources are encapsulated by POJOs and are + * plumbed to the RpcTracer and the Exporter. The metrics themselves are wrapped in typesafe + * classes. Each metric has its own class which will have a metric specific record method. In + * addition the metric classes will extend a schema specific class (ie AbstractClientMetric). The + * schema specific class will serve 2 use cases: + * + *

      + *
    • During the record phase, createResourceAttrs method, will ensure all of the resource + * attributes are captured as metric attributes. + *
    • During the export phase, createMonitoredResource and createMetricLabels methods are used to + * extract a MonitoredResource and Metric labels. + *
    + */ +package com.google.cloud.bigtable.data.v2.internal.csm; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/ClientSchema.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/ClientSchema.java new file mode 100644 index 0000000000..5ef030539d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/ClientSchema.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.schema; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.common.collect.ImmutableList; +import com.google.monitoring.v3.ProjectName; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.common.AttributesBuilder; + +/** + * The attributes for this schema are partially populated during the record phase and finalized + * during the export phase with {@link EnvInfo}. This is necessary because resolving {@link EnvInfo} + * is slow and should not happen during client startup. + */ +public final class ClientSchema extends Schema { + // This implements the `bigtable_client` resource defined in + // bigtable_googleapis_com/metrics/resource_types.gcl + + public static final AttributeKey BIGTABLE_PROJECT_ID_KEY = + AttributeKey.stringKey("project_id"); + // Resource labels passed during recording + public static final AttributeKey INSTANCE_ID_KEY = AttributeKey.stringKey("instance"); + public static final AttributeKey APP_PROFILE_KEY = AttributeKey.stringKey("app_profile"); + public static final AttributeKey CLIENT_NAME = AttributeKey.stringKey("client_name"); + + // Resource labels injected during export + private static final DeferredAttr CLIENT_PROJECT = + DeferredAttr.fromEnv("client_project", EnvInfo::getProject); + private static final DeferredAttr CLIENT_REGION = + DeferredAttr.fromEnv("region", EnvInfo::getRegion); + private static final DeferredAttr CLOUD_PLATFORM = + DeferredAttr.fromEnv("cloud_platform", EnvInfo::getPlatform); + private static final DeferredAttr HOST_ID = DeferredAttr.fromEnv("host_id", EnvInfo::getHostId); + private static final DeferredAttr HOST_NAME = + DeferredAttr.fromEnv("host_name", EnvInfo::getHostName); + private static final DeferredAttr UUID = DeferredAttr.fromEnv("uuid", EnvInfo::getUid); + + // Must come after all other static members + public static final ClientSchema INSTANCE = new ClientSchema(); + + public ClientSchema() { + super( + "bigtable_client", + ImmutableList.of(BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, APP_PROFILE_KEY, CLIENT_NAME), + ImmutableList.of(CLIENT_PROJECT, CLIENT_REGION, CLOUD_PLATFORM, HOST_ID, HOST_NAME, UUID)); + } + + @Override + public ProjectName extractProjectName(Attributes attrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ProjectName.of(clientInfo.getInstanceName().getProjectId()); + } + + public AttributesBuilder createResourceAttrs(ClientInfo clientInfo) { + return Attributes.builder() + .put(BIGTABLE_PROJECT_ID_KEY, clientInfo.getInstanceName().getProjectId()) + .put(INSTANCE_ID_KEY, clientInfo.getInstanceName().getInstanceId()) + .put(APP_PROFILE_KEY, clientInfo.getAppProfileId()) + .put(CLIENT_NAME, clientInfo.getClientName()); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/GrpcClientSchema.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/GrpcClientSchema.java new file mode 100644 index 0000000000..69a450977b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/GrpcClientSchema.java @@ -0,0 +1,78 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.schema; + +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.common.collect.ImmutableList; +import com.google.monitoring.v3.ProjectName; +import io.opentelemetry.api.common.Attributes; + +/** + * The attributes for this schema are partially populated during the record phase and finalized + * during the export phase with {@link EnvInfo}. This is necessary because resolving {@link EnvInfo} + * is slow and should not happen during client startup. + */ +public final class GrpcClientSchema extends Schema { + // Unlike the normal ClientSchema, the bigtable resource ids must be injected during export time + private static final DeferredAttr BIGTABLE_PROJECT_ID = + DeferredAttr.fromClientInfo("project_id", ci -> ci.getInstanceName().getProjectId()); + private static final DeferredAttr INSTANCE_ID = + DeferredAttr.fromClientInfo("instance", ci -> ci.getInstanceName().getInstanceId()); + private static final DeferredAttr APP_PROFILE_ID = + DeferredAttr.fromClientInfo("app_profile", ClientInfo::getAppProfileId); + private static final DeferredAttr CLIENT_NAME = + DeferredAttr.fromClientInfo("client_name", ClientInfo::getClientName); + + private static final DeferredAttr CLIENT_PROJECT = + DeferredAttr.fromEnv("client_project", EnvInfo::getProject); + private static final DeferredAttr CLIENT_REGION = + DeferredAttr.fromEnv("region", EnvInfo::getRegion); + private static final DeferredAttr CLOUD_PLATFORM = + DeferredAttr.fromEnv("cloud_platform", EnvInfo::getPlatform); + private static final DeferredAttr HOST_ID = DeferredAttr.fromEnv("host_id", EnvInfo::getHostId); + private static final DeferredAttr HOST_NAME = + DeferredAttr.fromEnv("host_name", EnvInfo::getHostName); + private static final DeferredAttr UUID = DeferredAttr.fromEnv("uuid", EnvInfo::getUid); + + // Must come after all other static members + public static final GrpcClientSchema INSTANCE = new GrpcClientSchema(); + + private GrpcClientSchema() { + super( + "bigtable_client", + ImmutableList.of(), + ImmutableList.of( + BIGTABLE_PROJECT_ID, + INSTANCE_ID, + APP_PROFILE_ID, + CLIENT_NAME, + // Same as ClientSchema + CLIENT_PROJECT, + CLIENT_REGION, + CLOUD_PLATFORM, + HOST_ID, + HOST_NAME, + UUID)); + } + + @Override + public ProjectName extractProjectName( + Attributes ignored, EnvInfo ignored2, ClientInfo clientInfo) { + return ProjectName.of(clientInfo.getInstanceName().getProjectId()); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/Schema.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/Schema.java new file mode 100644 index 0000000000..3458ce6064 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/Schema.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.schema; + +import com.google.api.MonitoredResource; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.common.collect.ImmutableList; +import com.google.monitoring.v3.ProjectName; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import java.util.List; +import java.util.function.BiFunction; +import java.util.function.Function; + +public abstract class Schema { + private final String name; + private final List> resourceKeys; + private final List deferredAttrs; + + Schema(String name, List> resourceKeys) { + this(name, resourceKeys, ImmutableList.of()); + } + + Schema(String name, List> resourceKeys, List deferredAttrs) { + this.name = name; + this.resourceKeys = resourceKeys; + this.deferredAttrs = deferredAttrs; + } + + public List> getResourceKeys() { + return resourceKeys; + } + + public abstract ProjectName extractProjectName( + Attributes attrs, EnvInfo envInfo, ClientInfo clientInfo); + + public MonitoredResource extractMonitoredResource( + Attributes attrs, EnvInfo envInfo, ClientInfo clientInfo) { + MonitoredResource.Builder builder = MonitoredResource.newBuilder().setType(name); + + for (AttributeKey key : resourceKeys) { + Object value = attrs.get(key); + if (value != null) { + builder.putLabels(key.getKey(), value.toString()); + } + } + for (DeferredAttr a : deferredAttrs) { + builder.putLabels(a.getKey().getKey(), a.getValue(envInfo, clientInfo)); + } + return builder.build(); + } + + public String getName() { + return name; + } + + static class DeferredAttr { + private final AttributeKey name; + private BiFunction extractor; + + static DeferredAttr fromEnv(String name, Function envExtractor) { + return new DeferredAttr( + AttributeKey.stringKey(name), (envInfo, ignored) -> envExtractor.apply(envInfo)); + } + + static DeferredAttr fromClientInfo(String name, Function envExtractor) { + return new DeferredAttr( + AttributeKey.stringKey(name), (ignored, clientInfo) -> envExtractor.apply(clientInfo)); + } + + private DeferredAttr( + AttributeKey name, BiFunction extractor) { + this.name = name; + this.extractor = extractor; + } + + AttributeKey getKey() { + return name; + } + + String getValue(EnvInfo envInfo, ClientInfo clientInfo) { + return extractor.apply(envInfo, clientInfo); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/TableSchema.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/TableSchema.java new file mode 100644 index 0000000000..8a655cfd76 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/schema/TableSchema.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.schema; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.common.collect.ImmutableList; +import com.google.monitoring.v3.ProjectName; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.common.AttributesBuilder; +import javax.annotation.Nullable; + +public final class TableSchema extends Schema { + // This implements the `bigtable_client_raw` resource defined in + // bigtable_googleapis_com/metrics/resource_types.gcl + + public static final AttributeKey BIGTABLE_PROJECT_ID_KEY = + AttributeKey.stringKey("project_id"); + public static final AttributeKey INSTANCE_ID_KEY = AttributeKey.stringKey("instance"); + public static final AttributeKey TABLE_ID_KEY = AttributeKey.stringKey("table"); + public static final AttributeKey CLUSTER_ID_KEY = AttributeKey.stringKey("cluster"); + public static final AttributeKey ZONE_ID_KEY = AttributeKey.stringKey("zone"); + + // Must come after all other static members + public static final TableSchema INSTANCE = new TableSchema(); + + public TableSchema() { + super( + "bigtable_client_raw", + ImmutableList.of( + BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, TABLE_ID_KEY, CLUSTER_ID_KEY, ZONE_ID_KEY)); + } + + @Override + public ProjectName extractProjectName(Attributes attrs, EnvInfo envInfo, ClientInfo clientInfo) { + return ProjectName.of(attrs.get(BIGTABLE_PROJECT_ID_KEY)); + } + + public AttributesBuilder createResourceAttrs( + ClientInfo clientInfo, String tableId, @Nullable ClusterInformation clusterInfo) { + return Attributes.builder() + .put(BIGTABLE_PROJECT_ID_KEY, clientInfo.getInstanceName().getProjectId()) + .put(INSTANCE_ID_KEY, clientInfo.getInstanceName().getInstanceId()) + .put(TABLE_ID_KEY, tableId) + .put(CLUSTER_ID_KEY, Util.formatClusterIdMetricLabel(clusterInfo)) + .put(ZONE_ID_KEY, Util.formatZoneIdMetricLabel(clusterInfo)); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableGrpcStreamTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableGrpcStreamTracer.java similarity index 76% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableGrpcStreamTracer.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableGrpcStreamTracer.java index 3b2242385a..99a184b5e3 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableGrpcStreamTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableGrpcStreamTracer.java @@ -13,13 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; -import com.google.common.base.Stopwatch; -import io.grpc.Attributes; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; import io.grpc.ClientStreamTracer; import io.grpc.Metadata; -import java.util.concurrent.TimeUnit; /** * Records the time a request is enqueued in a grpc channel queue. This a bridge between gRPC stream @@ -27,22 +25,15 @@ * asking gRPC to start an RPC and gRPC actually serializing that RPC. */ class BigtableGrpcStreamTracer extends ClientStreamTracer { - - private final Stopwatch stopwatch = Stopwatch.createUnstarted(); private final BigtableTracer tracer; - public BigtableGrpcStreamTracer(BigtableTracer tracer) { + private BigtableGrpcStreamTracer(BigtableTracer tracer) { this.tracer = tracer; } - @Override - public void streamCreated(Attributes transportAttrs, Metadata headers) { - stopwatch.start(); - } - @Override public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) { - tracer.grpcChannelQueuedLatencies(stopwatch.elapsed(TimeUnit.NANOSECONDS)); + tracer.grpcMessageSent(); } static class Factory extends ClientStreamTracer.Factory { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerStreamingCallable.java similarity index 61% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerStreamingCallable.java index 167cd0dc2e..c45e608c0a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerStreamingCallable.java @@ -13,34 +13,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; import com.google.api.core.InternalApi; -import com.google.api.gax.grpc.GrpcResponseMetadata; +import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StreamController; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; import com.google.common.base.Preconditions; import com.google.common.base.Stopwatch; import java.util.concurrent.TimeUnit; import javax.annotation.Nonnull; /** - * This callable will - *
  • -Inject a {@link GrpcResponseMetadata} to access the headers returned by gRPC methods upon - * completion. The {@link BigtableTracer} will process metrics that were injected in the - * header/trailer and publish them to OpenCensus. If {@link GrpcResponseMetadata#getMetadata()} - * returned null, it probably means that the request has never reached GFE, and it'll increment - * the gfe_header_missing_counter in this case. - *
  • -This class will also access trailers from {@link GrpcResponseMetadata} to record zone and - * cluster ids. - *
  • -Call {@link BigtableTracer#onRequest(int)} to record the request events in a stream. - *
  • -This class will also inject a {@link BigtableGrpcStreamTracer} that'll record the time an - * RPC spent in a grpc channel queue. - *
  • This class is considered an internal implementation detail and not meant to be used by - * applications. + * This class is considered an internal implementation detail and not meant to be used by + * applications. */ @InternalApi public class BigtableTracerStreamingCallable @@ -56,37 +47,42 @@ public BigtableTracerStreamingCallable( @Override public void call( RequestT request, ResponseObserver responseObserver, ApiCallContext context) { - final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); + GrpcCallContext grpcCtx = (GrpcCallContext) context; + + MetadataExtractorInterceptor metadataExtractor = new MetadataExtractorInterceptor(); + grpcCtx = metadataExtractor.injectInto(grpcCtx); + // tracer should always be an instance of bigtable tracer if (context.getTracer() instanceof BigtableTracer) { + BigtableTracer tracer = (BigtableTracer) context.getTracer(); + tracer.setSidebandData(metadataExtractor.getSidebandData()); + grpcCtx = + grpcCtx.withCallOptions( + grpcCtx + .getCallOptions() + .withStreamTracerFactory(new BigtableGrpcStreamTracer.Factory(tracer))); + BigtableTracerResponseObserver innerObserver = - new BigtableTracerResponseObserver<>( - responseObserver, (BigtableTracer) context.getTracer(), responseMetadata); - innerCallable.call( - request, - innerObserver, - Util.injectBigtableStreamTracer( - context, responseMetadata, (BigtableTracer) context.getTracer())); + new BigtableTracerResponseObserver<>(responseObserver, tracer); + if (context.getRetrySettings() != null) { + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); + } + innerCallable.call(request, innerObserver, grpcCtx); } else { - innerCallable.call(request, responseObserver, context); + innerCallable.call(request, responseObserver, grpcCtx); } } - private class BigtableTracerResponseObserver extends SafeResponseObserver { - + private static class BigtableTracerResponseObserver + extends SafeResponseObserver { private final BigtableTracer tracer; private final ResponseObserver outerObserver; - private final GrpcResponseMetadata responseMetadata; - BigtableTracerResponseObserver( - ResponseObserver observer, - BigtableTracer tracer, - GrpcResponseMetadata metadata) { + BigtableTracerResponseObserver(ResponseObserver observer, BigtableTracer tracer) { super(observer); this.tracer = tracer; this.outerObserver = observer; - this.responseMetadata = metadata; } @Override @@ -104,18 +100,16 @@ protected void onResponseImpl(ResponseT response) { @Override protected void onErrorImpl(Throwable t) { - Util.recordMetricsFromMetadata(responseMetadata, tracer, t); outerObserver.onError(t); } @Override protected void onCompleteImpl() { - Util.recordMetricsFromMetadata(responseMetadata, tracer, null); outerObserver.onComplete(); } } - private class TracedStreamController implements StreamController { + private static class TracedStreamController implements StreamController { private final StreamController innerController; private final BigtableTracer tracer; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerUnaryCallable.java new file mode 100644 index 0000000000..443ee17345 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BigtableTracerUnaryCallable.java @@ -0,0 +1,64 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.core.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; + +/** + * This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class BigtableTracerUnaryCallable + extends UnaryCallable { + + private final UnaryCallable innerCallable; + + public BigtableTracerUnaryCallable(@Nonnull UnaryCallable innerCallable) { + this.innerCallable = Preconditions.checkNotNull(innerCallable, "Inner callable must be set"); + } + + @Override + public ApiFuture futureCall(RequestT request, ApiCallContext context) { + MetadataExtractorInterceptor interceptor = new MetadataExtractorInterceptor(); + GrpcCallContext grpcCtx = interceptor.injectInto((GrpcCallContext) context); + + // tracer should always be an instance of BigtableTracer + if (context.getTracer() instanceof BigtableTracer) { + BigtableTracer tracer = (BigtableTracer) context.getTracer(); + tracer.setSidebandData(interceptor.getSidebandData()); + + grpcCtx = + grpcCtx.withCallOptions( + grpcCtx + .getCallOptions() + .withStreamTracerFactory(new BigtableGrpcStreamTracer.Factory(tracer))); + + if (context.getRetrySettings() != null) { + tracer.setTotalTimeoutDuration(context.getRetrySettings().getTotalTimeoutDuration()); + } + } + return innerCallable.futureCall(request, grpcCtx); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracer.java new file mode 100644 index 0000000000..305ec53315 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracer.java @@ -0,0 +1,433 @@ +/* + * Copyright 2022 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.bigtable.data.v2.internal.csm.tracers; + +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; +import static com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util.extractStatus; + +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.retrying.ServerStreamingAttemptException; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor.SidebandData; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; +import com.google.common.base.Stopwatch; +import com.google.common.collect.Comparators; +import com.google.common.math.IntMath; +import io.grpc.Deadline; +import io.grpc.Status; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.CancellationException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import javax.annotation.Nullable; + +/** + * A {@link BigtableTracer} that records built-in metrics and publish under the + * bigtable.googleapis.com/client namespace + */ +class BuiltinMetricsTracer extends BigtableTracer { + private static final MethodInfo READ_ROWS = + MethodInfo.builder().setName("Bigtable.ReadRows").setStreaming(true).build(); + private final MetricRegistry.RecorderRegistry recorder; + private final ClientInfo clientInfo; + private final MethodInfo methodInfo; + + // Operation level metrics + private final AtomicBoolean operationFinishedEarly = new AtomicBoolean(); + private final AtomicBoolean opFinished = new AtomicBoolean(); + private final Stopwatch operationTimer = Stopwatch.createStarted(); + private final Stopwatch firstResponsePerOpTimer = Stopwatch.createStarted(); + + // Attempt level metrics + private int attemptCount = 0; + private Stopwatch attemptTimer; + private volatile int attempt = 0; + + // Total server latency needs to be atomic because it's accessed from different threads. E.g. + // request() from user thread and attempt failed from grpc thread. We're only measuring the extra + // time application spent blocking grpc buffer, which will be operationLatency - serverLatency. + private final AtomicLong totalServerLatencyNano = new AtomicLong(0); + // Stopwatch is not thread safe so this is a workaround to check if the stopwatch changes is + // flushed to memory. + private final Stopwatch serverLatencyTimer = Stopwatch.createUnstarted(); + private final Object timerLock = new Object(); + + private boolean flowControlIsDisabled = false; + + private final AtomicInteger requestLeft = new AtomicInteger(0); + + private String tableId = ""; + + private final AtomicLong totalClientBlockingTime = new AtomicLong(0); + + private final AtomicLong grpcMessageSentDelay = new AtomicLong(0); + + private Deadline operationDeadline = null; + private volatile Duration remainingDeadlineAtAttemptStart = Duration.ZERO; + + private volatile MetadataExtractorInterceptor.SidebandData sidebandData = new SidebandData(); + + BuiltinMetricsTracer( + MetricRegistry.RecorderRegistry recorder, ClientInfo clientInfo, MethodInfo methodInfo) { + + this.recorder = recorder; + this.clientInfo = clientInfo; + this.methodInfo = methodInfo; + } + + @Override + public Scope inScope() { + return new Scope() { + @Override + public void close() {} + }; + } + + @Override + public void operationFinishEarly() { + operationFinishedEarly.set(true); + attemptTimer.stop(); + operationTimer.stop(); + } + + @Override + public void operationSucceeded() { + recordOperationCompletion(null); + } + + @Override + public void operationCancelled() { + recordOperationCompletion(new CancellationException()); + } + + @Override + public void operationFailed(Throwable error) { + recordOperationCompletion(error); + } + + @Override + public void attemptStarted(int attemptNumber) { + attemptStarted(null, attemptNumber); + } + + @Override + public void attemptStarted(Object request, int attemptNumber) { + this.attempt = attemptNumber; + attemptCount++; + attemptTimer = Stopwatch.createStarted(); + if (operationDeadline != null) { + remainingDeadlineAtAttemptStart = + Duration.ofMillis(operationDeadline.timeRemaining(TimeUnit.MILLISECONDS)); + } + if (request != null) { + this.tableId = Util.extractTableId(request); + } + if (!flowControlIsDisabled) { + synchronized (timerLock) { + if (!serverLatencyTimer.isRunning()) { + serverLatencyTimer.start(); + } + } + } + } + + @Override + public void attemptSucceeded() { + recordAttemptCompletion(null); + } + + @Override + public void attemptCancelled() { + recordAttemptCompletion(new CancellationException()); + } + + /** + * This method is obsolete. Use {@link #attemptFailedDuration(Throwable, java.time.Duration)} + * instead. + */ + @ObsoleteApi("Use attemptFailedDuration(Throwable, java.time.Duration) instead") + @Override + public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) { + attemptFailedDuration(error, toJavaTimeDuration(delay)); + } + + @Override + public void attemptFailedDuration(Throwable error, Duration delay) { + recordAttemptCompletion(error); + } + + @Override + public void attemptPermanentFailure(Throwable throwable) { + recordAttemptCompletion(throwable); + } + + @Override + public void onRequest(int requestCount) { + requestLeft.accumulateAndGet(requestCount, IntMath::saturatedAdd); + + if (operationFinishedEarly.get()) { + return; + } + + if (flowControlIsDisabled) { + // On request is only called when auto flow control is disabled. When auto flow control is + // disabled, server latency is measured between onRequest and onResponse. + synchronized (timerLock) { + if (!serverLatencyTimer.isRunning()) { + serverLatencyTimer.start(); + } + } + } + } + + @Override + public void responseReceived() { + if (operationFinishedEarly.get()) { + return; + } + + if (firstResponsePerOpTimer.isRunning()) { + firstResponsePerOpTimer.stop(); + } + // When auto flow control is enabled, server latency is measured between afterResponse and + // responseReceived. + // When auto flow control is disabled, server latency is measured between onRequest and + // responseReceived. + // When auto flow control is disabled and application requested multiple responses, server + // latency is measured between afterResponse and responseReceived. + // In all the cases, we want to stop the serverLatencyTimer here. + synchronized (timerLock) { + if (serverLatencyTimer.isRunning()) { + totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); + serverLatencyTimer.reset(); + } + } + } + + @Override + public void afterResponse(long applicationLatency) { + if (!flowControlIsDisabled || requestLeft.decrementAndGet() > 0) { + if (operationFinishedEarly.get()) { + return; + } + // When auto flow control is enabled, request will never be called, so server latency is + // measured between after the last response is processed and before the next response is + // received. If flow control is disabled but requestLeft is greater than 0, + // also start the timer to count the time between afterResponse and responseReceived. + synchronized (timerLock) { + if (!serverLatencyTimer.isRunning()) { + serverLatencyTimer.start(); + } + } + } + } + + @Override + public int getAttempt() { + return attempt; + } + + @Override + public void setSidebandData(MetadataExtractorInterceptor.SidebandData sidebandData) { + this.sidebandData = sidebandData; + } + + @Override + public void batchRequestThrottled(long throttledTimeNanos) { + totalClientBlockingTime.addAndGet(java.time.Duration.ofNanos(throttledTimeNanos).toMillis()); + } + + @Override + public void grpcMessageSent() { + grpcMessageSentDelay.set(attemptTimer.elapsed(TimeUnit.NANOSECONDS)); + } + + @Override + public void setTotalTimeoutDuration(java.time.Duration totalTimeoutDuration) { + // This method is called by BigtableTracerStreamingCallable and + // BigtableTracerUnaryCallable which is called per attempt. We only set + // the operationDeadline on the first attempt and when totalTimeout is set. + if (operationDeadline == null && !totalTimeoutDuration.isZero()) { + this.operationDeadline = + Deadline.after(totalTimeoutDuration.toMillis(), TimeUnit.MILLISECONDS); + this.remainingDeadlineAtAttemptStart = totalTimeoutDuration; + } + } + + @Override + public void disableFlowControl() { + flowControlIsDisabled = true; + } + + private void recordOperationCompletion(@Nullable Throwable throwable) { + if (operationFinishedEarly.get()) { + throwable = null; // force an ok + } + + if (!opFinished.compareAndSet(false, true)) { + return; + } + long operationLatencyNano = operationTimer.elapsed(TimeUnit.NANOSECONDS); + + Status.Code code = extractStatus(throwable); + + // Only record when retry count is greater than 0 so the retry + // graph will be less confusing + if (attemptCount > 1) { + recorder.retryCount.record( + clientInfo, tableId, methodInfo, sidebandData.getClusterInfo(), code, attemptCount - 1); + } + + recorder.operationLatency.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + code, + Duration.ofNanos(operationLatencyNano)); + + // serverLatencyTimer should already be stopped in recordAttemptCompletion + long applicationLatencyNano = operationLatencyNano - totalServerLatencyNano.get(); + recorder.applicationBlockingLatency.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + Duration.ofNanos(applicationLatencyNano)); + + if (methodInfo.equals(READ_ROWS)) { + recorder.firstResponseLantency.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + code, + firstResponsePerOpTimer.elapsed()); + } + } + + private void recordAttemptCompletion(@Nullable Throwable throwable) { + if (operationFinishedEarly.get()) { + throwable = null; // force an ok + } + // If the attempt failed, the time spent in retry should be counted in application latency. + // Stop the stopwatch and decrement requestLeft. + synchronized (timerLock) { + if (serverLatencyTimer.isRunning()) { + requestLeft.decrementAndGet(); + totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); + serverLatencyTimer.reset(); + } + } + + // Patch the throwable until it's fixed in gax. When an attempt failed, + // it'll throw a ServerStreamingAttemptException. Unwrap the exception + // so it could get processed by extractStatus + if (throwable instanceof ServerStreamingAttemptException) { + throwable = throwable.getCause(); + } + + Status.Code code = extractStatus(throwable); + + totalClientBlockingTime.addAndGet(grpcMessageSentDelay.get()); + recorder.clientBlockingLatency.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + Duration.ofNanos(totalClientBlockingTime.get())); + + recorder.attemptLatency.record( + clientInfo, + tableId, + sidebandData.getClusterInfo(), + methodInfo, + code, + attemptTimer.elapsed()); + + recorder.attemptLatency2.record( + clientInfo, + tableId, + sidebandData.getPeerInfo(), + sidebandData.getClusterInfo(), + methodInfo, + code, + attemptTimer.elapsed()); + + // When operationDeadline is set, it's possible that the deadline is passed by the time we send + // a new attempt. In this case we'll record 0. + if (operationDeadline != null) { + recorder.remainingDeadline.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + code, + Comparators.max(remainingDeadlineAtAttemptStart, Duration.ZERO)); + } + + if (sidebandData.getGfeTiming() != null) { + recorder.serverLatency.record( + clientInfo, + tableId, + methodInfo, + sidebandData.getClusterInfo(), + code, + sidebandData.getGfeTiming()); + } + + boolean seenServer = + Optional.ofNullable(sidebandData.getPeerInfo()) + .map(pe -> pe.getApplicationFrontendId() != 0) + .orElse(false); + + seenServer = + seenServer + || Optional.ofNullable(sidebandData.getPeerInfo()) + .map(rp -> !PeerInfo.getDefaultInstance().equals(rp)) + .orElse(false); + + seenServer = seenServer || (sidebandData.getGfeTiming() != null); + + if (seenServer) { + recorder.connectivityErrorCount.record( + clientInfo, tableId, methodInfo, sidebandData.getClusterInfo(), code, 0); + } else { + recorder.connectivityErrorCount.record( + clientInfo, tableId, methodInfo, sidebandData.getClusterInfo(), code, 1); + } + } + + @Override + public void setBatchWriteFlowControlTargetQps(double targetQps) { + recorder.batchWriteFlowControlTargetQps.record(clientInfo, methodInfo, targetQps); + } + + @Override + public void addBatchWriteFlowControlFactor( + double factor, @Nullable Throwable throwable, boolean applied) { + recorder.batchWriteFlowControlFactor.record( + clientInfo, extractStatus(throwable), applied, methodInfo, factor); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerFactory.java new file mode 100644 index 0000000000..8a41fd339e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerFactory.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.core.InternalApi; +import com.google.api.gax.tracing.ApiTracer; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.BaseApiTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; + +/** + * {@link ApiTracerFactory} that will generate OpenTelemetry metrics by using the {@link ApiTracer} + * api. + */ +@InternalApi("For internal use only") +public class BuiltinMetricsTracerFactory extends BaseApiTracerFactory { + + private final MetricRegistry.RecorderRegistry recorder; + private final ClientInfo clientInfo; + + public static BuiltinMetricsTracerFactory create( + MetricRegistry.RecorderRegistry recorder, ClientInfo clientInfo) { + return new BuiltinMetricsTracerFactory(recorder, clientInfo); + } + + BuiltinMetricsTracerFactory(MetricRegistry.RecorderRegistry recorder, ClientInfo clientInfo) { + this.recorder = recorder; + this.clientInfo = clientInfo; + } + + @Override + public ApiTracer newTracer(ApiTracer parent, SpanName spanName, OperationType operationType) { + MethodInfo methodInfo = + MethodInfo.builder() + .setName(spanName.toString()) + .setStreaming(operationType == OperationType.ServerStreaming) + .build(); + return new BuiltinMetricsTracer(recorder, clientInfo, methodInfo); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracer.java new file mode 100644 index 0000000000..2d53d119c1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracer.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. + */ +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelObserver; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolObserver; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings.LoadBalancingStrategy; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import java.util.logging.Logger; + +@InternalApi("For internal use only") +public class ChannelPoolMetricsTracer implements Runnable { + private static final Logger logger = Logger.getLogger(ChannelPoolMetricsTracer.class.getName()); + + private static final int SAMPLING_PERIOD_SECONDS = 60; + private final MetricRegistry.RecorderRegistry recorder; + private final ClientInfo clientInfo; + + private final AtomicReference bigtableChannelInsightsProviderRef = + new AtomicReference<>(); + private final AtomicReference lbPolicyRef = + new AtomicReference<>(LoadBalancingStrategy.ROUND_ROBIN); + + // Attributes for unary and streaming RPCs, built on demand in run() + + public ChannelPoolMetricsTracer(MetricRegistry.RecorderRegistry recorder, ClientInfo clientInfo) { + this.recorder = recorder; + this.clientInfo = clientInfo; + } + + /** + * Registers the provider for the channel pool entries. This should be called by the component + * that creates the BigtableChannelPool. + */ + public void registerChannelInsightsProvider(BigtableChannelPoolObserver channelInsightsProvider) { + this.bigtableChannelInsightsProviderRef.set(channelInsightsProvider); + } + + /** Register the current lb policy * */ + public void registerLoadBalancingStrategy(LoadBalancingStrategy lbPolicy) { + this.lbPolicyRef.set(lbPolicy); + } + + /** Starts the periodic collection. */ + public ScheduledFuture start(ScheduledExecutorService scheduler) { + return scheduler.scheduleAtFixedRate( + this, SAMPLING_PERIOD_SECONDS, SAMPLING_PERIOD_SECONDS, TimeUnit.SECONDS); + } + + @Override + public void run() { + BigtableChannelPoolObserver channelInsightsProvider = bigtableChannelInsightsProviderRef.get(); + if (channelInsightsProvider == null) { + logger.warning("No Bigtable ChannelPoolObserver available"); + return; // Not registered yet + } + List channelInsights = + channelInsightsProvider.getChannelInfos(); + if (channelInsights == null || channelInsights.isEmpty()) { + return; + } + + LoadBalancingStrategy lbPolicy = lbPolicyRef.get(); + + for (BigtableChannelObserver info : channelInsights) { + TransportType transportType = info.getTransportType(); + + long currentOutstandingUnaryRpcs = info.getOutstandingUnaryRpcs(); + long currentOutstandingStreamingRpcs = info.getOutstandingStreamingRpcs(); + + recorder.channelPoolOutstandingRpcs.record( + clientInfo, transportType, lbPolicy, false, currentOutstandingUnaryRpcs); + recorder.channelPoolOutstandingRpcs.record( + clientInfo, transportType, lbPolicy, true, currentOutstandingStreamingRpcs); + + long errors = info.getAndResetErrorCount(); + // Record errors with empty attributes. + recorder.perConnectionErrorCount.record(clientInfo, errors); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracer.java similarity index 74% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracer.java index 774c6d9f22..d9362acb48 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracer.java @@ -13,14 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; + +import com.google.api.core.ObsoleteApi; import com.google.api.gax.tracing.ApiTracer; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.List; import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** * Combines multiple {@link ApiTracer}s and {@link BigtableTracer}s into a single {@link ApiTracer}. @@ -62,6 +66,13 @@ public void close() { }; } + @Override + public void operationFinishEarly() { + for (BigtableTracer tracer : bigtableTracers) { + tracer.operationFinishEarly(); + } + } + @Override public void operationSucceeded() { for (ApiTracer child : children) { @@ -117,9 +128,20 @@ public void attemptCancelled() { } } - public void attemptFailed(Throwable error, Duration delay) { + /** + * This method is obsolete. Use {@link #attemptFailedDuration(Throwable, java.time.Duration)} + * instead. + */ + @ObsoleteApi("Use attemptFailedDuration(Throwable, java.time.Duration) instead") + @Override + public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) { + attemptFailedDuration(error, toJavaTimeDuration(delay)); + } + + @Override + public void attemptFailedDuration(Throwable error, java.time.Duration delay) { for (ApiTracer child : children) { - child.attemptFailed(error, delay); + child.attemptFailedDuration(error, delay); } } @@ -177,13 +199,6 @@ public int getAttempt() { return attempt; } - @Override - public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwable) { - for (BigtableTracer tracer : bigtableTracers) { - tracer.recordGfeMetadata(latency, throwable); - } - } - @Override public void batchRequestThrottled(long throttledTimeMs) { for (BigtableTracer tracer : bigtableTracers) { @@ -192,9 +207,9 @@ public void batchRequestThrottled(long throttledTimeMs) { } @Override - public void setLocations(String zone, String cluster) { - for (BigtableTracer tracer : bigtableTracers) { - tracer.setLocations(zone, cluster); + public void setSidebandData(MetadataExtractorInterceptor.SidebandData sidebandData) { + for (BigtableTracer bigtableTracer : bigtableTracers) { + bigtableTracer.setSidebandData(sidebandData); } } @@ -220,9 +235,31 @@ public void afterResponse(long applicationLatency) { } @Override - public void grpcChannelQueuedLatencies(long queuedTimeMs) { + public void grpcMessageSent() { + for (BigtableTracer tracer : bigtableTracers) { + tracer.grpcMessageSent(); + } + } + + @Override + public void setTotalTimeoutDuration(java.time.Duration totalTimeoutDuration) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.setTotalTimeoutDuration(totalTimeoutDuration); + } + } + + @Override + public void setBatchWriteFlowControlTargetQps(double targetQps) { + for (BigtableTracer tracer : bigtableTracers) { + tracer.setBatchWriteFlowControlTargetQps(targetQps); + } + } + + @Override + public void addBatchWriteFlowControlFactor( + double factor, @Nullable Throwable status, boolean applied) { for (BigtableTracer tracer : bigtableTracers) { - tracer.grpcChannelQueuedLatencies(queuedTimeMs); + tracer.addBatchWriteFlowControlFactor(factor, status, applied); } } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerFactory.java similarity index 96% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerFactory.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerFactory.java index 2d9256a5ea..8b2606e955 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; import com.google.api.core.InternalApi; import com.google.api.gax.tracing.ApiTracer; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracer.java new file mode 100644 index 0000000000..473c8c5681 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracer.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import java.time.Duration; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +public class CompositeVRpcTracer implements VRpcTracer { + + private static final Logger logger = Logger.getLogger(CompositeVRpcTracer.class.getName()); + + private final List children; + + public CompositeVRpcTracer(List children) { + this.children = children; + } + + @Override + public void onOperationStart() { + children.forEach( + c -> { + try { + c.onOperationStart(); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log operation start on tracer {0}", + c.getClass().getName()); + } + }); + } + + @Override + public void onAttemptStart(Object req) { + children.forEach( + c -> { + try { + c.onAttemptStart(req); + } catch (Throwable e) { + logger.log( + Level.WARNING, "Failed to log attempt start on tracer {0}", c.getClass().getName()); + } + }); + } + + @Override + public void onRequestSent(PeerInfo peerInfo) { + children.forEach( + c -> { + try { + c.onRequestSent(peerInfo); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log request sent on tracer {0} for peer {1}", + new Object[] {c.getClass().getName(), peerInfo}); + } + }); + } + + @Override + public void onResponseReceived() { + children.forEach( + c -> { + try { + c.onResponseReceived(); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log response received on tracer {0}", + c.getClass().getName()); + } + }); + } + + @Override + public void recordApplicationBlockingLatencies(Duration elapsed) { + children.forEach( + c -> { + try { + c.recordApplicationBlockingLatencies(elapsed); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log application latencies on tracer {0} with duration {1}", + new Object[] {c.getClass().getName(), elapsed}); + } + }); + } + + @Override + public void onAttemptFinish(VRpc.VRpcResult result) { + children.forEach( + c -> { + try { + c.onAttemptFinish(result); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log attempt finish on tracer {0} with result {1}", + new Object[] {c.getClass().getName(), result}); + } + }); + } + + @Override + public void onOperationFinish(VRpc.VRpcResult result) { + children.forEach( + c -> { + try { + c.onOperationFinish(result); + } catch (Throwable e) { + logger.log( + Level.WARNING, + "Failed to log operation finish on tracer {0} with result {1}", + new Object[] {c.getClass().getName(), result}); + } + }); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracer.java new file mode 100644 index 0000000000..e841f8b9bb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracer.java @@ -0,0 +1,34 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; + +public abstract class DebugTagTracer { + + public abstract void record(TelemetryConfiguration.Level level, String tag); + + public abstract void setClientConfigurationManager(ClientConfigurationManager manager); + + public final void checkPrecondition( + boolean expression, String tag, String errorMessage, Object... args) { + if (!expression) { + record(TelemetryConfiguration.Level.ERROR, tag); + throw new IllegalStateException(String.format(errorMessage, args)); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracerImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracerImpl.java new file mode 100644 index 0000000000..4ba0f28ef5 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DebugTagTracerImpl.java @@ -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 + * + * 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import java.util.Optional; + +public class DebugTagTracerImpl extends DebugTagTracer { + + private final MetricRegistry.RecorderRegistry registry; + private final ClientInfo clientInfo; + + private Optional manager = Optional.empty(); + + public DebugTagTracerImpl(ClientInfo clientInfo, MetricRegistry.RecorderRegistry registry) { + this.clientInfo = clientInfo; + this.registry = registry; + } + + public void setClientConfigurationManager(ClientConfigurationManager manager) { + this.manager = Optional.of(manager); + } + + @Override + public void record(TelemetryConfiguration.Level level, String tag) { + if (shouldRecord(level)) { + registry.debugTagCount.record(clientInfo, tag, 1); + } + } + + private boolean shouldRecord(TelemetryConfiguration.Level level) { + TelemetryConfiguration.Level currentLevel = + manager + .map(m -> m.getClientConfiguration().getTelemetryConfiguration().getDebugTagLevel()) + .orElse(TelemetryConfiguration.Level.WARN); + return level.getNumber() >= currentLevel.getNumber(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracer.java new file mode 100644 index 0000000000..701e93ef0d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracer.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator; + +/** Interface for recording DirectPath/DirectAccess eligibility metrics. */ +@InternalApi +public interface DirectPathCompatibleTracer { + + /** + * Records that the environment is eligible and successfully connected via DirectPath. + * + * @param ipProtocol The IP protocol used (e.g., "ipv6"). + */ + void recordSuccess(Util.IpProtocol ipProtocol); + + /** + * Records that the environment is not eligible or failed to connect via DirectPath. + * + * @param reason The reason for the failure (e.g., "routing_check_failed"). + */ + // TODO: Make this an enum + void recordFailure(DirectAccessInvestigator.FailureReason reason); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracerImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracerImpl.java new file mode 100644 index 0000000000..9995d1c90d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/DirectPathCompatibleTracerImpl.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator; +import com.google.common.base.Preconditions; + +@InternalApi +public class DirectPathCompatibleTracerImpl implements DirectPathCompatibleTracer { + private final ClientInfo clientInfo; + private final MetricRegistry.RecorderRegistry recorder; + + public DirectPathCompatibleTracerImpl( + ClientInfo clientInfo, MetricRegistry.RecorderRegistry recorder) { + this.clientInfo = Preconditions.checkNotNull(clientInfo); + this.recorder = Preconditions.checkNotNull(recorder); + } + + @Override + public void recordSuccess(Util.IpProtocol ipProtocol) { + recorder.dpCompatGuage.recordSuccess(clientInfo, ipProtocol.getValue()); + } + + @Override + public void recordFailure(DirectAccessInvestigator.FailureReason reason) { + recorder.dpCompatGuage.recordFailure(clientInfo, reason); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/Pacemaker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/Pacemaker.java new file mode 100644 index 0000000000..8a3771406a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/Pacemaker.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import java.time.Duration; +import java.time.Instant; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + +public class Pacemaker implements Runnable { + + static final Duration PACEMAKER_INTERVAL = Duration.ofMillis(100); + + private final RecorderRegistry registry; + private final ClientInfo clientInfo; + private final String executorName; + + private Instant prev; + + public Pacemaker(RecorderRegistry registry, ClientInfo clientInfo, String name) { + this.prev = Instant.now(); + this.registry = registry; + this.clientInfo = clientInfo; + this.executorName = name; + } + + public ScheduledFuture start(ScheduledExecutorService executor) { + return executor.scheduleAtFixedRate( + this, + Pacemaker.PACEMAKER_INTERVAL.toMillis(), + Pacemaker.PACEMAKER_INTERVAL.toMillis(), + TimeUnit.MILLISECONDS); + } + + @Override + public void run() { + Instant current = Instant.now(); + Duration delta = Duration.between(prev, current).minus(PACEMAKER_INTERVAL); + prev = current; + registry.pacemakerDelay.record( + clientInfo, executorName, delta.isNegative() ? Duration.ZERO : delta); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListener.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListener.java new file mode 100644 index 0000000000..cb808b094c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListener.java @@ -0,0 +1,25 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +public interface PoolFallbackListener { + public enum ChannelFallbackReason { + ERROR_RATE, + FALLBACK_DISABLE + }; + + void onFallback(String from, String to, ChannelFallbackReason reason); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListenerImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListenerImpl.java new file mode 100644 index 0000000000..154c3f8a3f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/PoolFallbackListenerImpl.java @@ -0,0 +1,34 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; + +public class PoolFallbackListenerImpl implements PoolFallbackListener { + private final RecorderRegistry registry; + private final ClientInfo clientInfo; + + public PoolFallbackListenerImpl(RecorderRegistry registry, ClientInfo clientInfo) { + this.registry = registry; + this.clientInfo = clientInfo; + } + + @Override + public void onFallback(String from, String to, ChannelFallbackReason reason) { + registry.channelFallbackCount.record(clientInfo, 1, from, to, reason); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracer.java new file mode 100644 index 0000000000..a9048490d7 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracer.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.PeerInfo; +import io.grpc.Status; + +public interface SessionTracer { + + void onStart(); + + void onOpen(PeerInfo peerInfo); + + void onVRpcClose(Status.Code code); + + void onClose(PeerInfo peerInfo, CloseSessionReason reason, Status status); + + /** + * Record any metrics outside of the normal flow (ie periodically recording how long a session has + * been open). + * + * @return false if this tracker is done and will not have anymore metrics to record. + */ + boolean recordAsyncMetrics(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracerImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracerImpl.java new file mode 100644 index 0000000000..add572f28b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/SessionTracerImpl.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientSessionDuration.SessionCloseVRpcState; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.common.base.Stopwatch; +import io.grpc.Status; +import io.grpc.Status.Code; + +public class SessionTracerImpl implements SessionTracer { + private final RecorderRegistry metricRegistry; + private final SessionPoolInfo poolInfo; + + private final Stopwatch uptime = Stopwatch.createUnstarted(); + + private enum State { + New, + Ready, + Closed + } + + private volatile State state = State.New; + private volatile boolean hasOkRpcs = false; + private volatile boolean hasErrorRpcs = false; + private volatile PeerInfo lastPeerInfo = SessionStream.DISCONNECTED_PEER_INFO; + + public SessionTracerImpl(RecorderRegistry metricRegistry, SessionPoolInfo sessionInfo) { + this.metricRegistry = metricRegistry; + this.poolInfo = sessionInfo; + } + + @Override + public void onStart() { + uptime.start(); + } + + @Override + public void onOpen(PeerInfo peerInfo) { + state = State.Ready; + lastPeerInfo = peerInfo; + + metricRegistry.sessionOpenLatency.record(poolInfo, peerInfo, Status.Code.OK, uptime.elapsed()); + } + + @Override + public void onVRpcClose(Status.Code code) { + if (code == Code.OK) { + hasOkRpcs = true; + } else { + hasErrorRpcs = true; + } + } + + @Override + public void onClose(PeerInfo peerInfo, CloseSessionReason reason, Status status) { + lastPeerInfo = peerInfo; + + if (state == State.New) { + metricRegistry.sessionOpenLatency.record( + poolInfo, peerInfo, status.getCode(), uptime.elapsed()); + } + + metricRegistry.sessionDuration.record( + poolInfo, + peerInfo, + status.getCode(), + reason, + SessionCloseVRpcState.find(hasOkRpcs, hasErrorRpcs), + state == State.Ready, + uptime.elapsed()); + + state = State.Closed; + } + + @Override + public boolean recordAsyncMetrics() { + if (state == State.Closed) { + return false; + } + metricRegistry.sessionUptime.record( + poolInfo, lastPeerInfo, state == State.Ready, uptime.elapsed()); + return true; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/TracedBatcherUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/TracedBatcherUnaryCallable.java similarity index 87% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/TracedBatcherUnaryCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/TracedBatcherUnaryCallable.java index ce73d75dc1..9b1b9764ab 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/TracedBatcherUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/TracedBatcherUnaryCallable.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; import com.google.api.core.ApiFuture; import com.google.api.core.InternalApi; @@ -21,7 +21,7 @@ import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.api.gax.tracing.ApiTracer; -import org.threeten.bp.Duration; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; /** * This callable will extract total throttled time from {@link ApiCallContext} and add it to {@link @@ -44,7 +44,8 @@ public ApiFuture futureCall(RequestT request, ApiCallContext context) if (tracer instanceof BigtableTracer) { ((BigtableTracer) tracer) .batchRequestThrottled( - Duration.ofMillis(context.getOption(Batcher.THROTTLED_TIME_KEY)).toNanos()); + java.time.Duration.ofMillis(context.getOption(Batcher.THROTTLED_TIME_KEY)) + .toNanos()); } } return innerCallable.futureCall(request, context); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/UserApiVRpcTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/UserApiVRpcTracer.java new file mode 100644 index 0000000000..e794036d5a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/UserApiVRpcTracer.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.api.gax.tracing.ApiTracer; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.TableName; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import java.time.Duration; +import java.util.concurrent.atomic.AtomicInteger; + +/* A VRpc tracer that wraps the legacy gax ApiTracer */ +public class UserApiVRpcTracer implements VRpcTracer { + + private final ApiTracer delegate; + private final AtomicInteger counter = new AtomicInteger(0); + private final TableName tableName; + private final String appProfileId; + private final VRpcDescriptor descriptor; + + public UserApiVRpcTracer( + ApiTracer apiTracer, SessionPoolInfo poolInfo, VRpcDescriptor descriptor) { + this.delegate = apiTracer; + this.tableName = + TableName.newBuilder() + .setProject(poolInfo.getClientInfo().getInstanceName().getProjectId()) + .setInstance(poolInfo.getClientInfo().getInstanceName().getInstanceId()) + .setTable(poolInfo.getName()) + .build(); + this.appProfileId = poolInfo.getClientInfo().getAppProfileId(); + this.descriptor = descriptor; + } + + @Override + public void onOperationStart() {} + + @Override + public void onAttemptStart(Object req) { + delegate.attemptStarted( + descriptor.toLegacyProto(tableName.toString(), appProfileId, req), + counter.getAndIncrement()); + } + + @Override + public void onRequestSent(PeerInfo peerInfo) { + delegate.requestSent(); + } + + @Override + public void onResponseReceived() { + delegate.responseReceived(); + } + + @Override + public void recordApplicationBlockingLatencies(Duration elapsed) {} + + @Override + public void onAttemptFinish(VRpc.VRpcResult result) { + if (result.getStatus().isOk()) { + delegate.attemptSucceeded(); + } else { + delegate.attemptFailedDuration(result.getStatus().asException(), Duration.ZERO); + } + } + + @Override + public void onOperationFinish(VRpc.VRpcResult result) { + if (result.getStatus().isOk()) { + delegate.operationSucceeded(); + } else { + delegate.operationFailed(result.getStatus().asException()); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracer.java new file mode 100644 index 0000000000..924bdd4d60 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracer.java @@ -0,0 +1,38 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import java.time.Duration; + +public interface VRpcTracer { + + void onOperationStart(); + + void onAttemptStart(Object request); + + void onRequestSent(PeerInfo peerInfo); + + void onResponseReceived(); + + void recordApplicationBlockingLatencies(Duration elapsed); + + void onAttemptFinish(VRpcResult result); + + void onOperationFinish(VRpcResult result); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerImpl.java new file mode 100644 index 0000000000..857be73d39 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerImpl.java @@ -0,0 +1,215 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult.State; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.common.base.Stopwatch; +import io.grpc.Deadline; +import java.time.Duration; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +/** + * + * + *
    + * The following events happen in an operation:
    + * operation
    + *   attempt start
    + *     attempt waiting for session / channel
    + *     rpc sent from client
    + *     rpc waiting for grpc buffer to be ready
    + *     receive response from server and calls back app's listener
    + *   attempt finish
    + *   retry wait
    + *   attempt start again
    + *   ...
    + *   attempt finish
    + * operation finish
    + * 
    + */ +public class VRpcTracerImpl implements VRpcTracer { + private static final ClusterInformation UNKNOWN_CLUSTER = + ClusterInformation.newBuilder().setZoneId("global").setClusterId("").build(); + + private final RecorderRegistry metricRegistry; + private final SessionPoolInfo poolInfo; + private final MethodInfo methodInfo; + private final Deadline originalDeadline; + + private final Stopwatch attemptTimer = Stopwatch.createStarted(); // per attempt + private final Stopwatch operationTimer = Stopwatch.createStarted(); // per operation + private final Stopwatch clientBlockingTimer = Stopwatch.createStarted(); // per attempt + private final Stopwatch firstResponsePerOpTimer = Stopwatch.createStarted(); // per operation + private Duration applicationBlockingLatency = Duration.ZERO; // per operation + private long remainingDeadline; // per attempt + + private final Stopwatch applicationBlockingTimer = Stopwatch.createUnstarted(); + private ClusterInformation lastClusterInfo; + private PeerInfo lastPeerInfo = SessionStream.DISCONNECTED_PEER_INFO; + + private int numAttempts = 0; + + public VRpcTracerImpl( + RecorderRegistry metricRegistry, + SessionPoolInfo poolInfo, + MethodInfo methodInfo, + Deadline deadline) { + this.metricRegistry = metricRegistry; + this.poolInfo = poolInfo; + this.methodInfo = methodInfo; + this.originalDeadline = deadline; + this.lastClusterInfo = UNKNOWN_CLUSTER; + } + + @Override + public void onOperationStart() {} + + @Override + public void onAttemptStart(Object req) { + if (!attemptTimer.isRunning()) { + attemptTimer.reset().start(); + } + if (!clientBlockingTimer.isRunning()) { + clientBlockingTimer.reset().start(); + } + remainingDeadline = originalDeadline.timeRemaining(TimeUnit.MILLISECONDS); + numAttempts++; + } + + @Override + public void onRequestSent(PeerInfo peerInfo) { + this.lastPeerInfo = peerInfo; + if (clientBlockingTimer.isRunning()) { + clientBlockingTimer.stop(); + } + } + + @Override + public void onResponseReceived() { + if (firstResponsePerOpTimer.isRunning()) { + firstResponsePerOpTimer.stop(); + } + if (!applicationBlockingTimer.isRunning()) { + applicationBlockingTimer.reset().start(); + } + } + + @Override + public void recordApplicationBlockingLatencies(Duration elapsed) { + applicationBlockingLatency = applicationBlockingLatency.plus(elapsed); + } + + @Override + public void onAttemptFinish(VRpcResult result) { + attemptTimer.stop(); + + @SuppressWarnings("AssignmentExpression") + ClusterInformation clusterInfo = + lastClusterInfo = Optional.ofNullable(result.getClusterInfo()).orElse(UNKNOWN_CLUSTER); + + metricRegistry.attemptLatency.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + clusterInfo, + methodInfo, + result.getStatus().getCode(), + attemptTimer.elapsed()); + + metricRegistry.attemptLatency2.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + lastPeerInfo, + clusterInfo, + methodInfo, + result.getStatus().getCode(), + attemptTimer.elapsed()); + + // TODO: what should be server latency? + // metricRegistry.serverLatency.record( + // poolInfo, methodInfo, clusterInfo, result.getStatus(), result.getServerLatency()); + + // If the result state is not SERVER_RESULT that means the vrpc failed before + // reaching the AFE and we increment the connectivity error counter. + metricRegistry.connectivityErrorCount.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + clusterInfo, + result.getStatus().getCode(), + (result.getState() != State.SERVER_RESULT) ? 1 : 0); + + metricRegistry.clientBlockingLatency.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + clusterInfo, + clientBlockingTimer.elapsed()); + + metricRegistry.remainingDeadline.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + clusterInfo, + result.getStatus().getCode(), + Duration.ofMillis(remainingDeadline)); + + metricRegistry.transportLatency.record( + poolInfo, + lastPeerInfo, + methodInfo, + attemptTimer.elapsed().minus(result.getBackendLatency())); + } + + @Override + public void onOperationFinish(VRpcResult result) { + metricRegistry.operationLatency.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + lastClusterInfo, + result.getStatus().getCode(), + operationTimer.elapsed()); + metricRegistry.applicationBlockingLatency.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + lastClusterInfo, + applicationBlockingLatency); + metricRegistry.firstResponseLantency.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + lastClusterInfo, + result.getStatus().getCode(), + firstResponsePerOpTimer.elapsed()); + metricRegistry.retryCount.record( + poolInfo.getClientInfo(), + poolInfo.getName(), + methodInfo, + lastClusterInfo, + result.getStatus().getCode(), + numAttempts - 1); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/AlwaysEnabledDirectAccessChecker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/AlwaysEnabledDirectAccessChecker.java new file mode 100644 index 0000000000..307f55a18d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/AlwaysEnabledDirectAccessChecker.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import com.google.api.core.InternalApi; +import io.grpc.Channel; +import io.grpc.ManagedChannel; +import javax.annotation.Nullable; + +@InternalApi +public class AlwaysEnabledDirectAccessChecker implements DirectAccessChecker { + public static final AlwaysEnabledDirectAccessChecker INSTANCE = + new AlwaysEnabledDirectAccessChecker(); + + private AlwaysEnabledDirectAccessChecker() {} + + @Override + public boolean check(Channel channel) { + if (channel instanceof ManagedChannel) { + ((ManagedChannel) channel).shutdownNow(); + } + return true; + } + + @Override + public void investigateFailure(@Nullable Throwable originalError) { + // No-op: + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessChecker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessChecker.java new file mode 100644 index 0000000000..ea11be7ce9 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessChecker.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import io.grpc.Channel; +import io.grpc.ClientInterceptors; +import io.grpc.ManagedChannel; +import io.grpc.Status.Code; +import io.grpc.StatusRuntimeException; +import java.util.Optional; +import java.util.concurrent.ScheduledExecutorService; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * Evaluates whether a given channel has Direct Access (DirectPath) routing by executing a RPC and + * inspecting the response headers. + */ +@InternalApi +public class ClassicDirectAccessChecker implements DirectAccessChecker { + private static final Logger LOG = Logger.getLogger(ClassicDirectAccessChecker.class.getName()); + private final DirectPathCompatibleTracer tracer; + private final ChannelPrimer channelPrimer; + private final ScheduledExecutorService executor; + + public ClassicDirectAccessChecker( + DirectPathCompatibleTracer tracer, + ChannelPrimer channelPrimer, + ScheduledExecutorService executor) { + this.tracer = Preconditions.checkNotNull(tracer); + this.channelPrimer = Preconditions.checkNotNull(channelPrimer); + this.executor = Preconditions.checkNotNull(executor); + } + + @VisibleForTesting + MetadataExtractorInterceptor createInterceptor() { + return new MetadataExtractorInterceptor(); + } + + @Override + public boolean check(Channel channel) { + try { + return evaluateEligibility(channel); + } catch (Exception e) { + investigateFailure(e); + LOG.log(Level.WARNING, "Failed to evaluate direct access eligibility.", e); + return false; + } finally { + if (channel instanceof ManagedChannel) { + ManagedChannel managedChannel = (ManagedChannel) channel; + managedChannel.shutdownNow(); + } + } + } + + /** Executes the underlying RPC and evaluates the eligibility. */ + private boolean evaluateEligibility(Channel channel) { + MetadataExtractorInterceptor interceptor = createInterceptor(); + Channel interceptedChannel = ClientInterceptors.intercept(channel, interceptor); + MetadataExtractorInterceptor.SidebandData sidebandData = interceptor.getSidebandData(); + boolean isEligible = false; + try { + channelPrimer.primeChannel(interceptedChannel); + isEligible = + Optional.ofNullable(sidebandData.getPeerInfo()) + .map(PeerInfo::getTransportType) + .map(type -> type == PeerInfo.TransportType.TRANSPORT_TYPE_DIRECT_ACCESS) + .orElse(false); + } catch (StatusRuntimeException e) { + if (e.getStatus().getCode() != Code.PERMISSION_DENIED) { + throw e; + } + // Failed with permission error, resorting to ALTS check. + isEligible = sidebandData.isAlts(); + } + + if (isEligible) { + // getIp should be non-null as isEligible is true + tracer.recordSuccess(sidebandData.getIpProtocol()); + } else { + investigateFailure(null); + } + return isEligible; + } + + @Override + public void investigateFailure(@Nullable Throwable originalError) { + if (executor != null) { + executor.execute(() -> DirectAccessInvestigator.investigateAndReport(tracer, originalError)); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessChecker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessChecker.java new file mode 100644 index 0000000000..e6954d279d --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessChecker.java @@ -0,0 +1,38 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import com.google.api.core.InternalApi; +import io.grpc.Channel; + +@InternalApi +/* Evaluates whether a given channel supports Direct Access. */ +public interface DirectAccessChecker { + /** + * Evaluates if Direct Access is available by sending request via provided channel. + * + * @param channel A channel to probe direct access connectivity + * @return true if the channel is eligible for Direct Access + */ + boolean check(Channel channel); + + /** + * Triggers a investigation into why Direct Access routing failed. + * + * @param originalError An optional exception that caused the failure. + */ + void investigateFailure(Throwable originalError); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessInvestigator.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessInvestigator.java new file mode 100644 index 0000000000..2a80672d82 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/DirectAccessInvestigator.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import com.google.api.core.InternalApi; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +@InternalApi +public class DirectAccessInvestigator { + private static final Logger LOG = Logger.getLogger(DirectAccessInvestigator.class.getName()); + + /** Metric reason codes for Direct Access failures. */ + public enum FailureReason { + NOT_IN_GCP("not_in_gcp"), + METADATA_UNREACHABLE("metadata_unreachable"), + NO_IP_ASSIGNED("no_ip_assigned"), + LOOPBACK_DOWN("loopback_misconfigured"), + LOOPBACK_V4_MISSING("loopback_misconfigured_ipv4"), + LOOPBACK_V6_MISSING("loopback_misconfigured_ipv6"), + USER_DISABLED("user_disabled"), + UNKNOWN("unknown"); + + private final String value; + + FailureReason(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + } + + // This is only called when direct access check fails. + public static void investigateAndReport( + DirectPathCompatibleTracer tracer, @Nullable Throwable originalError) { + try { + // TODO: Implement checks in a future PR. + // For now, default to returning "unknown". + recordAndLog( + tracer, + FailureReason.UNKNOWN, + "Direct Access investigation: Defaulting to unknown failure reason for now.", + originalError); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to record results of the Direct Access investigation", e); + } + } + + /** Helper method to consistently log the failure reason and record it to the tracer. */ + private static void recordAndLog( + DirectPathCompatibleTracer tracer, + FailureReason reason, + String logMessage, + @Nullable Throwable error) { + if (error != null) { + LOG.log(Level.FINE, logMessage, error); + } else { + LOG.log(Level.FINE, logMessage); + } + tracer.recordFailure(reason); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/NoopDirectAccessChecker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/NoopDirectAccessChecker.java new file mode 100644 index 0000000000..bf79fd5478 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/dp/NoopDirectAccessChecker.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import com.google.api.core.InternalApi; +import io.grpc.Channel; +import io.grpc.ManagedChannel; +import javax.annotation.Nullable; + +@InternalApi +public class NoopDirectAccessChecker implements DirectAccessChecker { + public static final NoopDirectAccessChecker INSTANCE = new NoopDirectAccessChecker(); + + private NoopDirectAccessChecker() {} + + @Override + public boolean check(Channel channel) { + // We must shut down the temporary probe channel to prevent gRPC resource leaks! + if (channel instanceof ManagedChannel) { + ((ManagedChannel) channel).shutdownNow(); + } + // If it's disabled, it is never eligible. + return false; + } + + @Override + public void investigateFailure(@Nullable Throwable originalError) { + // Do nothing. We don't investigate failures if the feature is disabled. + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/CancellableVRpc.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/CancellableVRpc.java new file mode 100644 index 0000000000..ded284e197 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/CancellableVRpc.java @@ -0,0 +1,74 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import com.google.common.util.concurrent.MoreExecutors; +import io.grpc.Context; +import io.grpc.Deadline; +import java.util.Optional; +import java.util.concurrent.TimeoutException; + +/** + * A {@link VRpc} decorator that propagates gRPC {@link Context} cancellation to the underlying + * VRpc. + */ +public class CancellableVRpc extends ForwardingVRpc { + private final Context context; + private final Context.CancellationListener cancellationListener; + + public CancellableVRpc(VRpc delegate, Context context) { + super(delegate); + this.context = context; + this.cancellationListener = + (c) -> { + boolean deadlineExceeded = + Optional.ofNullable(c.getDeadline()).map(Deadline::isExpired).orElse(false); + deadlineExceeded = deadlineExceeded && c.cancellationCause() instanceof TimeoutException; + // Let VRpc machinery handle deadline exceeded + if (!deadlineExceeded) { + delegate.cancel("gRPC context cancelled", c.cancellationCause()); + } + }; + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + context.addListener(cancellationListener, MoreExecutors.directExecutor()); + super.start( + req, ctx, new CancellationCleanupListener<>(listener, context, cancellationListener)); + } + + private static class CancellationCleanupListener extends ForwardListener { + private final Context context; + private final Context.CancellationListener cancellationListener; + + private CancellationCleanupListener( + VRpcListener delegate, + Context context, + Context.CancellationListener cancellationListener) { + super(delegate); + this.context = context; + this.cancellationListener = cancellationListener; + } + + @Override + public void onClose(VRpcResult result) { + context.removeListener(cancellationListener); + super.onClose(result); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpc.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpc.java new file mode 100644 index 0000000000..05173e6a9e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpc.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import javax.annotation.Nullable; + +/** Simple helper to delegate all calls to another {@link VRpc}. */ +public class ForwardingVRpc implements VRpc { + private final VRpc delegate; + + public ForwardingVRpc(VRpc delegate) { + this.delegate = delegate; + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + delegate.start(req, ctx, listener); + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + delegate.cancel(message, cause); + } + + @Override + public void requestNext() { + delegate.requestNext(); + } + + public static class ForwardListener implements VRpc.VRpcListener { + private final VRpc.VRpcListener delegate; + + public ForwardListener(VRpcListener delegate) { + this.delegate = delegate; + } + + @Override + public void onMessage(RespT msg) { + delegate.onMessage(msg); + } + + @Override + public void onClose(VRpcResult result) { + delegate.onClose(result); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpc.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpc.java new file mode 100644 index 0000000000..d6048bfb91 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpc.java @@ -0,0 +1,340 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.common.base.Stopwatch; +import com.google.protobuf.Duration; +import com.google.protobuf.util.Durations; +import com.google.rpc.RetryInfo; +import io.grpc.Context; +import io.grpc.Status; +import io.grpc.SynchronizationContext; +import java.util.Optional; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +public class RetryingVRpc implements VRpc { + + private static final Logger LOG = Logger.getLogger(RetryingVRpc.class.getName()); + + private final Context grpcContext; + private final io.opentelemetry.context.Context otelContext; + + private final Supplier> attemptFactory; + private ReqT request; + private VRpcListener listener; + private VRpcCallContext context; + private VRpcTracer tracer; + + private final ScheduledExecutorService executor; + private final SynchronizationContext syncContext; + + // current state and all the flags don't need to be volatile because they're only updated within + // the sync context. + private State currentState; + private boolean started; + // Breaks the loop if uncaught exception happens during sync context execution. + private boolean isCancelling; + + public RetryingVRpc(Supplier> supplier, ScheduledExecutorService executor) { + this.attemptFactory = supplier; + + grpcContext = Context.current(); + otelContext = io.opentelemetry.context.Context.current(); + + this.executor = otelContext.wrap(executor); + this.syncContext = + new SynchronizationContext( + (t, e) -> { + this.cancel( + "Unexpected error while notifying the caller of RetryingVRpc. Trying to cancel" + + " vRpc to ensure consistent state", + e); + }); + + started = false; + isCancelling = false; + this.currentState = new Idle(); + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + syncContext.execute( + () -> { + if (started) { + listener.onClose( + VRpcResult.createRejectedError( + Status.FAILED_PRECONDITION.withDescription("operation is already started"))); + return; + } + started = true; + + this.request = req; + this.listener = listener; + this.context = ctx; + this.tracer = context.getTracer(); + + tracer.onOperationStart(); + currentState.onStart(); + }); + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + syncContext.execute( + () -> { + if (currentState.isDone() || isCancelling) { + LOG.fine("Ignoring cancel because the vRPC is already cancelled or done."); + return; + } + // Prevents infinite loop if there's any error thrown during this phase. + isCancelling = true; + Throwable finalCause = cause; + try { + currentState.onCancel(message, cause); + } catch (Throwable t) { + if (finalCause != null) { + finalCause.addSuppressed(t); + } else { + finalCause = t; + } + } + onStateChange( + new Done( + VRpcResult.createRejectedError( + Status.CANCELLED.withDescription(message).withCause(finalCause)))); + }); + } + + @Override + public void requestNext() { + throw new UnsupportedOperationException("request next is not supported in unary"); + } + + void onStateChange(State state) { + syncContext.throwIfNotInThisSynchronizationContext(); + if (currentState.isDone()) { + return; + } + this.currentState = state; + currentState.onStart(); + } + + abstract static class State { + public abstract void onStart(); + + public void onCancel(String reason, Throwable throwable) {} + + public boolean isDone() { + return false; + } + } + + class Idle extends State { + + @Override + public void onStart() { + // initial request and retries will all start in idle state. + // TODO: When stream is supported we only transition to active state when + // caller is requesting more. And this should be part of the attempt time and app blocking + // time. + Active active = new Active(); + onStateChange(active); + } + } + + class Active extends State { + + private VRpc attempt; + + @Override + public void onStart() { + attempt = attemptFactory.get(); + tracer.onAttemptStart(request); + attempt.start( + request, + context, + new VRpcListener() { + @Override + public void onMessage(RespT msg) { + syncContext.execute( + () -> { + if (currentState != Active.this) { + LOG.log( + Level.FINE, + "Discarding response {0} because the attempt is no longer active.", + msg); + return; + } + tracer.onResponseReceived(); + Stopwatch appTimer = Stopwatch.createStarted(); + try { + listener.onMessage(msg); + } finally { + tracer.recordApplicationBlockingLatencies(appTimer.elapsed()); + } + }); + } + + @Override + public void onClose(VRpcResult result) { + syncContext.execute( + () -> { + tracer.onAttemptFinish(result); + if (currentState != Active.this) { + LOG.log( + Level.FINE, + "Discarding server close with result {0} because the the attempt is no" + + " longer active.", + result); + return; + } + if (shouldRetry(result)) { + context = context.createForNextAttempt(); + Duration retryDelay = + Optional.ofNullable(result.getRetryInfo()) + .map(RetryInfo::getRetryDelay) + .orElse(Durations.ZERO); + if (Durations.compare(retryDelay, Durations.ZERO) > 0) { + Scheduled scheduled = new Scheduled(retryDelay); + onStateChange(scheduled); + } else { + onStateChange(new Idle()); + } + return; + } + + onStateChange(new Done(result)); + }); + } + }); + } + + @Override + public void onCancel(String reason, Throwable throwable) { + // attempt could be null if attemptFactory.get() throws an exception. In which case sync + // context uncaught exception handler will be called, which calls cancel on the current + // state before transition into done state. + if (attempt != null) { + attempt.cancel(reason, throwable); + } + } + + boolean shouldRetry(VRpcResult result) { + // If the error has RetryInfo, it means it comes from the server and should + // be retried. + if (!result.getStatus().isOk() + && result.getRetryInfo() != null + && result.getRetryInfo().hasRetryDelay()) { + long retryDelay = Durations.toMillis(result.getRetryInfo().getRetryDelay()); + // only schedule retry if there's still a chance for the request to succeed + return context.getOperationInfo().getDeadline().timeRemaining(TimeUnit.MILLISECONDS) + - retryDelay + > 1; + } + // Do not retry result that is explicitly rejected + if (result.getRejected()) { + return false; + } + // If the error didn't leave the client or failed in transport and is idempotent, we + // can retry up to 3 times. + boolean isRetryable = + (result.getState() == VRpcResult.State.UNCOMMITED) + || (context.getOperationInfo().isIdempotent() + && result.getState() == VRpcResult.State.TRANSPORT_FAILURE); + if (isRetryable && context.getOperationInfo().getAttemptNumber() < 3) { + return true; + } + return false; + } + } + + class Scheduled extends State { + private final Duration retryDelay; + private SynchronizationContext.ScheduledHandle future; + + Scheduled(Duration retryDelay) { + this.retryDelay = retryDelay; + } + + @Override + public void onStart() { + try { + future = + syncContext.schedule( + () -> grpcContext.wrap(() -> onStateChange(new Idle())).run(), + Durations.toMillis(retryDelay), + TimeUnit.MILLISECONDS, + executor); + } catch (RejectedExecutionException e) { + onStateChange( + new Done( + VRpcResult.createRejectedError( + Status.CANCELLED + .withDescription( + "Executor shutting down, can't schedule operation for retry.") + .withCause(e)))); + } + } + + @Override + public void onCancel(String reason, Throwable throwable) { + // future can be null if schedule throws an exception that's not RejectedExecutionException. + // In which case sync context uncaught exception handler will be called, which calls cancel on + // the current + // state before transition into done state. + if (future != null && future.isPending()) { + future.cancel(); + } + } + } + + class Done extends State { + + private final VRpcResult result; + + Done(VRpcResult result) { + this.result = result; + } + + @Override + public void onStart() { + if (!started) { + LOG.fine("operation is not started yet."); + return; + } + Stopwatch appTimer = Stopwatch.createStarted(); + try { + listener.onClose(result); + } finally { + tracer.recordApplicationBlockingLatencies(appTimer.elapsed()); + tracer.onOperationFinish(result); + } + } + + @Override + public boolean isDone() { + return true; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpc.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpc.java new file mode 100644 index 0000000000..a29a51fd72 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpc.java @@ -0,0 +1,328 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.ErrorResponse; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Ticker; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.Any; +import com.google.rpc.RetryInfo; +import io.grpc.Context; +import io.grpc.Deadline; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.protobuf.StatusProto; +import java.time.Duration; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * Internal Bigtable representation of an RPC. + * + *

    The primary intent is to model the RPC as a chain of composable middleware. This abstraction + * models Unary and ServerStreaming style RPCs by generalizing them as ServerStreaming. + */ +public interface VRpc { + + /** + * Start the RPC and send the request message. + * + *

    This must be called before any other method on this object. The {@code listener} will be + * notified of the results. Please note, that the first response of the response stream will be + * delivered by default. + */ + void start(ReqT req, VRpcCallContext ctx, VRpcListener listener); + + /** Cancel a started RPC. This will be done by best effort. */ + void cancel(@Nullable String message, @Nullable Throwable cause); + + /** + * TBD - server streaming rpcs. This will be used to request more data. Unlike gRPC's request(n), + * starting a call will implicitly request the first message. + */ + void requestNext(); + + /** + * Bigtable specific version of ClientCall.Listener - simplified to only cater to client unary + * RPCs. Methods on this class are guaranteed to be called sequentially. + */ + interface VRpcListener { + + /** Called when the next response message is the received. */ + void onMessage(RespT msg); + + /** Called when the vRPC completes. */ + void onClose(VRpcResult result); + } + + /** vRPC side band data. */ + // TODO: set grpc deadline on callOptions or context + @AutoValue + abstract class VRpcCallContext { + + private static final Logger logger = Logger.getLogger(VRpcCallContext.class.getName()); + + /** Retry related metadata. */ + public abstract OperationInfo getOperationInfo(); + + /** The TraceId of the caller. */ + public abstract String getTraceParent(); + + public abstract VRpcTracer getTracer(); + + // TODO: csm + // Clientside metrics instrument + // public abstract BigtableTracer getTracer(); + + public static VRpcCallContext create( + Deadline deadline, boolean isIdempotent, VRpcTracer tracer) { + + Deadline grpcContextDeadline = Context.current().getDeadline(); + + Duration operationTimeout; + if (grpcContextDeadline != null && grpcContextDeadline.isBefore(deadline)) { + logger.log( + Level.FINE, + "grpc Context deadline {} is shorter than VrpcCallContext deadline {}", + new Object[] {grpcContextDeadline, deadline}); + operationTimeout = + Duration.ofNanos(grpcContextDeadline.timeRemaining(TimeUnit.NANOSECONDS)); + } else { + operationTimeout = Duration.ofNanos(deadline.timeRemaining(TimeUnit.NANOSECONDS)); + } + + return new AutoValue_VRpc_VRpcCallContext( + OperationInfo.create(operationTimeout, isIdempotent), "TODO", tracer); + } + + public VRpcCallContext createForNextAttempt() { + return new AutoValue_VRpc_VRpcCallContext( + getOperationInfo().createForNextAttempt(), getTraceParent(), getTracer()); + } + } + + /** Sideband data required for retries and/or hedging. */ + @AutoValue + abstract class OperationInfo { + /** + * Monotonically increasing number of retry attempt per operation. Starts with 0 for the + * original attempt. + */ + public abstract int getAttemptNumber(); + + /** + * When the caller started the operation (ie. when the first attempt was sent). This is the + * machine time. + */ + abstract long getOperationStartTickNs(); + + /** + * Original timeout of the operation (OperationStart + OperationTimeout = original deadline). + */ + public abstract Duration getOperationTimeout(); + + /** If it's safe to retry the vRPC after its been commited. */ + public abstract boolean isIdempotent(); + + abstract Ticker getTicker(); + + public Deadline getDeadline() { + return Deadline.after( + getOperationTimeout().toNanos() + getOperationStartTickNs() - getTicker().read(), + TimeUnit.NANOSECONDS); + } + + /** Create a new copy of the {@link OperationInfo} for the next retry/heding attempt. */ + public OperationInfo createForNextAttempt() { + return new AutoValue_VRpc_OperationInfo( + getAttemptNumber() + 1, + getOperationStartTickNs(), + getOperationTimeout(), + isIdempotent(), + getTicker()); + } + + /** Create new {@link OperationInfo} for the first attempt. */ + public static OperationInfo create(Duration operationTimeout, boolean isIdempotent) { + return create(Ticker.systemTicker(), operationTimeout, isIdempotent); + } + + @VisibleForTesting + static OperationInfo create(Ticker ticker, Duration operationTimeout, boolean isIdempotent) { + return new AutoValue_VRpc_OperationInfo( + 0, ticker.read(), operationTimeout, isIdempotent, ticker); + } + } + + /** Represents the final state of a vRPC. */ + @AutoValue + abstract class VRpcResult { + /** + * Describes how far the vRPC progressed prior to failure: + * + *

    + *
    {@code UNCOMMITED} + *
    The vRPC never left the client + *
    {@code TRANSPORT_FAILURE} + *
    The vRPC failed due to transport + *
    {@code SERVER_RESULT} + *
    The vRPC result was explicitly communicated by the server + *
    {@code USER_FAILURE} + *
    The vRPC failed due to errors in users callback + *
    + */ + public enum State { + UNCOMMITED, + TRANSPORT_FAILURE, + SERVER_RESULT, + USER_FAILURE + } + + /** + * How far the vRPC progressed before reaching terminal state. + * + * @see State + */ + public abstract State getState(); + + public abstract Status getStatus(); + + /** The status details. */ + @Nullable + protected abstract List getDetails(); + + /** + * Side channel metadata for client side metrics - describes the cluster that handled the + * request. + */ + @Nullable + public abstract ClusterInformation getClusterInfo(); + + /** Latency returned in SessionRequestStats. */ + public abstract Duration getBackendLatency(); + + /** Server directed retries. */ + // Server directed retries + @Nullable + public abstract RetryInfo getRetryInfo(); + + /** If the vrpc should be rejected for retry. */ + public abstract boolean getRejected(); + + public static VRpcResult createUncommitedError(Status status) { + return new AutoValue_VRpc_VRpcResult( + State.UNCOMMITED, status, ImmutableList.of(), null, Duration.ZERO, null, false); + } + + public static VRpcResult createRejectedError(Status status) { + return new AutoValue_VRpc_VRpcResult( + State.UNCOMMITED, status, ImmutableList.of(), null, Duration.ZERO, null, true); + } + + /** + * vRPC failed because the underlying transport failed. We don't know if the vRPC made it to the + * nodes, so we must assume complete uncertainty. + */ + public static VRpcResult createRemoteTransportError(Status transportStatus, Metadata trailers) { + Status status = Status.UNAVAILABLE.withDescription("vRPC failed due to transport error"); + + if (transportStatus.getCause() != null) { + status = status.withCause(transportStatus.getCause()); + } else { + status = + status.augmentDescription( + String.format( + "Transport error: %s: %s", + transportStatus.getCode(), transportStatus.getDescription())); + } + + List details = + StatusProto.fromStatusAndTrailers(transportStatus, trailers).getDetailsList(); + + return new AutoValue_VRpc_VRpcResult( + // TODO: need clusterInfo + State.TRANSPORT_FAILURE, status, details, null, Duration.ZERO, null, false); + } + + /** + * vRPC failed because the underlying transport failed. We don't know if the the vRPC made it to + * the nodes, so we must assume complete uncertainty. + */ + public static VRpcResult createLocalTransportError(Status status) { + return new AutoValue_VRpc_VRpcResult( + State.TRANSPORT_FAILURE, status, null, null, Duration.ZERO, null, false); + } + + public static VRpcResult createUserError(Throwable throwable) { + return new AutoValue_VRpc_VRpcResult( + State.USER_FAILURE, + Status.CANCELLED + .withCause(throwable) + .withDescription("Cancelling RPC due to exception thrown by user callback"), + ImmutableList.of(), + null, + Duration.ZERO, + // TODO: use server retry delay if available + null, + true); + } + + /** Wrap an OK from the server. */ + public static VRpcResult createServerOk(VirtualRpcResponse r) { + return new AutoValue_VRpc_VRpcResult( + State.SERVER_RESULT, + Status.OK, + ImmutableList.of(), + normalizeClusterInfo(r.getClusterInfo()), + Duration.ofSeconds( + r.getStats().getBackendLatency().getSeconds(), + r.getStats().getBackendLatency().getNanos()), + null, + false); + } + + /** Wrap the error response from the server. */ + public static VRpcResult createServerError(ErrorResponse r) { + Status grpcStatus = + Status.fromCodeValue(r.getStatus().getCode()).withDescription(r.getStatus().getMessage()); + return new AutoValue_VRpc_VRpcResult( + State.SERVER_RESULT, + grpcStatus, + r.getStatus().getDetailsList(), + normalizeClusterInfo(r.getClusterInfo()), + Duration.ZERO, + r.getRetryInfo(), + false); + } + + @Nullable + private static ClusterInformation normalizeClusterInfo(ClusterInformation clusterInformation) { + if (ClusterInformation.getDefaultInstance().equals(clusterInformation)) { + return null; + } + return clusterInformation; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/DynamicPicker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/DynamicPicker.java new file mode 100644 index 0000000000..1d932a865b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/DynamicPicker.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import java.util.Optional; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * A Picker that delegates to a concrete Picker implementation based on the current configuration. + */ +class DynamicPicker extends Picker { + private static final Logger LOGGER = Logger.getLogger(DynamicPicker.class.getName()); + private final SessionList sessions; + + private volatile Picker delegate; + private volatile LoadBalancingOptions currentOptions; + + public DynamicPicker(SessionList sessions, LoadBalancingOptions initialOptions) { + this.sessions = sessions; + this.currentOptions = initialOptions; + this.delegate = createPicker(initialOptions); + } + + @Override + public Optional pickSession() { + return delegate.pickSession(); + } + + public void updateConfig(SessionClientConfiguration.SessionPoolConfiguration config) { + LoadBalancingOptions newOptions = config.getLoadBalancingOptions(); + if (!newOptions.equals(currentOptions)) { + delegate = createPicker(newOptions); + currentOptions = newOptions; + } + } + + private Picker createPicker(LoadBalancingOptions options) { + switch (options.getLoadBalancingStrategyCase()) { + case RANDOM: + return new SimplePicker(sessions, options.getRandom()); + case LEAST_IN_FLIGHT: + return new LeastInFlightPicker(sessions, options.getLeastInFlight()); + case PEAK_EWMA: + return new LeastLatencyPicker(sessions, options.getPeakEwma()); + default: + LOGGER.log( + Level.FINE, + "got load balancing strategy {0} which was not implemented", + options.getLoadBalancingStrategyCase()); + return new LeastInFlightPicker( + sessions, LoadBalancingOptions.LeastInFlight.getDefaultInstance()); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastInFlightPicker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastInFlightPicker.java new file mode 100644 index 0000000000..fe6cd7beca --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastInFlightPicker.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.AfeHandle; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.ThreadLocalRandom; + +/** Pick the AFE with the fewest in-flight requests. */ +class LeastInFlightPicker extends Picker { + private final SessionList sessionList; + private final LoadBalancingOptions.LeastInFlight options; + + public LeastInFlightPicker(SessionList sessionList, LoadBalancingOptions.LeastInFlight options) { + this.sessionList = sessionList; + this.options = options; + } + + @Override + Optional pickSession() { + List readyAfes = sessionList.getAfesWithReadySessions(); + if (readyAfes.isEmpty()) { + return Optional.empty(); + } + + ThreadLocalRandom rng = ThreadLocalRandom.current(); + List candidates = new ArrayList<>(readyAfes); + int bestCost = Integer.MAX_VALUE; + AfeHandle bestAfe = null; + long iterations = readyAfes.size(); + if (options.getRandomSubsetSize() > 0) { + iterations = Math.min(options.getRandomSubsetSize(), iterations); + } + + // Partial Fisher-Yates shuffle. + for (int i = 0; i < iterations; i++) { + int randomIndex = i + rng.nextInt(candidates.size() - i); + AfeHandle picked = candidates.get(randomIndex); + if (picked.getNumOutstanding() < bestCost) { + bestCost = picked.getNumOutstanding(); + bestAfe = picked; + } + // Move candidate to the `i`th entry so that it's not picked again. + Collections.swap(candidates, i, randomIndex); + } + return sessionList.checkoutSession(bestAfe); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastLatencyPicker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastLatencyPicker.java new file mode 100644 index 0000000000..c4e264b1fa --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/LeastLatencyPicker.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.AfeHandle; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.ThreadLocalRandom; + +/** Pick the AFE with the least latency. Experimental for now. */ +class LeastLatencyPicker extends Picker { + private final SessionList sessionList; + private final LoadBalancingOptions.PeakEwma options; + + public LeastLatencyPicker(SessionList sessionList, LoadBalancingOptions.PeakEwma options) { + this.sessionList = sessionList; + this.options = options; + } + + @Override + Optional pickSession() { + List readyAfes = sessionList.getAfesWithReadySessions(); + if (readyAfes.isEmpty()) { + return Optional.empty(); + } + + ThreadLocalRandom rng = ThreadLocalRandom.current(); + List candidates = new ArrayList<>(readyAfes); + double bestCost = Double.MAX_VALUE; + AfeHandle bestAfe = null; + long iterations = readyAfes.size(); + + if (options.getRandomSubsetSize() > 0) { + iterations = Math.min(options.getRandomSubsetSize(), iterations); + } + + // Partial Fisher-Yates shuffle. + for (int i = 0; i < iterations; i++) { + int randomIndex = i + rng.nextInt(candidates.size() - i); + AfeHandle picked = candidates.get(randomIndex); + if (picked.getE2eCost() < bestCost) { + bestCost = picked.getE2eCost(); + bestAfe = picked; + } + // Move candidate to the `i`th entry so that it's not picked again. + Collections.swap(candidates, i, randomIndex); + } + return sessionList.checkoutSession(bestAfe); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Picker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Picker.java new file mode 100644 index 0000000000..ce4bc5a68c --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Picker.java @@ -0,0 +1,24 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import java.util.Optional; + +abstract class Picker { + abstract Optional pickSession(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizer.java new file mode 100644 index 0000000000..01a83a6614 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizer.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.PoolStats; +import com.google.rpc.Status; +import javax.annotation.CheckReturnValue; + +class PoolSizer { + + // Fraction of idle sessions to keep in order to manage an increase in requests-in-flight. For + // example, a headroom of 50% will keep enough sessions to deal with a 50% increase in QPS or a + // 50% increase in latency (since that also increases requests-in-flight). + private volatile float idlesSessionHeadRoom; + private volatile int minIdleSessions; + private volatile int maxIdleSessions; + + private final PoolStats stats; + private final Sized pendingRpcs; + + // This resolves cold start overprovisioning issue. + // Session creation sometimes involves creating new connection and warming the backend. + // So it takes time, but accumulated vRPCs may be processed rather quickly as simple + // point reads are expected to complete within 1-4ms. + // We assume that it is okay to collect 10 pending calls per starting session so that after + // the session is ready it takes 10-40ms to process all pending calls. + private volatile int pendingVRpcsPerSession; + + interface Sized { + int getSize(); + } + + PoolSizer( + PoolStats stats, + Sized pendingRpcs, + SessionClientConfiguration.SessionPoolConfiguration poolConfig) { + this.stats = stats; + this.pendingRpcs = pendingRpcs; + + this.idlesSessionHeadRoom = poolConfig.getHeadroom(); + this.minIdleSessions = poolConfig.getMinSessionCount(); + this.maxIdleSessions = poolConfig.getMaxSessionCount(); + this.pendingVRpcsPerSession = poolConfig.getNewSessionQueueLength(); + } + + void updateConfig(SessionClientConfiguration.SessionPoolConfiguration poolConfiguration) { + this.idlesSessionHeadRoom = poolConfiguration.getHeadroom(); + this.minIdleSessions = poolConfiguration.getMinSessionCount(); + this.maxIdleSessions = poolConfiguration.getMaxSessionCount(); + this.pendingVRpcsPerSession = poolConfiguration.getNewSessionQueueLength(); + } + + public int getScaleDelta() { + // Assume each session handles 1 RPC at a time. This should be revisited if sessions get + // support for multiplexing. + int effectivePending = (int) Math.ceil((float) pendingRpcs.getSize() / pendingVRpcsPerSession); + int sessionsInUse = effectivePending + stats.getInUseCount(); + int unboundedDesiredIdleSessions = (int) Math.ceil(sessionsInUse * idlesSessionHeadRoom); + int desiredIdleSessions = + Math.max(Math.min(unboundedDesiredIdleSessions, maxIdleSessions), minIdleSessions); + + int desiredCapacity = sessionsInUse + desiredIdleSessions; + int eventualCapacity = stats.getExpectedCapacity(); + int immediateCapacity = eventualCapacity - stats.getStartingCount(); + + if (desiredCapacity < immediateCapacity) { + return desiredCapacity - immediateCapacity; + } else if (desiredCapacity > eventualCapacity) { + return desiredCapacity - eventualCapacity; + } else { + return 0; + } + } + + /** Returns true if the session should be replaced */ + @CheckReturnValue + public boolean handleGoAway(GoAwayResponse msg) { + return getScaleDelta() >= 0; + } + + /** Returns true if the closed session should be replaced */ + @CheckReturnValue + boolean handleSessionClose(Status statusProto) { + return getScaleDelta() >= 0; + } + + /** Returns true if a new session should be added. */ + @CheckReturnValue + boolean handleNewCall() { + return getScaleDelta() > 0; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Session.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Session.java new file mode 100644 index 0000000000..35f8f98bc5 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/Session.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.protobuf.Message; +import io.grpc.Metadata; +import io.grpc.Status; +import java.time.Instant; + +/** + * A Bigtable abstraction over a bidirectional {@link io.grpc.ClientCall} to treat it as a stateful + * vRPC transport. + */ +public interface Session { + /** State transitions of Session, will happen in defined order */ + enum SessionState { + NEW(0), + STARTING(1), + READY(2), + CLOSING(3), + WAIT_SERVER_CLOSE(4), + CLOSED(5); + + final int phase; + + SessionState(int phase) { + this.phase = phase; + } + } + + @AutoValue + abstract class OpenParams { + abstract Metadata metadata(); + + abstract OpenSessionRequest request(); + + static OpenParams create(Metadata metadata, OpenSessionRequest request) { + return new AutoValue_Session_OpenParams(metadata, request); + } + + OpenParams withResetConsecutiveAttempt() { + return new AutoValue_Session_OpenParams( + metadata(), request().toBuilder().setConsecutiveFailedConnectionAttempts(0).build()); + } + + OpenParams withIncrementedAttempts() { + return new AutoValue_Session_OpenParams( + metadata(), + request().toBuilder() + .setConsecutiveFailedConnectionAttempts( + request().getConsecutiveFailedConnectionAttempts() + 1) + .build()); + } + } + + SessionState getState(); + + Instant getLastStateChange(); + + OpenParams getOpenParams(); + + boolean isOpenParamsUpdated(); + + PeerInfo getPeerInfo(); + + String getLogName(); + + Instant getNextHeartbeat(); + + /** + * Start the session by sending the opening message. + * + *

    This must be the first method called on the {@link Session}. It will try setup a session + * using the req (for the server) and headers (for rls). + */ + void start(OpenSessionRequest req, Metadata headers, Listener sessionListener); + + /** + * Caller instructed close of the Session. Will immediately close the session and abort all + * outstanding vRPCs. + */ + void close(CloseSessionRequest req); + + /** Force close a session. */ + void forceClose(CloseSessionRequest reason); + + /** + * Start a new vRPC. This method can only be called after {@link + * Listener#onReady(OpenSessionResponse)} has been notified. + */ + VRpc newCall( + VRpcDescriptor descriptor) throws IllegalStateException; + + /** Callback for Session lifecycyle transitions. Methods are called sequentially. */ + interface Listener { + + void onReady(OpenSessionResponse msg); + + void onGoAway(GoAwayResponse msg); + + void onClose(SessionState prevState, Status status, Metadata trailers); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudget.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudget.java new file mode 100644 index 0000000000..bfa8dd2213 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudget.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.common.annotations.VisibleForTesting; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.concurrent.NotThreadSafe; + +@NotThreadSafe +class SessionCreationBudget { + private static final Logger DEFAULT_LOGGER = + Logger.getLogger(SessionCreationBudget.class.getName()); + + // TODO: add a metric for session can't be created because there's no budget + private volatile int maxConcurrentRequest; + private volatile Duration penalty; + private final Clock clock; + + private int concurrentRequests = 0; + + // Whenever a session creation failed, add the time to the list + private final List delayedCreationTokens = new ArrayList<>(); + + static SessionCreationBudget create(int max, Duration penalty) { + return new SessionCreationBudget(max, penalty, Clock.systemUTC()); + } + + @VisibleForTesting + SessionCreationBudget(int max, Duration penalty, Clock clock) { + this.maxConcurrentRequest = max; + this.penalty = penalty; + this.clock = clock; + } + + Instant getNextAvailableBudget() { + if (concurrentRequests < maxConcurrentRequest) { + return Instant.now(); + } + + if (delayedCreationTokens.isEmpty()) { + return Instant.now(); + } + + return delayedCreationTokens.get(0); + } + + boolean tryReserveSession() { + sanityCheck(); + + if (concurrentRequests == maxConcurrentRequest) { + drainCreationFailures(); + } + + if (concurrentRequests == maxConcurrentRequest) { + return false; + } + + concurrentRequests++; + return true; + } + + void onSessionCreationFailure() { + delayedCreationTokens.add(Instant.now(clock).plus(penalty)); + } + + void onSessionCreationSuccess() { + concurrentRequests--; + } + + private void drainCreationFailures() { + Instant now = Instant.now(clock); + Iterator iter = delayedCreationTokens.listIterator(); + while (iter.hasNext()) { + if (iter.next().isBefore(now)) { + concurrentRequests--; + iter.remove(); + } else { + // The list should be roughly sorted. Exit early when we encounter + // something expires later. + break; + } + } + } + + private void sanityCheck() { + // This could happen if the budget is updated + if (concurrentRequests < 0) { + DEFAULT_LOGGER.log( + Level.FINE, + "concurrent request can't be negative: {0}. Resetting it to 0.", + concurrentRequests); + concurrentRequests = 0; + } + if (concurrentRequests > maxConcurrentRequest) { + DEFAULT_LOGGER.log( + Level.FINE, + "Concurrent requests out of range: {0}. Resetting it to max.", + concurrentRequests); + concurrentRequests = maxConcurrentRequest; + } + } + + public int getMaxConcurrentRequest() { + return maxConcurrentRequest; + } + + void updateConfig(SessionClientConfiguration.SessionPoolConfiguration config) { + int oldBudget = this.maxConcurrentRequest; + this.maxConcurrentRequest = config.getNewSessionCreationBudget(); + this.penalty = SessionUtil.toJavaDuration(config.getNewSessionCreationPenalty()); + DEFAULT_LOGGER.log( + Level.FINE, + "updated session creation budget from {0} to {1}.", + new Object[] {oldBudget, config.getNewSessionCreationBudget()}); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionFactory.java new file mode 100644 index 0000000000..20246775b6 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionFactory.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream; +import io.grpc.CallOptions; +import io.grpc.MethodDescriptor; + +/** Wrapper around a channel to centralize per call session customizations. */ +public final class SessionFactory { + private final ChannelPool channelPool; + private final MethodDescriptor methodDescriptor; + private final CallOptions callOptions; + + public SessionFactory( + ChannelPool channelPool, + MethodDescriptor methodDescriptor, + CallOptions callOptions) { + this.channelPool = channelPool; + this.methodDescriptor = methodDescriptor; + this.callOptions = callOptions; + } + + public SessionStream createNew() { + return channelPool.newStream(methodDescriptor, callOptions); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImpl.java new file mode 100644 index 0000000000..f79142171f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImpl.java @@ -0,0 +1,693 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.ErrorResponse; +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.HeartbeatResponse; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionParametersResponse; +import com.google.bigtable.v2.SessionRefreshConfig; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.bigtable.v2.VirtualRpcRequest; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.SessionTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcImpl.VRpcSessionApi; +import com.google.common.annotations.VisibleForTesting; +import com.google.protobuf.Message; +import com.google.protobuf.TextFormat; +import com.google.protobuf.util.Durations; +import io.grpc.Metadata; +import io.grpc.Status; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.util.Locale; +import java.util.Optional; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +/** Wraps a Bidi ClientCall and layers session semantics on top. */ +@VisibleForTesting +public class SessionImpl implements Session, VRpcSessionApi { + private static final Logger DEFAULT_LOGGER = Logger.getLogger(SessionImpl.class.getName()); + private Logger logger = DEFAULT_LOGGER; + + private static final SessionParametersResponse DEFAULT_SESSION_PARAMS = + SessionParametersResponse.newBuilder().setKeepAlive(Durations.fromMillis(100)).build(); + + static final Duration HEARTBEAT_CHECK_INTERVAL = + Duration.ofMillis(Durations.toMillis(DEFAULT_SESSION_PARAMS.getKeepAlive())); + + @VisibleForTesting + // A time in the future to skip heartbeat checks when there's no active vRPCs on the session + static final Duration FUTURE_TIME = Duration.ofMinutes(30); + + /* + * This lock should be mostly uncontended - all access should be naturally interleaved. Contention + * can only really happen when an unsolicited gRPC control message (ie GOAWAY) arrives at the same + * time as newCall or cancel. + * TODO: Contention will increase when multiplexing is implemented. + */ + private final Object lock = new Object(); + + private final Clock clock; + + private final SessionTracer tracer; + private final DebugTagTracer debugTagTracer; + + private final SessionInfo info; + + @GuardedBy("lock") + private final SessionStream stream; + + @GuardedBy("lock") + private SessionState state = SessionState.NEW; + + @GuardedBy("lock") + private Instant lastStateChangedAt; + + private Listener sessionListener; + + private volatile OpenParams openParams; + + private volatile boolean openParamsUpdated; + + @Nullable private CloseSessionRequest closeReason = null; + + @GuardedBy("lock") + private long nextRpcId = 1; + + // TODO: replace with a map when implementing multiplexing + @GuardedBy("lock") + private VRpcImpl currentRpc = null; + + @GuardedBy("lock") + private VRpcResult currentCancel = null; + + private SessionParametersResponse sessionParameters = DEFAULT_SESSION_PARAMS; + private Duration heartbeatInterval = + Duration.ofMillis(Durations.toMillis(sessionParameters.getKeepAlive())); + + private volatile Instant nextHeartbeat; + + public SessionImpl( + Metrics metrics, SessionPoolInfo poolInfo, long sessionNum, SessionStream stream) { + this(metrics, Clock.systemUTC(), poolInfo, sessionNum, stream); + } + + SessionImpl( + Metrics metrics, + Clock clock, + SessionPoolInfo poolInfo, + long sessionNum, + SessionStream stream) { + this.clock = clock; + this.info = SessionInfo.create(poolInfo, sessionNum); + this.stream = stream; + this.tracer = metrics.newSessionTracer(poolInfo); + this.debugTagTracer = metrics.getDebugTagTracer(); + this.nextHeartbeat = clock.instant().plus(FUTURE_TIME); + this.openParamsUpdated = false; + } + + @Override + public SessionState getState() { + synchronized (lock) { + return state; + } + } + + @Override + public Instant getLastStateChange() { + synchronized (lock) { + return lastStateChangedAt; + } + } + + @Override + public OpenParams getOpenParams() { + return openParams; + } + + @Override + public boolean isOpenParamsUpdated() { + return openParamsUpdated; + } + + @Override + public Instant getNextHeartbeat() { + return nextHeartbeat; + } + + @Override + public PeerInfo getPeerInfo() { + // This lock might not be necessary, its populated once on a gRPC callback which should + // establish a happens before relationship. However access to the underlying stream is guarded + // with errorprone, so sync block is required to get around the lint. + // TODO: consider removing the sync block + synchronized (lock) { + return stream.getPeerInfo(); + } + } + + @Override + public String getLogName() { + return info.getLogName(); + } + + @Override + public void forceClose(CloseSessionRequest closeReason) { + synchronized (lock) { + debugTagTracer.checkPrecondition( + state != SessionState.NEW, + "session_force_close_wrong_state", + "Tried to forceClose an unstarted session %s in state %s", + info.getLogName(), + state); + + if (state == SessionState.CLOSED) { + return; + } + + updateState(SessionState.WAIT_SERVER_CLOSE); + this.closeReason = closeReason; + + // Not sending the CloseSessionRequest because cancel() will just drop it + stream.forceClose(closeReason.getDescription(), null); + // Listeners will be notified by dispatchStreamClosed + } + } + + @Override + public void start(OpenSessionRequest req, Metadata headers, Listener sessionListener) { + synchronized (lock) { + debugTagTracer.checkPrecondition( + state == SessionState.NEW, + "session_start_wrong_state", + "Tried to start a started session, current state: %s", + state); + + logger.fine(String.format("Starting session %s", info.getLogName())); + tracer.onStart(); + + updateState(SessionState.STARTING); + openParams = OpenParams.create(headers, req); + this.sessionListener = sessionListener; + + SessionRequest wrappedReq = SessionRequest.newBuilder().setOpenSession(req).build(); + stream.start( + new SessionStream.Listener() { + @Override + public void onBeforeSessionStart(PeerInfo peerInfo) {} + + @Override + public void onMessage(SessionResponse message) { + dispatchResponseMessage(message); + } + + @Override + public void onClose(Status status, Metadata trailers) { + dispatchStreamClosed(status, trailers); + } + }, + headers); + + stream.sendMessage(wrappedReq); + } + } + + @Override + public void close(CloseSessionRequest req) { + logger.fine(String.format("Closing session %s for reason: %s", info.getLogName(), req)); + + synchronized (lock) { + // Throw an exception because this is a bug and we dont have a listener + debugTagTracer.checkPrecondition( + state != SessionState.NEW, + "session_close_wrong_state", + "Session error: Caller tried to close session %s before starting it with the reason: %s", + info.getLogName(), + req); + + // Multiple close is a no-op + if (state.phase >= SessionState.CLOSING.phase) { + logger.fine( + String.format( + "Session error: Caller tried to close a session %s that is %s for reason: %s", + info.getLogName(), state, req)); + return; + } + + closeReason = req; + updateState(SessionState.CLOSING); + + if (currentRpc == null) { + startGracefulClose(); + } + } + } + + /** Wraps the flow of closing a session. */ + @GuardedBy("lock") + private void startGracefulClose() { + debugTagTracer.checkPrecondition( + state == SessionState.CLOSING, + "session_graceful_close_wrong_state", + "Session error: %s tried to actuate session closing when not in the correct state. State:" + + " %s", + info.getLogName(), + state); + + // TODO: send metrics + updateState(SessionState.WAIT_SERVER_CLOSE); + + // Should never happen + if (closeReason == null) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "session_close_no_reason"); + logger.log( + Level.WARNING, + String.format("%s graceful shutdown started without a reason", info.getLogName()), + new IllegalStateException("Tried to close a session without a reason")); + // Synthesize a reason so that we let the server know of the problem instead + closeReason = + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_ERROR) + .setDescription("Started graceful shutdown close without a reason set") + .build(); + } + stream.sendMessage(SessionRequest.newBuilder().setCloseSession(closeReason).build()); + // TODO: remove this after the server is updated + stream.halfClose(); + } + + @Override + public + VRpc newCall(VRpcDescriptor descriptor) { + debugTagTracer.checkPrecondition( + descriptor.getSessionDescriptor().getType() == info.getPoolInfo().getType(), + "session_new_call_wrong_type", + "wrong VRpc descriptor type"); + + synchronized (lock) { + debugTagTracer.checkPrecondition( + state != SessionState.NEW, + "session_new_call_wrong_state", + "Session error: newCall called before start"); + + long rpcId = nextRpcId; + nextRpcId = Math.incrementExact(nextRpcId); + return new VRpcImpl<>(this, descriptor, rpcId, stream.getPeerInfo()); + } + } + + @Override + public Status startRpc(VRpcImpl rpc, VirtualRpcRequest payload) { + // start monitoring for heartbeat when the vrpc is started + this.nextHeartbeat = clock.instant().plus(heartbeatInterval); + + synchronized (lock) { + if (currentRpc != null) { + return Status.INTERNAL.withDescription( + "Session error: RPC multiplexing is not yet supported"); + } + if (state != SessionState.READY) { + return Status.INTERNAL.withDescription( + "Session error: Session was not ready, state = " + state); + } + + this.currentRpc = rpc; + stream.sendMessage(SessionRequest.newBuilder().setVirtualRpc(payload).build()); + return Status.OK; + } + } + + @Override + public void cancelRpc(long rpcId, @Nullable String message, @Nullable Throwable cause) { + synchronized (lock) { + if (currentRpc != null && rpcId == currentRpc.rpcId) { + currentCancel = + VRpcResult.createRejectedError( + Status.CANCELLED.withDescription(message).withCause(cause)); + } + // do nothing if the rpc is already finished + } + } + + // region SessionStream event handlers + private void dispatchResponseMessage(SessionResponse message) { + switch (message.getPayloadCase()) { + case OPEN_SESSION: + handleOpenSessionResponse(message.getOpenSession()); + break; + case SESSION_PARAMETERS: + handleSessionParamsResponse(message.getSessionParameters()); + break; + case GO_AWAY: + handleGoAwayResponse(message.getGoAway()); + break; + case VIRTUAL_RPC: + handleVRpcResponse(message.getVirtualRpc()); + break; + case HEARTBEAT: + handleHeartBeatResponse(message.getHeartbeat()); + break; + case SESSION_REFRESH_CONFIG: + handleSessionRefreshConfigResponse(message.getSessionRefreshConfig()); + break; + case ERROR: + handleVRpcErrorResponse(message.getError()); + break; + case PAYLOAD_NOT_SET: + default: + handleUnknownResponseMessage(message); + } + } + + private void handleOpenSessionResponse(OpenSessionResponse openSession) { + logger.fine(String.format("%s Session is ready", info.getLogName())); + + PeerInfo localPeerInfo; + + synchronized (lock) { + debugTagTracer.checkPrecondition( + state != SessionState.NEW, + "session_open_wrong_state", + "Got session open response before session started"); + debugTagTracer.checkPrecondition( + state != SessionState.CLOSED, + "session_open_wrong_state", + "Got session open response after session was closed"); + + if (state != SessionState.STARTING) { + logger.fine(String.format("Stream was already %s when session open was received", state)); + return; + } + localPeerInfo = stream.getPeerInfo(); + updateState(SessionState.READY); + } + tracer.onOpen(localPeerInfo); + sessionListener.onReady(openSession); + } + + private void handleSessionParamsResponse(SessionParametersResponse resp) { + synchronized (lock) { + if (state.phase >= SessionState.CLOSING.phase) { + logger.fine( + String.format("Stream was already %s when session params were received", state)); + return; + } + + if (!sessionParameters.equals(resp)) { + this.sessionParameters = resp; + this.heartbeatInterval = + Duration.ofMillis(Durations.toMillis(sessionParameters.getKeepAlive())); + logger.log( + Level.CONFIG, + () -> + String.format( + "%s session params changed: %s", + info.getLogName(), + TextFormat.printer().emittingSingleLine(true).printToString(resp))); + } + } + } + + private void handleVRpcResponse(VirtualRpcResponse vrpc) { + // TODO: when stream is supported this should be updated to the next expected time instead of + // session life time + this.nextHeartbeat = clock.instant().plus(FUTURE_TIME); + VRpcImpl localRpc; + VRpcResult localCancel; + + boolean needsClose; + + synchronized (lock) { + if (state.phase > SessionState.CLOSING.phase) { + debugTagTracer.record( + TelemetryConfiguration.Level.WARN, "session_closed_discard_vrpc_response"); + logger.warning( + String.format( + "%s Discarding vRPC error because session is past the CLOSING phase with the" + + " reason: %s", + info.getLogName(), closeReason)); + return; + } + + debugTagTracer.checkPrecondition( + state == SessionState.READY || state == SessionState.CLOSING, + "session_vrpc_response_wrong_state", + "Unexpected vRPC response when session is %s", + state); + debugTagTracer.checkPrecondition( + currentRpc != null, "session_vrpc_null", "Got vRPC response but current vRPC is unset"); + debugTagTracer.checkPrecondition( + currentRpc.rpcId == vrpc.getRpcId(), + "session_vrpc_id_mismatch", + "Got vRPC response for the wrong vRPC: expect: %s, actual: %s", + currentRpc.rpcId, + vrpc.getRpcId()); + + // reset state of the current rpc + localCancel = currentCancel; + currentCancel = null; + localRpc = currentRpc; + // TODO: handle multiplexing + currentRpc = null; + needsClose = (state == SessionState.CLOSING); + } + + if (localCancel != null) { + tracer.onVRpcClose(localCancel.getStatus().getCode()); + localRpc.handleError(localCancel); + } else { + tracer.onVRpcClose(Status.OK.getCode()); + localRpc.handleResponse(vrpc); + } + if (needsClose) { + synchronized (lock) { + if (state == SessionState.CLOSING) { + startGracefulClose(); + } + } + } + } + + private void handleHeartBeatResponse(HeartbeatResponse ignored) { + this.nextHeartbeat = clock.instant().plus(heartbeatInterval); + } + + private void handleSessionRefreshConfigResponse(SessionRefreshConfig config) { + synchronized (lock) { + Metadata grpcMetadata = new Metadata(); + config + .getMetadataList() + .forEach( + entry -> + grpcMetadata.put( + Metadata.Key.of(entry.getKey(), Metadata.ASCII_STRING_MARSHALLER), + entry.getValue().toStringUtf8())); + openParams = OpenParams.create(grpcMetadata, config.getOptimizedOpenRequest()); + openParamsUpdated = true; + } + } + + private void handleVRpcErrorResponse(ErrorResponse error) { + // Skips the heartbeat check when there's no active vrpc on the session + this.nextHeartbeat = clock.instant().plus(FUTURE_TIME); + + VRpcImpl localRpc; + boolean needsClose; + VRpcResult localCancel; + + synchronized (lock) { + if (state.phase > SessionState.CLOSING.phase) { + debugTagTracer.record( + TelemetryConfiguration.Level.WARN, "session_closed_discard_vrpc_response"); + logger.warning( + String.format( + "%s Discarding vRPC error because session is past the CLOSING phase with the" + + " reason: %s, error was: %s", + info.getLogName(), closeReason, error)); + return; + } + + debugTagTracer.checkPrecondition( + state == SessionState.READY || state == SessionState.CLOSING, + "session_vrpc_response_wrong_state", + "Unexpected vRPC response when session is %s", + state); + + debugTagTracer.checkPrecondition( + currentRpc != null, "session_vrpc_null", "Got vRPC response but current vRPC is unset"); + debugTagTracer.checkPrecondition( + currentRpc.rpcId == error.getRpcId(), + "session_vrpc_id_mismatch", + "Got vRPC response for the wrong vRPC: expect: %s, actual: %s", + currentRpc.rpcId, + error.getRpcId()); + + // reset the state of the current rpc + localCancel = currentCancel; + currentCancel = null; + localRpc = currentRpc; + currentRpc = null; + needsClose = (state == SessionState.CLOSING); + } + + if (localCancel != null) { + tracer.onVRpcClose(localCancel.getStatus().getCode()); + localRpc.handleError(localCancel); + } else { + tracer.onVRpcClose(Status.fromCodeValue(error.getStatus().getCode()).getCode()); + localRpc.handleError(VRpcResult.createServerError(error)); + } + if (needsClose) { + synchronized (lock) { + if (state == SessionState.CLOSING) { + startGracefulClose(); + } + } + } + } + + private void handleGoAwayResponse(GoAwayResponse goAwayResponse) { + synchronized (lock) { + if (state.phase >= SessionState.CLOSING.phase) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "session_go_away_ignored"); + logger.warning( + String.format( + "Session error: %s Ignoring goaway because session is %s", + info.getLogName(), state)); + return; + } + + debugTagTracer.checkPrecondition( + state.phase >= SessionState.STARTING.phase, + "session_go_away_wrong_state", + "Unexpected goaway when session is %s", + state); + + updateState(SessionState.CLOSING); + closeReason = + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_GOAWAY) + .setDescription( + "Server sent GO_AWAY_" + goAwayResponse.getReason().toUpperCase(Locale.ENGLISH)) + .build(); + if (currentRpc == null) { + startGracefulClose(); + } + } + sessionListener.onGoAway(goAwayResponse); + } + + private void handleUnknownResponseMessage(SessionResponse message) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "session_unknown_response"); + logger.warning(String.format("%s Unknown control message: %s", info.getLogName(), message)); + } + + private void dispatchStreamClosed(Status status, Metadata trailers) { + SessionState prevState; + VRpcImpl localVRpc; + + PeerInfo localPeerInfo; + synchronized (lock) { + prevState = state; + + if (!status.isOk()) { + String augmentedDescription = + Optional.ofNullable(status.getDescription()).map(d -> d + ". ").orElse("") + + "PeerInfo: " + + formatPeerInfo(getPeerInfo()); + + status = status.withDescription(augmentedDescription); + } + + if (state == SessionState.WAIT_SERVER_CLOSE) { + logger.fine(String.format("%s closed normally with status %s", info.getLogName(), status)); + } else { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "session_abnormal_close"); + // Unexpected path + String msg = + String.format( + "Session error: %s session closed unexpectedly in state %s. Status: %s", + info.getLogName(), state, status); + logger.warning(msg); + + if (state == SessionState.CLOSED) { + return; + } + + closeReason = + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_ERROR) + .setDescription("Unexpected session close with status: " + status.getCode()) + .build(); + } + + localVRpc = currentRpc; + localPeerInfo = stream.getPeerInfo(); + currentRpc = null; + updateState(SessionState.CLOSED); + } + + if (localVRpc != null) { + try { + localVRpc.handleSessionClose(VRpcResult.createRemoteTransportError(status, trailers)); + } catch (Throwable t) { + logger.log( + Level.WARNING, + String.format( + "Session error: %s Unhandled exception while notifying vRpc of session closure" + + " status %s", + info.getLogName(), status), + t); + } + tracer.onVRpcClose(Status.UNAVAILABLE.getCode()); + } + tracer.onClose(localPeerInfo, closeReason.getReason(), status); + sessionListener.onClose(prevState, status, trailers); + } + + @GuardedBy("lock") + private void updateState(SessionState newState) { + this.state = newState; + this.lastStateChangedAt = clock.instant(); + } + + private static String formatPeerInfo(PeerInfo peerInfo) { + if (peerInfo == null) { + return "null"; + } + return TextFormat.printer().emittingSingleLine(true).printToString(peerInfo); + } + // endregion +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionInfo.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionInfo.java new file mode 100644 index 0000000000..a3c4bf1d73 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionInfo.java @@ -0,0 +1,33 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.auto.value.AutoValue; + +@AutoValue +public abstract class SessionInfo { + public abstract SessionPoolInfo getPoolInfo(); + + public abstract String getLogName(); + + public abstract boolean isReady(); + + static SessionInfo create(SessionPoolInfo poolInfo, long sessionNum) { + String logName = String.format("%s-%d", poolInfo.getLogName(), sessionNum); + return new AutoValue_SessionInfo(poolInfo, logName, false); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionList.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionList.java new file mode 100644 index 0000000000..c5efeebffd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionList.java @@ -0,0 +1,449 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_MISSED_HEARTBEAT; + +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.Session.SessionState; +import com.google.common.annotations.VisibleForTesting; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.concurrent.NotThreadSafe; + +/** + * A data structure to track sessions through their lifecycle transitions. + * + *

    Each session will be wrapped in a SessionHandle to track per Session state. + * + *

    This class is not thread safe and requires external synchronization. + */ +@NotThreadSafe +class SessionList { + private static final Logger LOG = Logger.getLogger(SessionList.class.getName()); + + static final Duration SESSION_LIST_PRUNE_INTERVAL = Duration.ofMinutes(10); + + // List of afes that have sessions that are ready now. + private final List afesWithReadySessions = new ArrayList<>(); + // A map of all recently used Afes with possibly empty sessions + private final Map afeHandles = new HashMap<>(); + // All the sessions being tracked by this SessionList including: + // - ones that are in use + // - starting sessions + // - closing sessions + private final Set allSessions = new HashSet<>(); + private final Set inUseSessions = new HashSet<>(); + + private final CloseSessionRequest missedHeartbeatCloseRequest = + CloseSessionRequest.newBuilder() + .setReason(CLOSE_SESSION_REASON_MISSED_HEARTBEAT) + .setDescription("missed heartbeat") + .build(); + + // pool level statistics across all the afes + private final PoolStats poolStats = new PoolStats(); + + /** Entrypoint for a session's lifecycle */ + SessionHandle newHandle(Session session) { + SessionHandle h = new SessionHandle(session); + allSessions.add(h); + poolStats.startingCount++; + poolStats.expectedCapacity++; + return h; + } + + /** Get {@link PoolStats} */ + PoolStats getStats() { + return poolStats; + } + + Set getAllSessions() { + return allSessions; + } + + List getAfesWithReadySessions() { + return Collections.unmodifiableList(afesWithReadySessions); + } + + /** + * Gets the next ready session from the afe. This will be called when a vrpc is about to be + * started, it is called by the {@link Picker}. + */ + public Optional checkoutSession(AfeHandle afeHandle) { + Optional maybeHandle = Optional.ofNullable(afeHandle.sessions.poll()); + + maybeHandle.ifPresent( + handle -> { + poolStats.readyCount--; + poolStats.inUseCount++; + + if (handle.afe.get().sessions.isEmpty()) { + afesWithReadySessions.remove(afeHandle); + } + }); + + return maybeHandle; + } + + /** Closes all the sessions with this reason. */ + void close(CloseSessionRequest req) { + // Notify all sessions to close and have the callbacks clean up the rest of the state + for (SessionHandle s : allSessions) { + s.getSession().close(req); + } + } + + void prune() { + Instant now = Instant.now(); + Instant horizon = now.minus(SESSION_LIST_PRUNE_INTERVAL); + + Iterator> it = afeHandles.entrySet().iterator(); + while (it.hasNext()) { + Entry e = it.next(); + AfeHandle handle = e.getValue(); + if (handle.refCount > 0) { + continue; + } + if (handle.lastConnected.isBefore(horizon)) { + continue; + } + it.remove(); + } + } + + void checkHeartbeat(Clock clock) { + Instant now = clock.instant(); + inUseSessions.forEach( + handle -> { + if (now.isAfter(handle.getSession().getNextHeartbeat())) { + LOG.log( + Level.WARNING, + "Missed heartbeat for {0}, forcing session close", + handle.getSession().getLogName()); + handle.getSession().forceClose(missedHeartbeatCloseRequest); + } + }); + } + + @NotThreadSafe + class SessionHandle { + private final Session session; + private boolean inExpectedCount = true; + + @SuppressWarnings("OptionalUsedAsFieldOrParameterType") + private Optional afe = Optional.empty(); + + SessionHandle(Session session) { + this.session = session; + } + + Session getSession() { + return session; + } + + /** First transition in the happy path - server acknowledged the session */ + void onSessionStarted() { + PeerInfo peerInfo = session.getPeerInfo(); + + AfeHandle afeHandle = + afeHandles.computeIfAbsent(AfeId.extract(peerInfo), (ignored) -> new AfeHandle()); + this.afe = Optional.of(afeHandle); + afeHandle.sessions.add(this); + afeHandle.refCount++; + afeHandle.lastConnected = Instant.now(); + if (afeHandle.sessions.size() == 1) { + afesWithReadySessions.add(afeHandle); + } + + poolStats.startingCount--; + poolStats.readyCount++; + } + + void onVRpcStarted() { + // Pool stats and AFE list are updated in SessionList#checkoutSession + inUseSessions.add(this); + } + + /** + * The session is returned to the pool after use. This undoes what SessionList#checkoutSession + */ + void onVRpcFinish(Duration elapsed, VRpcResult result) { + // Guaranteed to be set - vrpc can only start after the session is ready + AfeHandle afeHandle = this.afe.get(); + + poolStats.inUseCount--; + inUseSessions.remove(this); + + if (result.getStatus().isOk()) { + afeHandle.updateLatency(elapsed, result.getBackendLatency()); + } + + if (session.getState() == SessionState.READY) { + poolStats.readyCount++; + afeHandle.sessions.add(this); + afeHandle.lastConnected = Instant.now(); + + // If this is the first session returned to the pool, transition the afe to ready list + if (afeHandle.sessions.size() == 1) { + afesWithReadySessions.add(afeHandle); + } + } + } + + /** + * Server started graceful refresh. The session is still available, but a replacement is being + * searched for. + */ + void onSessionClosing() { + // The session could get a goaway before it started, which means it has not been + // associated with an afe. + // Also the session could get a goaway when its either idle or in use. + boolean wasReady = false; + + // if afe is not present, the session has not started, so skip this + if (afe.isPresent()) { + wasReady = afe.get().sessions.remove(this); + + if (afe.get().sessions.isEmpty()) { + afesWithReadySessions.remove(afe.get()); + } + } + + if (wasReady) { + poolStats.readyCount--; + } + // eagerly decrement expected count and make sure to avoid double counting in onSessionClosed + poolStats.expectedCapacity--; + inExpectedCount = false; + } + + void onSessionClosed(SessionState prevState) { + if (inExpectedCount) { + poolStats.expectedCapacity--; + inExpectedCount = false; + } + // only update counts after the session started and has an afe associated + afe.ifPresent(afeHandle -> afeHandle.refCount--); + + // NOTE: don't need to update vRpc counters, onVRpcFinish will have been invoked already + switch (prevState) { + case NEW: + throw new IllegalStateException("NEW session was closed"); + case STARTING: + poolStats.startingCount--; + break; + case READY: + { + AfeHandle afeHandle = afe.get(); + // If the session was available & idle, then we need to remove it + if (afeHandle.sessions.remove(this)) { + poolStats.readyCount--; + if (afeHandle.sessions.isEmpty()) { + afesWithReadySessions.remove(afeHandle); + } + } + break; + } + case CLOSING: + case WAIT_SERVER_CLOSE: + // noop + break; + case CLOSED: + throw new IllegalStateException("double close"); + } + + allSessions.remove(this); + } + } + + /** Simple counters for the sessions contained in this list. */ + @NotThreadSafe + static class PoolStats { + private int startingCount; + private int readyCount; + private int inUseCount; + private int expectedCapacity; + + PoolStats() { + reset(); + } + + void reset() { + startingCount = 0; + readyCount = 0; + inUseCount = 0; + expectedCapacity = 0; + } + + /** Number of Sessions that are being prepped, but not ready for use. */ + int getStartingCount() { + return startingCount; + } + + /** Number of Sessions ready for immediate use. */ + int getReadyCount() { + return readyCount; + } + + /** + * Number of Sessions that are in use and thus unavailable. This includes sessions that will not + * be returned to the pool because they will be closed when the go idle. + */ + int getInUseCount() { + return inUseCount; + } + + /** + * Number of sessions should be usable in the short term future. Includes sessions that are + * starting, idle and in used. + */ + int getExpectedCapacity() { + return expectedCapacity; + } + + @VisibleForTesting + TestHelper getTestHelper() { + return new TestHelper(); + } + + @Override + public String toString() { + return String.format( + "PoolStats{startingCount=%d, readyCount=%d, inUseCount=%d, expectedCapacity=%d}", + startingCount, readyCount, inUseCount, expectedCapacity); + } + + @VisibleForTesting + class TestHelper { + void setStartingCount(int n) { + startingCount = n; + } + + void setReadyCount(int n) { + readyCount = n; + } + + void setExpectedCapacity(int n) { + expectedCapacity = n; + } + + void setInUseCount(int n) { + inUseCount = n; + } + } + } + + /** Typesafe wrapper around the applicationFrontendId the server sent us */ + @AutoValue + abstract static class AfeId { + protected abstract long getId(); + + static AfeId extract(PeerInfo peerInfo) { + return new AutoValue_SessionList_AfeId(peerInfo.getApplicationFrontendId()); + } + } + + static class AfeHandle { + // All sessions in the queue are ready to be used + @VisibleForTesting final Queue sessions; + // Last time this afe was used. It will be consulted when we need to garbage collect + // afe that have disappeared + private Instant lastConnected = Instant.now(); + // Tracks number ready and inUse sessions, also used for garbage collection + private int refCount = 0; + + private final PeakEwma transportLatency = new PeakEwma(Duration.of(500, ChronoUnit.MICROS)); + private final PeakEwma e2eLatency = new PeakEwma(Duration.ofMillis(1)); + + public AfeHandle() { + sessions = new ArrayDeque<>(); + } + + void updateLatency(Duration e2eLatency, Duration backendLatency) { + this.transportLatency.update(e2eLatency.minus(backendLatency)); + this.e2eLatency.update(e2eLatency); + } + + double getTransportCost() { + return transportLatency.getCost(); + } + + double getE2eCost() { + return e2eLatency.getCost(); + } + + int getNumOutstanding() { + return refCount - sessions.size(); + } + } + + static class PeakEwma { + // Use the last 10s as a look back window + private final double decayNs = TimeUnit.SECONDS.toNanos(10); + private long timestamp = System.nanoTime(); + private double cost; + + public PeakEwma(Duration initialLatency) { + this.cost = initialLatency.toNanos(); + } + + public double getCost() { + return cost; + } + + void update(Duration rtt) { + if (rtt.compareTo(Duration.ZERO) <= 0) { + LOG.warning("Ignoring latency<= 0: " + rtt); + return; + } + + long now = System.nanoTime(); + long rttNs = rtt.toNanos(); + + if (cost < rttNs) { + this.cost = rttNs; + } else { + long elapsed = Math.max(now - timestamp, 0); + double decay = Math.exp(-elapsed / decayNs); + double recency = 1.0 - decay; + this.cost = cost * decay + rttNs * recency; + } + this.timestamp = now; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPool.java new file mode 100644 index 0000000000..0b8cd1cdae --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPool.java @@ -0,0 +1,37 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.protobuf.Message; +import io.grpc.Metadata; + +public interface SessionPool { + void start(OpenReqT openReq, Metadata md); + + VRpc newCall( + VRpcDescriptor desc); + + void close(CloseSessionRequest req); + + SessionPoolInfo getInfo(); + + int getConsecutiveUnimplementedFailures(); + + boolean hasSession(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImpl.java new file mode 100644 index 0000000000..25ac731250 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImpl.java @@ -0,0 +1,845 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.ClientConfiguration; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.api.Util; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.ForwardingVRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.Session.Listener; +import com.google.cloud.bigtable.data.v2.internal.session.Session.OpenParams; +import com.google.cloud.bigtable.data.v2.internal.session.Session.SessionState; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor.SessionDescriptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.base.Stopwatch; +import com.google.protobuf.ByteString; +import com.google.protobuf.Message; +import io.grpc.CallOptions; +import io.grpc.Context; +import io.grpc.Deadline; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.protobuf.StatusProto; +import io.opentelemetry.context.Scope; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Deque; +import java.util.Iterator; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +public class SessionPoolImpl implements SessionPool { + private static final Logger DEFAULT_LOGGER = Logger.getLogger(SessionPoolImpl.class.getName()); + private Logger logger = DEFAULT_LOGGER; + + private enum PoolState { + NEW, + STARTED, + CLOSED + } + + private static final int PROTOCOL_VERSION = 0; + + private final Metrics metrics; + private final FeatureFlags featureFlags; + private final SessionPoolInfo info; + private long sessionNum = 0; + private final SessionFactory factory; + private final SessionDescriptor descriptor; + + // Set once by start(), and read by both user & grpc threads + private volatile OpenParams openParams; + + @GuardedBy("this") + private PoolState poolState = PoolState.NEW; + + @VisibleForTesting + @GuardedBy("this") + final SessionList sessions; + + @GuardedBy("this") + private final DynamicPicker picker; + + @GuardedBy("this") + private final PoolSizer poolSizer; + + // TODO: we need to close pendingVRpcs when deadline expires + @GuardedBy("this") + private final Deque> pendingRpcs = new ArrayDeque<>(); + + private final Watchdog watchdog; + + @GuardedBy("this") + private int consecutiveFailures = 0; + + /** + * When the client fallback to a non-session AFE session creation will return unimplemented + * errors. In which case the requests should fallback to classic client instead of waiting for an + * available session. + */ + private volatile int consecutiveUnimplementedFailures = 0; + + private final ScheduledFuture afeListPruneTask; + + private final ScheduledFuture heartbeatMonitor; + + private final ScheduledExecutorService executorService; + + @GuardedBy("this") + private ScheduledFuture retryCreateSessionFuture = null; + + // TODO: get the max from ClientConfiguration + @GuardedBy("this") + private final SessionCreationBudget budget; + + private final ClientConfigurationManager configManager; + private final ClientConfigurationManager.ListenerHandle configListenerHandle; + + private final DebugTagTracer debugTagTracer; + + @SuppressWarnings("GuardedBy") + public SessionPoolImpl( + Metrics metrics, + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + SessionDescriptor sessionDescriptor, + String name, + ScheduledExecutorService executorService) { + this( + metrics, + featureFlags, + clientInfo, + configManager, + channelPool, + callOptions, + sessionDescriptor, + name, + executorService, + createInitialBudget(configManager.getClientConfiguration())); + } + + @SuppressWarnings("GuardedBy") + @VisibleForTesting + SessionPoolImpl( + Metrics metrics, + FeatureFlags featureFlags, + ClientInfo clientInfo, + ClientConfigurationManager configManager, + ChannelPool channelPool, + CallOptions callOptions, + SessionDescriptor sessionDescriptor, + String name, + ScheduledExecutorService executorService, + SessionCreationBudget budget) { + this.metrics = metrics; + this.featureFlags = featureFlags; + this.info = SessionPoolInfo.create(clientInfo, sessionDescriptor, name); + this.factory = + new SessionFactory(channelPool, sessionDescriptor.getMethodDescriptor(), callOptions); + this.descriptor = sessionDescriptor; + this.executorService = executorService; + + sessions = new SessionList(); + LoadBalancingOptions lbOptions = + configManager + .getClientConfiguration() + .getSessionConfiguration() + .getSessionPoolConfiguration() + .getLoadBalancingOptions(); + picker = new DynamicPicker(sessions, lbOptions); + poolSizer = + new PoolSizer( + sessions.getStats(), + pendingRpcs::size, + configManager + .getClientConfiguration() + .getSessionConfiguration() + .getSessionPoolConfiguration()); + + debugTagTracer = metrics.getDebugTagTracer(); + + // Watchdog checks for sessions in WAIT_SERVER_CLOSE state and runs every 5 minutes + watchdog = new Watchdog(this, executorService, Duration.ofMinutes(5), sessions, debugTagTracer); + // Heartbeat monitor checks for sessions in READY state with active vRPCs and runs more + // frequently + heartbeatMonitor = + executorService.scheduleAtFixedRate( + () -> { + synchronized (SessionPoolImpl.this) { + sessions.checkHeartbeat(Clock.systemUTC()); + } + }, + SessionImpl.HEARTBEAT_CHECK_INTERVAL.toMillis(), + SessionImpl.HEARTBEAT_CHECK_INTERVAL.toMillis(), + TimeUnit.MILLISECONDS); + afeListPruneTask = + executorService.scheduleAtFixedRate( + () -> { + synchronized (SessionPoolImpl.this) { + sessions.prune(); + } + }, + SessionList.SESSION_LIST_PRUNE_INTERVAL.toMillis(), + SessionList.SESSION_LIST_PRUNE_INTERVAL.toMillis(), + TimeUnit.MILLISECONDS); + + this.budget = budget; + + this.configManager = configManager; + this.configListenerHandle = + configManager.addListener( + clientConfig -> clientConfig.getSessionConfiguration().getSessionPoolConfiguration(), + newConfig -> { + synchronized (SessionPoolImpl.this) { + budget.updateConfig(newConfig); + poolSizer.updateConfig(newConfig); + picker.updateConfig(newConfig); + } + }); + } + + @Override + public SessionPoolInfo getInfo() { + return info; + } + + @Override + public void close(CloseSessionRequest req) { + configListenerHandle.close(); + + synchronized (this) { + if (poolState == PoolState.CLOSED) { + logger.fine(String.format("Tried to close a closed SessionPool %s", info.getLogName())); + return; + } + logger.fine(String.format("Closing session pool %s for reason %s", info.getLogName(), req)); + + poolState = PoolState.CLOSED; + + for (PendingVRpc pendingRpc : pendingRpcs) { + pendingRpc.cancel("SessionPool closed: " + req, null); + } + afeListPruneTask.cancel(false); + heartbeatMonitor.cancel(false); + if (retryCreateSessionFuture != null) { + retryCreateSessionFuture.cancel(false); + retryCreateSessionFuture = null; + } + watchdog.close(); + sessions.close(req); + } + } + + @Override + public synchronized void start(OpenReqT openReq, Metadata md) { + Preconditions.checkState(poolState == PoolState.NEW); + + Metadata mergedMd = new Metadata(); + mergedMd.merge(md); + mergedMd.merge(Util.composeMetadata(featureFlags, descriptor.extractHeaderParams(openReq))); + + openParams = + OpenParams.create( + mergedMd, + OpenSessionRequest.newBuilder() + .setProtocolVersion(PROTOCOL_VERSION) + .setFlags(featureFlags) + .setConsecutiveFailedConnectionAttempts(0) // will be updated each handshake attempt + .setRoutingCookie(ByteString.EMPTY) // set when each session is renegotiated + .setPayload(openReq.toByteString()) // will be set on start + .build()); + poolState = PoolState.STARTED; // TODO: maybe need a READY state as well? + + // Pre-start + for (int i = poolSizer.getScaleDelta(); i > 0; i--) { + createSession(openParams); + } + + watchdog.start(); + } + + private static SessionCreationBudget createInitialBudget( + ClientConfiguration clientConfiguration) { + SessionClientConfiguration.SessionPoolConfiguration sessionPoolConfig = + clientConfiguration.getSessionConfiguration().getSessionPoolConfiguration(); + // Always use the config from the server. The budget should only be 0 when the + // session load is 0. + return SessionCreationBudget.create( + sessionPoolConfig.getNewSessionCreationBudget(), + SessionUtil.toJavaDuration(sessionPoolConfig.getNewSessionCreationPenalty())); + } + + private int getMaxConsecutiveFailures(ClientConfigurationManager configManager) { + return configManager + .getClientConfiguration() + .getSessionConfiguration() + .getSessionPoolConfiguration() + .getConsecutiveSessionFailureThreshold(); + } + + private synchronized void createSession(OpenParams openParams) { + if (!budget.tryReserveSession()) { + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "session_pool_no_budget"); + logger.fine( + String.format( + "Refusing to add a new session due to exhausted %s concurrent create session" + + " requests", + budget.getMaxConcurrentRequest())); + // Retry create session if we run out of budget. In the edge case where we get a new VRpc + // after failing to create any sessions and exhausting all the budget, we'll retry session + // creation once the budget becomes available so the VRpc still has a chance to succeed. + maybeScheduleCreateSessionRetry(); + return; + } + + // Explicit create session streams in a detached context + // We don't want to propagate the rpc deadline nor the trace context + Context prevContext = Context.ROOT.attach(); + try { + try (Scope ignored = io.opentelemetry.context.Context.root().makeCurrent()) { + + SessionStream stream = factory.createNew(); + Session session = new SessionImpl(metrics, info, sessionNum++, stream); + SessionHandle handle = sessions.newHandle(session); + + Metadata localMd = new Metadata(); + localMd.merge(openParams.metadata()); + session.start( + openParams.request(), + localMd, + new Listener() { + @Override + public void onReady(OpenSessionResponse msg) { + SessionPoolImpl.this.onSessionReady(handle, msg); + } + + @Override + public void onGoAway(GoAwayResponse msg) { + SessionPoolImpl.this.onSessionGoAway(handle, msg); + } + + @Override + public void onClose(SessionState prevState, Status status, Metadata trailers) { + SessionPoolImpl.this.onSessionClose(handle, prevState, status, trailers); + } + }); + } + } finally { + Context.ROOT.detach(prevContext); + } + } + + @GuardedBy("this") + private void maybeScheduleCreateSessionRetry() { + if (retryCreateSessionFuture != null) { + return; + } + // This interval could be 0 or negative if nextAvailableBudget is now. In which case + // we'll retry after 1 millisecond to avoid retrying in a busy loop. + long retryIntervalMs = + Duration.between(Instant.now(), budget.getNextAvailableBudget()).toMillis(); + if (retryIntervalMs < 1) { + retryIntervalMs = 1; + } + retryCreateSessionFuture = + executorService.schedule( + () -> { + synchronized (this) { + retryCreateSessionFuture = null; + if (poolState != PoolState.CLOSED && poolSizer.getScaleDelta() > 0) { + createSession(openParams); + } + } + }, + retryIntervalMs, + TimeUnit.MILLISECONDS); + } + + private synchronized void onSessionReady(SessionHandle handle, OpenSessionResponse ignored) { + logger.log( + Level.FINE, + "Session {0} in state {1}", + new Object[] {handle.getSession().getLogName(), handle.getSession().getState()}); + + consecutiveFailures = 0; + consecutiveUnimplementedFailures = 0; + + if (poolState != PoolState.STARTED) { + logger.fine( + String.format( + "%s Session became ready after pool transitioned to %s, ignoring", + handle.getSession().getLogName(), poolState)); + // The session will be closed as part of SessionList#close + return; + } + handle.onSessionStarted(); + + budget.onSessionCreationSuccess(); + + // handle pending rpcs + tryDrainPendingRpcs(); + } + + private synchronized void onVRpcComplete( + SessionHandle handle, Duration elapsed, VRpcResult result) { + handle.onVRpcFinish(elapsed, result); + + // pool is shutting down, dont try to drain vrpcs + if (poolState != PoolState.STARTED) { + return; + } + // Session is shutting down, don't try to drain vrpcs + if (handle.getSession().getState() != SessionState.READY) { + return; + } + tryDrainPendingRpcs(); + } + + private synchronized void onSessionGoAway(SessionHandle handle, GoAwayResponse msg) { + handle.onSessionClosing(); + + // If the session received refresh config or pool requires a replacement, keep the current + // session and request a replacement. + // TODO: remove the check on if the open params is updated. In the future, server should + // broadcast session refresh config to all the sessions that needs reconnect and client + // just need to recreate sessions when pool sizer requries a replacement. + if (handle.getSession().isOpenParamsUpdated() || poolSizer.handleGoAway(msg)) { + logger.fine( + String.format( + "Adding new session to replace a going away session %s", + handle.getSession().getLogName())); + createSession(handle.getSession().getOpenParams()); + } + } + + private void onSessionClose( + SessionHandle handle, SessionState prevState, Status status, Metadata trailers) { + + List> toBeClosed = new ArrayList<>(); + + synchronized (this) { + logger.fine( + String.format("Removing closed session from pool %s", handle.getSession().getLogName())); + + handle.onSessionClosed(prevState); + + // If the pool is closed then there is nothing else to do + // dont need to create a replacement session and pending vRpcs get cleaned up in close() + if (poolState == PoolState.CLOSED) { + return; + } + + // Handle abnormal close. This can happen if the Session was aborted due to underlying stream + // termination + if (prevState != SessionState.WAIT_SERVER_CLOSE) { + consecutiveFailures++; + if (status.getCode() == Status.Code.UNIMPLEMENTED) { + consecutiveUnimplementedFailures++; + } else { + consecutiveUnimplementedFailures = 0; + } + // TODO: decide if max consecutive failures should be capped per client + if (consecutiveFailures >= getMaxConsecutiveFailures(configManager)) { + toBeClosed = popClosableRpcs(); + } + + if (prevState == SessionState.STARTING) { + budget.onSessionCreationFailure(); + } + + // TODO: backoff creating a new session when consecutive failures > max? + if (poolSizer.handleSessionClose(StatusProto.fromStatusAndTrailers(status, trailers))) { + logger.fine( + String.format( + "Replacing abnormally closed session %s", handle.getSession().getLogName())); + createSession(openParams.withIncrementedAttempts()); + } + } + } + + if (!toBeClosed.isEmpty()) { + // vRPCs failing with consecutive failures should fail + VRpcResult result = + VRpcResult.createRejectedError( + Status.UNAVAILABLE.withDescription( + String.format( + "Session failed with consecutive failures. Most recent server status: %s," + + " metadata: %s.", + status, trailers))); + for (PendingVRpc vrpc : toBeClosed) { + try { + vrpc.getListener().onClose(result); + } catch (Throwable t) { + logger.log(Level.WARNING, "Exception when closing request", t); + } + } + } + } + + @GuardedBy("this") + private void tryDrainPendingRpcs() { + while (!pendingRpcs.isEmpty()) { + if (pendingRpcs.peek().isCancelled) { + pendingRpcs.pop(); + continue; + } + Optional handle = picker.pickSession(); + if (!handle.isPresent()) { + break; + } + handle.get().onVRpcStarted(); + PendingVRpc rpc = pendingRpcs.removeFirst(); + rpc.drainTo(handle.get()); + } + } + + @GuardedBy("this") + private List> popClosableRpcs() { + List> toBeClosed = new ArrayList<>(); + Iterator> iter = pendingRpcs.iterator(); + while (iter.hasNext()) { + PendingVRpc vrpc = iter.next(); + // vrpcs that have started on a session gets closed in SessionImpl. Do not double close. + if (!vrpc.isCancelled && vrpc.realCall == null) { + iter.remove(); + toBeClosed.add(vrpc); + } + } + return toBeClosed; + } + + @Override + public synchronized VRpc newCall( + VRpcDescriptor desc) { + Optional handle = picker.pickSession(); + if (handle.isPresent()) { + return newRealCall(desc, handle.get()); + } + if (logger.isLoggable(Level.FINE)) { + logger.fine( + String.format( + "%s Creating new rpc as pending, numPending: %d, %s", + info.getLogName(), pendingRpcs.size(), sessions.getStats())); + } + return new PendingVRpc<>(desc); + } + + @GuardedBy("this") + private VRpc newRealCall( + VRpcDescriptor desc, SessionHandle handle) { + + return new ForwardingVRpc(handle.getSession().newCall(desc)) { + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + final Stopwatch stopwatch = Stopwatch.createStarted(); + super.start( + req, + ctx, + new ForwardListener(listener) { + @Override + public void onClose(VRpcResult result) { + SessionPoolImpl.this.onVRpcComplete(handle, stopwatch.elapsed(), result); + super.onClose(result); + } + }); + } + }; + } + + // Used in the shim layer for fallback decisions. Called on every RPC and we're ok with seeing + // slightly outdated value. + @Override + public int getConsecutiveUnimplementedFailures() { + return consecutiveUnimplementedFailures; + } + + // Used in the shim layer for fallback decisions. Called on every RPC. + @Override + public synchronized boolean hasSession() { + return sessions.getStats().getReadyCount() + sessions.getStats().getInUseCount() > 0; + } + + class PendingVRpc implements VRpc { + private final VRpcDescriptor desc; + + private ReqT req; + private VRpcCallContext ctx; + private VRpcListener listener; + + private boolean isCancelled = false; + private VRpc realCall; + + private ScheduledFuture deadlineMonitor; + + public PendingVRpc(VRpcDescriptor desc) { + this.desc = desc; + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + Preconditions.checkState(this.req == null, "request is already started"); + Preconditions.checkNotNull(req, "request can't be null"); + Preconditions.checkNotNull(ctx, "ctx can't be null"); + Preconditions.checkNotNull(listener, "listener can't be null"); + + this.req = req; + this.ctx = ctx; + this.listener = listener; + this.deadlineMonitor = monitorDeadline(executorService, ctx.getOperationInfo().getDeadline()); + + synchronized (SessionPoolImpl.this) { + if (SessionPoolImpl.this.poolState != PoolState.STARTED) { + listener.onClose( + VRpcResult.createUncommitedError( + Status.UNAVAILABLE.withCause( + new IllegalStateException("SessionPool is closed")))); + return; + } + pendingRpcs.add(this); + + if (logger.isLoggable(Level.FINE)) { + logger.fine( + String.format( + "starting pending call, numPending: %d, %s", + pendingRpcs.size(), sessions.getStats())); + } + + if (poolSizer.handleNewCall()) { + logger.fine( + String.format("Adding session to handle incoming vrpc %s", info.getLogName())); + createSession(openParams); + } + + tryDrainPendingRpcs(); + } + } + + // It's safe to call cancel on a vrpc more than once. It'll be a noop after the initial + // call. Cancelled vrpcs are removed from the pending vrpc queue the next time we + // drain the queue. + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + Status status = Status.CANCELLED; + if (message != null) { + status = status.withDescription(message); + } + if (cause != null) { + status = status.withCause(cause); + } + cancel(status, false); + } + + // Cancel could race with drainTo which sets the real call. Assign realCall to a NOOP_CALL + // so if drainTo gets called at the same time, it'll just get swallowed and we're only calling + // onClose once on the listener. The cancel could also come from deadline monitor when + // the deadline expires. In this case if the real call is already set, we want to real call + // to handle the deadline and return early. + private void cancel(Status status, boolean onlyCancelPendingCall) { + boolean delegateToRealCall = true; + synchronized (SessionPoolImpl.this) { + if (isCancelled) { + return; + } + isCancelled = true; + if (realCall == null) { + this.realCall = NOOP_CALL; + delegateToRealCall = false; + } else if (onlyCancelPendingCall) { + return; + } + } + if (delegateToRealCall) { + realCall.cancel(status.getDescription(), status.getCause()); + } else { + listener.onClose(VRpcResult.createRejectedError(status)); + } + } + + @Override + public void requestNext() { + if (realCall != null) { + realCall.requestNext(); + return; + } + throw new IllegalStateException("requestNext can't be called until data has been received"); + } + + private void drainTo(SessionHandle handle) { + synchronized (SessionPoolImpl.this) { + if (realCall == null) { + this.realCall = newRealCall(desc, handle); + } + } + this.realCall.start(req, ctx, listener); + if (deadlineMonitor != null) { + deadlineMonitor.cancel(false); + } + } + + private VRpcListener getListener() { + return listener; + } + + private ScheduledFuture monitorDeadline( + ScheduledExecutorService executorService, Deadline deadline) { + return executorService.schedule( + () -> + // This could race with user cancel. Setting onlyCancelPendingCall to true + // so that if the real call is set, this cancellation is going to be a noop. + cancel( + Status.DEADLINE_EXCEEDED.withDescription("Deadline exceeded waiting for session"), + true), + deadline.timeRemaining(TimeUnit.NANOSECONDS), + TimeUnit.NANOSECONDS); + } + } + + static class Watchdog implements Runnable { + private static final Logger LOG = Logger.getLogger(Watchdog.class.getName()); + + private final Object lock; + private final ScheduledExecutorService executor; + private final Duration interval; + private final SessionList sessions; + private ScheduledFuture future; + private final Clock clock; + private final DebugTagTracer debugTagTracer; + + // TODO: fix lock sharing + public Watchdog( + Object lock, + ScheduledExecutorService executor, + Duration interval, + SessionList sessionList, + DebugTagTracer debugTagTracer) { + this(lock, executor, interval, sessionList, debugTagTracer, Clock.systemUTC()); + } + + @VisibleForTesting + Watchdog( + Object lock, + ScheduledExecutorService executor, + Duration interval, + SessionList sessionList, + DebugTagTracer debugTagTracer, + Clock clock) { + this.lock = lock; + this.executor = executor; + this.interval = interval; + this.sessions = sessionList; + this.debugTagTracer = debugTagTracer; + this.clock = clock; + } + + public void start() { + future = + executor.scheduleAtFixedRate( + this, interval.toMillis(), interval.toMillis(), TimeUnit.MILLISECONDS); + } + + @Override + public void run() { + Set allSessions; + synchronized (lock) { + allSessions = sessions.getAllSessions(); + } + + for (SessionHandle handle : allSessions) { + Session s = handle.getSession(); + + if (s.getState() != SessionState.WAIT_SERVER_CLOSE) { + continue; + } + + Duration stateDuration = Duration.between(s.getLastStateChange(), Instant.now(clock)); + if (stateDuration.compareTo(interval) < 0) { + continue; + } + + debugTagTracer.record(TelemetryConfiguration.Level.WARN, "watchdog_close_session"); + LOG.fine( + String.format( + "Found session %s that lingered too long in WAIT_SERVER_CLOSE state, canceling" + + " session", + handle.getSession().getLogName())); + handle + .getSession() + .forceClose( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_ERROR) + .setDescription( + String.format( + "Watchdog found session %s in awaiting close for too long. Last" + + " activity was %s ago.", + handle.getSession().getLogName(), + Duration.between( + handle.getSession().getLastStateChange(), Instant.now(clock)))) + .build()); + } + } + + public void close() { + if (future != null) { + future.cancel(false); + } + } + } + + private static final VRpc NOOP_CALL = + new VRpc() { + @Override + public void start(Object req, VRpcCallContext ctx, VRpcListener listener) {} + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) {} + + @Override + public void requestNext() {} + }; +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolInfo.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolInfo.java new file mode 100644 index 0000000000..3fcf322a02 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolInfo.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.SessionType; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor.SessionDescriptor; +import com.google.common.base.Ascii; + +@AutoValue +public abstract class SessionPoolInfo { + public abstract ClientInfo getClientInfo(); + + public abstract SessionType getType(); + + public abstract String getTypeLabel(); + + public abstract String getName(); + + public abstract String getLogName(); + + public static SessionPoolInfo create( + ClientInfo clientInfo, SessionDescriptor descriptor, String name) { + SessionType type = descriptor.getType(); + String typeStr = Ascii.toLowerCase(type.name().replace("SESSION_TYPE_", "")); + String logName = String.format("%s(%s)", typeStr, name); + + return new AutoValue_SessionPoolInfo(clientInfo, type, typeStr, name, logName); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionUtil.java new file mode 100644 index 0000000000..ab0313468a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SessionUtil.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.SessionProto; +import com.google.bigtable.v2.SessionType; +import com.google.common.base.Preconditions; +import com.google.protobuf.Message; +import com.google.protobuf.util.Durations; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoMethodDescriptorSupplier; +import java.time.Duration; + +final class SessionUtil { + private SessionUtil() {} + + static SessionType extractSessionTypeFromMethod(MethodDescriptor desc) { + ProtoMethodDescriptorSupplier schemaDescriptor = + (ProtoMethodDescriptorSupplier) desc.getSchemaDescriptor(); + + SessionType sessionType = + schemaDescriptor + .getMethodDescriptor() + .getOptions() + .getExtension(SessionProto.rpcSessionType); + + Preconditions.checkNotNull(sessionType, "%s missing rpc_session_type annotation", desc); + Preconditions.checkState( + sessionType != SessionType.SESSION_TYPE_UNSET, + "%s missing rpc_session_type annotation", + desc); + + return sessionType; + } + + static SessionType extractOpenSessionTypeFromOpenMsg(Message openReq) { + SessionType sessionType = + openReq.getDescriptorForType().getOptions().getExtension(SessionProto.openSessionType); + Preconditions.checkNotNull( + sessionType, "%s missing open_session_type annotation", openReq.getDescriptorForType()); + Preconditions.checkState( + sessionType != SessionType.SESSION_TYPE_UNSET, + "%s missing rpc_session_type annotation", + openReq.getDescriptorForType()); + return sessionType; + } + + static Duration toJavaDuration(com.google.protobuf.Duration duration) { + return Duration.ofMillis(Durations.toMillis(duration)); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SimplePicker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SimplePicker.java new file mode 100644 index 0000000000..5a0acfb83b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/SimplePicker.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.AfeHandle; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import java.util.List; +import java.util.Optional; +import java.util.Random; + +class SimplePicker extends Picker { + private final SessionList sessionList; + private final LoadBalancingOptions.Random options; + private final Random random = new Random(); + + public SimplePicker(SessionList sessionList, LoadBalancingOptions.Random options) { + this.sessionList = sessionList; + this.options = options; + } + + @Override + Optional pickSession() { + List readyAfes = sessionList.getAfesWithReadySessions(); + if (readyAfes.isEmpty()) { + return Optional.empty(); + } + + AfeHandle afeHandle = readyAfes.get(random.nextInt(readyAfes.size())); + return sessionList.checkoutSession(afeHandle); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptor.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptor.java new file mode 100644 index 0000000000..bffb3259d3 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptor.java @@ -0,0 +1,330 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.AuthorizedViewRequest; +import com.google.bigtable.v2.AuthorizedViewResponse; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.MaterializedViewRequest; +import com.google.bigtable.v2.MaterializedViewResponse; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenMaterializedViewRequest; +import com.google.bigtable.v2.OpenTableRequest; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.RowSet; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.bigtable.v2.SessionType; +import com.google.bigtable.v2.TableRequest; +import com.google.bigtable.v2.TableResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.Message; +import io.grpc.MethodDescriptor; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Function; + +/** + * Static descriptor for virtual RPCs. + * + *

    Contains a const for each supported vRPC. The descriptors help ensure vRPC are statically + * typed and provide encoding/decoding. + * + *

    The structure of the descriptor is to have a constant for each vRPC and the constant is + * defined using a pair of encoder/decoder factories for that vRPC family. + */ +public final class VRpcDescriptor { + public static final SessionDescriptor TABLE_SESSION = + new SessionDescriptor<>( + BigtableGrpc.getOpenTableMethod(), + r -> + String.format( + "%s(%s, %s, %s)", + SessionType.SESSION_TYPE_TABLE, + r.getTableName(), + r.getAppProfileId(), + r.getPermission()), + r -> + ImmutableMap.of( + "open_session.payload.table_name", r.getTableName(), + "open_session.payload.app_profile_id", r.getAppProfileId(), + "open_session.payload.permission", r.getPermission().name())); + + public static final SessionDescriptor AUTHORIZED_VIEW_SESSION = + new SessionDescriptor<>( + BigtableGrpc.getOpenAuthorizedViewMethod(), + r -> + String.format( + "%s(%s, %s, %s)", + SessionType.SESSION_TYPE_AUTHORIZED_VIEW, + r.getAuthorizedViewName(), + r.getAppProfileId(), + r.getPermission()), + r -> + ImmutableMap.of( + "open_session.payload.authorized_view_name", + r.getAuthorizedViewName(), + "open_session.payload.app_profile_id", + r.getAppProfileId(), + "open_session.payload.permission", + r.getPermission().name())); + + public static final SessionDescriptor MATERIALIZED_VIEW_SESSION = + new SessionDescriptor<>( + BigtableGrpc.getOpenMaterializedViewMethod(), + r -> + String.format( + "%s(%s, %s, %s)", + SessionType.SESSION_TYPE_MATERIALIZED_VIEW, + r.getMaterializedViewName(), + r.getAppProfileId(), + r.getPermission()), + r -> + ImmutableMap.of( + "open_session.payload.materialized_view_name", + r.getMaterializedViewName(), + "open_session.payload.app_profile_id", + r.getAppProfileId(), + "open_session.payload.permission", + r.getPermission().name())); + + // region vRPC definitions + public static final VRpcDescriptor< + OpenTableRequest, SessionReadRowRequest, SessionReadRowResponse> + READ_ROW = + new VRpcDescriptor<>( + TABLE_SESSION, + MethodInfo.of("Bigtable.ReadRow", false), + createTableEncoder(TableRequest.Builder::setReadRow), + createTableDecoder(TableResponse::getReadRow), + (name, appProfileId, req) -> + ReadRowsRequest.newBuilder() + .setTableName(name) + .setAppProfileId(appProfileId) + .setRows(RowSet.newBuilder().addRowKeys(req.getKey()).build()) + .setFilter(req.getFilter()) + .setRowsLimit(1) + .build()); + + public static final VRpcDescriptor< + OpenTableRequest, SessionMutateRowRequest, SessionMutateRowResponse> + MUTATE_ROW = + new VRpcDescriptor<>( + TABLE_SESSION, + MethodInfo.of("Bigtable.MutateRow", false), + createTableEncoder(TableRequest.Builder::setMutateRow), + createTableDecoder(TableResponse::getMutateRow), + (name, appProfileId, req) -> + MutateRowRequest.newBuilder() + .setTableName(name) + .setAppProfileId(appProfileId) + .setRowKey(req.getKey()) + .addAllMutations(req.getMutationsList()) + .build()); + + public static final VRpcDescriptor< + OpenAuthorizedViewRequest, SessionReadRowRequest, SessionReadRowResponse> + READ_ROW_AUTH_VIEW = + new VRpcDescriptor<>( + AUTHORIZED_VIEW_SESSION, + MethodInfo.of("Bigtable.ReadRow", false), + createAuthViewEncoder(AuthorizedViewRequest.Builder::setReadRow), + createAuthViewDecoder(AuthorizedViewResponse::getReadRow), + (name, appProfileId, req) -> + ReadRowsRequest.newBuilder() + .setAuthorizedViewName(name) + .setAppProfileId(appProfileId) + .setRows(RowSet.newBuilder().addRowKeys(req.getKey()).build()) + .setFilter(req.getFilter()) + .setRowsLimit(1) + .build()); + + public static final VRpcDescriptor< + OpenAuthorizedViewRequest, SessionMutateRowRequest, SessionMutateRowResponse> + MUTATE_ROW_AUTH_VIEW = + new VRpcDescriptor<>( + AUTHORIZED_VIEW_SESSION, + MethodInfo.of("Bigtable.MutateRow", false), + createAuthViewEncoder(AuthorizedViewRequest.Builder::setMutateRow), + createAuthViewDecoder(AuthorizedViewResponse::getMutateRow), + (name, appProfileId, req) -> + MutateRowRequest.newBuilder() + .setAuthorizedViewName(name) + .setAppProfileId(appProfileId) + .setRowKey(req.getKey()) + .addAllMutations(req.getMutationsList()) + .build()); + + public static final VRpcDescriptor< + OpenMaterializedViewRequest, SessionReadRowRequest, SessionReadRowResponse> + READ_ROW_MAT_VIEW = + new VRpcDescriptor<>( + MATERIALIZED_VIEW_SESSION, + MethodInfo.of("Bigtable.ReadRow", false), + createMatViewEncoder(MaterializedViewRequest.Builder::setReadRow), + createMatViewDecoder(MaterializedViewResponse::getReadRow), + (name, appProfileId, req) -> + ReadRowsRequest.newBuilder() + .setMaterializedViewName(name) + .setAppProfileId(appProfileId) + .setRows(RowSet.newBuilder().addRowKeys(req.getKey()).build()) + .setFilter(req.getFilter()) + .setRowsLimit(1) + .build()); + + // endregion + + // region vRPC family encoder/decoder factories + private static Encoder createTableEncoder( + BiConsumer subEncoder) { + return req -> { + TableRequest.Builder builder = TableRequest.newBuilder(); + subEncoder.accept(builder, req); + return builder.build().toByteString(); + }; + } + + private static Decoder createTableDecoder( + Function subDecoder) { + return (bytes) -> subDecoder.apply(TableResponse.parseFrom(bytes)); + } + + private static Encoder createAuthViewEncoder( + BiConsumer subEncoder) { + return req -> { + AuthorizedViewRequest.Builder builder = AuthorizedViewRequest.newBuilder(); + subEncoder.accept(builder, req); + return builder.build().toByteString(); + }; + } + + private static Decoder createAuthViewDecoder( + Function subDecoder) { + return (bytes) -> subDecoder.apply(AuthorizedViewResponse.parseFrom(bytes)); + } + + private static Encoder createMatViewEncoder( + BiConsumer subEncoder) { + return req -> { + MaterializedViewRequest.Builder builder = MaterializedViewRequest.newBuilder(); + subEncoder.accept(builder, req); + return builder.build().toByteString(); + }; + } + + private static Decoder createMatViewDecoder( + Function subDecoder) { + return (bytes) -> subDecoder.apply(MaterializedViewResponse.parseFrom(bytes)); + } + + // endregion + + private final SessionDescriptor session; + private final MethodInfo methodInfo; + private final Encoder encoder; + private final Decoder decoder; + private final LegacyConverter legacyConverter; + + VRpcDescriptor( + SessionDescriptor session, + MethodInfo methodInfo, + Encoder encoder, + Decoder decoder, + LegacyConverter legacyConverter) { + this.session = session; + this.methodInfo = methodInfo; + this.encoder = encoder; + this.decoder = decoder; + this.legacyConverter = legacyConverter; + } + + public SessionDescriptor getSessionDescriptor() { + return session; + } + + public MethodInfo getMethodInfo() { + return methodInfo; + } + + public RespT decode(ByteString bytes) throws InvalidProtocolBufferException { + return decoder.decode(bytes); + } + + public ByteString encode(ReqT req) { + return encoder.encode(req); + } + + public Message toLegacyProto(String name, String appProfileId, ReqT sessionRequest) { + return legacyConverter.convert(name, appProfileId, sessionRequest); + } + + interface Decoder { + RespT decode(ByteString bytes) throws InvalidProtocolBufferException; + } + + interface Encoder { + ByteString encode(ReqT req); + } + + @FunctionalInterface + interface LegacyConverter { + Message convert(String name, String appProfileId, ReqT sessionRequest); + } + + public static final class SessionDescriptor { + private final SessionType type; + private final MethodDescriptor methodDescriptor; + private final Function> headerPopulator; + private final Function logNameExtractor; + + public SessionDescriptor( + MethodDescriptor methodDescriptor, + Function logNameExtractor, + Function> headerPopulator) { + this.type = SessionUtil.extractSessionTypeFromMethod(methodDescriptor); + this.methodDescriptor = methodDescriptor; + this.logNameExtractor = logNameExtractor; + this.headerPopulator = headerPopulator; + } + + public SessionType getType() { + return type; + } + + public MethodDescriptor getMethodDescriptor() { + return methodDescriptor; + } + + public Map extractHeaderParams(OpenReqT req) { + Preconditions.checkArgument(SessionUtil.extractOpenSessionTypeFromOpenMsg(req) == type); + return headerPopulator.apply(req); + } + + public String getLogName(OpenReqT req) { + return logNameExtractor.apply(req); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcImpl.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcImpl.java new file mode 100644 index 0000000000..b2d16c7a09 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcImpl.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.VirtualRpcRequest; +import com.google.bigtable.v2.VirtualRpcRequest.Metadata; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.protobuf.Message; +import com.google.protobuf.MessageLite; +import com.google.protobuf.util.Durations; +import io.grpc.Status; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * This class is the intermediary between a user and a {@link SessionImpl}. + * + *

      + *
    • {@link #start(MessageLite, VRpcCallContext, VRpcListener)} must be the first method called + * by the user + *
    • {@link #cancel(String, Throwable)} and {@link #requestNext()} can be called by any thread + *
    • {@link #requestNext()} can only be called after {@link + * com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcListener#onMessage} is + * invoked with a {@link VirtualRpcResponse} indicating that there is more data. + *
    • All {@code handle*} methods are expected to be called sequentially by {@link SessionImpl} + *
    + * + *

    The expectation is that all happens-before state transitions are conducted via the {@link + * SessionImpl}/gRPC's executor and no synchronization has to occur here. + */ +class VRpcImpl + implements VRpc { + private static final Logger DEFAULT_LOGGER = Logger.getLogger(VRpcImpl.class.getName()); + private Logger logger = DEFAULT_LOGGER; + + // Narrow view of SessionImpl + interface VRpcSessionApi { + Status startRpc(VRpcImpl rpc, VirtualRpcRequest payload); + + void cancelRpc(long rpcId, @Nullable String message, @Nullable Throwable cause); + } + + private enum State { + NEW, + STARTED, + CLOSED + } + + private final VRpcSessionApi session; + private final VRpcDescriptor desc; + final long rpcId; + private VRpcListener listener; + private PeerInfo peerInfo; + + private AtomicReference state; + + public VRpcImpl( + VRpcSessionApi session, + VRpcDescriptor desc, + long rpcId, + PeerInfo peerInfo) { + this.session = session; + this.desc = desc; + this.rpcId = rpcId; + this.state = new AtomicReference<>(State.NEW); + this.peerInfo = peerInfo; + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + this.listener = listener; + + Status status; + boolean retryable = true; + + if (state.get() != State.NEW) { + status = Status.INTERNAL.withDescription("VRpc already started in state: " + state.get()); + retryable = false; + } else if (ctx.getOperationInfo().getDeadline().timeRemaining(TimeUnit.MICROSECONDS) + < TimeUnit.MILLISECONDS.toMicros(1)) { + // Don't send RPCs that don't have any hope of succeeding + status = + Status.DEADLINE_EXCEEDED.withDescription("Remaining deadline is too short to send RPC"); + retryable = false; + } else { + state.set(State.STARTED); + Metadata vRpcMetadata = + Metadata.newBuilder() + .setAttemptNumber(ctx.getOperationInfo().getAttemptNumber()) + .setTraceparent(ctx.getTraceParent()) + .build(); + ctx.getTracer().onRequestSent(peerInfo); + status = + session.startRpc( + this, + VirtualRpcRequest.newBuilder() + .setRpcId(rpcId) + .setMetadata(vRpcMetadata) + .setDeadline( + Durations.fromNanos( + ctx.getOperationInfo().getDeadline().timeRemaining(TimeUnit.NANOSECONDS))) + .setPayload(desc.encode(req)) + .build()); + // if status is not OK, the session might not be ready and the vRPC can be retried on a + // different session + } + + if (!status.isOk()) { + if (!state.compareAndSet(State.STARTED, State.CLOSED)) { + return; + } + // TODO: loop through the session executor + if (retryable) { + listener.onClose(VRpcResult.createUncommitedError(status)); + } else { + listener.onClose(VRpcResult.createRejectedError(status)); + } + } + } + + void handleSessionClose(VRpcResult result) { + if (!state.compareAndSet(State.STARTED, State.CLOSED)) { + logger.warning("tried to close a vRPC after it was already closed state: " + state.get()); + return; + } + + listener.onClose(result); + } + + void handleResponse(VirtualRpcResponse response) { + if (!state.compareAndSet(State.STARTED, State.CLOSED)) { + // This can happen if the call was cancelled just before the response arrived. + // Silently ignore it. + return; + } + // TODO: handle streaming + + RespT resp; + try { + resp = desc.decode(response.getPayload()); + } catch (Throwable e) { + // TODO: notify Session to cancel the vRPC + // Right now, vrpc streaming & cancellation is not supported, so notifying SessionImpl is + // unnecessary. In the future handleResponse will need to notify that Session that the user + // was already notified of the error and no further notifications should be delivered + VRpcResult result = + VRpcResult.createLocalTransportError( + Status.INTERNAL.withDescription("Failed to decode VRpc payload").withCause(e)); + listener.onClose(result); + return; + } + + try { + listener.onMessage(resp); + } catch (Throwable e) { + VRpcResult result = VRpcResult.createUserError(e); + listener.onClose(result); + return; + } + + listener.onClose(VRpcResult.createServerOk(response)); + } + + void handleError(VRpcResult result) { + if (state.getAndSet(State.CLOSED) == State.CLOSED) { + return; + } + + listener.onClose(result); + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + session.cancelRpc(rpcId, message, cause); + } + + @Override + public void requestNext() { + throw new UnsupportedOperationException("streamed RPCs are not supported yet"); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManager.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManager.java new file mode 100644 index 0000000000..c367d5c644 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManager.java @@ -0,0 +1,542 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.util; + +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.ClientConfiguration; +import com.google.bigtable.v2.ClientConfiguration.PollingCase; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.GetClientConfigurationRequest; +import com.google.bigtable.v2.TelemetryConfiguration; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.TextFormat; +import com.google.protobuf.util.Durations; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ClientCall.Listener; +import io.grpc.Deadline; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.Status.Code; +import io.grpc.StatusRuntimeException; +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +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; + +/** + * ClientConfiguration controls how the data client should behave. For example, it controls how much + * of the traffic should go through jetstream vs unary. It also controls how frequent the client + * should poll for a new configuration and how long the configuration is valid for. + */ +public class ClientConfigurationManager implements AutoCloseable { + private static final Logger logger = Logger.getLogger(ClientConfigurationManager.class.getName()); + + public static final String OVERRIDE_SYS_PROP_KEY = "bigtable.internal.client-config-override"; + + public interface ConfigListener { + void onChange(T newValue); + } + + public interface ListenerHandle extends Closeable { + @Override + void close(); + } + + private class ListenerEntry implements ListenerHandle { + private final Function extractor; + private final ConfigListener listener; + + private ListenerEntry(Function extractor, ConfigListener listener) { + this.extractor = extractor; + this.listener = listener; + } + + private void maybeNotify(ClientConfiguration oldConfig, ClientConfiguration newConfig) { + T oldValue = extractor.apply(oldConfig); + T newValue = extractor.apply(newConfig); + if (Objects.equals(oldValue, newValue)) { + return; + } + listener.onChange(newValue); + } + + @Override + public void close() { + synchronized (ClientConfigurationManager.this) { + if (notifying) { + pendingListenerRemovals.add(this); + } else { + listeners.remove(this); + } + } + } + } + + private final Metadata metadata; + private final GetClientConfigurationRequest request; + private final ChannelProvider channelProvider; + + @GuardedBy("this") + private ManagedChannel channel; + + private final DebugTagTracer debugTagTracer; + private final ScheduledExecutorService executor; + + private final ClientConfiguration defaultConfig; + private final Optional overrideConfig; + + private final Duration defaultDeadline = Duration.ofSeconds(5); + + @GuardedBy("this") + @Nonnull + private ClientConfiguration clientConfiguration; + + @GuardedBy("this") + @Nonnull + private Instant validUntil = Instant.MAX; + + @GuardedBy("this") + private final List> listeners = new ArrayList<>(); + + @GuardedBy("this") + private boolean notifying = false; + + @GuardedBy("this") + private final Set> pendingListenerRemovals = new HashSet<>(); + + @GuardedBy("this") + @Nullable + private ScheduledFuture nextPoll = null; + + @GuardedBy("this") + private boolean closing = false; + + public ClientConfigurationManager( + FeatureFlags featureFlags, + ClientInfo clientInfo, + ChannelProvider channelProvider, + DebugTagTracer tracer, + ScheduledExecutorService executor) + throws IOException { + this(System.getProperties(), featureFlags, clientInfo, channelProvider, tracer, executor); + } + + ClientConfigurationManager( + Properties sysProps, + FeatureFlags featureFlags, + ClientInfo clientInfo, + ChannelProvider channelProvider, + DebugTagTracer tracer, + ScheduledExecutorService executor) + throws IOException { + this.defaultConfig = loadDefault(); + this.overrideConfig = + Optional.ofNullable(sysProps.getProperty(OVERRIDE_SYS_PROP_KEY)) + .map( + str -> { + try { + return TextFormat.parse(str, ClientConfiguration.class); + } catch (Exception e) { + throw new RuntimeException( + "Failed to parse bigtable.internal.client-config-override", e); + } + }); + + if (overrideConfig.isPresent()) { + logger.log( + Level.INFO, + () -> + "Local client config override: " + + TextFormat.printer() + .emittingSingleLine(true) + .printToString(overrideConfig.get())); + } + featureFlags = channelProvider.updateFeatureFlags(featureFlags); + this.clientConfiguration = defaultConfig; + + this.metadata = + Util.composeMetadata( + featureFlags, + ImmutableMap.of( + "instance_name", clientInfo.getInstanceName().toString(), + "app_profile_id", clientInfo.getAppProfileId())); + this.request = + GetClientConfigurationRequest.newBuilder() + .setInstanceName(clientInfo.getInstanceName().toString()) + .setAppProfileId(clientInfo.getAppProfileId()) + .build(); + + this.channelProvider = channelProvider; + this.channel = channelProvider.newChannelBuilder().build(); + this.debugTagTracer = tracer; + this.executor = executor; + } + + public static ClientConfiguration loadDefault() throws IOException { + try (InputStream is = + ClientConfiguration.class.getResourceAsStream( + "/bigtable-default-client-config.textproto")) { + Preconditions.checkNotNull(is, "Failed to load default config"); + + try (Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) { + ClientConfiguration.Builder builder = ClientConfiguration.newBuilder(); + TextFormat.getParser().merge(reader, builder); + return builder.build(); + } + } + } + + /** + * Start polling client configuration. The first poll should be blocking and client should fall + * back to unary if it fails. + */ + public CompletableFuture start() { + CompletableFuture f = startPolling(); + @SuppressWarnings("UnusedVariable") + CompletableFuture ignored = + f.whenComplete( + (cfg, error) -> { + if (error != null) { + debugTagTracer.record( + TelemetryConfiguration.Level.ERROR, "client_config_fetch_failed"); + logger.log(Level.WARNING, "Failed to fetch initial config", error); + } else { + logger.log(Level.CONFIG, "Got initial config: {0}", cfg); + } + }); + return f; + } + + @Override + public synchronized void close() { + closing = true; + if (nextPoll != null) { + nextPoll.cancel(true); + } + channel.shutdown(); + } + + /** Gets the client configuration. */ + @Nonnull + public synchronized ClientConfiguration getClientConfiguration() { + return this.clientConfiguration; + } + + ClientConfiguration getDefaultConfig() { + return defaultConfig; + } + + public synchronized ListenerHandle addListener( + Function extractor, ConfigListener listener) { + ListenerEntry entry = new ListenerEntry<>(extractor, listener); + listeners.add(entry); + return entry; + } + + private CompletableFuture startPolling() { + CompletableFuture result = new CompletableFuture<>(); + sendRequestWithRetries(0, result); + return result; + } + + private synchronized void sendRequestWithRetries( + int attemptCount, CompletableFuture finalResult) { + if (closing) { + finalResult.completeExceptionally(new RuntimeException("Client is closing")); + return; + } + + CompletableFuture currentRequest = sendRequest(); + // We only schedule the next poll after successfully getting a client config + // from the server. + @SuppressWarnings("UnusedVariable") + CompletableFuture ignored = + currentRequest.whenComplete( + (result, throwable) -> { + // Config updated + if (throwable == null) { + setClientConfiguration(result); + scheduleNextPoll(); + finalResult.complete(result); + return; + } + + // Handle failure and retry if necessary + if (handleFailedFetch(throwable, attemptCount)) { + debugTagTracer.record( + TelemetryConfiguration.Level.ERROR, "client_config_fetch_failed"); + replaceChannel(); + long delay = getRetryDelay(attemptCount); + @SuppressWarnings("UnusedVariable") + ScheduledFuture ignored2 = + executor.schedule( + () -> sendRequestWithRetries(attemptCount + 1, finalResult), + delay, + TimeUnit.MILLISECONDS); + } else { + scheduleNextPoll(); + finalResult.completeExceptionally(throwable); + } + }); + } + + @GuardedBy("this") + private CompletableFuture sendRequest() { + CompletableFuture future = new CompletableFuture<>(); + + ClientCall call = + channel.newCall( + BigtableGrpc.getGetClientConfigurationMethod(), + CallOptions.DEFAULT.withDeadline( + Deadline.after(defaultDeadline.toMillis(), TimeUnit.MILLISECONDS))); + call.start( + new Listener() { + @Override + public void onMessage(ClientConfiguration cfg) { + cfg = normalizeConfig(cfg); + future.complete(cfg); + } + + @Override + public void onClose(Status status, Metadata trailers) { + if (!status.isOk()) { + future.completeExceptionally(status.asRuntimeException()); + } + } + }, + metadata); + call.sendMessage(request); + call.halfClose(); + call.request(1); + + return future; + } + + @SuppressWarnings("deprecation") + private ClientConfiguration normalizeConfig(ClientConfiguration cfg) { + ClientConfiguration.Builder builder = cfg.toBuilder(); + + // TODO: remove this once server is updated + // Patch PollingConfiguration (migrating PollingInterval) + if (!cfg.hasPollingConfiguration()) { + builder.setPollingConfiguration( + defaultConfig.getPollingConfiguration().toBuilder() + .setPollingInterval(cfg.getPollingInterval())); + } + + // TODO: remove this once server is updated + // Patch SessionPoolConfiguration (migrating LoadBalancingOptions) + if (!cfg.getSessionConfiguration().hasSessionPoolConfiguration()) { + builder + .getSessionConfigurationBuilder() + .clearLoadBalancingOptions() + .setSessionPoolConfiguration( + defaultConfig.getSessionConfiguration().getSessionPoolConfiguration().toBuilder() + .setLoadBalancingOptions(cfg.getSessionConfiguration().getLoadBalancingOptions()) + .build()); + } else { + // ignore LoadBalancing options when we migrated to SessionPoolConfig + builder.getSessionConfigurationBuilder().clearLoadBalancingOptions(); + } + // TODO: remove this once server is updated + // Patch ChannelPoolConfiguration + if (!cfg.getSessionConfiguration().hasChannelConfiguration()) { + builder + .getSessionConfigurationBuilder() + .setChannelConfiguration( + defaultConfig.getSessionConfiguration().getChannelConfiguration()); + } + + // Patch debug tag level + switch (cfg.getTelemetryConfiguration().getDebugTagLevel()) { + case UNRECOGNIZED: + case LEVEL_UNSPECIFIED: + builder + .getTelemetryConfigurationBuilder() + .setDebugTagLevel(defaultConfig.getTelemetryConfiguration().getDebugTagLevel()); + } + + // Inject overrides + overrideConfig.ifPresent(builder::mergeFrom); + + // When sessions are disabled make sure to clear out the config + if (cfg.getSessionConfiguration().getSessionLoad() == 0) { + builder.clearSessionConfiguration(); + return builder.build(); + } + + return builder.build(); + } + + public boolean areSessionsRequired() { + return overrideConfig.map(c -> c.getSessionConfiguration().getSessionLoad() > 0).orElse(false); + } + + private long getRetryDelay(int attempt) { + // the attempt is the total number of attempts starting from 0. The first request + // is sent immediately, and the second request is sent after 2 ^ 0 ms (with jitter) etc. + // Initial delay is 1 ms. + return ThreadLocalRandom.current().nextLong((long) Math.pow(2, attempt)); + } + + private synchronized void scheduleNextPoll() { + if (closing) { + return; + } + + if (!clientConfiguration.hasPollingConfiguration()) { + return; + } + long delayMs = + Durations.toMillis(clientConfiguration.getPollingConfiguration().getPollingInterval()); + + this.nextPoll = + executor.schedule( + () -> { + @SuppressWarnings("UnusedVariable") + CompletableFuture ignored = startPolling(); + }, + delayMs, + TimeUnit.MILLISECONDS); + } + + private synchronized void setClientConfiguration(ClientConfiguration result) { + ClientConfiguration old = this.clientConfiguration; + + clientConfiguration = result; + if (clientConfiguration.hasPollingConfiguration()) { + this.validUntil = + Instant.now() + .plus( + toJavaDuration( + clientConfiguration.getPollingConfiguration().getValidityDuration())); + } else if (clientConfiguration.getStopPolling()) { + this.validUntil = Instant.MAX; + } + + maybeLogConfigChange(old, result); + notifyListeners(old, clientConfiguration); + } + + private void maybeLogConfigChange(ClientConfiguration oldCfg, ClientConfiguration newCfg) { + if (shouldLogConfigChange(oldCfg, newCfg)) { + logger.log(Level.CONFIG, "ClientConfig changed to: {0}", newCfg); + } + } + + private boolean shouldLogConfigChange(ClientConfiguration oldCfg, ClientConfiguration newCfg) { + if (oldCfg.getPollingCase() != newCfg.getPollingCase()) { + return true; + } + // round down interval to minimize noise from jitter + if (oldCfg.getPollingCase() == PollingCase.POLLING_CONFIGURATION) { + long oldInterval = Durations.toMinutes(oldCfg.getPollingConfiguration().getPollingInterval()); + long newInterval = Durations.toMinutes(newCfg.getPollingConfiguration().getPollingInterval()); + if (oldInterval == newInterval) { + ClientConfiguration.Builder roundedOldCfgBuilder = oldCfg.toBuilder(); + roundedOldCfgBuilder + .getPollingConfigurationBuilder() + .setPollingInterval(newCfg.getPollingConfiguration().getPollingInterval()); + oldCfg = roundedOldCfgBuilder.build(); + } + } + return oldCfg.equals(newCfg); + } + + @GuardedBy("this") + private void notifyListeners(ClientConfiguration oldConfig, ClientConfiguration newConfig) { + notifying = true; + // Snapshot the listeners so that new listeners added this cycle dont get notified + List> snapshot = new ArrayList<>(listeners); + + for (ListenerEntry e : snapshot) { + if (pendingListenerRemovals.contains(e)) { + continue; + } + e.maybeNotify(oldConfig, newConfig); + } + + listeners.removeAll(pendingListenerRemovals); + pendingListenerRemovals.clear(); + notifying = false; + } + + private synchronized boolean handleFailedFetch(Throwable throwable, int attempt) { + if (validUntil.isBefore(Instant.now())) { + setClientConfiguration(defaultConfig); + } + + // Figure out if we should retry + if (!(throwable instanceof StatusRuntimeException)) { + return false; + } + Code statusCode = Status.fromThrowable(throwable).getCode(); + // do not retry non-retryable errors + switch (statusCode) { + case PERMISSION_DENIED: + case UNAUTHENTICATED: + logger.warning("instance.ping permission is required"); + return false; + case NOT_FOUND: + case INVALID_ARGUMENT: + return false; + default: + if (closing) { + return false; + } + return attempt < getClientConfiguration().getPollingConfiguration().getMaxRpcRetryCount(); + } + } + + private synchronized void replaceChannel() { + channel.shutdownNow(); + channel = channelProvider.newChannelBuilder().build(); + } + + private static Duration toJavaDuration(com.google.protobuf.Duration protobufDuration) { + return Duration.ofMillis(Durations.toMillis(protobufDuration)); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewId.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewId.java index 5f64190b5c..a090b2117d 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewId.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewId.java @@ -36,9 +36,15 @@ public static AuthorizedViewId of(String tableId, String authorizedViewId) { return new AutoValue_AuthorizedViewId(tableId, authorizedViewId); } - abstract String getTableId(); + public static AuthorizedViewId of(TableId tableId, String authorizedViewId) { + Preconditions.checkNotNull(tableId, "table id can't be null."); + Preconditions.checkNotNull(authorizedViewId, "authorized view id can't be null."); + return new AutoValue_AuthorizedViewId(tableId.getTableId(), authorizedViewId); + } + + public abstract String getTableId(); - abstract String getAuthorizedViewId(); + public abstract String getAuthorizedViewId(); @Override @InternalApi @@ -52,4 +58,10 @@ public String toResourceName(String projectId, String instanceId) { public boolean scopedForAuthorizedView() { return true; } + + @Override + @InternalApi + public boolean scopedForMaterializedView() { + return false; + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java index f6a09d0b6d..fb7b04269f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/BulkMutation.java @@ -43,7 +43,9 @@ public final class BulkMutation implements Serializable, Cloneable { private long mutationCountSum = 0; - /** @deprecated Please use {@link BulkMutation#create(TargetId)} instead. */ + /** + * @deprecated Please use {@link BulkMutation#create(TargetId)} instead. + */ @Deprecated public static BulkMutation create(String tableId) { return new BulkMutation(TableId.of(tableId)); @@ -99,9 +101,9 @@ public BulkMutation add(@Nonnull ByteString rowKey, @Nonnull Mutation mutation) long mutationCount = mutation.getMutations().size(); Preconditions.checkArgument( mutationCountSum + mutationCount <= MAX_MUTATION, - String.format( - "Too many mutations, got %s, limit is %s", - mutationCountSum + mutationCount, MAX_MUTATION)); + "Too many mutations, got %s, limit is %s", + mutationCountSum + mutationCount, + MAX_MUTATION); this.mutationCountSum += mutationCount; builder.addEntries( diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index 23fb47bd82..7ca9deeaee 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -15,7 +15,10 @@ */ package com.google.cloud.bigtable.data.v2.models; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenInstant; + import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; @@ -23,7 +26,6 @@ import com.google.protobuf.ByteString; import java.io.Serializable; import javax.annotation.Nonnull; -import org.threeten.bp.Instant; /** * A ChangeStreamMutation represents a list of mods(represented by List<{@link Entry}>) targeted at @@ -73,13 +75,13 @@ public enum MutationType { static Builder createUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - Instant commitTimestamp, + java.time.Instant commitTimestamp, int tieBreaker) { return builder() .setRowKey(rowKey) .setType(MutationType.USER) .setSourceClusterId(sourceClusterId) - .setCommitTimestamp(commitTimestamp) + .setCommitTime(commitTimestamp) .setTieBreaker(tieBreaker); } @@ -89,12 +91,12 @@ static Builder createUserMutation( * mutation. */ static Builder createGcMutation( - @Nonnull ByteString rowKey, Instant commitTimestamp, int tieBreaker) { + @Nonnull ByteString rowKey, java.time.Instant commitTimestamp, int tieBreaker) { return builder() .setRowKey(rowKey) .setType(MutationType.GARBAGE_COLLECTION) .setSourceClusterId("") - .setCommitTimestamp(commitTimestamp) + .setCommitTime(commitTimestamp) .setTieBreaker(tieBreaker); } @@ -110,8 +112,14 @@ static Builder createGcMutation( @Nonnull public abstract String getSourceClusterId(); + /** This method is obsolete. Use {@link #getCommitTime()} instead. */ + @ObsoleteApi("Use getCommitTime() instead") + public org.threeten.bp.Instant getCommitTimestamp() { + return toThreetenInstant(getCommitTime()); + } + /** Get the commit timestamp of the current mutation. */ - public abstract Instant getCommitTimestamp(); + public abstract java.time.Instant getCommitTime(); /** * Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple @@ -123,8 +131,14 @@ static Builder createGcMutation( @Nonnull public abstract String getToken(); + /** This method is obsolete. Use {@link #getEstimatedLowWatermarkTime()} instead. */ + @ObsoleteApi("Use getEstimatedLowWatermarkTime() instead") + public org.threeten.bp.Instant getEstimatedLowWatermark() { + return toThreetenInstant(getEstimatedLowWatermarkTime()); + } + /** Get the low watermark of the current mutation. */ - public abstract Instant getEstimatedLowWatermark(); + public abstract java.time.Instant getEstimatedLowWatermarkTime(); /** Get the list of mods of the current mutation. */ @Nonnull @@ -139,21 +153,21 @@ static Builder builder() { @InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue.Builder abstract static class Builder { - abstract Builder setRowKey(@Nonnull ByteString rowKey); + abstract Builder setRowKey(ByteString rowKey); - abstract Builder setType(@Nonnull MutationType type); + abstract Builder setType(MutationType type); - abstract Builder setSourceClusterId(@Nonnull String sourceClusterId); + abstract Builder setSourceClusterId(String sourceClusterId); - abstract Builder setCommitTimestamp(Instant commitTimestamp); + abstract Builder setCommitTime(java.time.Instant commitTimestamp); abstract Builder setTieBreaker(int tieBreaker); abstract ImmutableList.Builder entriesBuilder(); - abstract Builder setToken(@Nonnull String token); + abstract Builder setToken(String token); - abstract Builder setEstimatedLowWatermark(Instant estimatedLowWatermark); + abstract Builder setEstimatedLowWatermarkTime(java.time.Instant estimatedLowWatermark); Builder setCell( @Nonnull String familyName, @@ -191,7 +205,7 @@ Builder mergeToCell(@Nonnull String familyName, Value qualifier, Value timestamp } public RowMutation toRowMutation(@Nonnull String tableId) { - RowMutation rowMutation = RowMutation.create(tableId, getRowKey()); + RowMutation rowMutation = RowMutation.create(TableId.of(tableId), getRowKey()); for (Entry entry : getEntries()) { if (entry instanceof DeleteFamily) { rowMutation.deleteFamily(((DeleteFamily) entry).getFamilyName()); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java index 40a71b1d3c..9b892b14ea 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java @@ -19,8 +19,8 @@ import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.protobuf.ByteString; +import java.time.Instant; import javax.annotation.Nonnull; -import org.threeten.bp.Instant; /** * An extension point that allows end users to plug in a custom implementation of logical change diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java index 14841f9f4d..aa3d17096a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutation.java @@ -44,7 +44,9 @@ private ConditionalRowMutation(TargetId targetId, ByteString rowKey) { builder.setRowKey(rowKey); } - /** @deprecated Please use {@link ConditionalRowMutation#create(TargetId, String)} instead. */ + /** + * @deprecated Please use {@link ConditionalRowMutation#create(TargetId, String)} instead. + */ @Deprecated public static ConditionalRowMutation create(String tableId, String rowKey) { return create(tableId, ByteString.copyFromUtf8(rowKey)); @@ -60,7 +62,9 @@ public static ConditionalRowMutation create(TargetId targetId, String rowKey) { return create(targetId, ByteString.copyFromUtf8(rowKey)); } - /** @deprecated Please use {@link ConditionalRowMutation#create(TargetId, ByteString)} instead. */ + /** + * @deprecated Please use {@link ConditionalRowMutation#create(TargetId, ByteString)} instead. + */ @Deprecated public static ConditionalRowMutation create(String tableId, ByteString rowKey) { Validations.validateTableId(tableId); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java index d40ad7621c..ffed83e6f9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java @@ -20,9 +20,9 @@ import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; +import java.time.Instant; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.threeten.bp.Instant; /** * Default implementation of a {@link ChangeStreamRecordAdapter} that uses {@link @@ -94,7 +94,8 @@ public ChangeStreamRecord onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbe public ChangeStreamRecord onCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { Preconditions.checkState( this.changeStreamMutationBuilder == null, - "Can not create a CloseStream when there is an existing ChangeStreamMutation being built."); + "Can not create a CloseStream when there is an existing ChangeStreamMutation being" + + " built."); return CloseStream.fromProto(closeStream); } @@ -112,8 +113,7 @@ public void startUserMutation( /** {@inheritDoc} */ @Override - public void startGcMutation( - @Nonnull ByteString rowKey, Instant commitTimestamp, int tieBreaker) { + public void startGcMutation(ByteString rowKey, Instant commitTimestamp, int tieBreaker) { this.changeStreamMutationBuilder = ChangeStreamMutation.createGcMutation(rowKey, commitTimestamp, tieBreaker); } @@ -176,9 +176,9 @@ public void finishCell() { /** {@inheritDoc} */ @Override public ChangeStreamRecord finishChangeStreamMutation( - @Nonnull String token, Instant estimatedLowWatermark) { + String token, Instant estimatedLowWatermark) { this.changeStreamMutationBuilder.setToken(token); - this.changeStreamMutationBuilder.setEstimatedLowWatermark(estimatedLowWatermark); + this.changeStreamMutationBuilder.setEstimatedLowWatermarkTime(estimatedLowWatermark); return this.changeStreamMutationBuilder.build(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java index 2ff139081c..d722bcbe6e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java @@ -77,12 +77,11 @@ public Row createRowFromProto(com.google.bigtable.v2.Row row) { /** Internal implementation detail for {@link DefaultRowAdapter}. */ @InternalApi() - public class DefaultRowBuilder implements RowBuilder { + public static class DefaultRowBuilder implements RowBuilder { private ByteString currentKey; private TreeMap> cellsByFamily; private ImmutableList.Builder currentFamilyCells; private String previousFamily; - private int totalCellCount; private String family; private ByteString qualifier; @@ -134,7 +133,6 @@ public void finishCell() { RowCell rowCell = RowCell.create(family, qualifier, timestamp, labels, value); currentFamilyCells.add(rowCell); - totalCellCount++; } /** {@inheritDoc} */ @@ -143,7 +141,7 @@ public Row finishRow() { final ImmutableList sortedCells; // Optimization: If there are no cells, then just return the static empty list. - if (cellsByFamily.size() == 0) { + if (cellsByFamily.isEmpty()) { sortedCells = ImmutableList.of(); } else if (cellsByFamily.size() == 1) { // Optimization: If there is a single family, avoid copies and return that one list. @@ -170,7 +168,6 @@ public void reset() { cellsByFamily = new TreeMap<>(); currentFamilyCells = null; previousFamily = null; - totalCellCount = 0; family = null; qualifier = null; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index 8e3d865790..ae5507ae75 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -15,12 +15,14 @@ */ package com.google.cloud.bigtable.data.v2.models; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenInstant; + import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; import java.io.Serializable; import javax.annotation.Nonnull; -import org.threeten.bp.Instant; /** A simple wrapper for {@link ReadChangeStreamResponse.Heartbeat}. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") @@ -29,7 +31,8 @@ public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; private static Heartbeat create( - ChangeStreamContinuationToken changeStreamContinuationToken, Instant estimatedLowWatermark) { + ChangeStreamContinuationToken changeStreamContinuationToken, + java.time.Instant estimatedLowWatermark) { return new AutoValue_Heartbeat(changeStreamContinuationToken, estimatedLowWatermark); } @@ -37,7 +40,7 @@ private static Heartbeat create( static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { return create( ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken()), - Instant.ofEpochSecond( + java.time.Instant.ofEpochSecond( heartbeat.getEstimatedLowWatermark().getSeconds(), heartbeat.getEstimatedLowWatermark().getNanos())); } @@ -45,6 +48,12 @@ static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public abstract ChangeStreamContinuationToken getChangeStreamContinuationToken(); + /** This method is obsolete. Use {@link #getEstimatedLowWatermarkTime()} instead. */ + @ObsoleteApi("Use getEstimatedLowWatermarkTime() instead") + public org.threeten.bp.Instant getEstimatedLowWatermark() { + return toThreetenInstant(getEstimatedLowWatermarkTime()); + } + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") - public abstract Instant getEstimatedLowWatermark(); + public abstract java.time.Instant getEstimatedLowWatermarkTime(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewId.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewId.java new file mode 100644 index 0000000000..f6f08d441a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewId.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * 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.bigtable.data.v2.models; + +import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.common.base.Preconditions; + +/** + * An implementation of a {@link TargetId} for materialized views. + * + *

    See {@link com.google.cloud.bigtable.admin.v2.models.MaterializedView} for more details about + * an materialized view. + */ +@AutoValue +public abstract class MaterializedViewId implements TargetId { + /** Constructs a new MaterializedViewId object from the specified materializedViewId. */ + public static MaterializedViewId of(String materializedViewId) { + Preconditions.checkNotNull(materializedViewId, "materialized view id can't be null."); + return new AutoValue_MaterializedViewId(materializedViewId); + } + + public abstract String getMaterializedViewId(); + + @Override + @InternalApi + public String toResourceName(String projectId, String instanceId) { + return NameUtil.formatMaterializedViewName(projectId, instanceId, getMaterializedViewId()); + } + + @Override + @InternalApi + public boolean scopedForAuthorizedView() { + return false; + } + + @Override + @InternalApi + public boolean scopedForMaterializedView() { + return true; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java index 1b4cb8d680..ffac399e72 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java @@ -21,6 +21,7 @@ import com.google.bigtable.v2.RowFilter; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.RowSet; +import com.google.bigtable.v2.SessionReadRowRequest; import com.google.cloud.bigtable.data.v2.internal.ByteStringComparator; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; @@ -50,7 +51,9 @@ public final class Query implements Serializable { private final TargetId targetId; private transient ReadRowsRequest.Builder builder = ReadRowsRequest.newBuilder(); - /** @deprecated Please use {@link Query#create(TargetId)} instead. */ + /** + * @deprecated Please use {@link Query#create(TargetId)} instead. + */ @Deprecated public static Query create(String tableId) { return new Query(TableId.of(tableId)); @@ -62,6 +65,7 @@ public static Query create(String tableId) { * com.google.cloud.bigtable.data.v2.BigtableDataSettings}. * * @see AuthorizedViewId + * @see MaterializedViewId * @see TableId */ public static Query create(TargetId targetId) { @@ -309,6 +313,19 @@ public ByteStringRange getBound() { return RowSetUtil.getBound(builder.getRows()); } + @InternalApi + public TargetId getTargetId() { + return targetId; + } + + @InternalApi + public SessionReadRowRequest toSessionPointProto() { + return SessionReadRowRequest.newBuilder() + .setKey(this.builder.getRows().getRowKeysList().get(0)) + .setFilter(this.builder.getFilter()) + .build(); + } + /** * Creates the request protobuf. This method is considered an internal implementation detail and * not meant to be used by applications. @@ -317,7 +334,9 @@ public ByteStringRange getBound() { public ReadRowsRequest toProto(RequestContext requestContext) { String resourceName = targetId.toResourceName(requestContext.getProjectId(), requestContext.getInstanceId()); - if (targetId.scopedForAuthorizedView()) { + if (targetId.scopedForMaterializedView()) { + builder.setMaterializedViewName(resourceName); + } else if (targetId.scopedForAuthorizedView()) { builder.setAuthorizedViewName(resourceName); } else { builder.setTableName(resourceName); @@ -335,13 +354,16 @@ public static Query fromProto(@Nonnull ReadRowsRequest request) { Preconditions.checkArgument(request != null, "ReadRowsRequest must not be null"); String tableName = request.getTableName(); String authorizedViewName = request.getAuthorizedViewName(); + String materializedViewName = request.getMaterializedViewName(); - Query query = new Query(NameUtil.extractTargetId(tableName, authorizedViewName)); + Query query = + new Query(NameUtil.extractTargetId(tableName, authorizedViewName, materializedViewName)); query.builder = request.toBuilder(); return query; } + @Override public Query clone() { Query query = Query.create(targetId); query.builder = this.builder.clone(); @@ -359,7 +381,6 @@ private static ByteString wrapKey(String key) { * A Query Paginator that will split a query into small chunks. See {@link * Query#createPaginator(int)} for example usage. */ - @BetaApi("This surface is stable yet it might be removed in the future.") public static class QueryPaginator { private final boolean hasOverallLimit; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java index a6dfb7666d..2c9cf54354 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java @@ -15,7 +15,11 @@ */ package com.google.cloud.bigtable.data.v2.models; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration; +import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeInstant; + import com.google.api.core.InternalApi; +import com.google.api.core.ObsoleteApi; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationTokens; @@ -36,7 +40,6 @@ import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.threeten.bp.Instant; /** A simple wrapper to construct a query for the ReadChangeStream RPC. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") @@ -143,8 +146,14 @@ public ReadChangeStreamQuery streamPartition(ByteStringRange range) { return streamPartition(rangeBuilder.build()); } + /** This method is obsolete. Use {@link #startTime(java.time.Instant)} instead. */ + @ObsoleteApi("Use startTime(java.time.Instant) instead") + public ReadChangeStreamQuery startTime(org.threeten.bp.Instant value) { + return startTime(toJavaTimeInstant(value)); + } + /** Sets the startTime to read the change stream. */ - public ReadChangeStreamQuery startTime(Instant value) { + public ReadChangeStreamQuery startTime(java.time.Instant value) { Preconditions.checkState( !builder.hasContinuationTokens(), "startTime and continuationTokens can't be specified together"); @@ -156,8 +165,14 @@ public ReadChangeStreamQuery startTime(Instant value) { return this; } + /** This method is obsolete. Use {@link #endTime(java.time.Instant)} instead. */ + @ObsoleteApi("Use endTime(java.time.Instant) instead") + public ReadChangeStreamQuery endTime(org.threeten.bp.Instant value) { + return endTime(toJavaTimeInstant(value)); + } + /** Sets the endTime to read the change stream. */ - public ReadChangeStreamQuery endTime(Instant value) { + public ReadChangeStreamQuery endTime(java.time.Instant value) { builder.setEndTime( Timestamp.newBuilder() .setSeconds(value.getEpochSecond()) @@ -181,8 +196,14 @@ public ReadChangeStreamQuery continuationTokens( return this; } - /** Sets the heartbeat duration for the change stream. */ + /** This method is obsolete. Use {@link #heartbeatDuration(java.time.Duration)} instead. */ + @ObsoleteApi("Use heartbeatDuration(java.time.Duration) instead") public ReadChangeStreamQuery heartbeatDuration(org.threeten.bp.Duration duration) { + return heartbeatDuration(toJavaTimeDuration(duration)); + } + + /** Sets the heartbeat duration for the change stream. */ + public ReadChangeStreamQuery heartbeatDuration(java.time.Duration duration) { builder.setHeartbeatDuration( Duration.newBuilder() .setSeconds(duration.getSeconds()) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java index 554a0268b9..f51635f546 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java @@ -45,7 +45,9 @@ private ReadModifyWriteRow(TargetId targetId, ByteString key) { builder.setRowKey(key); } - /** @deprecated Please use {@link ReadModifyWriteRow#create(TargetId, String)} instead. */ + /** + * @deprecated Please use {@link ReadModifyWriteRow#create(TargetId, String)} instead. + */ @Deprecated public static ReadModifyWriteRow create(String tableId, String key) { Preconditions.checkNotNull(key, "key can't be null."); @@ -62,7 +64,9 @@ public static ReadModifyWriteRow create(TargetId targetId, String key) { return new ReadModifyWriteRow(targetId, ByteString.copyFromUtf8(key)); } - /** @deprecated Please use {@link ReadModifyWriteRow#create(TargetId, ByteString)} instead. */ + /** + * @deprecated Please use {@link ReadModifyWriteRow#create(TargetId, ByteString)} instead. + */ @Deprecated public static ReadModifyWriteRow create(String tableId, ByteString key) { return new ReadModifyWriteRow(TableId.of(tableId), key); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java index cee0a37f19..3208fc4e58 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutation.java @@ -20,6 +20,7 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsRequest.Entry; +import com.google.bigtable.v2.SessionMutateRowRequest; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; @@ -47,7 +48,9 @@ private RowMutation(TargetId targetId, ByteString key, Mutation mutation) { this.mutation = mutation; } - /** @deprecated Please use {@link RowMutation#create(TargetId, String)} instead. */ + /** + * @deprecated Please use {@link RowMutation#create(TargetId, String)} instead. + */ @Deprecated public static RowMutation create(String tableId, String key) { return create(tableId, ByteString.copyFromUtf8(key)); @@ -64,7 +67,9 @@ public static RowMutation create(TargetId targetId, String key) { return create(targetId, ByteString.copyFromUtf8(key)); } - /** @deprecated Please use {@link RowMutation#create(TargetId, ByteString)} instead. */ + /** + * @deprecated Please use {@link RowMutation#create(TargetId, ByteString)} instead. + */ @Deprecated public static RowMutation create(String tableId, ByteString key) { return new RowMutation(TableId.of(tableId), key, Mutation.create()); @@ -81,7 +86,9 @@ public static RowMutation create(TargetId targetId, ByteString key) { return new RowMutation(targetId, key, Mutation.create()); } - /** @deprecated Please use {@link RowMutation#create(TargetId, String, Mutation)} instead. */ + /** + * @deprecated Please use {@link RowMutation#create(TargetId, String, Mutation)} instead. + */ @Deprecated public static RowMutation create(String tableId, String key, Mutation mutation) { return create(tableId, ByteString.copyFromUtf8(key), mutation); @@ -107,7 +114,9 @@ public static RowMutation create(TargetId targetId, String key, Mutation mutatio return create(targetId, ByteString.copyFromUtf8(key), mutation); } - /** @deprecated Please use {@link RowMutation#create(TargetId, ByteString, Mutation)} instead. */ + /** + * @deprecated Please use {@link RowMutation#create(TargetId, ByteString, Mutation)} instead. + */ @Deprecated public static RowMutation create(String tableId, ByteString key, Mutation mutation) { return new RowMutation(TableId.of(tableId), key, mutation); @@ -247,6 +256,19 @@ public RowMutation mergeToCell( return this; } + @InternalApi + public TargetId getTargetId() { + return targetId; + } + + @InternalApi + public SessionMutateRowRequest toSessionProto() { + return SessionMutateRowRequest.newBuilder() + .setKey(key) + .addAllMutations(mutation.getMutations()) + .build(); + } + @InternalApi public MutateRowRequest toProto(RequestContext requestContext) { MutateRowRequest.Builder builder = MutateRowRequest.newBuilder(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java index 80ffe53737..2cd2529d53 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java @@ -204,9 +204,9 @@ public RowMutationEntry mergeToCell( public MutateRowsRequest.Entry toProto() { Preconditions.checkArgument( mutation.getMutations().size() <= MAX_MUTATION, - String.format( - "Too many mutations, got %s, limit is %s", - mutation.getMutations().size(), MAX_MUTATION)); + "Too many mutations, got %s, limit is %s", + mutation.getMutations().size(), + MAX_MUTATION); return MutateRowsRequest.Entry.newBuilder() .setRowKey(key) .addAllMutations(mutation.getMutations()) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequest.java index 08d9a3ca23..78a444019c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequest.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequest.java @@ -44,7 +44,9 @@ public com.google.bigtable.v2.SampleRowKeysRequest toProto(RequestContext reques com.google.bigtable.v2.SampleRowKeysRequest.newBuilder(); String resourceName = targetId.toResourceName(requestContext.getProjectId(), requestContext.getInstanceId()); - if (targetId.scopedForAuthorizedView()) { + if (targetId.scopedForMaterializedView()) { + builder.setMaterializedViewName(resourceName); + } else if (targetId.scopedForAuthorizedView()) { builder.setAuthorizedViewName(resourceName); } else { builder.setTableName(resourceName); @@ -55,17 +57,19 @@ public com.google.bigtable.v2.SampleRowKeysRequest toProto(RequestContext reques /** * Wraps the protobuf {@link com.google.bigtable.v2.SampleRowKeysRequest}. * - *

    WARNING: Please note that the project id & instance id in the table/authorized view name - * will be overwritten by the configuration in the BigtableDataClient. + *

    WARNING: Please note that the project id & instance id in the table/authorized + * view/materialized view name will be overwritten by the configuration in the BigtableDataClient. */ @InternalApi public static SampleRowKeysRequest fromProto( @Nonnull com.google.bigtable.v2.SampleRowKeysRequest request) { String tableName = request.getTableName(); String authorizedViewName = request.getAuthorizedViewName(); + String materializedViewName = request.getMaterializedViewName(); SampleRowKeysRequest sampleRowKeysRequest = - SampleRowKeysRequest.create(NameUtil.extractTargetId(tableName, authorizedViewName)); + SampleRowKeysRequest.create( + NameUtil.extractTargetId(tableName, authorizedViewName, materializedViewName)); return sampleRowKeysRequest; } @@ -81,4 +85,9 @@ public boolean equals(Object o) { SampleRowKeysRequest sampleRowKeysRequest = (SampleRowKeysRequest) o; return Objects.equal(targetId, sampleRowKeysRequest.targetId); } + + @Override + public int hashCode() { + return Objects.hashCode(targetId); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TableId.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TableId.java index 15b2cd9d95..f743128212 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TableId.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TableId.java @@ -31,7 +31,7 @@ public static TableId of(String tableId) { return new AutoValue_TableId(tableId); } - abstract String getTableId(); + public abstract String getTableId(); @Override @InternalApi @@ -44,4 +44,10 @@ public String toResourceName(String projectId, String instanceId) { public boolean scopedForAuthorizedView() { return false; } + + @Override + @InternalApi + public boolean scopedForMaterializedView() { + return false; + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TargetId.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TargetId.java index ae5be23598..73860dc1d8 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TargetId.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/TargetId.java @@ -40,8 +40,15 @@ public interface TargetId extends Serializable { /** * Returns true if this TargetId object represents id for an authorized view (rather than a - * table). + * table/materialized view). */ @InternalApi boolean scopedForAuthorizedView(); + + /** + * Returns true if this TargetId object represents id for an materialized view (rather than a + * table/authorized view). + */ + @InternalApi + boolean scopedForMaterializedView(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Value.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Value.java index 80b8eedd4c..a7ea9f0c50 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Value.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Value.java @@ -127,7 +127,8 @@ public static Value fromProto(com.google.bigtable.v2.Value source) { return RawValue.create(source.getRawValue()); case RAW_TIMESTAMP_MICROS: return RawTimestamp.create(source.getRawTimestampMicros()); + default: + throw new UnsupportedOperationException(); } - throw new UnsupportedOperationException(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Statement.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatement.java similarity index 60% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Statement.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatement.java index 58c16e2c5c..82c1084afd 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Statement.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatement.java @@ -15,7 +15,6 @@ */ package com.google.cloud.bigtable.data.v2.models.sql; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.bigtable.v2.ArrayValue; import com.google.bigtable.v2.ExecuteQueryRequest; @@ -23,91 +22,86 @@ import com.google.bigtable.v2.Value; import com.google.cloud.Date; import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryVersion; +import com.google.cloud.bigtable.data.v2.internal.QueryParamUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; +import java.time.Instant; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Nullable; -import org.threeten.bp.Instant; /** - * A SQL statement that can be executed by calling {@link - * com.google.cloud.bigtable.data.v2.BigtableDataClient#executeQuery(Statement)}. + * A bound SQL statement that can be executed by calling {@link + * com.google.cloud.bigtable.data.v2.BigtableDataClient#executeQuery(BoundStatement)}. * - *

    A statement contains a SQL string and optional parameters. A parameterized query should - * contain placeholders in the form of {@literal @} followed by the parameter name. Parameter names - * may consist of any combination of letters, numbers, and underscores. + *

    It is an error to bind a statement with unset parameters. * - *

    Parameters can appear anywhere that a literal value is expected. The same parameter name can - * be used more than once, for example: {@code WHERE cf["qualifier1"] = @value OR cf["qualifier2"] - * = @value } - * - *

    It is an error to execute an SQL query with placeholders for unset parameters. - * - *

    Parameterized Statements are constructed using a {@link Builder} and calling - * setTypeParam(String paramName, Type value) for the appropriate type. For example: + *

    BoundStatements are constructed using a {@link Builder} and calling setTypeParam(String + * paramName, Type value) for the appropriate type. For example: * *

    {@code
    - * Statement statement = Statement
    - *     .newBuilder("SELECT cf[@qualifer] FROM table WHERE _key=@key")
    + * BoundStatementt boundStatement = preparedStatement.bind()
      *     .setBytesParam("qualifier", ByteString.copyFromUtf8("test"))
      *     .setBytesParam("key", ByteString.copyFromUtf8("testKey"))
      *     .build();
      * }
    */ -@BetaApi -public class Statement { - - private static final Type STRING_TYPE = - Type.newBuilder().setStringType(Type.String.getDefaultInstance()).build(); - private static final Type BYTES_TYPE = - Type.newBuilder().setBytesType(Type.Bytes.getDefaultInstance()).build(); - private static final Type INT64_TYPE = - Type.newBuilder().setInt64Type(Type.Int64.getDefaultInstance()).build(); - private static final Type FLOAT32_TYPE = - Type.newBuilder().setFloat32Type(Type.Float32.getDefaultInstance()).build(); - private static final Type FLOAT64_TYPE = - Type.newBuilder().setFloat64Type(Type.Float64.getDefaultInstance()).build(); - private static final Type BOOL_TYPE = - Type.newBuilder().setBoolType(Type.Bool.getDefaultInstance()).build(); - private static final Type TIMESTAMP_TYPE = - Type.newBuilder().setTimestampType(Type.Timestamp.getDefaultInstance()).build(); - private static final Type DATE_TYPE = - Type.newBuilder().setDateType(Type.Date.getDefaultInstance()).build(); - - private final String sql; +public class BoundStatement { + + private final PreparedStatementImpl preparedStatement; private final Map params; - private Statement(String sql, Map params) { - this.sql = sql; + private BoundStatement(PreparedStatementImpl preparedStatement, Map params) { + this.preparedStatement = preparedStatement; this.params = params; } - /** Creates a {@code Statement} with the given SQL query and no query parameters. */ - public static Statement of(String sql) { - return newBuilder(sql).build(); - } - - /** Creates a new {@code Builder} with the given SQL query */ - public static Builder newBuilder(String sql) { - return new Builder(sql); + /** + * Gets the most recent version of the PrepareResponse associated with this query. + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ + @InternalApi("For internal use only") + public PreparedQueryData getLatestPrepareResponse() { + return preparedStatement.getLatestPrepareResponse(); } public static class Builder { - private final String sql; + private final PreparedStatementImpl preparedStatement; + private final Map> paramTypes; private final Map params; - private Builder(String sql) { - this.sql = sql; + /** + * Creates a builder from a {@link PreparedStatement} + * + *

    This is considered an internal implementation detail and should not be used by + * applications. + */ + @InternalApi("For internal use only") + public Builder(PreparedStatementImpl preparedStatement, Map> paramTypes) { + this.preparedStatement = preparedStatement; + this.paramTypes = paramTypes; this.params = new HashMap<>(); } - /** Builds a {@code Statement} from the builder */ - public Statement build() { - return new Statement(sql, ImmutableMap.copyOf(params)); + /** Builds a {@link BoundStatement} from the builder */ + public BoundStatement build() { + for (Map.Entry> paramType : paramTypes.entrySet()) { + String paramName = paramType.getKey(); + if (!params.containsKey(paramName)) { + throw new IllegalArgumentException( + "Attempting to build BoundStatement without binding parameter: " + paramName); + } + } + return new BoundStatement(preparedStatement, ImmutableMap.copyOf(params)); } /** @@ -115,6 +109,7 @@ public Statement build() { * value} */ public Builder setStringParam(String paramName, @Nullable String value) { + validateMatchesParamTypes(paramName, SqlType.string()); params.put(paramName, stringParamOf(value)); return this; } @@ -124,6 +119,7 @@ public Builder setStringParam(String paramName, @Nullable String value) { * value} */ public Builder setBytesParam(String paramName, @Nullable ByteString value) { + validateMatchesParamTypes(paramName, SqlType.bytes()); params.put(paramName, bytesParamOf(value)); return this; } @@ -133,6 +129,7 @@ public Builder setBytesParam(String paramName, @Nullable ByteString value) { * value} */ public Builder setLongParam(String paramName, @Nullable Long value) { + validateMatchesParamTypes(paramName, SqlType.int64()); params.put(paramName, int64ParamOf(value)); return this; } @@ -142,6 +139,7 @@ public Builder setLongParam(String paramName, @Nullable Long value) { * value} */ public Builder setFloatParam(String paramName, @Nullable Float value) { + validateMatchesParamTypes(paramName, SqlType.float32()); params.put(paramName, float32ParamOf(value)); return this; } @@ -151,6 +149,7 @@ public Builder setFloatParam(String paramName, @Nullable Float value) { * value} */ public Builder setDoubleParam(String paramName, @Nullable Double value) { + validateMatchesParamTypes(paramName, SqlType.float64()); params.put(paramName, float64ParamOf(value)); return this; } @@ -159,6 +158,7 @@ public Builder setDoubleParam(String paramName, @Nullable Double value) { * Sets a query parameter with the name {@code paramName} and the BOOL typed value {@code value} */ public Builder setBooleanParam(String paramName, @Nullable Boolean value) { + validateMatchesParamTypes(paramName, SqlType.bool()); params.put(paramName, booleanParamOf(value)); return this; } @@ -168,6 +168,7 @@ public Builder setBooleanParam(String paramName, @Nullable Boolean value) { * value} */ public Builder setTimestampParam(String paramName, @Nullable Instant value) { + validateMatchesParamTypes(paramName, SqlType.timestamp()); params.put(paramName, timestampParamOf(value)); return this; } @@ -176,6 +177,7 @@ public Builder setTimestampParam(String paramName, @Nullable Instant value) { * Sets a query parameter with the name {@code paramName} and the DATE typed value {@code value} */ public Builder setDateParam(String paramName, @Nullable Date value) { + validateMatchesParamTypes(paramName, SqlType.date()); params.put(paramName, dateParamOf(value)); return this; } @@ -187,12 +189,28 @@ public Builder setDateParam(String paramName, @Nullable Date value) { */ public Builder setListParam( String paramName, @Nullable List value, SqlType.Array arrayType) { + validateMatchesParamTypes(paramName, arrayType); params.put(paramName, arrayParamOf(value, arrayType)); return this; } + private void validateMatchesParamTypes(String paramName, SqlType expectedType) { + Preconditions.checkArgument( + paramTypes.containsKey(paramName), "No parameter named: " + paramName); + SqlType actualType = paramTypes.get(paramName); + Preconditions.checkArgument( + SqlType.typesMatch(expectedType, actualType), + "Invalid type passed for query param '" + + paramName + + "'. Expected: " + + expectedType + + " received: " + + actualType); + } + private static Value stringParamOf(@Nullable String value) { - Value.Builder builder = nullValueWithType(STRING_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.string()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setStringValue(value); } @@ -200,7 +218,8 @@ private static Value stringParamOf(@Nullable String value) { } private static Value bytesParamOf(@Nullable ByteString value) { - Value.Builder builder = nullValueWithType(BYTES_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.bytes()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setBytesValue(value); } @@ -208,7 +227,8 @@ private static Value bytesParamOf(@Nullable ByteString value) { } private static Value int64ParamOf(@Nullable Long value) { - Value.Builder builder = nullValueWithType(INT64_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.int64()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setIntValue(value); } @@ -216,7 +236,8 @@ private static Value int64ParamOf(@Nullable Long value) { } private static Value float32ParamOf(@Nullable Float value) { - Value.Builder builder = nullValueWithType(FLOAT32_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.float32()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setFloatValue(value); } @@ -224,7 +245,8 @@ private static Value float32ParamOf(@Nullable Float value) { } private static Value float64ParamOf(@Nullable Double value) { - Value.Builder builder = nullValueWithType(FLOAT64_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.float64()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setFloatValue(value); } @@ -232,7 +254,8 @@ private static Value float64ParamOf(@Nullable Double value) { } private static Value booleanParamOf(@Nullable Boolean value) { - Value.Builder builder = nullValueWithType(BOOL_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.bool()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setBoolValue(value); } @@ -240,7 +263,8 @@ private static Value booleanParamOf(@Nullable Boolean value) { } private static Value timestampParamOf(@Nullable Instant value) { - Value.Builder builder = nullValueWithType(TIMESTAMP_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.timestamp()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setTimestampValue(toTimestamp(value)); } @@ -248,7 +272,8 @@ private static Value timestampParamOf(@Nullable Instant value) { } private static Value dateParamOf(@Nullable Date value) { - Value.Builder builder = nullValueWithType(DATE_TYPE); + Type type = QueryParamUtil.convertToQueryParamProto(SqlType.date()); + Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setDateValue(toProtoDate(value)); } @@ -256,11 +281,7 @@ private static Value dateParamOf(@Nullable Date value) { } private static Value arrayParamOf(@Nullable List value, SqlType.Array arrayType) { - Type type = - Type.newBuilder() - .setArrayType( - Type.Array.newBuilder().setElementType(getElementType(arrayType)).build()) - .build(); + Type type = QueryParamUtil.convertToQueryParamProto(arrayType); Value.Builder builder = nullValueWithType(type); if (value != null) { builder.setArrayValue(arrayValueOf(value, arrayType)); @@ -268,30 +289,6 @@ private static Value arrayParamOf(@Nullable List value, SqlType.Array return builder.build(); } - private static Type getElementType(SqlType.Array arrayType) { - switch (arrayType.getElementType().getCode()) { - case BYTES: - return BYTES_TYPE; - case STRING: - return STRING_TYPE; - case INT64: - return INT64_TYPE; - case FLOAT32: - return FLOAT32_TYPE; - case FLOAT64: - return FLOAT64_TYPE; - case BOOL: - return BOOL_TYPE; - case TIMESTAMP: - return TIMESTAMP_TYPE; - case DATE: - return DATE_TYPE; - default: - throw new IllegalArgumentException( - "Unsupported query parameter Array element type: " + arrayType.getElementType()); - } - } - private static ArrayValue arrayValueOf(List value, SqlType.Array arrayType) { ArrayValue.Builder valueBuilder = ArrayValue.newBuilder(); for (Object element : value) { @@ -366,14 +363,38 @@ private static Value.Builder nullValueWithType(Type type) { * not meant to be used by applications. */ @InternalApi("For internal use only") - public ExecuteQueryRequest toProto(RequestContext requestContext) { - return ExecuteQueryRequest.newBuilder() - .setInstanceName( - NameUtil.formatInstanceName( - requestContext.getProjectId(), requestContext.getInstanceId())) - .setAppProfileId(requestContext.getAppProfileId()) - .setQuery(sql) - .putAllParams(params) - .build(); + public ExecuteQueryRequest toProto( + ByteString preparedQuery, RequestContext requestContext, @Nullable ByteString resumeToken) { + ExecuteQueryRequest.Builder requestBuilder = + ExecuteQueryRequest.newBuilder() + .setInstanceName( + NameUtil.formatInstanceName( + requestContext.getProjectId(), requestContext.getInstanceId())) + .setAppProfileId(requestContext.getAppProfileId()) + .setPreparedQuery(preparedQuery) + .putAllParams(params); + + if (resumeToken != null) { + requestBuilder.setResumeToken(resumeToken); + } + return requestBuilder.build(); + } + + @InternalApi("For internal use only") + public PreparedQueryData markExpiredAndStartRefresh( + PreparedQueryVersion expiredPreparedQueryVersion) { + return this.preparedStatement.markExpiredAndStartRefresh(expiredPreparedQueryVersion); + } + + /** + * Asserts that the given stub matches the stub used for plan refresh. This is necessary to ensure + * that the request comes from the same client and uses the same configuration. + * + *

    This is considered an internal implementation detail and not meant to be used by + * applications + */ + @InternalApi + public void assertUsingSameStub(EnhancedBigtableStub stub) { + this.preparedStatement.assertUsingSameStub(stub); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ColumnMetadata.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ColumnMetadata.java index 0a722a914d..20d063922c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ColumnMetadata.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ColumnMetadata.java @@ -15,10 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models.sql; -import com.google.api.core.BetaApi; - /** Represents the metadata for a column in a {@link ResultSet} */ -@BetaApi public interface ColumnMetadata { /** The name of the column. Returns Empty string if the column has no name */ String name(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatement.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatement.java new file mode 100644 index 0000000000..e54c86953b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatement.java @@ -0,0 +1,32 @@ +/* + * 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 + * + * 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.bigtable.data.v2.models.sql; + +/** + * The results of query preparation that can be used to create {@link BoundStatement}s to execute + * queries. + * + *

    Whenever possible this should be shared across different instances of the same query, in order + * to amortize query preparation costs. + */ +public interface PreparedStatement { + + /** + * @return {@link BoundStatement.Builder} to bind query params to and pass to {@link + * com.google.cloud.bigtable.data.v2.BigtableDataClient#executeQuery(BoundStatement)} + */ + BoundStatement.Builder bind(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatementRefreshTimeoutException.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatementRefreshTimeoutException.java new file mode 100644 index 0000000000..413997aff8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/PreparedStatementRefreshTimeoutException.java @@ -0,0 +1,30 @@ +/* + * 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 + * + * 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.bigtable.data.v2.models.sql; + +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import io.grpc.Status.Code; + +/** + * Error thrown when an executeQuery attempt hits the attempt deadline waiting for {@link + * PreparedStatement} to refresh it's underlying plan. + */ +public class PreparedStatementRefreshTimeoutException extends ApiException { + public PreparedStatementRefreshTimeoutException(String message) { + super(message, null, GrpcStatusCode.of(Code.DEADLINE_EXCEEDED), true); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSet.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSet.java index 807e995712..a149c03728 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSet.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSet.java @@ -15,8 +15,6 @@ */ package com.google.cloud.bigtable.data.v2.models.sql; -import com.google.api.core.BetaApi; - /** * A set of SQL data, generated as the result of an ExecuteQuery request. * @@ -38,7 +36,6 @@ *

    {@code ResultSet} implementations are not required to be thread-safe: the thread that asked * for a ResultSet must be the one that interacts with it. */ -@BetaApi public interface ResultSet extends StructReader, AutoCloseable { /** diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSetMetadata.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSetMetadata.java index 23e7155e67..303c00928e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSetMetadata.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/ResultSetMetadata.java @@ -15,14 +15,14 @@ */ package com.google.cloud.bigtable.data.v2.models.sql; -import com.google.api.core.BetaApi; import java.util.List; /** Provides information about the schema of a {@link ResultSet}. */ -@BetaApi public interface ResultSetMetadata { - /** @return full list of {@link ColumnMetadata} for each column in the {@link ResultSet}. */ + /** + * @return full list of {@link ColumnMetadata} for each column in the {@link ResultSet}. + */ List getColumns(); /** diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/SqlType.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/SqlType.java index 50146f292a..1307349c92 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/SqlType.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/SqlType.java @@ -21,10 +21,14 @@ import com.google.cloud.bigtable.common.Type; import com.google.cloud.bigtable.common.Type.SchemalessStruct; import com.google.cloud.bigtable.common.Type.StructWithSchema; +import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; +import com.google.protobuf.Parser; +import com.google.protobuf.ProtocolMessageEnum; import java.io.Serializable; +import java.time.Instant; import java.util.List; -import org.threeten.bp.Instant; +import java.util.function.Function; /** * Represents a data type in a SQL query. @@ -34,7 +38,6 @@ * * @param the corresponding java type */ -@BetaApi public interface SqlType extends Serializable { /* Enumeration of the types */ @@ -49,10 +52,14 @@ enum Code { DATE, STRUCT, ARRAY, - MAP + MAP, + PROTO, + ENUM } - /** @return {@link Code} enum for this type */ + /** + * @return {@link Code} enum for this type + */ Code getCode(); /** @@ -62,10 +69,14 @@ enum Code { * @param Java type of the Map value data */ interface Map extends SqlType> { - /** @return {@link SqlType} of the map's key */ + /** + * @return {@link SqlType} of the map's key + */ SqlType getKeyType(); - /** @return {@link SqlType} of the map's value */ + /** + * @return {@link SqlType} of the map's value + */ SqlType getValueType(); } @@ -75,7 +86,9 @@ interface Map extends SqlType> { * @param Java type of the Array element data */ interface Array extends SqlType> { - /** @return {@link SqlType} of the array's elements */ + /** + * @return {@link SqlType} of the array's elements + */ SqlType getElementType(); } @@ -86,14 +99,22 @@ interface Struct extends SqlType type(); } - /** @return the ordered list of {@link Field}s for the struct */ + /** + * @return the ordered list of {@link Field}s for the struct + */ List getFields(); /** @@ -119,6 +140,39 @@ interface Field extends ColumnMetadata { int getColumnIndex(String fieldName); } + /** + * Represents a protobuf message type in SQL. + * + * @param Java type of the protobuf message + */ + @BetaApi("This feature is currently experimental and can change in the future") + interface Proto extends SqlType { + + /** + * @return the parser for the proto message. + */ + Parser getParserForType(); + + String getMessageName(); + } + + /** + * Represents a protobuf enum type in SQL. + * + * @param Java type of the protobuf enum + */ + @BetaApi("This feature is currently experimental and can change in the future") + @SuppressWarnings("JavaLangClash") + interface Enum extends SqlType { + + /** + * @return the function to convert an integer to the enum value. + */ + Function getForNumber(); + + String getEnumName(); + } + /** returns a {@link SqlType} for the {@code BYTES} type. */ static SqlType bytes() { return Type.Bytes.create(); @@ -198,6 +252,45 @@ static SqlType.Map mapOf(SqlType keyType, SqlType valType) { return mapOf(bytes(), arrayOf(struct())); } + /** + * Returns a {@link SqlType} for a protobuf message. + * + * @param message an instance of the message. {@code MyMessage.getDefaultInstance()} can be used. + * @param the message type + */ + @BetaApi("This feature is currently experimental and can change in the future") + static SqlType.Proto protoOf(T message) { + return Type.Proto.create(message); + } + + /** + * Returns a {@link SqlType} for a protobuf enum. + * + * @param method a function to convert an integer to the enum value. This is usually {@code + * MyEnum::forNumber} + * @param the enum type + */ + @BetaApi("This feature is currently experimental and can change in the future") + static SqlType.Enum enumOf(Function method) { + return Type.Enum.create(method); + } + + /** + * Extracts the unqualified name from a fully qualified proto message or enum name. For example, + * "my.package.MyMessage" becomes "MyMessage". + * + *

    This is considered an internal implementation detail and not meant to be used by + * applications. + */ + @InternalApi + static String getUnqualifiedName(String fullName) { + if (fullName == null || fullName.isEmpty()) { + return ""; + } + int lastDotIndex = fullName.lastIndexOf('.'); + return (lastDotIndex == -1) ? fullName : fullName.substring(lastDotIndex + 1); + } + /** * Creates a {@link SqlType} from the protobuf representation of Types. * @@ -230,6 +323,10 @@ static SqlType fromProto(com.google.bigtable.v2.Type proto) { case MAP_TYPE: com.google.bigtable.v2.Type.Map mapType = proto.getMapType(); return mapOf(fromProto(mapType.getKeyType()), fromProto(mapType.getValueType())); + case PROTO_TYPE: + return Type.SchemalessProto.fromProto(proto.getProtoType()); + case ENUM_TYPE: + return Type.SchemalessEnum.fromProto(proto.getEnumType()); case KIND_NOT_SET: throw new IllegalStateException("Unrecognized Type. You may need to update your client."); default: @@ -259,6 +356,36 @@ static boolean typesMatch(SqlType left, SqlType right) { case TIMESTAMP: case DATE: return left.equals(right); + case PROTO: + { + if (!left.getCode().equals(right.getCode())) { + return false; + } + if (left instanceof Type.SchemalessProto && right instanceof Type.SchemalessProto) { + return left.equals(right); + } + if (left instanceof Type.Proto && right instanceof Type.Proto) { + return left.equals(right); + } + // Compares mixed SchemalessProto and Proto + return getUnqualifiedName(((SqlType.Proto) left).getMessageName()) + .equals(getUnqualifiedName(((SqlType.Proto) right).getMessageName())); + } + case ENUM: + { + if (!left.getCode().equals(right.getCode())) { + return false; + } + if (left instanceof Type.SchemalessEnum && right instanceof Type.SchemalessEnum) { + return left.equals(right); + } + if (left instanceof Type.Enum && right instanceof Type.Enum) { + return left.equals(right); + } + // Compares mixed SchemalessEnum and Enum + return getUnqualifiedName(((SqlType.Enum) left).getEnumName()) + .equals(getUnqualifiedName(((SqlType.Enum) right).getEnumName())); + } case STRUCT: // Don't validate fields since the field types will be validated on // accessor calls to struct diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Struct.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Struct.java index 23b113f9f7..a043e714f0 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Struct.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/Struct.java @@ -15,12 +15,10 @@ */ package com.google.cloud.bigtable.data.v2.models.sql; -import com.google.api.core.BetaApi; import java.io.Serializable; /** * The representation of a SQL Struct type. Data can be accessed using the methods from the {@code * StructReader} interface. */ -@BetaApi public interface Struct extends StructReader, Serializable {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/StructReader.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/StructReader.java index 8f450bbd92..0af8b8017a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/StructReader.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/sql/StructReader.java @@ -17,10 +17,13 @@ import com.google.api.core.BetaApi; import com.google.cloud.Date; +import com.google.protobuf.AbstractMessage; import com.google.protobuf.ByteString; +import com.google.protobuf.ProtocolMessageEnum; +import java.time.Instant; import java.util.List; import java.util.Map; -import org.threeten.bp.Instant; +import java.util.function.Function; /** * An interface for reading the columns of a {@code Struct} or {@code @@ -36,7 +39,6 @@ * a {@code NullPointerException}; {@link #isNull(int)} & {@link #isNull(String)} can be used to * check for null values. */ -@BetaApi public interface StructReader { /** * @param columnIndex index of the column @@ -198,4 +200,58 @@ public interface StructReader { * @param Java type of the map values */ Map getMap(String columnName, SqlType.Map mapType); + + /** + * Returns the value of a non-{@code NULL} column with a protobuf message type. + * + * @param columnIndex index of the column. + * @param message an instance of the message. This is used to determine the message type and + * parser. {@code MyMessage.getDefaultInstance()} can be used. + * @param the message type. + * @see getDefaultInstance() + */ + @BetaApi("This feature is currently experimental and can change in the future") + MsgType getProtoMessage(int columnIndex, MsgType message); + + /** + * Returns the value of a non-{@code NULL} column with a protobuf message type. + * + * @param columnName name of the column. + * @param message an instance of the message. This is used to determine the message type and + * parser. {@code MyMessage.getDefaultInstance()} can be used. + * @param the message type. + * @see getDefaultInstance() + */ + @BetaApi("This feature is currently experimental and can change in the future") + MsgType getProtoMessage(String columnName, MsgType message); + + /** + * Returns the value of a non-{@code NULL} column with a protobuf enum type. + * + * @param columnIndex index of the column. + * @param forNumber a function to convert an integer to the enum value. This is usually {@code + * MyEnum::forNumber}. + * @param the enum type. + * @see forNumber() + */ + @BetaApi("This feature is currently experimental and can change in the future") + EnumType getProtoEnum( + int columnIndex, Function forNumber); + + /** + * Returns the value of a non-{@code NULL} column with a protobuf enum type. + * + * @param columnName name of the column. + * @param forNumber a function to convert an integer to the enum value. This is usually {@code + * MyEnum::forNumber}. + * @param the enum type. + * @see forNumber() + */ + @BetaApi("This feature is currently experimental and can change in the future") + EnumType getProtoEnum( + String columnName, Function forNumber); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java index 3e2b540635..eea295074e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java @@ -312,12 +312,14 @@ public BigtableBatchingCallSettings build() { batchingSettings.getElementCountThreshold() == null || flowControlSettings.getMaxOutstandingElementCount() > batchingSettings.getElementCountThreshold(), - "if batch elementCountThreshold is set in BatchingSettings, flow control maxOutstandingElementCount must be > elementCountThreshold"); + "if batch elementCountThreshold is set in BatchingSettings, flow control" + + " maxOutstandingElementCount must be > elementCountThreshold"); Preconditions.checkArgument( batchingSettings.getRequestByteThreshold() == null || flowControlSettings.getMaxOutstandingRequestBytes() > batchingSettings.getRequestByteThreshold(), - "if batch requestByteThreshold is set in BatchingSettings, flow control maxOutstandingRequestBytes must be > getRequestByteThreshold"); + "if batch requestByteThreshold is set in BatchingSettings, flow control" + + " maxOutstandingRequestBytes must be > getRequestByteThreshold"); // Combine static FlowControlSettings with latency based throttling settings to create // DynamicFlowControlSettings. if (isLatencyBasedThrottlingEnabled()) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java index ecbef85be5..2d5022900e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java @@ -15,98 +15,168 @@ */ package com.google.cloud.bigtable.data.v2.stub; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.ChannelPrimer; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.rpc.FixedTransportChannelProvider; +import com.google.api.core.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.api.core.SettableApiFuture; import com.google.auth.Credentials; +import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.PingAndWarmRequest; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.common.base.Preconditions; -import io.grpc.ManagedChannel; +import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer; +import io.grpc.CallCredentials; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.Deadline; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.auth.MoreCallCredentials; import java.io.IOException; -import java.util.concurrent.ExecutionException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; import java.util.logging.Logger; /** * A channel warmer that ensures that a Bigtable channel is ready to be used before being added to - * the active {@link com.google.api.gax.grpc.ChannelPool}. + * the active {@link com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPool}. * *

    This implementation is subject to change in the future, but currently it will prime the * channel by sending a ReadRow request for a hardcoded, non-existent row key. */ -@BetaApi("Channel priming is not currently stable and might change in the future") -class BigtableChannelPrimer implements ChannelPrimer { +@InternalApi +public class BigtableChannelPrimer implements ChannelPrimer { private static Logger LOG = Logger.getLogger(BigtableChannelPrimer.class.toString()); - private final EnhancedBigtableStubSettings settingsTemplate; + static final Metadata.Key REQUEST_PARAMS = + Metadata.Key.of("x-goog-request-params", Metadata.ASCII_STRING_MARSHALLER); + private final PingAndWarmRequest request; + private final CallCredentials callCredentials; + private final Map headers; static BigtableChannelPrimer create( - Credentials credentials, String projectId, String instanceId, String appProfileId) { - EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId(projectId) - .setInstanceId(instanceId) - .setAppProfileId(appProfileId) - .setCredentialsProvider(FixedCredentialsProvider.create(credentials)) - // Disable refreshing channel here to avoid creating settings in a loop - .setRefreshingChannel(false) - .setExecutorProvider( - InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(1).build()); - - return new BigtableChannelPrimer(builder.build()); + String projectId, + String instanceId, + String appProfileId, + Credentials credentials, + Map headers) { + return new BigtableChannelPrimer(projectId, instanceId, appProfileId, credentials, headers); } - private BigtableChannelPrimer(EnhancedBigtableStubSettings settingsTemplate) { - Preconditions.checkNotNull(settingsTemplate, "settingsTemplate can't be null"); - this.settingsTemplate = settingsTemplate; + BigtableChannelPrimer( + String projectId, + String instanceId, + String appProfileId, + Credentials credentials, + Map headers) { + if (credentials != null) { + callCredentials = MoreCallCredentials.from(credentials); + } else { + callCredentials = null; + } + + request = + PingAndWarmRequest.newBuilder() + .setName(InstanceName.of(projectId, instanceId).toString()) + .setAppProfileId(appProfileId) + .build(); + + this.headers = headers; } @Override - public void primeChannel(ManagedChannel managedChannel) { + public void primeChannel(Channel channel) { try { - primeChannelUnsafe(managedChannel); + primeChannelUnsafe(channel); } catch (IOException | RuntimeException e) { - LOG.warning( - String.format("Unexpected error while trying to prime a channel: %s", e.getMessage())); + LOG.log(Level.WARNING, "Unexpected error while trying to prime a channel", e); } } - private void primeChannelUnsafe(ManagedChannel managedChannel) throws IOException { - sendPrimeRequests(managedChannel); + private void primeChannelUnsafe(Channel channel) throws IOException { + sendPrimeRequestsBlocking(channel); } - private void sendPrimeRequests(ManagedChannel managedChannel) throws IOException { - // Wrap the channel in a temporary stub - EnhancedBigtableStubSettings primingSettings = - settingsTemplate - .toBuilder() - .setTransportChannelProvider( - FixedTransportChannelProvider.create(GrpcTransportChannel.create(managedChannel))) - .build(); + private void sendPrimeRequestsBlocking(Channel channel) { + try { + sendPrimeRequestsAsync(channel).get(1, TimeUnit.MINUTES); + } catch (Throwable e) { + // TODO: Not sure if we should swallow the error here. We are pre-emptively swapping + // channels if the new + // channel is bad. + LOG.log(Level.WARNING, "Failed to prime channel", e); + } + } + + @Override + public ApiFuture sendPrimeRequestsAsync(Channel managedChannel) { + ClientCall clientCall = + managedChannel.newCall( + BigtableGrpc.getPingAndWarmMethod(), + CallOptions.DEFAULT + .withCallCredentials(callCredentials) + .withDeadline(Deadline.after(1, TimeUnit.MINUTES))); + + SettableApiFuture future = SettableApiFuture.create(); + clientCall.start( + new ClientCall.Listener() { + private PingAndWarmResponse response; + + @Override + public void onMessage(PingAndWarmResponse message) { + response = message; + } + + @Override + public void onClose(Status status, Metadata trailers) { + if (status.isOk()) { + future.set(response); + } else { + // Propagate the gRPC error to the future. + future.setException(status.asException(trailers)); + } + } + }, + createMetadata(headers, request)); + + try { + // Send the request message. + clientCall.sendMessage(request); + // Signal that no more messages will be sent. + clientCall.halfClose(); + // Request the response from the server. + clientCall.request(Integer.MAX_VALUE); + } catch (Throwable t) { + // If sending fails, cancel the call and notify the future. + clientCall.cancel("Failed to send priming request", t); + future.setException(t); + } + + return future; + } - try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(primingSettings)) { - PingAndWarmRequest request = - PingAndWarmRequest.newBuilder() - .setName( - NameUtil.formatInstanceName( - primingSettings.getProjectId(), primingSettings.getInstanceId())) - .setAppProfileId(primingSettings.getAppProfileId()) - .build(); - - try { - stub.pingAndWarmCallable().call(request); - } catch (Throwable e) { - // TODO: Not sure if we should swallow the error here. We are pre-emptively swapping - // channels if the new - // channel is bad. - if (e instanceof ExecutionException) { - e = e.getCause(); - } - LOG.warning(String.format("Failed to prime channel: %s", e)); - } + // Internal headers (bigtable-features and user-agent) are merged in ClientContext and set on + // the transport channel. So when primeChannel is called from gax, the managed channel already has + // those headers. This is tested in EnhancedBigtableStubTest. + private static Metadata createMetadata(Map headers, PingAndWarmRequest request) { + Metadata metadata = new Metadata(); + + headers.forEach( + (k, v) -> metadata.put(Metadata.Key.of(k, Metadata.ASCII_STRING_MARSHALLER), v)); + try { + metadata.put( + REQUEST_PARAMS, + String.format( + "name=%s&app_profile_id=%s", + URLEncoder.encode(request.getName(), "UTF-8"), + URLEncoder.encode(request.getAppProfileId(), "UTF-8"))); + } catch (UnsupportedEncodingException e) { + LOG.log(Level.WARNING, "Failed to encode request params", e); } + + return metadata; } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableClientContext.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableClientContext.java new file mode 100644 index 0000000000..a74c15613e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableClientContext.java @@ -0,0 +1,350 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.CredentialsProvider; +import com.google.api.gax.core.ExecutorProvider; +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.core.FixedExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.auth.Credentials; +import com.google.auth.oauth2.ServiceAccountJwtAccessCredentials; +import com.google.cloud.bigtable.data.v2.internal.JwtCredentialsWithAudience; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.compat.DisabledShim; +import com.google.cloud.bigtable.data.v2.internal.compat.Shim; +import com.google.cloud.bigtable.data.v2.internal.compat.ShimImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricsImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.dp.AlwaysEnabledDirectAccessChecker; +import com.google.cloud.bigtable.data.v2.internal.dp.ClassicDirectAccessChecker; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessChecker; +import com.google.cloud.bigtable.data.v2.internal.dp.NoopDirectAccessChecker; +import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider; +import com.google.cloud.bigtable.gaxx.grpc.BigtableTransportChannelProvider; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer; +import com.google.common.base.Preconditions; +import io.grpc.ManagedChannelBuilder; +import io.opencensus.stats.Stats; +import io.opencensus.stats.StatsRecorder; +import io.opencensus.tags.Tagger; +import io.opencensus.tags.Tags; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.concurrent.ScheduledExecutorService; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * This class wraps all state needed during the lifetime of the Bigtable client. This includes gax's + * {@link ClientContext} plus any additional state that Bigtable Client needs. + */ +@InternalApi +public class BigtableClientContext { + + private static final Logger logger = Logger.getLogger(BigtableClientContext.class.getName()); + + private final boolean isChild; + private final ClientInfo clientInfo; + private final Metrics metrics; + private final ClientContext clientContext; + // the background executor shared for OTEL instances and monitoring client and all other + // background tasks + private final ExecutorProvider backgroundExecutorProvider; + private final Shim sessionShim; + + public static BigtableClientContext create(EnhancedBigtableStubSettings settings) + throws IOException { + return create(settings, Tags.getTagger(), Stats.getStatsRecorder()); + } + + public static BigtableClientContext create( + EnhancedBigtableStubSettings settings, Tagger ocTagger, StatsRecorder ocRecorder) + throws IOException { + ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of(settings.getProjectId(), settings.getInstanceId())) + .setAppProfileId(settings.getAppProfileId()) + .build(); + + EnhancedBigtableStubSettings.Builder builder = settings.toBuilder(); + + // Set up credentials + patchCredentials(builder); + + // Fix the credentials so that they can be shared + @Nullable Credentials credentials = null; + if (builder.getCredentialsProvider() != null) { + credentials = builder.getCredentialsProvider().getCredentials(); + } + builder.setCredentialsProvider(FixedCredentialsProvider.create(credentials)); + + String universeDomain = settings.getUniverseDomain(); + + boolean shouldAutoClose = settings.getBackgroundExecutorProvider().shouldAutoClose(); + ScheduledExecutorService backgroundExecutor = + settings.getBackgroundExecutorProvider().getExecutor(); + FixedExecutorProvider executorProvider = + FixedExecutorProvider.create(backgroundExecutor, shouldAutoClose); + builder.setBackgroundExecutorProvider(executorProvider); + + MetricRegistry metricRegistry = new MetricRegistry(); + // Set up OpenTelemetry + @Nullable OpenTelemetry userOtel = null; + if (settings.getMetricsProvider() instanceof CustomOpenTelemetryMetricsProvider) { + userOtel = + ((CustomOpenTelemetryMetricsProvider) settings.getMetricsProvider()).getOpenTelemetry(); + } + + @Nullable OpenTelemetrySdk builtinOtel = null; + try { + if (settings.areInternalMetricsEnabled()) { + builtinOtel = + MetricsImpl.createBuiltinOtel( + metricRegistry, + clientInfo, + credentials, + settings.getMetricsEndpoint(), + universeDomain, + backgroundExecutor); + } + } catch (Throwable t) { + logger.log(Level.WARNING, "Failed to get OTEL, will skip exporting client side metrics", t); + } + + Metrics metrics = + new MetricsImpl( + metricRegistry, + clientInfo, + settings.getTracerFactory(), + builtinOtel, + userOtel, + ocTagger, + ocRecorder, + backgroundExecutor); + + // Set up channel + InstantiatingGrpcChannelProvider.Builder transportProvider = + builder.getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider + ? ((InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider()).toBuilder() + : null; + + if (transportProvider != null) { + configureGrpcOtel(transportProvider, metrics); + + setupCookieHolder(transportProvider); + + ChannelPrimer channelPrimer = NoOpChannelPrimer.create(); + + // Inject channel priming if enabled + if (isRefreshingEnabled(builder)) { + channelPrimer = + BigtableChannelPrimer.create( + builder.getProjectId(), + builder.getInstanceId(), + builder.getAppProfileId(), + credentials, + builder.getHeaderProvider().getHeaders()); + } + + DirectAccessChecker directAccessChecker = null; + switch (settings.getDirectPathConfig()) { + case FORCED_ON: + directAccessChecker = AlwaysEnabledDirectAccessChecker.INSTANCE; + break; + case FORCED_OFF: + directAccessChecker = NoopDirectAccessChecker.INSTANCE; + break; + case DEFAULT: + default: + directAccessChecker = + new ClassicDirectAccessChecker( + metrics.getDirectPathCompatibleTracer(), channelPrimer, backgroundExecutor); + break; + } + + BigtableTransportChannelProvider btTransportProvider = + BigtableTransportChannelProvider.create( + transportProvider.build(), + channelPrimer, + metrics.getChannelPoolMetricsTracer(), + backgroundExecutor, + directAccessChecker); + + builder.setTransportChannelProvider(btTransportProvider); + } + + ClientContext clientContext = ClientContext.create(builder.build()); + + metrics.start(); + + Shim shim = + settings.isSessionsEnabled() + ? ShimImpl.create(clientInfo, credentials, metrics, backgroundExecutor, settings) + : new DisabledShim(); + + try { + return new BigtableClientContext( + false, shim, clientInfo, clientContext, metrics, executorProvider); + } catch (IOException | RuntimeException t) { + metrics.close(); + throw t; + } + } + + @SuppressWarnings("deprecation") + private static boolean isRefreshingEnabled(EnhancedBigtableStubSettings.Builder b) { + return b.isRefreshingChannel(); + } + + private static void configureGrpcOtel( + InstantiatingGrpcChannelProvider.Builder transportProvider, Metrics metrics) { + @SuppressWarnings("rawtypes") + ApiFunction oldConfigurator = + transportProvider.getChannelConfigurator(); + + transportProvider.setChannelConfigurator( + b -> { + if (oldConfigurator != null) { + b = oldConfigurator.apply(b); + } + return metrics.configureGrpcChannel(b); + }); + } + + private BigtableClientContext( + boolean isChild, + Shim shim, + ClientInfo clientInfo, + ClientContext clientContext, + Metrics metrics, + ExecutorProvider backgroundExecutorProvider) + throws IOException { + this.isChild = isChild; + this.sessionShim = shim; + this.clientInfo = clientInfo; + + this.metrics = metrics; + this.backgroundExecutorProvider = backgroundExecutorProvider; + + this.clientContext = + clientContext.toBuilder().setTracerFactory(metrics.createTracerFactory(clientInfo)).build(); + } + + public ClientInfo getClientInfo() { + return clientInfo; + } + + public Metrics getMetrics() { + return metrics; + } + + public ClientContext getClientContext() { + return this.clientContext; + } + + public BigtableClientContext createChild(InstanceName instanceName, String appProfileId) + throws IOException { + // TODO: either mark BigtableDataClientFactory as deprecated or figure out how to make it + // work with Sessions + Preconditions.checkState( + sessionShim instanceof DisabledShim, "Sessions don't support BigtableDataClientFactory"); + + return new BigtableClientContext( + true, + sessionShim, + clientInfo.toBuilder().setInstanceName(instanceName).setAppProfileId(appProfileId).build(), + clientContext, + metrics, + backgroundExecutorProvider); + } + + public void close() throws Exception { + if (isChild) { + return; + } + + sessionShim.close(); + + for (BackgroundResource resource : clientContext.getBackgroundResources()) { + resource.close(); + } + metrics.close(); + + if (backgroundExecutorProvider.shouldAutoClose()) { + backgroundExecutorProvider.getExecutor().shutdown(); + } + } + + private static void patchCredentials(EnhancedBigtableStubSettings.Builder settings) + throws IOException { + String audience = settings.getJwtAudience(); + + URI audienceUri = null; + try { + audienceUri = new URI(audience); + } catch (URISyntaxException e) { + throw new IllegalStateException("invalid JWT audience", e); + } + + CredentialsProvider credentialsProvider = settings.getCredentialsProvider(); + if (credentialsProvider == null) { + return; + } + + Credentials credentials = credentialsProvider.getCredentials(); + if (credentials == null) { + return; + } + + if (!(credentials instanceof ServiceAccountJwtAccessCredentials)) { + return; + } + + ServiceAccountJwtAccessCredentials jwtCreds = (ServiceAccountJwtAccessCredentials) credentials; + JwtCredentialsWithAudience patchedCreds = new JwtCredentialsWithAudience(jwtCreds, audienceUri); + settings.setCredentialsProvider(FixedCredentialsProvider.create(patchedCreds)); + } + + private static void setupCookieHolder( + InstantiatingGrpcChannelProvider.Builder transportProvider) { + ApiFunction oldChannelConfigurator = + transportProvider.getChannelConfigurator(); + transportProvider.setChannelConfigurator( + managedChannelBuilder -> { + managedChannelBuilder.intercept(new CookiesInterceptor()); + + if (oldChannelConfigurator != null) { + managedChannelBuilder = oldChannelConfigurator.apply(managedChannelBuilder); + } + return managedChannelBuilder; + }); + } + + public Shim getSessionShim() { + return sessionShim; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStreamResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStreamResumptionStrategy.java new file mode 100644 index 0000000000..8eb907d673 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStreamResumptionStrategy.java @@ -0,0 +1,27 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.retrying.StreamResumptionStrategy; + +/** Expand StreamResumptionStrategy to also process the error. */ +@InternalApi +public abstract class BigtableStreamResumptionStrategy + implements StreamResumptionStrategy { + + public abstract Throwable processError(Throwable throwable); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java index 9d887d6ccd..d1faee3766 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,8 @@ import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; @@ -92,6 +94,10 @@ public UnaryCallable pingAndWarmCallabl throw new UnsupportedOperationException("Not implemented: readChangeStreamCallable()"); } + public UnaryCallable prepareQueryCallable() { + throw new UnsupportedOperationException("Not implemented: prepareQueryCallable()"); + } + public ServerStreamingCallable executeQueryCallable() { throw new UnsupportedOperationException("Not implemented: executeQueryCallable()"); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java index f3897f802d..f7382755b8 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 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.ServerStreamingCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StubSettings; @@ -45,6 +46,8 @@ import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; @@ -58,9 +61,9 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import java.io.IOException; +import java.time.Duration; import java.util.List; import javax.annotation.Generated; -import org.threeten.bp.Duration; // AUTO-GENERATED DOCUMENTATION AND CLASS. /** For internal use only. */ @@ -95,6 +98,7 @@ public class BigtableStubSettings extends StubSettings { generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings readChangeStreamSettings; + private final UnaryCallSettings prepareQuerySettings; private final ServerStreamingCallSettings executeQuerySettings; @@ -152,6 +156,11 @@ public UnaryCallSettings pingAndWarmSet return readChangeStreamSettings; } + /** Returns the object with the settings used for calls to prepareQuery. */ + public UnaryCallSettings prepareQuerySettings() { + return prepareQuerySettings; + } + /** Returns the object with the settings used for calls to executeQuery. */ public ServerStreamingCallSettings executeQuerySettings() { @@ -248,9 +257,19 @@ protected BigtableStubSettings(Builder settingsBuilder) throws IOException { generateInitialChangeStreamPartitionsSettings = settingsBuilder.generateInitialChangeStreamPartitionsSettings().build(); readChangeStreamSettings = settingsBuilder.readChangeStreamSettings().build(); + prepareQuerySettings = settingsBuilder.prepareQuerySettings().build(); executeQuerySettings = settingsBuilder.executeQuerySettings().build(); } + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-bigtable") + .setRepository("googleapis/java-bigtable") + .setVersion(Version.VERSION) + .build(); + } + /** Builder for BigtableStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; @@ -274,6 +293,8 @@ public static class Builder extends StubSettings.Builder readChangeStreamSettings; + private final UnaryCallSettings.Builder + prepareQuerySettings; private final ServerStreamingCallSettings.Builder executeQuerySettings; private static final ImmutableMap> @@ -287,7 +308,7 @@ public static class Builder extends StubSettings.BuildernewArrayList())); definitions.put( - "retry_policy_4_codes", + "retry_policy_5_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); @@ -296,10 +317,15 @@ public static class Builder extends StubSettings.BuildernewArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_7_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -310,65 +336,76 @@ public static class Builder extends StubSettings.Builder mutateRowS return readChangeStreamSettings; } + /** Returns the builder for the settings used for calls to prepareQuery. */ + public UnaryCallSettings.Builder + prepareQuerySettings() { + return prepareQuerySettings; + } + /** Returns the builder for the settings used for calls to executeQuery. */ public ServerStreamingCallSettings.Builder executeQuerySettings() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallable.java new file mode 100644 index 0000000000..726ab47381 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallable.java @@ -0,0 +1,215 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.core.AbstractApiFuture; +import com.google.api.core.ApiFuture; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.InternalException; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamController; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; +import com.google.common.base.Preconditions; +import com.google.common.util.concurrent.Futures; +import io.grpc.Status; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Helper to convert a fake {@link ServerStreamingCallable} (ie only up to 1 response) into a {@link + * UnaryCallable}. It is intended to be the outermost callable of a chain. + * + *

    Responsibilities: + * + *

      + *
    • Operation level metrics + *
    • Configuring the default call context + *
    • Converting the result to a future + */ +class BigtableUnaryOperationCallable extends UnaryCallable { + private static final Logger LOGGER = + Logger.getLogger(BigtableUnaryOperationCallable.class.getName()); + Logger logger = LOGGER; + + private final ServerStreamingCallable inner; + private final ApiCallContext defaultCallContext; + private final ApiTracerFactory tracerFactory; + private final SpanName spanName; + private final boolean allowNoResponse; + + public BigtableUnaryOperationCallable( + ServerStreamingCallable inner, + ApiCallContext defaultCallContext, + ApiTracerFactory tracerFactory, + SpanName spanName, + boolean allowNoResponse) { + this.inner = inner; + this.defaultCallContext = defaultCallContext; + this.tracerFactory = tracerFactory; + this.spanName = spanName; + this.allowNoResponse = allowNoResponse; + } + + @Override + public ApiFuture futureCall(ReqT req, ApiCallContext apiCallContext) { + apiCallContext = defaultCallContext.merge(apiCallContext); + + BigtableTracer apiTracer = + (BigtableTracer) + tracerFactory.newTracer( + apiCallContext.getTracer(), spanName, ApiTracerFactory.OperationType.Unary); + + apiCallContext = apiCallContext.withTracer(apiTracer); + + UnaryFuture f = new UnaryFuture(apiTracer, allowNoResponse); + inner.call(req, f, apiCallContext); + return f; + } + + class UnaryFuture extends AbstractApiFuture implements ResponseObserver { + private final BigtableTracer tracer; + private final boolean allowNoResponse; + + private StreamController controller; + private final AtomicBoolean upstreamCancelled = new AtomicBoolean(); + + private UnaryFuture(BigtableTracer tracer, boolean allowNoResponse) { + this.tracer = Preconditions.checkNotNull(tracer, "tracer can't be null"); + this.allowNoResponse = allowNoResponse; + } + + @Override + public void onStart(StreamController controller) { + this.controller = controller; + controller.disableAutoInboundFlowControl(); + // Request 2 to detect protocol bugs + controller.request(2); + } + + /** + * Immediately cancel the future state and try to cancel the underlying operation. Will return + * false if the future is already resolved. + */ + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + if (super.cancel(mayInterruptIfRunning)) { + cancelUpstream(); + return true; + } + return false; + } + + private void cancelUpstream() { + if (upstreamCancelled.compareAndSet(false, true)) { + controller.cancel(); + } + } + + @Override + public void onResponse(RespT resp) { + tracer.responseReceived(); + + if (set(resp)) { + tracer.operationFinishEarly(); + return; + } + + // At this point we are guaranteed that the future has been resolved. However we need to check + // why. + // We know it's not because it was resolved with the current response. Moreover, since the + // future + // is resolved, our only means to flag the error is to log. + // So there are 3 possibilities: + // 1. user cancelled the future + // 2. this is an extra response and the previous one resolved the future + // 3. we got a response after the rpc failed (this should never happen and would be a bad bug) + + if (isCancelled()) { + return; + } + + try { + RespT prev = Futures.getDone(this); + String msg = + String.format( + "Received response after future is resolved for a %s unary operation. previous: %s," + + " New response: %s", + spanName, prev, resp); + logger.log(Level.WARNING, msg); + } catch (ExecutionException e) { + // Should never happen + String msg = + String.format( + "Received response after future resolved as a failure for a %s unary operation. New" + + " response: %s", + spanName, resp); + logger.log(Level.WARNING, msg, e.getCause()); + } + + cancelUpstream(); + } + + @Override + public void onError(Throwable throwable) { + if (this.setException(throwable)) { + tracer.operationFailed(throwable); + } else if (isCancelled()) { + tracer.operationCancelled(); + } else { + // At this point the has been resolved, so we ignore the error + tracer.operationSucceeded(); + } + } + + @Override + public void onComplete() { + if (allowNoResponse && set(null)) { + tracer.operationSucceeded(); + return; + + // Under normal circumstances the future wouldve been resolved in onResponse or via + // set(null) if it expected for + // the rpc to not have a response. So if aren't done, the only reason is that we didn't get + // a response + // but were expecting one + } else if (!isDone()) { + String msg = spanName + " unary operation completed without a response message"; + InternalException e = + new InternalException(msg, null, GrpcStatusCode.of(Status.Code.INTERNAL), false); + + if (setException(e)) { + tracer.operationFailed(e); + return; + } + } + + // check cancellation race + if (isCancelled()) { + tracer.operationCancelled(); + return; + } + + tracer.operationSucceeded(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallable.java deleted file mode 100644 index 549e10f44b..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallable.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.CheckAndMutateRowRequest; -import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.common.util.concurrent.MoreExecutors; - -/** Simple wrapper for CheckAndMutateRow to wrap the request and response protobufs. */ -class CheckAndMutateRowCallable extends UnaryCallable { - private final UnaryCallable inner; - private final RequestContext requestContext; - - CheckAndMutateRowCallable( - UnaryCallable inner, - RequestContext requestContext) { - this.inner = inner; - this.requestContext = requestContext; - } - - @Override - public ApiFuture futureCall(ConditionalRowMutation request, ApiCallContext context) { - ApiFuture rawResponse = - inner.futureCall(request.toProto(requestContext), context); - - return ApiFutures.transform( - rawResponse, - new ApiFunction() { - @Override - public Boolean apply(CheckAndMutateRowResponse checkAndMutateRowResponse) { - return checkAndMutateRowResponse.getPredicateMatched(); - } - }, - MoreExecutors.directExecutor()); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ClientOperationSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ClientOperationSettings.java new file mode 100644 index 0000000000..540eb08cc8 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ClientOperationSettings.java @@ -0,0 +1,406 @@ +/* + * Copyright 2026 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.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.batching.BatchingSettings; +import com.google.api.gax.batching.FlowControlSettings; +import com.google.api.gax.batching.FlowController; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.bigtable.v2.PingAndWarmRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.KeyOffset; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; +import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor; +import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor; +import com.google.common.base.MoreObjects; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableSet; +import java.util.List; +import java.util.Set; +import org.threeten.bp.Duration; + +@InternalApi +public class ClientOperationSettings { + private static final Set IDEMPOTENT_RETRY_CODES = + ImmutableSet.of(StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE); + + // Copy of default retrying settings in the yaml + private static final RetrySettings IDEMPOTENT_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setInitialRpcTimeout(Duration.ofSeconds(20)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofSeconds(20)) + .setTotalTimeout(Duration.ofMinutes(10)) + .build(); + + // Allow retrying ABORTED statuses. These will be returned by the server when the client is + // too slow to read the rows. This makes sense for the java client because retries happen + // after the row merging logic. Which means that the retry will not be invoked until the + // current buffered chunks are consumed. + private static final Set READ_ROWS_RETRY_CODES = + ImmutableSet.builder() + .addAll(IDEMPOTENT_RETRY_CODES) + .add(StatusCode.Code.ABORTED) + .build(); + + // Priming request should have a shorter timeout + private static final Duration PRIME_REQUEST_TIMEOUT = Duration.ofSeconds(30); + + private static final RetrySettings READ_ROWS_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setInitialRpcTimeout(Duration.ofMinutes(30)) + .setRpcTimeoutMultiplier(2.0) + .setMaxRpcTimeout(Duration.ofMinutes(30)) + .setTotalTimeout(Duration.ofHours(12)) + .build(); + + private static final RetrySettings MUTATE_ROWS_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setInitialRpcTimeout(Duration.ofMinutes(1)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMinutes(1)) + .setTotalTimeout(Duration.ofMinutes(10)) + .build(); + + private static final Set GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_CODES = + ImmutableSet.builder() + .addAll(IDEMPOTENT_RETRY_CODES) + .add(StatusCode.Code.ABORTED) + .build(); + + private static final RetrySettings GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setInitialRpcTimeout(Duration.ofMinutes(1)) + .setRpcTimeoutMultiplier(2.0) + .setMaxRpcTimeout(Duration.ofMinutes(10)) + .setTotalTimeout(Duration.ofMinutes(60)) + .build(); + + // Allow retrying ABORTED statuses. These will be returned by the server when the client is + // too slow to read the change stream records. This makes sense for the java client because + // retries happen after the mutation merging logic. Which means that the retry will not be + // invoked until the current buffered change stream mutations are consumed. + private static final Set READ_CHANGE_STREAM_RETRY_CODES = + ImmutableSet.builder() + .addAll(IDEMPOTENT_RETRY_CODES) + .add(StatusCode.Code.ABORTED) + .build(); + + private static final RetrySettings READ_CHANGE_STREAM_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setInitialRpcTimeout(Duration.ofMinutes(5)) + .setRpcTimeoutMultiplier(2.0) + .setMaxRpcTimeout(Duration.ofMinutes(5)) + .setTotalTimeout(Duration.ofHours(12)) + .build(); + + // Allow retrying ABORTED statuses. These will be returned by the server when the client is + // too slow to read the responses. + private static final Set EXECUTE_QUERY_RETRY_CODES = + ImmutableSet.builder() + .addAll(IDEMPOTENT_RETRY_CODES) + .add(StatusCode.Code.ABORTED) + .build(); + + // We use the same configuration as READ_ROWS + private static final RetrySettings EXECUTE_QUERY_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setInitialRpcTimeout(Duration.ofMinutes(30)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMinutes(30)) + .setTotalTimeout(Duration.ofHours(12)) + .build(); + + // Similar to IDEMPOTENT but with a lower initial rpc timeout since we expect + // these calls to be quick in most circumstances + private static final RetrySettings PREPARE_QUERY_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2) + .setMaxRetryDelay(Duration.ofMinutes(1)) + // TODO: fix the settings: initial attempt deadline: 5s, max is 20s but multiplier is 1 + .setInitialRpcTimeout(Duration.ofSeconds(5)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofSeconds(20)) + .setTotalTimeout(Duration.ofMinutes(10)) + .build(); + + final ServerStreamingCallSettings readRowsSettings; + final UnaryCallSettings readRowSettings; + final UnaryCallSettings> sampleRowKeysSettings; + final UnaryCallSettings mutateRowSettings; + final BigtableBatchingCallSettings bulkMutateRowsSettings; + final BigtableBulkReadRowsCallSettings bulkReadRowsSettings; + final UnaryCallSettings checkAndMutateRowSettings; + final UnaryCallSettings readModifyWriteRowSettings; + final ServerStreamingCallSettings + generateInitialChangeStreamPartitionsSettings; + final ServerStreamingCallSettings + readChangeStreamSettings; + final UnaryCallSettings pingAndWarmSettings; + final ServerStreamingCallSettings executeQuerySettings; + final UnaryCallSettings prepareQuerySettings; + + ClientOperationSettings(Builder builder) { + // Since point reads, streaming reads, bulk reads share the same base callable that converts + // grpc errors into ApiExceptions, they must have the same retry codes. + Preconditions.checkState( + builder + .readRowSettings + .getRetryableCodes() + .equals(builder.readRowsSettings.getRetryableCodes()), + "Single ReadRow retry codes must match ReadRows retry codes"); + Preconditions.checkState( + builder + .bulkReadRowsSettings + .getRetryableCodes() + .equals(builder.readRowsSettings.getRetryableCodes()), + "Bulk ReadRow retry codes must match ReadRows retry codes"); + + // Per method settings. + readRowsSettings = builder.readRowsSettings.build(); + readRowSettings = builder.readRowSettings.build(); + sampleRowKeysSettings = builder.sampleRowKeysSettings.build(); + mutateRowSettings = builder.mutateRowSettings.build(); + bulkMutateRowsSettings = builder.bulkMutateRowsSettings.build(); + bulkReadRowsSettings = builder.bulkReadRowsSettings.build(); + checkAndMutateRowSettings = builder.checkAndMutateRowSettings.build(); + readModifyWriteRowSettings = builder.readModifyWriteRowSettings.build(); + generateInitialChangeStreamPartitionsSettings = + builder.generateInitialChangeStreamPartitionsSettings.build(); + readChangeStreamSettings = builder.readChangeStreamSettings.build(); + pingAndWarmSettings = builder.pingAndWarmSettings.build(); + executeQuerySettings = builder.executeQuerySettings.build(); + prepareQuerySettings = builder.prepareQuerySettings.build(); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("readRowsSettings", readRowsSettings) + .add("readRowSettings", readRowSettings) + .add("sampleRowKeysSettings", sampleRowKeysSettings) + .add("mutateRowSettings", mutateRowSettings) + .add("bulkMutateRowsSettings", bulkMutateRowsSettings) + .add("bulkReadRowsSettings", bulkReadRowsSettings) + .add("checkAndMutateRowSettings", checkAndMutateRowSettings) + .add("readModifyWriteRowSettings", readModifyWriteRowSettings) + .add( + "generateInitialChangeStreamPartitionsSettings", + generateInitialChangeStreamPartitionsSettings) + .add("readChangeStreamSettings", readChangeStreamSettings) + .add("pingAndWarmSettings", pingAndWarmSettings) + .add("executeQuerySettings", executeQuerySettings) + .add("prepareQuerySettings", prepareQuerySettings) + .toString(); + } + + static class Builder { + ServerStreamingCallSettings.Builder readRowsSettings; + UnaryCallSettings.Builder readRowSettings; + UnaryCallSettings.Builder> sampleRowKeysSettings; + UnaryCallSettings.Builder mutateRowSettings; + BigtableBatchingCallSettings.Builder bulkMutateRowsSettings; + BigtableBulkReadRowsCallSettings.Builder bulkReadRowsSettings; + UnaryCallSettings.Builder checkAndMutateRowSettings; + UnaryCallSettings.Builder readModifyWriteRowSettings; + ServerStreamingCallSettings.Builder + generateInitialChangeStreamPartitionsSettings; + ServerStreamingCallSettings.Builder + readChangeStreamSettings; + UnaryCallSettings.Builder pingAndWarmSettings; + ServerStreamingCallSettings.Builder executeQuerySettings; + UnaryCallSettings.Builder prepareQuerySettings; + + Builder() { + BigtableStubSettings.Builder baseDefaults = BigtableStubSettings.newBuilder(); + + readRowsSettings = ServerStreamingCallSettings.newBuilder(); + + readRowsSettings + .setRetryableCodes(READ_ROWS_RETRY_CODES) + .setRetrySettings(READ_ROWS_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)) + .setWaitTimeout(Duration.ofMinutes(5)); + + readRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + readRowSettings + .setRetryableCodes(readRowsSettings.getRetryableCodes()) + .setRetrySettings(IDEMPOTENT_RETRY_SETTINGS); + + sampleRowKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + sampleRowKeysSettings + .setRetryableCodes(IDEMPOTENT_RETRY_CODES) + .setRetrySettings( + IDEMPOTENT_RETRY_SETTINGS.toBuilder() + .setInitialRpcTimeout(Duration.ofMinutes(5)) + .setMaxRpcTimeout(Duration.ofMinutes(5)) + .build()); + + mutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyRetrySettings(baseDefaults.mutateRowSettings(), mutateRowSettings); + + long maxBulkMutateElementPerBatch = 100L; + long maxBulkMutateOutstandingElementCount = 20_000L; + + bulkMutateRowsSettings = + BigtableBatchingCallSettings.newBuilder(new MutateRowsBatchingDescriptor()) + .setRetryableCodes(IDEMPOTENT_RETRY_CODES) + .setRetrySettings(MUTATE_ROWS_RETRY_SETTINGS) + .setBatchingSettings( + BatchingSettings.newBuilder() + .setIsEnabled(true) + .setElementCountThreshold(maxBulkMutateElementPerBatch) + .setRequestByteThreshold(20L * 1024 * 1024) + .setDelayThreshold(Duration.ofSeconds(1)) + .setFlowControlSettings( + FlowControlSettings.newBuilder() + .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) + .setMaxOutstandingRequestBytes(100L * 1024 * 1024) + .setMaxOutstandingElementCount(maxBulkMutateOutstandingElementCount) + .build()) + .build()); + + long maxBulkReadElementPerBatch = 100L; + long maxBulkReadRequestSizePerBatch = 400L * 1024L; + long maxBulkReadOutstandingElementCount = 20_000L; + + bulkReadRowsSettings = + BigtableBulkReadRowsCallSettings.newBuilder(new ReadRowsBatchingDescriptor()) + .setRetryableCodes(readRowsSettings.getRetryableCodes()) + .setRetrySettings(IDEMPOTENT_RETRY_SETTINGS) + .setBatchingSettings( + BatchingSettings.newBuilder() + .setElementCountThreshold(maxBulkReadElementPerBatch) + .setRequestByteThreshold(maxBulkReadRequestSizePerBatch) + .setDelayThreshold(Duration.ofSeconds(1)) + .setFlowControlSettings( + FlowControlSettings.newBuilder() + .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) + .setMaxOutstandingElementCount(maxBulkReadOutstandingElementCount) + .build()) + .build()); + + checkAndMutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyRetrySettings(baseDefaults.checkAndMutateRowSettings(), checkAndMutateRowSettings); + + readModifyWriteRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyRetrySettings(baseDefaults.readModifyWriteRowSettings(), readModifyWriteRowSettings); + + generateInitialChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); + generateInitialChangeStreamPartitionsSettings + .setRetryableCodes(GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_CODES) + .setRetrySettings(GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)) + .setWaitTimeout(Duration.ofMinutes(1)); + + readChangeStreamSettings = ServerStreamingCallSettings.newBuilder(); + readChangeStreamSettings + .setRetryableCodes(READ_CHANGE_STREAM_RETRY_CODES) + .setRetrySettings(READ_CHANGE_STREAM_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)) + .setWaitTimeout(Duration.ofMinutes(1)); + + pingAndWarmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + pingAndWarmSettings.setRetrySettings( + RetrySettings.newBuilder() + .setMaxAttempts(1) + .setInitialRpcTimeout(PRIME_REQUEST_TIMEOUT) + .setMaxRpcTimeout(PRIME_REQUEST_TIMEOUT) + .setTotalTimeout(PRIME_REQUEST_TIMEOUT) + .build()); + + executeQuerySettings = ServerStreamingCallSettings.newBuilder(); + executeQuerySettings + .setRetryableCodes(EXECUTE_QUERY_RETRY_CODES) + .setRetrySettings(EXECUTE_QUERY_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)) + .setWaitTimeout(Duration.ofMinutes(5)); + + prepareQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + prepareQuerySettings + .setRetryableCodes(IDEMPOTENT_RETRY_CODES) + .setRetrySettings(PREPARE_QUERY_RETRY_SETTINGS); + } + + Builder(ClientOperationSettings settings) { + readRowsSettings = settings.readRowsSettings.toBuilder(); + readRowSettings = settings.readRowSettings.toBuilder(); + sampleRowKeysSettings = settings.sampleRowKeysSettings.toBuilder(); + mutateRowSettings = settings.mutateRowSettings.toBuilder(); + bulkMutateRowsSettings = settings.bulkMutateRowsSettings.toBuilder(); + bulkReadRowsSettings = settings.bulkReadRowsSettings.toBuilder(); + checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); + readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); + generateInitialChangeStreamPartitionsSettings = + settings.generateInitialChangeStreamPartitionsSettings.toBuilder(); + readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); + pingAndWarmSettings = settings.pingAndWarmSettings.toBuilder(); + executeQuerySettings = settings.executeQuerySettings.toBuilder(); + prepareQuerySettings = settings.prepareQuerySettings.toBuilder(); + } + + /** + * Copies settings from unary RPC to another. This is necessary when modifying request and + * response types while trying to retain retry settings. + */ + private static void copyRetrySettings( + UnaryCallSettings.Builder source, UnaryCallSettings.Builder dest) { + dest.setRetryableCodes(source.getRetryableCodes()); + dest.setRetrySettings(source.getRetrySettings()); + } + + ClientOperationSettings build() { + return new ClientOperationSettings(this); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java index 31109abb03..ca99ebd02b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java @@ -22,6 +22,7 @@ import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StreamController; import com.google.common.base.Throwables; +import java.util.Locale; /** * This callable converts the "Received rst stream" exception into a retryable {@link ApiException}. @@ -43,7 +44,7 @@ public void call( innerCallable.call(request, observer, context); } - private class ConvertExceptionResponseObserver + private static class ConvertExceptionResponseObserver extends SafeResponseObserver { private final ResponseObserver outerObserver; @@ -74,7 +75,7 @@ protected void onCompleteImpl() { } } - private Throwable convertException(Throwable t) { + private static Throwable convertException(Throwable t) { // Long lived connections sometimes are disconnected via an RST frame or a goaway. These errors // are transient and should be retried. if (isRstStreamError(t) || isGoAway(t) || isRetriableAuthError(t)) { @@ -83,7 +84,7 @@ private Throwable convertException(Throwable t) { return t; } - private boolean isRetriableAuthError(Throwable t) { + private static boolean isRetriableAuthError(Throwable t) { if (t instanceof InternalException && t.getMessage() != null) { String error = t.getMessage(); return error.contains("Authentication backend internal server error. Please retry"); @@ -91,15 +92,15 @@ private boolean isRetriableAuthError(Throwable t) { return false; } - private boolean isRstStreamError(Throwable t) { + private static boolean isRstStreamError(Throwable t) { if (t instanceof InternalException && t.getMessage() != null) { - String error = t.getMessage().toLowerCase(); + String error = t.getMessage().toLowerCase(Locale.ENGLISH); return error.contains("rst_stream") || error.contains("rst stream"); } return false; } - private boolean isGoAway(Throwable t) { + private static boolean isGoAway(Throwable t) { if (t instanceof InternalException) { Throwable rootCause = Throwables.getRootCause(t); String rootCauseMessage = rootCause.getMessage(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStats.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStats.java index 01fabe52cb..ad659d4623 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStats.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStats.java @@ -69,7 +69,7 @@ boolean setLastAdjustedTimestampMs(long last, long now) { return lastAdjustedTimestampMs.compareAndSet(last, now); } - private class DecayingAverage { + private static class DecayingAverage { private double decayConstant; private double mean; private double weightedCount; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index d0022a1a46..56b7d634f1 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -15,72 +15,55 @@ */ package com.google.cloud.bigtable.data.v2.stub; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.APP_PROFILE_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.BIGTABLE_PROJECT_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_NAME_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.INSTANCE_ID_KEY; - -import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.batching.Batcher; import com.google.api.gax.batching.BatcherImpl; import com.google.api.gax.batching.FlowController; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.CredentialsProvider; -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcRawCallableFactory; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.retrying.BasicResultRetryAlgorithm; import com.google.api.gax.retrying.ExponentialRetryAlgorithm; import com.google.api.gax.retrying.RetryAlgorithm; import com.google.api.gax.retrying.RetryingExecutorWithContext; import com.google.api.gax.retrying.ScheduledRetryingExecutor; +import com.google.api.gax.retrying.SimpleStreamResumptionStrategy; +import com.google.api.gax.retrying.StreamResumptionStrategy; +import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.Callables; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StatusCode.Code; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; -import com.google.api.gax.tracing.ApiTracerFactory; -import com.google.api.gax.tracing.OpencensusTracerFactory; import com.google.api.gax.tracing.SpanName; import com.google.api.gax.tracing.TracedServerStreamingCallable; import com.google.api.gax.tracing.TracedUnaryCallable; -import com.google.auth.Credentials; -import com.google.auth.oauth2.ServiceAccountJwtAccessCredentials; import com.google.bigtable.v2.BigtableGrpc; -import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; import com.google.bigtable.v2.ExecuteQueryRequest; import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; -import com.google.bigtable.v2.MutateRowRequest; -import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; -import com.google.bigtable.v2.PingAndWarmRequest; -import com.google.bigtable.v2.PingAndWarmResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; -import com.google.bigtable.v2.ReadModifyWriteRowRequest; -import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.SampleRowKeysResponse; -import com.google.cloud.bigtable.Version; -import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.cloud.bigtable.data.v2.internal.JwtCredentialsWithAudience; import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.BigtableTracerStreamingCallable; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.BigtableTracerUnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.TracedBatcherUnaryCallable; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; @@ -98,69 +81,46 @@ import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; import com.google.cloud.bigtable.data.v2.models.SampleRowKeysRequest; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.models.TargetId; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMergingCallable; import com.google.cloud.bigtable.data.v2.stub.changestream.GenerateInitialChangeStreamPartitionsUserCallable; import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamUserCallable; -import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; -import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerUnaryCallable; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracerFactory; -import com.google.cloud.bigtable.data.v2.stub.metrics.CompositeTracerFactory; -import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider; -import com.google.cloud.bigtable.data.v2.stub.metrics.DefaultMetricsProvider; -import com.google.cloud.bigtable.data.v2.stub.metrics.ErrorCountPerConnectionMetricTracker; -import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider; -import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsTracerFactory; -import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; -import com.google.cloud.bigtable.data.v2.stub.metrics.RpcMeasureConstants; import com.google.cloud.bigtable.data.v2.stub.metrics.StatsHeadersServerStreamingCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.StatsHeadersUnaryCallable; -import com.google.cloud.bigtable.data.v2.stub.metrics.TracedBatcherUnaryCallable; import com.google.cloud.bigtable.data.v2.stub.mutaterows.BulkMutateRowsUserFacingCallable; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsAttemptResult; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsPartialErrorRetryAlgorithm; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsRetryingCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.FilterMarkerRowsCallable; +import com.google.cloud.bigtable.data.v2.stub.readrows.LargeReadRowsResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor; -import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsFirstCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsRetryCompletedCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsUserCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.RowMergingCallable; import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallContext; import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallable; -import com.google.cloud.bigtable.data.v2.stub.sql.MetadataResolvingCallable; +import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryResumptionStrategy; +import com.google.cloud.bigtable.data.v2.stub.sql.MetadataErrorHandlingCallable; +import com.google.cloud.bigtable.data.v2.stub.sql.PlanRefreshingCallable; import com.google.cloud.bigtable.data.v2.stub.sql.SqlRowMergingCallable; -import com.google.cloud.bigtable.gaxx.retrying.ApiResultRetryAlgorithm; import com.google.cloud.bigtable.gaxx.retrying.RetryInfoRetryAlgorithm; -import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Functions; 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.protobuf.ByteString; -import io.grpc.ManagedChannelBuilder; -import io.opencensus.stats.Stats; -import io.opencensus.stats.StatsRecorder; -import io.opencensus.tags.TagKey; -import io.opencensus.tags.TagValue; -import io.opencensus.tags.Tagger; -import io.opencensus.tags.Tags; -import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.api.common.Attributes; +import io.grpc.MethodDescriptor; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Collections; +import java.time.Duration; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; +import java.util.function.Function; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -179,22 +139,22 @@ @InternalApi public class EnhancedBigtableStub implements AutoCloseable { - private static final Logger logger = Logger.getLogger(EnhancedBigtableStub.class.getName()); - private static final String CLIENT_NAME = "Bigtable"; private static final long FLOW_CONTROL_ADJUSTING_INTERVAL_MS = TimeUnit.SECONDS.toMillis(20); - private final EnhancedBigtableStubSettings settings; - private final ClientContext clientContext; + private final ClientOperationSettings perOpSettings; + private final BigtableClientContext bigtableClientContext; - private final boolean closeClientContext; private final RequestContext requestContext; private final FlowController bulkMutationFlowController; private final DynamicFlowControlStats bulkMutationDynamicFlowControlStats; private final ServerStreamingCallable readRowsCallable; + + private final ServerStreamingCallable skipLargeRowsCallable; + private final UnaryCallable readRowCallable; private final UnaryCallable> bulkReadRowsCallable; - private final UnaryCallable> sampleRowKeysCallable; + @Deprecated private final UnaryCallable> sampleRowKeysCallable; private final UnaryCallable> sampleRowKeysCallableWithRequest; private final UnaryCallable mutateRowCallable; @@ -202,7 +162,6 @@ public class EnhancedBigtableStub implements AutoCloseable { private final UnaryCallable externalBulkMutateRowsCallable; private final UnaryCallable checkAndMutateRowCallable; private final UnaryCallable readModifyWriteRowCallable; - private final UnaryCallable pingAndWarmCallable; private final ServerStreamingCallable generateInitialChangeStreamPartitionsCallable; @@ -211,258 +170,25 @@ public class EnhancedBigtableStub implements AutoCloseable { readChangeStreamCallable; private final ExecuteQueryCallable executeQueryCallable; + private final UnaryCallable prepareQueryCallable; public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) throws IOException { - ClientContext clientContext = createClientContext(settings); - OpenTelemetry openTelemetry = null; - try { - // We don't want client side metrics to crash the client, so catch any exception when getting - // the OTEL instance and log the exception instead. - openTelemetry = - getOpenTelemetry( - settings.getProjectId(), - settings.getMetricsProvider(), - clientContext.getCredentials()); - } catch (Throwable t) { - logger.log(Level.WARNING, "Failed to get OTEL, will skip exporting client side metrics", t); - } - ClientContext contextWithTracer = - clientContext - .toBuilder() - .setTracerFactory(createBigtableTracerFactory(settings, openTelemetry)) - .build(); - return new EnhancedBigtableStub(settings, contextWithTracer); - } - - public static EnhancedBigtableStub createWithClientContext( - EnhancedBigtableStubSettings settings, ClientContext clientContext) throws IOException { - - return new EnhancedBigtableStub(settings, clientContext, false); - } - - public static ClientContext createClientContext(EnhancedBigtableStubSettings settings) - throws IOException { - EnhancedBigtableStubSettings.Builder builder = settings.toBuilder(); - - // TODO: this implementation is on the cusp of unwieldy, if we end up adding more features - // consider splitting it up by feature. - - // workaround JWT audience issues - patchCredentials(builder); - - // Fix the credentials so that they can be shared - Credentials credentials = null; - if (builder.getCredentialsProvider() != null) { - credentials = builder.getCredentialsProvider().getCredentials(); - } - builder.setCredentialsProvider(FixedCredentialsProvider.create(credentials)); - - InstantiatingGrpcChannelProvider.Builder transportProvider = - builder.getTransportChannelProvider() instanceof InstantiatingGrpcChannelProvider - ? ((InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider()).toBuilder() - : null; - - OpenTelemetry openTelemetry = null; - try { - // We don't want client side metrics to crash the client, so catch any exception when getting - // the OTEL instance and log the exception instead. - openTelemetry = - getOpenTelemetry(settings.getProjectId(), settings.getMetricsProvider(), credentials); - } catch (Throwable t) { - logger.log(Level.WARNING, "Failed to get OTEL, will skip exporting client side metrics", t); - } - ErrorCountPerConnectionMetricTracker errorCountPerConnectionMetricTracker; - // Skip setting up ErrorCountPerConnectionMetricTracker if openTelemetry is null - if (openTelemetry != null && transportProvider != null) { - errorCountPerConnectionMetricTracker = - new ErrorCountPerConnectionMetricTracker( - openTelemetry, createBuiltinAttributes(settings)); - ApiFunction oldChannelConfigurator = - transportProvider.getChannelConfigurator(); - transportProvider.setChannelConfigurator( - managedChannelBuilder -> { - if (settings.getEnableRoutingCookie()) { - managedChannelBuilder.intercept(new CookiesInterceptor()); - } - - managedChannelBuilder.intercept(errorCountPerConnectionMetricTracker.getInterceptor()); - - if (oldChannelConfigurator != null) { - managedChannelBuilder = oldChannelConfigurator.apply(managedChannelBuilder); - } - return managedChannelBuilder; - }); - } else { - errorCountPerConnectionMetricTracker = null; - } - - // Inject channel priming - if (settings.isRefreshingChannel()) { - - if (transportProvider != null) { - transportProvider.setChannelPrimer( - BigtableChannelPrimer.create( - credentials, - settings.getProjectId(), - settings.getInstanceId(), - settings.getAppProfileId())); - } - } - - if (transportProvider != null) { - builder.setTransportChannelProvider(transportProvider.build()); - } - - ClientContext clientContext = ClientContext.create(builder.build()); - if (errorCountPerConnectionMetricTracker != null) { - errorCountPerConnectionMetricTracker.startConnectionErrorCountTracker( - clientContext.getExecutor()); - } - return clientContext; - } - - public static ApiTracerFactory createBigtableTracerFactory( - EnhancedBigtableStubSettings settings, @Nullable OpenTelemetry openTelemetry) - throws IOException { - return createBigtableTracerFactory( - settings, Tags.getTagger(), Stats.getStatsRecorder(), openTelemetry); - } - - @VisibleForTesting - public static ApiTracerFactory createBigtableTracerFactory( - EnhancedBigtableStubSettings settings, - Tagger tagger, - StatsRecorder stats, - @Nullable OpenTelemetry openTelemetry) - throws IOException { - String projectId = settings.getProjectId(); - String instanceId = settings.getInstanceId(); - String appProfileId = settings.getAppProfileId(); - - ImmutableMap attributes = - ImmutableMap.builder() - .put(RpcMeasureConstants.BIGTABLE_PROJECT_ID, TagValue.create(projectId)) - .put(RpcMeasureConstants.BIGTABLE_INSTANCE_ID, TagValue.create(instanceId)) - .put(RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID, TagValue.create(appProfileId)) - .build(); - - ImmutableList.Builder tracerFactories = ImmutableList.builder(); - tracerFactories - .add( - // Add OpenCensus Tracing - new OpencensusTracerFactory( - ImmutableMap.builder() - // Annotate traces with the same tags as metrics - .put(RpcMeasureConstants.BIGTABLE_PROJECT_ID.getName(), projectId) - .put(RpcMeasureConstants.BIGTABLE_INSTANCE_ID.getName(), instanceId) - .put(RpcMeasureConstants.BIGTABLE_APP_PROFILE_ID.getName(), appProfileId) - // Also annotate traces with library versions - .put("gax", GaxGrpcProperties.getGaxGrpcVersion()) - .put("grpc", GaxGrpcProperties.getGrpcVersion()) - .put("gapic", Version.VERSION) - .build())) - // Add OpenCensus Metrics - .add(MetricsTracerFactory.create(tagger, stats, attributes)) - // Add user configured tracer - .add(settings.getTracerFactory()); - BuiltinMetricsTracerFactory builtinMetricsTracerFactory = - openTelemetry != null - ? BuiltinMetricsTracerFactory.create(openTelemetry, createBuiltinAttributes(settings)) - : null; - if (builtinMetricsTracerFactory != null) { - tracerFactories.add(builtinMetricsTracerFactory); - } - return new CompositeTracerFactory(tracerFactories.build()); - } - - @Nullable - public static OpenTelemetry getOpenTelemetry( - String projectId, MetricsProvider metricsProvider, @Nullable Credentials defaultCredentials) - throws IOException { - if (metricsProvider instanceof CustomOpenTelemetryMetricsProvider) { - CustomOpenTelemetryMetricsProvider customMetricsProvider = - (CustomOpenTelemetryMetricsProvider) metricsProvider; - return customMetricsProvider.getOpenTelemetry(); - } else if (metricsProvider instanceof DefaultMetricsProvider) { - Credentials credentials = - BigtableDataSettings.getMetricsCredentials() != null - ? BigtableDataSettings.getMetricsCredentials() - : defaultCredentials; - DefaultMetricsProvider defaultMetricsProvider = (DefaultMetricsProvider) metricsProvider; - return defaultMetricsProvider.getOpenTelemetry(projectId, credentials); - } else if (metricsProvider instanceof NoopMetricsProvider) { - return null; - } - throw new IOException("Invalid MetricsProvider type " + metricsProvider); - } - - private static Attributes createBuiltinAttributes(EnhancedBigtableStubSettings settings) { - return Attributes.of( - BIGTABLE_PROJECT_ID_KEY, - settings.getProjectId(), - INSTANCE_ID_KEY, - settings.getInstanceId(), - APP_PROFILE_KEY, - settings.getAppProfileId(), - CLIENT_NAME_KEY, - "bigtable-java/" + Version.VERSION); - } - - private static void patchCredentials(EnhancedBigtableStubSettings.Builder settings) - throws IOException { - int i = settings.getEndpoint().lastIndexOf(":"); - String host = settings.getEndpoint().substring(0, i); - String audience = settings.getJwtAudienceMapping().get(host); - - if (audience == null) { - return; - } - URI audienceUri = null; - try { - audienceUri = new URI(audience); - } catch (URISyntaxException e) { - throw new IllegalStateException("invalid JWT audience override", e); - } - - CredentialsProvider credentialsProvider = settings.getCredentialsProvider(); - if (credentialsProvider == null) { - return; - } - - Credentials credentials = credentialsProvider.getCredentials(); - if (credentials == null) { - return; - } - - if (!(credentials instanceof ServiceAccountJwtAccessCredentials)) { - return; - } - - ServiceAccountJwtAccessCredentials jwtCreds = (ServiceAccountJwtAccessCredentials) credentials; - JwtCredentialsWithAudience patchedCreds = new JwtCredentialsWithAudience(jwtCreds, audienceUri); - settings.setCredentialsProvider(FixedCredentialsProvider.create(patchedCreds)); - } - - public EnhancedBigtableStub(EnhancedBigtableStubSettings settings, ClientContext clientContext) { - this(settings, clientContext, true); + BigtableClientContext bigtableClientContext = BigtableClientContext.create(settings); + return new EnhancedBigtableStub(settings.getPerOpSettings(), bigtableClientContext); } public EnhancedBigtableStub( - EnhancedBigtableStubSettings settings, - ClientContext clientContext, - boolean closeClientContext) { - this.settings = settings; - this.clientContext = clientContext; - this.closeClientContext = closeClientContext; - this.requestContext = - RequestContext.create( - settings.getProjectId(), settings.getInstanceId(), settings.getAppProfileId()); + ClientOperationSettings perOpSettings, BigtableClientContext clientContext) { + this.perOpSettings = perOpSettings; + this.bigtableClientContext = clientContext; + this.requestContext = RequestContext.create(clientContext.getClientInfo()); this.bulkMutationFlowController = - new FlowController(settings.bulkMutateRowsSettings().getDynamicFlowControlSettings()); + new FlowController(perOpSettings.bulkMutateRowsSettings.getDynamicFlowControlSettings()); this.bulkMutationDynamicFlowControlStats = new DynamicFlowControlStats(); readRowsCallable = createReadRowsCallable(new DefaultRowAdapter()); + skipLargeRowsCallable = createSkipLargeRowsCallable(new DefaultRowAdapter()); readRowCallable = createReadRowCallable(new DefaultRowAdapter()); bulkReadRowsCallable = createBulkReadRowsCallable(new DefaultRowAdapter()); sampleRowKeysCallable = createSampleRowKeysCallable(); @@ -477,8 +203,8 @@ public EnhancedBigtableStub( createGenerateInitialChangeStreamPartitionsCallable(); readChangeStreamCallable = createReadChangeStreamCallable(new DefaultChangeStreamRecordAdapter()); - pingAndWarmCallable = createPingAndWarmCallable(); executeQueryCallable = createExecuteQueryCallable(); + prepareQueryCallable = createPrepareQueryCallable(); } // @@ -500,8 +226,8 @@ public EnhancedBigtableStub( @BetaApi("This surface is stable yet it might be removed in the future.") public ServerStreamingCallable createReadRowsRawCallable( RowAdapter rowAdapter) { - return createReadRowsBaseCallable(settings.readRowsSettings(), rowAdapter) - .withDefaultCallContext(clientContext.getDefaultCallContext()); + return createReadRowsBaseCallable(perOpSettings.readRowsSettings, rowAdapter) + .withDefaultCallContext(bigtableClientContext.getClientContext().getDefaultCallContext()); } /** @@ -521,7 +247,7 @@ public ServerStreamingCallable createReadRowsRawCa public ServerStreamingCallable createReadRowsCallable( RowAdapter rowAdapter) { ServerStreamingCallable readRowsCallable = - createReadRowsBaseCallable(settings.readRowsSettings(), rowAdapter); + createReadRowsBaseCallable(perOpSettings.readRowsSettings, rowAdapter); ServerStreamingCallable readRowsUserCallable = new ReadRowsUserCallable<>(readRowsCallable, requestContext); @@ -529,9 +255,15 @@ public ServerStreamingCallable createReadRowsCallable( SpanName span = getSpanName("ReadRows"); ServerStreamingCallable traced = new TracedServerStreamingCallable<>( - readRowsUserCallable, clientContext.getTracerFactory(), span); - - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + readRowsUserCallable, + bigtableClientContext.getClientContext().getTracerFactory(), + span); + + return traced.withDefaultCallContext( + bigtableClientContext + .getClientContext() + .getDefaultCallContext() + .withRetrySettings(perOpSettings.readRowsSettings.getRetrySettings())); } /** @@ -549,25 +281,43 @@ public ServerStreamingCallable createReadRowsCallable( *
    */ public UnaryCallable createReadRowCallable(RowAdapter rowAdapter) { + ClientContext clientContext = bigtableClientContext.getClientContext(); + ServerStreamingCallable readRowsCallable = createReadRowsBaseCallable( ServerStreamingCallSettings.newBuilder() - .setRetryableCodes(settings.readRowSettings().getRetryableCodes()) - .setRetrySettings(settings.readRowSettings().getRetrySettings()) - .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout()) + .setRetryableCodes(perOpSettings.readRowSettings.getRetryableCodes()) + .setRetrySettings(perOpSettings.readRowSettings.getRetrySettings()) + .setIdleTimeoutDuration(Duration.ZERO) + .setWaitTimeoutDuration(Duration.ZERO) .build(), - rowAdapter); - - ReadRowsUserCallable readRowCallable = - new ReadRowsUserCallable<>(readRowsCallable, requestContext); - - ReadRowsFirstCallable firstRow = new ReadRowsFirstCallable<>(readRowCallable); - - UnaryCallable traced = - new TracedUnaryCallable<>( - firstRow, clientContext.getTracerFactory(), getSpanName("ReadRow")); + rowAdapter, + new SimpleStreamResumptionStrategy<>()); + ServerStreamingCallable readRowCallable = + new TransformingServerStreamingCallable<>( + readRowsCallable, + (query) -> query.limit(1).toProto(requestContext), + Functions.identity()); + + BigtableUnaryOperationCallable classic = + new BigtableUnaryOperationCallable<>( + readRowCallable, + clientContext + .getDefaultCallContext() + .withRetrySettings(perOpSettings.readRowSettings.getRetrySettings()), + clientContext.getTracerFactory(), + getSpanName("ReadRow"), + /* allowNoResponse= */ true); + + return bigtableClientContext + .getSessionShim() + .decorateReadRow(classic, rowAdapter, perOpSettings.readRowSettings); + } - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + private ServerStreamingCallable createReadRowsBaseCallable( + ServerStreamingCallSettings readRowsSettings, RowAdapter rowAdapter) { + return createReadRowsBaseCallable( + readRowsSettings, rowAdapter, new ReadRowsResumptionStrategy(rowAdapter)); } /** @@ -586,29 +336,17 @@ public UnaryCallable createReadRowCallable(RowAdapter *

    NOTE: the caller is responsible for adding tracing & metrics. */ private ServerStreamingCallable createReadRowsBaseCallable( - ServerStreamingCallSettings readRowsSettings, RowAdapter rowAdapter) { - + ServerStreamingCallSettings readRowsSettings, + RowAdapter rowAdapter, + StreamResumptionStrategy resumptionStrategy) { ServerStreamingCallable base = GrpcRawCallableFactory.createServerStreamingCallable( GrpcCallSettings.newBuilder() .setMethodDescriptor(BigtableGrpc.getReadRowsMethod()) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ReadRowsRequest readRowsRequest) { - String tableName = readRowsRequest.getTableName(); - String authorizedViewName = readRowsRequest.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); - } - return ImmutableMap.of( - "table_name", - tableName, - "app_profile_id", - readRowsRequest.getAppProfileId()); - } - }) + r -> + composeRequestParams( + r.getAppProfileId(), r.getTableName(), r.getAuthorizedViewName())) .build(), readRowsSettings.getRetryableCodes()); @@ -628,7 +366,7 @@ public Map extract(ReadRowsRequest readRowsRequest) { // ReadRowsRequest -> ReadRowsResponse callable). ServerStreamingCallSettings innerSettings = ServerStreamingCallSettings.newBuilder() - .setResumptionStrategy(new ReadRowsResumptionStrategy<>(rowAdapter)) + .setResumptionStrategy(resumptionStrategy) .setRetryableCodes(readRowsSettings.getRetryableCodes()) .setRetrySettings(readRowsSettings.getRetrySettings()) .setIdleTimeout(readRowsSettings.getIdleTimeout()) @@ -636,7 +374,7 @@ public Map extract(ReadRowsRequest readRowsRequest) { .build(); ServerStreamingCallable watched = - Callables.watched(merging, innerSettings, clientContext); + Callables.watched(merging, innerSettings, bigtableClientContext.getClientContext()); ServerStreamingCallable withBigtableTracer = new BigtableTracerStreamingCallable<>(watched); @@ -652,6 +390,99 @@ public Map extract(ReadRowsRequest readRowsRequest) { return new FilterMarkerRowsCallable<>(retrying2, rowAdapter); } + /** + * Creates a callable chain to handle streaming ReadRows RPCs. This chain skips the large rows + * internally. The chain will: + * + *

      + *
    • Convert a {@link Query} into a {@link com.google.bigtable.v2.ReadRowsRequest}. + *
    • Dispatch the RPC with {@link ReadRowsRequest}. + *
    • Upon receiving the response stream, it will merge the {@link + * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row + * implementation can be configured in by the {@code rowAdapter} parameter. + *
    • Add bigtable tracer for tracking bigtable specific metrics. + *
    • Retry/resume on failure (retries for retryable error codes, connection errors and skip + * large row keys) + *
    • Filter out marker rows. + *
    • Add tracing & metrics. + *
    + */ + public ServerStreamingCallable createSkipLargeRowsCallable( + RowAdapter rowAdapter) { + + ServerStreamingCallSettings readRowsSettings = + (ServerStreamingCallSettings) perOpSettings.readRowsSettings; + + ServerStreamingCallable base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings.newBuilder() + .setMethodDescriptor(BigtableGrpc.getReadRowsMethod()) + .setParamsExtractor( + r -> + composeRequestParams( + r.getAppProfileId(), r.getTableName(), r.getAuthorizedViewName())) + .build(), + readRowsSettings.getRetryableCodes()); + + ServerStreamingCallable withStatsHeaders = + new StatsHeadersServerStreamingCallable<>(base); + + // Sometimes ReadRows connections are disconnected via an RST frame. This error is transient and + // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code + // which by default is not retryable. Convert the exception so it can be retried in the client. + ServerStreamingCallable convertException = + new ConvertExceptionCallable<>(withStatsHeaders); + + ServerStreamingCallable merging = + new RowMergingCallable<>(convertException, rowAdapter); + + // Copy settings for the middle ReadRowsRequest -> RowT callable (as opposed to the inner + // ReadRowsRequest -> ReadRowsResponse callable). + // We override the resumption strategy to use LargeReadRowsResumptionStrategy here (which skips + // the large rows) instead of ReadRowResumptionStrategy + ServerStreamingCallSettings innerSettings = + ServerStreamingCallSettings.newBuilder() + .setResumptionStrategy(new LargeReadRowsResumptionStrategy<>(rowAdapter)) + .setRetryableCodes(readRowsSettings.getRetryableCodes()) + .setRetrySettings(readRowsSettings.getRetrySettings()) + .setIdleTimeout(readRowsSettings.getIdleTimeout()) + .setWaitTimeout(readRowsSettings.getWaitTimeout()) + .build(); + + ServerStreamingCallable watched = + Callables.watched(merging, innerSettings, bigtableClientContext.getClientContext()); + + ServerStreamingCallable withBigtableTracer = + new BigtableTracerStreamingCallable<>(watched); + + // Retry logic is split into 2 parts to workaround a rare edge case described in + // ReadRowsRetryCompletedCallable + ServerStreamingCallable retrying1 = + new ReadRowsRetryCompletedCallable<>(withBigtableTracer); + + ServerStreamingCallable retrying2 = + largeRowWithRetries(retrying1, innerSettings); + + ServerStreamingCallable readRowsCallable = + new FilterMarkerRowsCallable<>(retrying2, rowAdapter); + + ServerStreamingCallable readRowsUserCallable = + new ReadRowsUserCallable<>(readRowsCallable, requestContext); + + SpanName span = getSpanName("ReadRows"); + ServerStreamingCallable traced = + new TracedServerStreamingCallable<>( + readRowsUserCallable, + bigtableClientContext.getClientContext().getTracerFactory(), + span); + + return traced.withDefaultCallContext( + bigtableClientContext + .getClientContext() + .getDefaultCallContext() + .withRetrySettings(readRowsSettings.getRetrySettings())); + } + /** * Creates a callable chain to handle bulk ReadRows RPCs. This is meant to be used in ReadRows * batcher. The chain will: @@ -671,7 +502,7 @@ public Map extract(ReadRowsRequest readRowsRequest) { private UnaryCallable> createBulkReadRowsCallable( RowAdapter rowAdapter) { ServerStreamingCallable readRowsCallable = - createReadRowsBaseCallable(settings.readRowsSettings(), rowAdapter); + createReadRowsBaseCallable(perOpSettings.readRowsSettings, rowAdapter); ServerStreamingCallable readRowsUserCallable = new ReadRowsUserCallable<>(readRowsCallable, requestContext); @@ -684,81 +515,32 @@ private UnaryCallable> createBulkReadRowsCallable( new TracedBatcherUnaryCallable<>(readRowsUserCallable.all()); UnaryCallable> traced = - new TracedUnaryCallable<>(tracedBatcher, clientContext.getTracerFactory(), span); - - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); - } - - /** - * Helper function that should only be used by createSampleRowKeysCallable() and - * createSampleRowKeysWithRequestCallable(). - */ - private UnaryCallable> - createSampleRowKeysBaseCallable() { - ServerStreamingCallable - base = - GrpcRawCallableFactory.createServerStreamingCallable( - GrpcCallSettings - . - newBuilder() - .setMethodDescriptor(BigtableGrpc.getSampleRowKeysMethod()) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - com.google.bigtable.v2.SampleRowKeysRequest sampleRowKeysRequest) { - String tableName = sampleRowKeysRequest.getTableName(); - String authorizedViewName = - sampleRowKeysRequest.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName( - authorizedViewName); - } - return ImmutableMap.of( - "table_name", - tableName, - "app_profile_id", - sampleRowKeysRequest.getAppProfileId()); - } - }) - .build(), - settings.sampleRowKeysSettings().getRetryableCodes()); - - UnaryCallable> - spoolable = base.all(); - - UnaryCallable> - withStatsHeaders = new StatsHeadersUnaryCallable<>(spoolable); - - UnaryCallable> - withBigtableTracer = new BigtableTracerUnaryCallable<>(withStatsHeaders); - - UnaryCallable> - retryable = withRetries(withBigtableTracer, settings.sampleRowKeysSettings()); + new TracedUnaryCallable<>( + tracedBatcher, bigtableClientContext.getClientContext().getTracerFactory(), span); - return retryable; + return traced.withDefaultCallContext( + bigtableClientContext + .getClientContext() + .getDefaultCallContext() + .withRetrySettings(perOpSettings.readRowsSettings.getRetrySettings())); } /** - * Creates a callable chain to handle SampleRowKeys RPcs. The chain will: + * Simple wrapper around {@link #createSampleRowKeysCallableWithRequest()} to provide backwards + * compatibility * - *
      - *
    • Convert a table id to a {@link com.google.bigtable.v2.SampleRowKeysRequest}. - *
    • Dispatch the request to the GAPIC's {@link BigtableStub#sampleRowKeysCallable()}. - *
    • Spool responses into a list. - *
    • Retry on failure. - *
    • Convert the responses into {@link KeyOffset}s. - *
    • Add tracing & metrics. - *
    + * @deprecated Please use {@link #createSampleRowKeysCallableWithRequest()} */ + @Deprecated private UnaryCallable> createSampleRowKeysCallable() { - String methodName = "SampleRowKeys"; - - UnaryCallable> - baseCallable = createSampleRowKeysBaseCallable(); - return createUserFacingUnaryCallable( - methodName, new SampleRowKeysCallable(baseCallable, requestContext)); + UnaryCallable> baseCallable = + createSampleRowKeysCallableWithRequest(); + return new UnaryCallable>() { + @Override + public ApiFuture> futureCall(String s, ApiCallContext apiCallContext) { + return baseCallable.futureCall(SampleRowKeysRequest.create(TableId.of(s)), apiCallContext); + } + }; } /** @@ -778,10 +560,40 @@ private UnaryCallable> createSampleRowKeysCallable() { createSampleRowKeysCallableWithRequest() { String methodName = "SampleRowKeys"; + ServerStreamingCallable + base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(BigtableGrpc.getSampleRowKeysMethod()) + .setParamsExtractor( + r -> + composeRequestParams( + r.getAppProfileId(), r.getTableName(), r.getAuthorizedViewName())) + .build(), + perOpSettings.sampleRowKeysSettings.getRetryableCodes()); + + UnaryCallable> + spoolable = base.all(); + UnaryCallable> - baseCallable = createSampleRowKeysBaseCallable(); + withStatsHeaders = new StatsHeadersUnaryCallable<>(spoolable); + + UnaryCallable> + withAttemptTracer = new BigtableTracerUnaryCallable<>(withStatsHeaders); + + UnaryCallable> + retryable = withRetries(withAttemptTracer, perOpSettings.sampleRowKeysSettings); + return createUserFacingUnaryCallable( - methodName, new SampleRowKeysCallableWithRequest(baseCallable, requestContext)); + methodName, + new SampleRowKeysCallableWithRequest(retryable, requestContext) + .withDefaultCallContext( + bigtableClientContext + .getClientContext() + .getDefaultCallContext() + .withRetrySettings(perOpSettings.sampleRowKeysSettings.getRetrySettings()))); } /** @@ -793,42 +605,19 @@ private UnaryCallable> createSampleRowKeysCallable() { * */ private UnaryCallable createMutateRowCallable() { - String methodName = "MutateRow"; - UnaryCallable base = - GrpcRawCallableFactory.createUnaryCallable( - GrpcCallSettings.newBuilder() - .setMethodDescriptor(BigtableGrpc.getMutateRowMethod()) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MutateRowRequest mutateRowRequest) { - String tableName = mutateRowRequest.getTableName(); - String authorizedViewName = mutateRowRequest.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); - } - return ImmutableMap.of( - "table_name", - tableName, - "app_profile_id", - mutateRowRequest.getAppProfileId()); - } - }) - .build(), - settings.mutateRowSettings().getRetryableCodes()); - - UnaryCallable withStatsHeaders = - new StatsHeadersUnaryCallable<>(base); - - UnaryCallable withBigtableTracer = - new BigtableTracerUnaryCallable<>(withStatsHeaders); - - UnaryCallable retrying = - withRetries(withBigtableTracer, settings.mutateRowSettings()); - - return createUserFacingUnaryCallable( - methodName, new MutateRowCallable(retrying, requestContext)); + UnaryCallable classic = + createUnaryCallable( + BigtableGrpc.getMutateRowMethod(), + req -> + composeRequestParams( + req.getAppProfileId(), req.getTableName(), req.getAuthorizedViewName()), + perOpSettings.mutateRowSettings, + req -> req.toProto(requestContext), + resp -> null); + + return bigtableClientContext + .getSessionShim() + .decorateMutateRow(classic, perOpSettings.mutateRowSettings); } /** @@ -850,34 +639,22 @@ public Map extract(MutateRowRequest mutateRowRequest) { *

    This function should not be exposed to external users, as it could cause a data loss. */ private UnaryCallable createMutateRowsBaseCallable() { + ClientContext clientContext = bigtableClientContext.getClientContext(); ServerStreamingCallable base = GrpcRawCallableFactory.createServerStreamingCallable( GrpcCallSettings.newBuilder() .setMethodDescriptor(BigtableGrpc.getMutateRowsMethod()) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(MutateRowsRequest mutateRowsRequest) { - String tableName = mutateRowsRequest.getTableName(); - String authorizedViewName = mutateRowsRequest.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); - } - return ImmutableMap.of( - "table_name", - tableName, - "app_profile_id", - mutateRowsRequest.getAppProfileId()); - } - }) + r -> + composeRequestParams( + r.getAppProfileId(), r.getTableName(), r.getAuthorizedViewName())) .build(), - settings.bulkMutateRowsSettings().getRetryableCodes()); + perOpSettings.bulkMutateRowsSettings.getRetryableCodes()); ServerStreamingCallable callable = new StatsHeadersServerStreamingCallable<>(base); - if (settings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled()) { + if (perOpSettings.bulkMutateRowsSettings.isServerInitiatedFlowControlEnabled()) { callable = new RateLimitingServerStreamingCallable(callable); } @@ -888,15 +665,12 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { ServerStreamingCallable convertException = new ConvertExceptionCallable<>(callable); - ServerStreamingCallable withBigtableTracer = + ServerStreamingCallable withAttemptTracer = new BigtableTracerStreamingCallable<>(convertException); - BasicResultRetryAlgorithm resultRetryAlgorithm; - if (settings.getEnableRetryInfo()) { - resultRetryAlgorithm = new RetryInfoRetryAlgorithm<>(); - } else { - resultRetryAlgorithm = new ApiResultRetryAlgorithm<>(); - } + BasicResultRetryAlgorithm resultRetryAlgorithm = + new RetryInfoRetryAlgorithm<>(); + MutateRowsPartialErrorRetryAlgorithm mutateRowsPartialErrorRetryAlgorithm = new MutateRowsPartialErrorRetryAlgorithm(resultRetryAlgorithm); @@ -904,32 +678,29 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { new RetryAlgorithm<>( mutateRowsPartialErrorRetryAlgorithm, new ExponentialRetryAlgorithm( - settings.bulkMutateRowsSettings().getRetrySettings(), clientContext.getClock())); + perOpSettings.bulkMutateRowsSettings.getRetrySettings(), clientContext.getClock())); RetryingExecutorWithContext retryingExecutor = new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor()); UnaryCallable baseCallable = new MutateRowsRetryingCallable( clientContext.getDefaultCallContext(), - withBigtableTracer, + withAttemptTracer, retryingExecutor, - settings.bulkMutateRowsSettings().getRetryableCodes(), + perOpSettings.bulkMutateRowsSettings.getRetryableCodes(), retryAlgorithm); - UnaryCallable withCookie = baseCallable; - - if (settings.getEnableRoutingCookie()) { - withCookie = new CookiesUnaryCallable<>(baseCallable); - } + UnaryCallable withCookie = + new CookiesUnaryCallable<>(baseCallable); UnaryCallable flowControlCallable = null; - if (settings.bulkMutateRowsSettings().isLatencyBasedThrottlingEnabled()) { + if (perOpSettings.bulkMutateRowsSettings.isLatencyBasedThrottlingEnabled()) { flowControlCallable = new DynamicFlowControlCallable( withCookie, bulkMutationFlowController, bulkMutationDynamicFlowControlStats, - settings.bulkMutateRowsSettings().getTargetRpcLatencyMs(), + perOpSettings.bulkMutateRowsSettings.getTargetRpcLatencyMs(), FLOW_CONTROL_ADJUSTING_INTERVAL_MS); } UnaryCallable userFacing = @@ -945,7 +716,10 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { new TracedUnaryCallable<>( tracedBatcherUnaryCallable, clientContext.getTracerFactory(), spanName); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(perOpSettings.bulkMutateRowsSettings.getRetrySettings())); } /** @@ -966,17 +740,21 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { * com.google.cloud.bigtable.data.v2.models.MutateRowsException}. *

  • Split the responses using {@link MutateRowsBatchingDescriptor}. * + * + * @deprecated Please use {@link #newMutateRowsBatcher(TargetId, GrpcCallContext)} */ + @Deprecated public Batcher newMutateRowsBatcher( @Nonnull String tableId, @Nullable GrpcCallContext ctx) { return new BatcherImpl<>( - settings.bulkMutateRowsSettings().getBatchingDescriptor(), + perOpSettings.bulkMutateRowsSettings.getBatchingDescriptor(), bulkMutateRowsCallable, BulkMutation.create(tableId), - settings.bulkMutateRowsSettings().getBatchingSettings(), - clientContext.getExecutor(), + perOpSettings.bulkMutateRowsSettings.getBatchingSettings(), + bigtableClientContext.getClientContext().getExecutor(), bulkMutationFlowController, - MoreObjects.firstNonNull(ctx, clientContext.getDefaultCallContext())); + MoreObjects.firstNonNull( + ctx, bigtableClientContext.getClientContext().getDefaultCallContext())); } /** @@ -1001,13 +779,14 @@ public Batcher newMutateRowsBatcher( public Batcher newMutateRowsBatcher( TargetId targetId, @Nullable GrpcCallContext ctx) { return new BatcherImpl<>( - settings.bulkMutateRowsSettings().getBatchingDescriptor(), + perOpSettings.bulkMutateRowsSettings.getBatchingDescriptor(), bulkMutateRowsCallable, BulkMutation.create(targetId), - settings.bulkMutateRowsSettings().getBatchingSettings(), - clientContext.getExecutor(), + perOpSettings.bulkMutateRowsSettings.getBatchingSettings(), + bigtableClientContext.getClientContext().getExecutor(), bulkMutationFlowController, - MoreObjects.firstNonNull(ctx, clientContext.getDefaultCallContext())); + MoreObjects.firstNonNull( + ctx, bigtableClientContext.getClientContext().getDefaultCallContext())); } /** @@ -1029,13 +808,14 @@ public Batcher newBulkReadRowsBatcher( @Nonnull Query query, @Nullable GrpcCallContext ctx) { Preconditions.checkNotNull(query, "query cannot be null"); return new BatcherImpl<>( - settings.bulkReadRowsSettings().getBatchingDescriptor(), + perOpSettings.bulkReadRowsSettings.getBatchingDescriptor(), bulkReadRowsCallable, query, - settings.bulkReadRowsSettings().getBatchingSettings(), - clientContext.getExecutor(), + perOpSettings.bulkReadRowsSettings.getBatchingSettings(), + bigtableClientContext.getClientContext().getExecutor(), null, - MoreObjects.firstNonNull(ctx, clientContext.getDefaultCallContext())); + MoreObjects.firstNonNull( + ctx, bigtableClientContext.getClientContext().getDefaultCallContext())); } /** @@ -1048,44 +828,14 @@ public Batcher newBulkReadRowsBatcher( * */ private UnaryCallable createCheckAndMutateRowCallable() { - String methodName = "CheckAndMutateRow"; - UnaryCallable base = - GrpcRawCallableFactory.createUnaryCallable( - GrpcCallSettings.newBuilder() - .setMethodDescriptor(BigtableGrpc.getCheckAndMutateRowMethod()) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - CheckAndMutateRowRequest checkAndMutateRowRequest) { - String tableName = checkAndMutateRowRequest.getTableName(); - String authorizedViewName = - checkAndMutateRowRequest.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); - } - return ImmutableMap.of( - "table_name", - tableName, - "app_profile_id", - checkAndMutateRowRequest.getAppProfileId()); - } - }) - .build(), - settings.checkAndMutateRowSettings().getRetryableCodes()); - - UnaryCallable withStatsHeaders = - new StatsHeadersUnaryCallable<>(base); - - UnaryCallable withBigtableTracer = - new BigtableTracerUnaryCallable<>(withStatsHeaders); - - UnaryCallable retrying = - withRetries(withBigtableTracer, settings.checkAndMutateRowSettings()); - - return createUserFacingUnaryCallable( - methodName, new CheckAndMutateRowCallable(retrying, requestContext)); + return createUnaryCallable( + BigtableGrpc.getCheckAndMutateRowMethod(), + req -> + composeRequestParams( + req.getAppProfileId(), req.getTableName(), req.getAuthorizedViewName()), + perOpSettings.checkAndMutateRowSettings, + req -> req.toProto(requestContext), + CheckAndMutateRowResponse::getPredicateMatched); } /** @@ -1099,39 +849,16 @@ public Map extract( * */ private UnaryCallable createReadModifyWriteRowCallable() { - UnaryCallable base = - GrpcRawCallableFactory.createUnaryCallable( - GrpcCallSettings.newBuilder() - .setMethodDescriptor(BigtableGrpc.getReadModifyWriteRowMethod()) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ReadModifyWriteRowRequest request) { - String tableName = request.getTableName(); - String authorizedViewName = request.getAuthorizedViewName(); - if (tableName.isEmpty()) { - tableName = - NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); - } - return ImmutableMap.of( - "table_name", tableName, "app_profile_id", request.getAppProfileId()); - } - }) - .build(), - settings.readModifyWriteRowSettings().getRetryableCodes()); - - UnaryCallable withStatsHeaders = - new StatsHeadersUnaryCallable<>(base); - - String methodName = "ReadModifyWriteRow"; - UnaryCallable withBigtableTracer = - new BigtableTracerUnaryCallable<>(withStatsHeaders); - - UnaryCallable retrying = - withRetries(withBigtableTracer, settings.readModifyWriteRowSettings()); - - return createUserFacingUnaryCallable( - methodName, new ReadModifyWriteRowCallable(retrying, requestContext)); + DefaultRowAdapter rowAdapter = new DefaultRowAdapter(); + + return createUnaryCallable( + BigtableGrpc.getReadModifyWriteRowMethod(), + req -> + composeRequestParams( + req.getAppProfileId(), req.getTableName(), req.getAuthorizedViewName()), + perOpSettings.readModifyWriteRowSettings, + req -> req.toProto(requestContext), + resp -> rowAdapter.createRowFromProto(resp.getRow())); } /** @@ -1148,6 +875,7 @@ public Map extract(ReadModifyWriteRowRequest request) { */ private ServerStreamingCallable createGenerateInitialChangeStreamPartitionsCallable() { + ClientContext clientContext = bigtableClientContext.getClientContext(); ServerStreamingCallable< GenerateInitialChangeStreamPartitionsRequest, GenerateInitialChangeStreamPartitionsResponse> @@ -1160,20 +888,9 @@ public Map extract(ReadModifyWriteRowRequest request) { .setMethodDescriptor( BigtableGrpc.getGenerateInitialChangeStreamPartitionsMethod()) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - GenerateInitialChangeStreamPartitionsRequest - generateInitialChangeStreamPartitionsRequest) { - return ImmutableMap.of( - "table_name", - generateInitialChangeStreamPartitionsRequest.getTableName(), - "app_profile_id", - generateInitialChangeStreamPartitionsRequest.getAppProfileId()); - } - }) + r -> composeRequestParams(r.getAppProfileId(), r.getTableName(), "")) .build(), - settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()); + perOpSettings.generateInitialChangeStreamPartitionsSettings.getRetryableCodes()); ServerStreamingCallable userCallable = new GenerateInitialChangeStreamPartitionsUserCallable(base, requestContext); @@ -1192,29 +909,33 @@ public Map extract( ServerStreamingCallSettings innerSettings = ServerStreamingCallSettings.newBuilder() .setRetryableCodes( - settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()) + perOpSettings.generateInitialChangeStreamPartitionsSettings.getRetryableCodes()) .setRetrySettings( - settings.generateInitialChangeStreamPartitionsSettings().getRetrySettings()) + perOpSettings.generateInitialChangeStreamPartitionsSettings.getRetrySettings()) .setIdleTimeout( - settings.generateInitialChangeStreamPartitionsSettings().getIdleTimeout()) + perOpSettings.generateInitialChangeStreamPartitionsSettings.getIdleTimeout()) .setWaitTimeout( - settings.generateInitialChangeStreamPartitionsSettings().getWaitTimeout()) + perOpSettings.generateInitialChangeStreamPartitionsSettings.getWaitTimeout()) .build(); ServerStreamingCallable watched = Callables.watched(convertException, innerSettings, clientContext); - ServerStreamingCallable withBigtableTracer = + ServerStreamingCallable withAttemptTracer = new BigtableTracerStreamingCallable<>(watched); ServerStreamingCallable retrying = - withRetries(withBigtableTracer, innerSettings); + withRetries(withAttemptTracer, innerSettings); SpanName span = getSpanName("GenerateInitialChangeStreamPartitions"); ServerStreamingCallable traced = new TracedServerStreamingCallable<>(retrying, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings( + perOpSettings.generateInitialChangeStreamPartitionsSettings.getRetrySettings())); } /** @@ -1235,22 +956,15 @@ public Map extract( ServerStreamingCallable createReadChangeStreamCallable( ChangeStreamRecordAdapter changeStreamRecordAdapter) { + ClientContext clientContext = bigtableClientContext.getClientContext(); ServerStreamingCallable base = GrpcRawCallableFactory.createServerStreamingCallable( GrpcCallSettings.newBuilder() .setMethodDescriptor(BigtableGrpc.getReadChangeStreamMethod()) .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - ReadChangeStreamRequest readChangeStreamRequest) { - return ImmutableMap.of( - "table_name", readChangeStreamRequest.getTableName(), - "app_profile_id", readChangeStreamRequest.getAppProfileId()); - } - }) + r -> composeRequestParams(r.getAppProfileId(), r.getTableName(), "")) .build(), - settings.readChangeStreamSettings().getRetryableCodes()); + perOpSettings.readChangeStreamSettings.getRetryableCodes()); ServerStreamingCallable withStatsHeaders = new StatsHeadersServerStreamingCallable<>(base); @@ -1270,20 +984,20 @@ public Map extract( ServerStreamingCallSettings.newBuilder() .setResumptionStrategy( new ReadChangeStreamResumptionStrategy<>(changeStreamRecordAdapter)) - .setRetryableCodes(settings.readChangeStreamSettings().getRetryableCodes()) - .setRetrySettings(settings.readChangeStreamSettings().getRetrySettings()) - .setIdleTimeout(settings.readChangeStreamSettings().getIdleTimeout()) - .setWaitTimeout(settings.readChangeStreamSettings().getWaitTimeout()) + .setRetryableCodes(perOpSettings.readChangeStreamSettings.getRetryableCodes()) + .setRetrySettings(perOpSettings.readChangeStreamSettings.getRetrySettings()) + .setIdleTimeout(perOpSettings.readChangeStreamSettings.getIdleTimeout()) + .setWaitTimeout(perOpSettings.readChangeStreamSettings.getWaitTimeout()) .build(); ServerStreamingCallable watched = Callables.watched(merging, innerSettings, clientContext); - ServerStreamingCallable withBigtableTracer = + ServerStreamingCallable withAttemptTracer = new BigtableTracerStreamingCallable<>(watched); ServerStreamingCallable readChangeStreamCallable = - withRetries(withBigtableTracer, innerSettings); + withRetries(withAttemptTracer, innerSettings); ServerStreamingCallable readChangeStreamUserCallable = @@ -1294,18 +1008,24 @@ public Map extract( new TracedServerStreamingCallable<>( readChangeStreamUserCallable, clientContext.getTracerFactory(), span); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(perOpSettings.readChangeStreamSettings.getRetrySettings())); } /** * Creates a callable chain to handle streaming ExecuteQuery RPCs. The chain will: * *
      - *
    • Convert a {@link Statement} into a {@link ExecuteQueryCallContext}, which passes the - * {@link Statement} & a future for the {@link + *
    • Convert a {@link BoundStatement} into a {@link ExecuteQueryCallContext}, which passes the + * {@link BoundStatement} & a future for the {@link * com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata} up the call chain. - *
    • Upon receiving the response stream, it will set the metadata future and translate the + *
    • Refresh expired {@link PrepareResponse} when the server returns a specific error} + *
    • Add retry/resume on failures + *
    • Upon receiving the first resume_token, it will set the metadata future and translate the * {@link com.google.bigtable.v2.PartialResultSet}s into {@link SqlRow}s + *
    • Pass through non-retryable errors to the metadata future *
    • Add tracing & metrics. *
    • Wrap the metadata future & row stream into a {@link * com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream} @@ -1313,9 +1033,7 @@ public Map extract( */ @InternalApi("For internal use only") public ExecuteQueryCallable createExecuteQueryCallable() { - // TODO support resumption - // TODO update codes once resumption is implemented - Set retryableCodes = Collections.emptySet(); + ClientContext clientContext = bigtableClientContext.getClientContext(); ServerStreamingCallable base = GrpcRawCallableFactory.createServerStreamingCallable( GrpcCallSettings.newBuilder() @@ -1330,39 +1048,76 @@ public Map extract(ExecuteQueryRequest executeQueryRequest) { } }) .build(), - retryableCodes); + perOpSettings.executeQuerySettings.getRetryableCodes()); ServerStreamingCallable withStatsHeaders = new StatsHeadersServerStreamingCallable<>(base); - ServerStreamingCallSettings innerSettings = - ServerStreamingCallSettings.newBuilder() - // TODO resumption strategy and retry settings - .setIdleTimeout(settings.executeQuerySettings().getIdleTimeout()) - .setWaitTimeout(settings.executeQuerySettings().getWaitTimeout()) - .build(); + ServerStreamingCallable withPlanRefresh = + new PlanRefreshingCallable(withStatsHeaders, requestContext); - // Watchdog needs to stay above the metadata observer so that watchdog errors - // are passed through to the metadata future. - ServerStreamingCallable watched = - Callables.watched(withStatsHeaders, innerSettings, clientContext); + // Sometimes ExecuteQuery connections are disconnected via an RST frame. This error is transient + // and should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error + // code which by default is not retryable. Convert the exception, so it can be retried in the + // client. + ServerStreamingCallable convertException = + new ConvertExceptionCallable<>(withPlanRefresh); + + ServerStreamingCallable withAttemptTracer = + new BigtableTracerStreamingCallable<>(convertException); + + ServerStreamingCallSettings retrySettings = + ServerStreamingCallSettings.newBuilder() + .setResumptionStrategy(new ExecuteQueryResumptionStrategy()) + .setRetryableCodes(perOpSettings.executeQuerySettings.getRetryableCodes()) + .setRetrySettings(perOpSettings.executeQuerySettings.getRetrySettings()) + .setIdleTimeout(perOpSettings.executeQuerySettings.getIdleTimeout()) + .setWaitTimeout(perOpSettings.executeQuerySettings.getWaitTimeout()) + .build(); - ServerStreamingCallable withMetadataObserver = - new MetadataResolvingCallable(watched); + // Retries need to happen before row merging, because the resumeToken is part + // of the ExecuteQueryResponse. This is okay because the first response in every + // attempt stream will have reset set to true, so any unyielded data from the previous + // attempt will be reset properly + ServerStreamingCallable retries = + withRetries(withAttemptTracer, retrySettings); ServerStreamingCallable merging = - new SqlRowMergingCallable(withMetadataObserver); + new SqlRowMergingCallable(retries); + + ServerStreamingCallSettings watchdogSettings = + ServerStreamingCallSettings.newBuilder() + .setIdleTimeout(perOpSettings.executeQuerySettings.getIdleTimeout()) + .setWaitTimeout(perOpSettings.executeQuerySettings.getWaitTimeout()) + .build(); + + // Watchdog needs to stay above the metadata error handling so that watchdog errors + // are passed through to the metadata future. + ServerStreamingCallable watched = + Callables.watched(merging, watchdogSettings, clientContext); - ServerStreamingCallable withBigtableTracer = - new BigtableTracerStreamingCallable<>(merging); + ServerStreamingCallable passingThroughErrorsToMetadata = + new MetadataErrorHandlingCallable(watched); SpanName span = getSpanName("ExecuteQuery"); ServerStreamingCallable traced = new TracedServerStreamingCallable<>( - withBigtableTracer, clientContext.getTracerFactory(), span); + passingThroughErrorsToMetadata, clientContext.getTracerFactory(), span); return new ExecuteQueryCallable( - traced.withDefaultCallContext(clientContext.getDefaultCallContext()), requestContext); + traced.withDefaultCallContext( + clientContext + .getDefaultCallContext() + .withRetrySettings(perOpSettings.executeQuerySettings.getRetrySettings()))); + } + + private UnaryCallable createPrepareQueryCallable() { + return createUnaryCallable( + BigtableGrpc.getPrepareQueryMethod(), + req -> composeInstanceLevelRequestParams(req.getInstanceName(), req.getAppProfileId()), + perOpSettings.prepareQuerySettings, + req -> req.toProto(requestContext), + PrepareResponse::fromProto); } /** @@ -1373,62 +1128,102 @@ private UnaryCallable createUserFacin String methodName, UnaryCallable inner) { UnaryCallable traced = - new TracedUnaryCallable<>(inner, clientContext.getTracerFactory(), getSpanName(methodName)); + new TracedUnaryCallable<>( + inner, + bigtableClientContext.getClientContext().getTracerFactory(), + getSpanName(methodName)); - return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + return traced.withDefaultCallContext( + bigtableClientContext.getClientContext().getDefaultCallContext()); } - private UnaryCallable createPingAndWarmCallable() { - UnaryCallable pingAndWarm = - GrpcRawCallableFactory.createUnaryCallable( - GrpcCallSettings.newBuilder() - .setMethodDescriptor(BigtableGrpc.getPingAndWarmMethod()) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(PingAndWarmRequest request) { - return ImmutableMap.of( - "name", request.getName(), - "app_profile_id", request.getAppProfileId()); - } - }) + private Map composeRequestParams( + String appProfileId, String tableName, String authorizedViewName) { + if (tableName.isEmpty() && !authorizedViewName.isEmpty()) { + tableName = NameUtil.extractTableNameFromAuthorizedViewName(authorizedViewName); + } + return ImmutableMap.of("table_name", tableName, "app_profile_id", appProfileId); + } + + private Map composeInstanceLevelRequestParams( + String instanceName, String appProfileId) { + return ImmutableMap.of("name", instanceName, "app_profile_id", appProfileId); + } + + private UnaryCallable createUnaryCallable( + MethodDescriptor methodDescriptor, + RequestParamsExtractor headerParamsFn, + UnaryCallSettings callSettings, + Function requestTransformer, + Function responseTranformer) { + + ServerStreamingCallable base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings.newBuilder() + .setMethodDescriptor(methodDescriptor) + .setParamsExtractor(headerParamsFn) .build(), - Collections.emptySet()); - return pingAndWarm.withDefaultCallContext(clientContext.getDefaultCallContext()); + callSettings.getRetryableCodes()); + + base = new StatsHeadersServerStreamingCallable<>(base); + + base = new BigtableTracerStreamingCallable<>(base); + + base = withRetries(base, convertUnaryToServerStreamingSettings(callSettings)); + + ServerStreamingCallable transformed = + new TransformingServerStreamingCallable<>(base, requestTransformer, responseTranformer); + + return new BigtableUnaryOperationCallable<>( + transformed, + bigtableClientContext + .getClientContext() + .getDefaultCallContext() + .withRetrySettings(callSettings.getRetrySettings()), + bigtableClientContext.getClientContext().getTracerFactory(), + getSpanName(methodDescriptor.getBareMethodName()), + /* allowNoResponse= */ false); + } + + private static + ServerStreamingCallSettings convertUnaryToServerStreamingSettings( + UnaryCallSettings unarySettings) { + return ServerStreamingCallSettings.newBuilder() + .setResumptionStrategy(new SimpleStreamResumptionStrategy<>()) + .setRetryableCodes(unarySettings.getRetryableCodes()) + .setRetrySettings(unarySettings.getRetrySettings()) + .setIdleTimeoutDuration(Duration.ZERO) + .setWaitTimeoutDuration(Duration.ZERO) + .build(); } private UnaryCallable withRetries( UnaryCallable innerCallable, UnaryCallSettings unaryCallSettings) { - UnaryCallable retrying; - if (settings.getEnableRetryInfo()) { - retrying = - com.google.cloud.bigtable.gaxx.retrying.Callables.retrying( - innerCallable, unaryCallSettings, clientContext); - } else { - retrying = Callables.retrying(innerCallable, unaryCallSettings, clientContext); - } - if (settings.getEnableRoutingCookie()) { - return new CookiesUnaryCallable<>(retrying); - } - return retrying; + UnaryCallable retrying = + com.google.cloud.bigtable.gaxx.retrying.Callables.retrying( + innerCallable, unaryCallSettings, bigtableClientContext.getClientContext()); + return new CookiesUnaryCallable<>(retrying); } private ServerStreamingCallable withRetries( ServerStreamingCallable innerCallable, ServerStreamingCallSettings serverStreamingCallSettings) { - ServerStreamingCallable retrying; - if (settings.getEnableRetryInfo()) { - retrying = - com.google.cloud.bigtable.gaxx.retrying.Callables.retrying( - innerCallable, serverStreamingCallSettings, clientContext); - } else { - retrying = Callables.retrying(innerCallable, serverStreamingCallSettings, clientContext); - } - if (settings.getEnableRoutingCookie()) { - return new CookiesServerStreamingCallable<>(retrying); - } - return retrying; + ServerStreamingCallable retrying = + com.google.cloud.bigtable.gaxx.retrying.Callables.retrying( + innerCallable, serverStreamingCallSettings, bigtableClientContext.getClientContext()); + + return new CookiesServerStreamingCallable<>(retrying); + } + + private ServerStreamingCallable largeRowWithRetries( + ServerStreamingCallable innerCallable, + ServerStreamingCallSettings serverStreamingCallSettings) { + + ServerStreamingCallable retrying = + com.google.cloud.bigtable.gaxx.retrying.Callables.retryingForLargeRows( + innerCallable, serverStreamingCallSettings, bigtableClientContext.getClientContext()); + return new CookiesServerStreamingCallable<>(retrying); } // @@ -1439,11 +1234,18 @@ public ServerStreamingCallable readRowsCallable() { return readRowsCallable; } + /** Returns a streaming read rows callable that skips large rows */ + public ServerStreamingCallable skipLargeRowsCallable() { + return skipLargeRowsCallable; + } + /** Return a point read callable */ public UnaryCallable readRowCallable() { return readRowCallable; } + /** Deprecated, please use {@link #sampleRowKeysCallableWithRequest} */ + @Deprecated public UnaryCallable> sampleRowKeysCallable() { return sampleRowKeysCallable; } @@ -1502,8 +1304,9 @@ public ExecuteQueryCallable executeQueryCallable() { return executeQueryCallable; } - UnaryCallable pingAndWarmCallable() { - return pingAndWarmCallable; + @InternalApi + public UnaryCallable prepareQueryCallable() { + return prepareQueryCallable; } // @@ -1514,14 +1317,10 @@ private SpanName getSpanName(String methodName) { @Override public void close() { - if (closeClientContext) { - for (BackgroundResource backgroundResource : clientContext.getBackgroundResources()) { - try { - backgroundResource.close(); - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } + try { + bigtableClientContext.close(); + } catch (Exception e) { + throw new IllegalStateException("failed to close client context", e); } } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 4415894132..a9eb27bae4 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -21,7 +21,6 @@ import com.google.api.gax.batching.BatchingSettings; import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.batching.FlowController; -import com.google.api.gax.batching.FlowController.LimitExceededBehavior; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.grpc.ChannelPoolSettings; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; @@ -35,6 +34,8 @@ import com.google.bigtable.v2.FeatureFlags; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; import com.google.cloud.bigtable.data.v2.internal.SqlRow; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; @@ -45,16 +46,13 @@ import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; import com.google.cloud.bigtable.data.v2.stub.metrics.DefaultMetricsProvider; import com.google.cloud.bigtable.data.v2.stub.metrics.MetricsProvider; -import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor; -import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor; 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 java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -62,9 +60,9 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.logging.Logger; +import java.util.Optional; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.threeten.bp.Duration; /** @@ -96,112 +94,25 @@ * } */ public class EnhancedBigtableStubSettings extends StubSettings { - private static final Logger logger = - Logger.getLogger(EnhancedBigtableStubSettings.class.getName()); - // The largest message that can be received is a 256 MB ReadRowsResponse. private static final int MAX_MESSAGE_SIZE = 256 * 1024 * 1024; private static final String SERVER_DEFAULT_APP_PROFILE_ID = ""; - // TODO(meeral-k): add documentation - private static final String CBT_ENABLE_DIRECTPATH = "CBT_ENABLE_DIRECTPATH"; - private static final Set IDEMPOTENT_RETRY_CODES = - ImmutableSet.of(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE); - - // Copy of default retrying settings in the yaml - private static final RetrySettings IDEMPOTENT_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10)) - .setRetryDelayMultiplier(2) - .setMaxRetryDelay(Duration.ofMinutes(1)) - .setInitialRpcTimeout(Duration.ofSeconds(20)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofSeconds(20)) - .setTotalTimeout(Duration.ofMinutes(10)) - .build(); - - // Allow retrying ABORTED statuses. These will be returned by the server when the client is - // too slow to read the rows. This makes sense for the java client because retries happen - // after the row merging logic. Which means that the retry will not be invoked until the - // current buffered chunks are consumed. - private static final Set READ_ROWS_RETRY_CODES = - ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); - - // Priming request should have a shorter timeout - private static Duration PRIME_REQUEST_TIMEOUT = Duration.ofSeconds(30); - - private static final RetrySettings READ_ROWS_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMinutes(1)) - .setMaxAttempts(10) - .setJittered(true) - .setInitialRpcTimeout(Duration.ofMinutes(30)) - .setRpcTimeoutMultiplier(2.0) - .setMaxRpcTimeout(Duration.ofMinutes(30)) - .setTotalTimeout(Duration.ofHours(12)) - .build(); + // TODO change this to true when enabling directpath by default + // For now, Only runs Direct Access Checker if user explicitly sets CBT_ENABLE_DIRECTPATH=true + private static final DirectPathConfig DIRECT_PATH_CONFIG = + Optional.ofNullable(System.getenv("CBT_ENABLE_DIRECTPATH")) + .map(Boolean::parseBoolean) + .map(b -> b ? DirectPathConfig.FORCED_ON : DirectPathConfig.FORCED_OFF) + .orElse(DirectPathConfig.DEFAULT); - private static final RetrySettings MUTATE_ROWS_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10)) - .setRetryDelayMultiplier(2) - .setMaxRetryDelay(Duration.ofMinutes(1)) - .setInitialRpcTimeout(Duration.ofMinutes(1)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMinutes(1)) - .setTotalTimeout(Duration.ofMinutes(10)) - .build(); - - private static final Set GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_CODES = - ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); - - private static final RetrySettings GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMinutes(1)) - .setMaxAttempts(10) - .setJittered(true) - .setInitialRpcTimeout(Duration.ofMinutes(1)) - .setRpcTimeoutMultiplier(2.0) - .setMaxRpcTimeout(Duration.ofMinutes(10)) - .setTotalTimeout(Duration.ofMinutes(60)) - .build(); + // If true, disable the bound-token-by-default feature for DirectPath. + private static final boolean DIRECT_PATH_BOUND_TOKEN_DISABLED = + Boolean.parseBoolean(System.getenv("CBT_DISABLE_DIRECTPATH_BOUND_TOKEN")); - // Allow retrying ABORTED statuses. These will be returned by the server when the client is - // too slow to read the change stream records. This makes sense for the java client because - // retries happen after the mutation merging logic. Which means that the retry will not be - // invoked until the current buffered change stream mutations are consumed. - private static final Set READ_CHANGE_STREAM_RETRY_CODES = - ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); - - private static final RetrySettings READ_CHANGE_STREAM_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(10)) - .setRetryDelayMultiplier(2.0) - .setMaxRetryDelay(Duration.ofMinutes(1)) - .setMaxAttempts(10) - .setJittered(true) - .setInitialRpcTimeout(Duration.ofMinutes(5)) - .setRpcTimeoutMultiplier(2.0) - .setMaxRpcTimeout(Duration.ofMinutes(5)) - .setTotalTimeout(Duration.ofHours(12)) - .build(); + private static final boolean SESSIONS_DISABLE_ENV_VAR = + Boolean.parseBoolean(System.getenv("CBT_DISABLE_SESSIONS")); - // TODO update this when we support retries for ExecuteQuery - // For preview we don't support resumption yet, so we don't retry anything. - private static final Set EXECUTE_QUERY_RETRY_CODES = Collections.emptySet(); - - // We still setup retry settings in order to set default deadlines - private static final RetrySettings EXECUTE_QUERY_RETRY_SETTINGS = - RetrySettings.newBuilder() - .setMaxAttempts(1) - // Set a conservative deadline to start for preview. We'll increase this in the future - .setInitialRpcTimeout(Duration.ofSeconds(30)) - .setMaxRpcTimeout(Duration.ofSeconds(30)) - .build(); /** * Scopes that are equivalent to JWT's audience. * @@ -217,82 +128,52 @@ public class EnhancedBigtableStubSettings extends StubSettings DEFAULT_JWT_AUDIENCE_MAPPING = - ImmutableMap.of("batch-bigtable.googleapis.com", "https://bigtable.googleapis.com/"); + private static final String DEFAULT_DATA_JWT_AUDIENCE = "https://bigtable.googleapis.com/"; private final String projectId; private final String instanceId; private final String appProfileId; private final boolean isRefreshingChannel; - private ImmutableList primedTableIds; - private final Map jwtAudienceMapping; - private final boolean enableRoutingCookie; - private final boolean enableRetryInfo; - - private final ServerStreamingCallSettings readRowsSettings; - private final UnaryCallSettings readRowSettings; - private final UnaryCallSettings> sampleRowKeysSettings; - private final UnaryCallSettings mutateRowSettings; - private final BigtableBatchingCallSettings bulkMutateRowsSettings; - private final BigtableBulkReadRowsCallSettings bulkReadRowsSettings; - private final UnaryCallSettings checkAndMutateRowSettings; - private final UnaryCallSettings readModifyWriteRowSettings; - private final ServerStreamingCallSettings - generateInitialChangeStreamPartitionsSettings; - private final ServerStreamingCallSettings - readChangeStreamSettings; - private final UnaryCallSettings pingAndWarmSettings; - private final ServerStreamingCallSettings executeQuerySettings; + + private final ClientOperationSettings perOpSettings; private final FeatureFlags featureFlags; private final MetricsProvider metricsProvider; + @Nullable private final String metricsEndpoint; + private final boolean areInternalMetricsEnabled; + private final String jwtAudience; + + @InternalApi + public enum DirectPathConfig { + DEFAULT, + FORCED_ON, + FORCED_OFF, + } + + private final DirectPathConfig directPathConfig; + + private final boolean sessionsEnabled; private EnhancedBigtableStubSettings(Builder builder) { super(builder); - // Since point reads, streaming reads, bulk reads share the same base callable that converts - // grpc errors into ApiExceptions, they must have the same retry codes. - Preconditions.checkState( - builder - .readRowSettings - .getRetryableCodes() - .equals(builder.readRowsSettings.getRetryableCodes()), - "Single ReadRow retry codes must match ReadRows retry codes"); - Preconditions.checkState( - builder - .bulkReadRowsSettings - .getRetryableCodes() - .equals(builder.readRowsSettings.getRetryableCodes()), - "Bulk ReadRow retry codes must match ReadRows retry codes"); - + directPathConfig = builder.directPathConfig; projectId = builder.projectId; instanceId = builder.instanceId; appProfileId = builder.appProfileId; isRefreshingChannel = builder.isRefreshingChannel; - primedTableIds = builder.primedTableIds; - jwtAudienceMapping = builder.jwtAudienceMapping; - enableRoutingCookie = builder.enableRoutingCookie; - enableRetryInfo = builder.enableRetryInfo; metricsProvider = builder.metricsProvider; + metricsEndpoint = builder.metricsEndpoint; + areInternalMetricsEnabled = builder.areInternalMetricsEnabled; + jwtAudience = builder.jwtAudience; - // Per method settings. - readRowsSettings = builder.readRowsSettings.build(); - readRowSettings = builder.readRowSettings.build(); - sampleRowKeysSettings = builder.sampleRowKeysSettings.build(); - mutateRowSettings = builder.mutateRowSettings.build(); - bulkMutateRowsSettings = builder.bulkMutateRowsSettings.build(); - bulkReadRowsSettings = builder.bulkReadRowsSettings.build(); - checkAndMutateRowSettings = builder.checkAndMutateRowSettings.build(); - readModifyWriteRowSettings = builder.readModifyWriteRowSettings.build(); - generateInitialChangeStreamPartitionsSettings = - builder.generateInitialChangeStreamPartitionsSettings.build(); - readChangeStreamSettings = builder.readChangeStreamSettings.build(); - pingAndWarmSettings = builder.pingAndWarmSettings.build(); - executeQuerySettings = builder.executeQuerySettings.build(); + this.sessionsEnabled = builder.sessionsEnabled; + + perOpSettings = new ClientOperationSettings(builder.perOpSettings); featureFlags = builder.featureFlags.build(); } @@ -306,6 +187,11 @@ public String getProjectId() { return projectId; } + @InternalApi + public DirectPathConfig getDirectPathConfig() { + return this.directPathConfig; + } + /** Returns the target instance id. */ public String getInstanceId() { return instanceId; @@ -332,12 +218,17 @@ public boolean isRefreshingChannel() { */ @Deprecated public List getPrimedTableIds() { - return primedTableIds; + return ImmutableList.of(); } + /** + * @deprecated This is a no op and will always return an empty map. Audience is always set to + * bigtable service name. + */ @InternalApi("Used for internal testing") + @Deprecated public Map getJwtAudienceMapping() { - return jwtAudienceMapping; + return ImmutableMap.of(); } public MetricsProvider getMetricsProvider() { @@ -345,39 +236,51 @@ public MetricsProvider getMetricsProvider() { } /** - * Gets if routing cookie is enabled. If true, client will retry a request with extra metadata - * server sent back. + * @deprecated routing cookies are always on. */ - @BetaApi("Routing cookie is not currently stable and may change in the future") + @Deprecated public boolean getEnableRoutingCookie() { - return enableRoutingCookie; + return true; } /** - * Gets if RetryInfo is enabled. If true, client bases retry decision and back off time on server - * returned RetryInfo value. Otherwise, client uses {@link RetrySettings}. + * @deprecated RetryInfo is now always on. */ - @BetaApi("RetryInfo is not currently stable and may change in the future") + @Deprecated public boolean getEnableRetryInfo() { - return enableRetryInfo; + return true; + } + + /** + * Gets the Google Cloud Monitoring endpoint for publishing client side metrics. If it's null, + * client will publish metrics to the default monitoring endpoint. + */ + @Nullable + public String getMetricsEndpoint() { + return metricsEndpoint; + } + + public boolean areInternalMetricsEnabled() { + return areInternalMetricsEnabled; + } + + @InternalApi + public ClientOperationSettings getPerOpSettings() { + return perOpSettings; } /** Returns a builder for the default ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - Boolean isDirectpathEnabled = Boolean.parseBoolean(System.getenv(CBT_ENABLE_DIRECTPATH)); InstantiatingGrpcChannelProvider.Builder grpcTransportProviderBuilder = BigtableStubSettings.defaultGrpcTransportProviderBuilder(); - if (isDirectpathEnabled) { - // Attempts direct access to CBT service over gRPC to improve throughput, - // whether the attempt is allowed is totally controlled by service owner. - grpcTransportProviderBuilder.setAttemptDirectPathXds().setAttemptDirectPath(true); - } return grpcTransportProviderBuilder .setChannelPoolSettings( ChannelPoolSettings.builder() .setInitialChannelCount(10) .setMinRpcsPerChannel(1) - .setMaxRpcsPerChannel(50) + // Keep it conservative as we scale the channel size every 1min + // and delta is 2 channels. + .setMaxRpcsPerChannel(25) .setPreemptiveRefreshEnabled(true) .build()) .setMaxInboundMessageSize(MAX_MESSAGE_SIZE) @@ -386,6 +289,27 @@ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProvi Duration.ofSeconds(10)); // wait this long before considering the connection dead } + boolean isSessionsEnabled() { + return sessionsEnabled; + } + + /** Applies Direct Access traits to an existing builder. */ + @InternalApi + public static InstantiatingGrpcChannelProvider.Builder applyDirectAccessTraitsInternal( + InstantiatingGrpcChannelProvider.Builder builder) { + builder + .setAttemptDirectPathXds() + .setAttemptDirectPath(true) + .setAllowNonDefaultServiceAccount(true); + + if (!DIRECT_PATH_BOUND_TOKEN_DISABLED) { + builder.setAllowHardBoundTokenTypes( + Collections.singletonList(InstantiatingGrpcChannelProvider.HardBoundTokenTypes.ALTS)); + } + + return builder; + } + @SuppressWarnings("WeakerAccess") public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); @@ -429,7 +353,7 @@ public String getServiceName() { *
    */ public ServerStreamingCallSettings readRowsSettings() { - return readRowsSettings; + return perOpSettings.readRowsSettings; } /** @@ -452,7 +376,7 @@ public ServerStreamingCallSettings readRowsSettings() { * */ public UnaryCallSettings> sampleRowKeysSettings() { - return sampleRowKeysSettings; + return perOpSettings.sampleRowKeysSettings; } /** @@ -477,7 +401,7 @@ public UnaryCallSettings> sampleRowKeysSettings() { * @see RetrySettings for more explanation. */ public UnaryCallSettings readRowSettings() { - return readRowSettings; + return perOpSettings.readRowSettings; } /** @@ -502,7 +426,7 @@ public UnaryCallSettings readRowSettings() { * @see RetrySettings for more explanation. */ public UnaryCallSettings mutateRowSettings() { - return mutateRowSettings; + return perOpSettings.mutateRowSettings; } /** @@ -549,7 +473,7 @@ public UnaryCallSettings mutateRowSettings() { * related configuration explanation. */ public BigtableBatchingCallSettings bulkMutateRowsSettings() { - return bulkMutateRowsSettings; + return perOpSettings.bulkMutateRowsSettings; } /** @@ -590,7 +514,7 @@ public BigtableBatchingCallSettings bulkMutateRowsSettings() { * @see BatchingSettings for batch related configuration explanation. */ public BigtableBulkReadRowsCallSettings bulkReadRowsSettings() { - return bulkReadRowsSettings; + return perOpSettings.bulkReadRowsSettings; } /** @@ -604,7 +528,7 @@ public BigtableBulkReadRowsCallSettings bulkReadRowsSettings() { * @see RetrySettings for more explanation. */ public UnaryCallSettings checkAndMutateRowSettings() { - return checkAndMutateRowSettings; + return perOpSettings.checkAndMutateRowSettings; } /** @@ -618,21 +542,47 @@ public UnaryCallSettings checkAndMutateRowSetti * @see RetrySettings for more explanation. */ public UnaryCallSettings readModifyWriteRowSettings() { - return readModifyWriteRowSettings; + return perOpSettings.readModifyWriteRowSettings; } public ServerStreamingCallSettings generateInitialChangeStreamPartitionsSettings() { - return generateInitialChangeStreamPartitionsSettings; + return perOpSettings.generateInitialChangeStreamPartitionsSettings; } public ServerStreamingCallSettings readChangeStreamSettings() { - return readChangeStreamSettings; + return perOpSettings.readChangeStreamSettings; } - public ServerStreamingCallSettings executeQuerySettings() { - return executeQuerySettings; + public ServerStreamingCallSettings executeQuerySettings() { + return perOpSettings.executeQuerySettings; + } + + /** + * Returns the object with the settings used for a PrepareQuery request. This is used by + * PreparedStatement to manage PreparedQueries. + * + *

    This is an idempotent and non-streaming operation. + * + *

    Default retry and timeout settings: + * + *

      + *
    • Retry {@link UnaryCallSettings.Builder#setRetryableCodes error codes} are: {@link + * Code#DEADLINE_EXCEEDED} and {@link Code#UNAVAILABLE} + *
    • RetryDelay between failed attempts {@link RetrySettings.Builder#setInitialRetryDelay + * starts} at 10ms and {@link RetrySettings.Builder#setRetryDelayMultiplier increases + * exponentially} by a factor of 2 until a {@link RetrySettings.Builder#setMaxRetryDelay + * maximum of} 1 minute. + *
    • The default timeout for {@link RetrySettings.Builder#setMaxRpcTimeout each attempt} is 5 + * seconds and the timeout for the {@link RetrySettings.Builder#setTotalTimeout entire + * operation} across all of the attempts is 10 mins. + *
    + * + * @see RetrySettings for more explanation. + */ + public UnaryCallSettings prepareQuerySettings() { + return perOpSettings.prepareQuerySettings; } /** @@ -641,45 +591,32 @@ public ServerStreamingCallSettings executeQuerySettings() { *

    By default the retries are disabled for PingAndWarm and deadline is set to 30 seconds. */ UnaryCallSettings pingAndWarmSettings() { - return pingAndWarmSettings; + return perOpSettings.pingAndWarmSettings; } /** Returns a builder containing all the values of this settings class. */ + @Override public Builder toBuilder() { return new Builder(this); } /** Builder for BigtableDataSettings. */ public static class Builder extends StubSettings.Builder { - + private DirectPathConfig directPathConfig; private String projectId; private String instanceId; private String appProfileId; private boolean isRefreshingChannel; - private ImmutableList primedTableIds; - private Map jwtAudienceMapping; - private boolean enableRoutingCookie; - private boolean enableRetryInfo; - - private final ServerStreamingCallSettings.Builder readRowsSettings; - private final UnaryCallSettings.Builder readRowSettings; - private final UnaryCallSettings.Builder> sampleRowKeysSettings; - private final UnaryCallSettings.Builder mutateRowSettings; - private final BigtableBatchingCallSettings.Builder bulkMutateRowsSettings; - private final BigtableBulkReadRowsCallSettings.Builder bulkReadRowsSettings; - private final UnaryCallSettings.Builder - checkAndMutateRowSettings; - private final UnaryCallSettings.Builder readModifyWriteRowSettings; - private final ServerStreamingCallSettings.Builder - generateInitialChangeStreamPartitionsSettings; - private final ServerStreamingCallSettings.Builder - readChangeStreamSettings; - private final UnaryCallSettings.Builder pingAndWarmSettings; - private final ServerStreamingCallSettings.Builder executeQuerySettings; - - private FeatureFlags.Builder featureFlags; + private String jwtAudience; + private boolean sessionsEnabled = true; + + private final ClientOperationSettings.Builder perOpSettings; + + private final FeatureFlags.Builder featureFlags; private MetricsProvider metricsProvider; + @Nullable private String metricsEndpoint; + private boolean areInternalMetricsEnabled; /** * Initializes a new Builder with sane defaults for all settings. @@ -690,14 +627,16 @@ public static class Builder extends StubSettings.Builder + this.perOpSettings = new ClientOperationSettings.Builder(settings.perOpSettings); - /** - * Copies settings from unary RPC to another. This is necessary when modifying request and - * response types while trying to retain retry settings. - */ - private static void copyRetrySettings( - UnaryCallSettings.Builder source, UnaryCallSettings.Builder dest) { - dest.setRetryableCodes(source.getRetryableCodes()); - dest.setRetrySettings(source.getRetrySettings()); + featureFlags = settings.featureFlags.toBuilder(); } - // // /** @@ -936,13 +758,18 @@ public Builder setRefreshingChannel(boolean isRefreshingChannel) { return this; } + @InternalApi("For internal use only.") + public Builder setDirectPathConfig(DirectPathConfig directPathConfig) { + this.directPathConfig = directPathConfig; + return this; + } + /** * @deprecated This field is ignored. If {@link #isRefreshingChannel()} is enabled, warm up * requests will be sent to all table ids of the instance. */ @Deprecated public Builder setPrimedTableIds(String... tableIds) { - this.primedTableIds = ImmutableList.copyOf(tableIds); return this; } @@ -962,12 +789,29 @@ public boolean isRefreshingChannel() { */ @Deprecated public List getPrimedTableIds() { - return primedTableIds; + return ImmutableList.of(); } + /** + * @deprecated This is a no op. Audience is always set to bigtable service name. + * @see #setJwtAudience(String) to override the audience. + */ @InternalApi("Used for internal testing") + @Deprecated public Builder setJwtAudienceMapping(Map jwtAudienceMapping) { - this.jwtAudienceMapping = Preconditions.checkNotNull(jwtAudienceMapping); + return this; + } + + /** Set the jwt audience override. */ + @InternalApi("Used for internal testing") + public Builder setJwtAudience(String audience) { + this.jwtAudience = audience; + return this; + } + + @InternalApi + public Builder setSessionsEnabled(boolean enabled) { + this.sessionsEnabled = enabled; return this; } @@ -995,93 +839,127 @@ public MetricsProvider getMetricsProvider() { return this.metricsProvider; } + /** + * Built-in client side metrics are published through Google Cloud Monitoring endpoint. This + * setting overrides the default endpoint for publishing the metrics. + */ + public Builder setMetricsEndpoint(String endpoint) { + this.metricsEndpoint = endpoint; + return this; + } + + /** + * Get the Google Cloud Monitoring endpoint for publishing client side metrics. If it's null, + * client will publish metrics to the default monitoring endpoint. + */ + @Nullable + public String getMetricsEndpoint() { + return metricsEndpoint; + } + + /** Disable collection of internal metrics that help google detect issues accessing Bigtable. */ + public Builder disableInternalMetrics() { + this.areInternalMetricsEnabled = false; + return this; + } + + /** Checks if internal metrics are disabled */ + public boolean areInternalMetricsEnabled() { + return areInternalMetricsEnabled; + } + + /** + * @deprecated This is a no op and will always return an empty map. Audience is always set to + * bigtable service name. + * @see #getJwtAudience() to get the audience. + */ @InternalApi("Used for internal testing") + @Deprecated public Map getJwtAudienceMapping() { - return jwtAudienceMapping; + return ImmutableMap.of(); + } + + /** Return the jwt audience override. */ + String getJwtAudience() { + return this.jwtAudience; } /** - * Sets if routing cookie is enabled. If true, client will retry a request with extra metadata - * server sent back. + * @deprecated this now a no-op as routing cookies are always on. */ - @BetaApi("Routing cookie is not currently stable and may change in the future") + @Deprecated public Builder setEnableRoutingCookie(boolean enableRoutingCookie) { - this.enableRoutingCookie = enableRoutingCookie; return this; } /** - * Gets if routing cookie is enabled. If true, client will retry a request with extra metadata - * server sent back. + * @deprecated routing cookies are always on. */ - @BetaApi("Routing cookie is not currently stable and may change in the future") + @Deprecated public boolean getEnableRoutingCookie() { - return enableRoutingCookie; + return true; } /** - * Sets if RetryInfo is enabled. If true, client bases retry decision and back off time on - * server returned RetryInfo value. Otherwise, client uses {@link RetrySettings}. + * @deprecated This is a no-op, RetryInfo is always used now. */ - @BetaApi("RetryInfo is not currently stable and may change in the future") + @Deprecated public Builder setEnableRetryInfo(boolean enableRetryInfo) { - this.enableRetryInfo = enableRetryInfo; return this; } /** - * Gets if RetryInfo is enabled. If true, client bases retry decision and back off time on - * server returned RetryInfo value. Otherwise, client uses {@link RetrySettings}. + * @deprecated RetryInfo is always on. */ - @BetaApi("RetryInfo is not currently stable and may change in the future") + @Deprecated public boolean getEnableRetryInfo() { - return enableRetryInfo; + return true; } /** Returns the builder for the settings used for calls to readRows. */ public ServerStreamingCallSettings.Builder readRowsSettings() { - return readRowsSettings; + return perOpSettings.readRowsSettings; } /** Returns the builder for the settings used for point reads using readRow. */ public UnaryCallSettings.Builder readRowSettings() { - return readRowSettings; + return perOpSettings.readRowSettings; } /** Returns the builder for the settings used for calls to SampleRowKeysSettings. */ public UnaryCallSettings.Builder> sampleRowKeysSettings() { - return sampleRowKeysSettings; + return perOpSettings.sampleRowKeysSettings; } /** Returns the builder for the settings used for calls to MutateRow. */ public UnaryCallSettings.Builder mutateRowSettings() { - return mutateRowSettings; + return perOpSettings.mutateRowSettings; } /** Returns the builder for the settings used for calls to MutateRows. */ public BigtableBatchingCallSettings.Builder bulkMutateRowsSettings() { - return bulkMutateRowsSettings; + return perOpSettings.bulkMutateRowsSettings; } /** Returns the builder for the settings used for calls to MutateRows. */ public BigtableBulkReadRowsCallSettings.Builder bulkReadRowsSettings() { - return bulkReadRowsSettings; + return perOpSettings.bulkReadRowsSettings; } /** Returns the builder for the settings used for calls to CheckAndMutateRow. */ public UnaryCallSettings.Builder checkAndMutateRowSettings() { - return checkAndMutateRowSettings; + return perOpSettings.checkAndMutateRowSettings; } /** Returns the builder with the settings used for calls to ReadModifyWriteRow. */ public UnaryCallSettings.Builder readModifyWriteRowSettings() { - return readModifyWriteRowSettings; + return perOpSettings.readModifyWriteRowSettings; } /** Returns the builder for the settings used for calls to ReadChangeStream. */ public ServerStreamingCallSettings.Builder readChangeStreamSettings() { - return readChangeStreamSettings; + return perOpSettings.readChangeStreamSettings; } /** @@ -1089,12 +967,12 @@ public UnaryCallSettings.Builder readModifyWriteRowSett */ public ServerStreamingCallSettings.Builder generateInitialChangeStreamPartitionsSettings() { - return generateInitialChangeStreamPartitionsSettings; + return perOpSettings.generateInitialChangeStreamPartitionsSettings; } /** Returns the builder with the settings used for calls to PingAndWarm. */ public UnaryCallSettings.Builder pingAndWarmSettings() { - return pingAndWarmSettings; + return perOpSettings.pingAndWarmSettings; } /** @@ -1104,11 +982,18 @@ public UnaryCallSettings.Builder pingAndWarmSettings() * requests will not be retried currently. */ @BetaApi - public ServerStreamingCallSettings.Builder executeQuerySettings() { - return executeQuerySettings; + public ServerStreamingCallSettings.Builder executeQuerySettings() { + return perOpSettings.executeQuerySettings; + } + + /** Returns the builder with the settings used for calls to PrepareQuery */ + @BetaApi + public UnaryCallSettings.Builder prepareQuerySettings() { + return perOpSettings.prepareQuerySettings; } @SuppressWarnings("unchecked") + @Override public EnhancedBigtableStubSettings build() { Preconditions.checkState(projectId != null, "Project id must be set"); Preconditions.checkState(instanceId != null, "Instance id must be set"); @@ -1119,8 +1004,8 @@ public EnhancedBigtableStubSettings build() { featureFlags.setMutateRowsRateLimit2(true); } - featureFlags.setRoutingCookie(this.getEnableRoutingCookie()); - featureFlags.setRetryInfo(this.getEnableRetryInfo()); + featureFlags.setRoutingCookie(true); + featureFlags.setRetryInfo(true); // client_Side_metrics_enabled feature flag is only set when a user is running with a // DefaultMetricsProvider. This may cause false negatives when a user registered the // metrics on their CustomOpenTelemetryMetricsProvider. @@ -1161,25 +1046,13 @@ public String toString() { .add("instanceId", instanceId) .add("appProfileId", appProfileId) .add("isRefreshingChannel", isRefreshingChannel) - .add("primedTableIds", primedTableIds) - .add("jwtAudienceMapping", jwtAudienceMapping) - .add("enableRoutingCookie", enableRoutingCookie) - .add("enableRetryInfo", enableRetryInfo) - .add("readRowsSettings", readRowsSettings) - .add("readRowSettings", readRowSettings) - .add("sampleRowKeysSettings", sampleRowKeysSettings) - .add("mutateRowSettings", mutateRowSettings) - .add("bulkMutateRowsSettings", bulkMutateRowsSettings) - .add("bulkReadRowsSettings", bulkReadRowsSettings) - .add("checkAndMutateRowSettings", checkAndMutateRowSettings) - .add("readModifyWriteRowSettings", readModifyWriteRowSettings) - .add( - "generateInitialChangeStreamPartitionsSettings", - generateInitialChangeStreamPartitionsSettings) - .add("readChangeStreamSettings", readChangeStreamSettings) - .add("pingAndWarmSettings", pingAndWarmSettings) - .add("executeQuerySettings", executeQuerySettings) + .add("perOpSettings", perOpSettings) .add("metricsProvider", metricsProvider) + .add("metricsEndpoint", metricsEndpoint) + .add("areInternalMetricsEnabled", areInternalMetricsEnabled) + .add("jwtAudience", jwtAudience) + .add("directPathConfig", getDirectPathConfig().toString()) + .add("sessionsEnabled", sessionsEnabled) .add("parent", super.toString()) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java index ac688963ae..3e7bedaa9b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java index d5a81334b9..089bbb8a25 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,8 @@ import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; @@ -65,6 +67,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/ReadRows") .setRequestMarshaller(ProtoUtils.marshaller(ReadRowsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ReadRowsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -76,6 +79,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(SampleRowKeysRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SampleRowKeysResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -85,6 +89,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/MutateRow") .setRequestMarshaller(ProtoUtils.marshaller(MutateRowRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(MutateRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -94,6 +99,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/MutateRows") .setRequestMarshaller(ProtoUtils.marshaller(MutateRowsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(MutateRowsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -105,6 +111,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(CheckAndMutateRowRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CheckAndMutateRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -115,6 +122,7 @@ public class GrpcBigtableStub extends BigtableStub { .setRequestMarshaller(ProtoUtils.marshaller(PingAndWarmRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PingAndWarmResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -126,6 +134,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(ReadModifyWriteRowRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ReadModifyWriteRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -145,6 +154,7 @@ public class GrpcBigtableStub extends BigtableStub { .setResponseMarshaller( ProtoUtils.marshaller( GenerateInitialChangeStreamPartitionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -156,6 +166,18 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(ReadChangeStreamRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ReadChangeStreamResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + prepareQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.bigtable.v2.Bigtable/PrepareQuery") + .setRequestMarshaller(ProtoUtils.marshaller(PrepareQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PrepareQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -166,6 +188,7 @@ public class GrpcBigtableStub extends BigtableStub { .setRequestMarshaller(ProtoUtils.marshaller(ExecuteQueryRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ExecuteQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final ServerStreamingCallable readRowsCallable; @@ -184,6 +207,7 @@ public class GrpcBigtableStub extends BigtableStub { generateInitialChangeStreamPartitionsCallable; private final ServerStreamingCallable readChangeStreamCallable; + private final UnaryCallable prepareQueryCallable; private final ServerStreamingCallable executeQueryCallable; @@ -196,36 +220,35 @@ public class GrpcBigtableStub extends BigtableStub { private static final PathTemplate READ_ROWS_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate READ_ROWS_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); + private static final PathTemplate READ_ROWS_3_PATH_TEMPLATE = + PathTemplate.create("{name=projects/*/instances/*}/**"); private static final PathTemplate SAMPLE_ROW_KEYS_0_PATH_TEMPLATE = PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); private static final PathTemplate SAMPLE_ROW_KEYS_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate SAMPLE_ROW_KEYS_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); + private static final PathTemplate SAMPLE_ROW_KEYS_3_PATH_TEMPLATE = + PathTemplate.create("{name=projects/*/instances/*}/**"); private static final PathTemplate MUTATE_ROW_0_PATH_TEMPLATE = PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); private static final PathTemplate MUTATE_ROW_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate MUTATE_ROW_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); private static final PathTemplate MUTATE_ROWS_0_PATH_TEMPLATE = PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); private static final PathTemplate MUTATE_ROWS_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate MUTATE_ROWS_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); private static final PathTemplate CHECK_AND_MUTATE_ROW_0_PATH_TEMPLATE = PathTemplate.create("{table_name=projects/*/instances/*/tables/*}"); private static final PathTemplate CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate CHECK_AND_MUTATE_ROW_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); private static final PathTemplate PING_AND_WARM_0_PATH_TEMPLATE = PathTemplate.create("{name=projects/*/instances/*}"); private static final PathTemplate PING_AND_WARM_1_PATH_TEMPLATE = @@ -235,8 +258,11 @@ public class GrpcBigtableStub extends BigtableStub { private static final PathTemplate READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE = PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate READ_MODIFY_WRITE_ROW_2_PATH_TEMPLATE = - PathTemplate.create( - "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"); + PathTemplate.create("{table_name=projects/*/instances/*/tables/*}/**"); + private static final PathTemplate PREPARE_QUERY_0_PATH_TEMPLATE = + PathTemplate.create("{name=projects/*/instances/*}"); + private static final PathTemplate PREPARE_QUERY_1_PATH_TEMPLATE = + PathTemplate.create("{app_profile_id=**}"); private static final PathTemplate EXECUTE_QUERY_0_PATH_TEMPLATE = PathTemplate.create("{name=projects/*/instances/*}"); private static final PathTemplate EXECUTE_QUERY_1_PATH_TEMPLATE = @@ -287,11 +313,11 @@ protected GrpcBigtableStub( builder.add( request.getAppProfileId(), "app_profile_id", READ_ROWS_1_PATH_TEMPLATE); builder.add( - request.getAuthorizedViewName(), - "authorized_view_name", - READ_ROWS_2_PATH_TEMPLATE); + request.getAuthorizedViewName(), "table_name", READ_ROWS_2_PATH_TEMPLATE); + builder.add(request.getMaterializedViewName(), "name", READ_ROWS_3_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings sampleRowKeysTransportSettings = GrpcCallSettings.newBuilder() @@ -305,10 +331,13 @@ protected GrpcBigtableStub( request.getAppProfileId(), "app_profile_id", SAMPLE_ROW_KEYS_1_PATH_TEMPLATE); builder.add( request.getAuthorizedViewName(), - "authorized_view_name", + "table_name", SAMPLE_ROW_KEYS_2_PATH_TEMPLATE); + builder.add( + request.getMaterializedViewName(), "name", SAMPLE_ROW_KEYS_3_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings mutateRowTransportSettings = GrpcCallSettings.newBuilder() @@ -320,11 +349,10 @@ protected GrpcBigtableStub( builder.add( request.getAppProfileId(), "app_profile_id", MUTATE_ROW_1_PATH_TEMPLATE); builder.add( - request.getAuthorizedViewName(), - "authorized_view_name", - MUTATE_ROW_2_PATH_TEMPLATE); + request.getAuthorizedViewName(), "table_name", MUTATE_ROW_2_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings mutateRowsTransportSettings = GrpcCallSettings.newBuilder() @@ -336,11 +364,10 @@ protected GrpcBigtableStub( builder.add( request.getAppProfileId(), "app_profile_id", MUTATE_ROWS_1_PATH_TEMPLATE); builder.add( - request.getAuthorizedViewName(), - "authorized_view_name", - MUTATE_ROWS_2_PATH_TEMPLATE); + request.getAuthorizedViewName(), "table_name", MUTATE_ROWS_2_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings checkAndMutateRowTransportSettings = @@ -359,10 +386,11 @@ protected GrpcBigtableStub( CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE); builder.add( request.getAuthorizedViewName(), - "authorized_view_name", + "table_name", CHECK_AND_MUTATE_ROW_2_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings pingAndWarmTransportSettings = GrpcCallSettings.newBuilder() @@ -375,6 +403,7 @@ protected GrpcBigtableStub( request.getAppProfileId(), "app_profile_id", PING_AND_WARM_1_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getName()) .build(); GrpcCallSettings readModifyWriteRowTransportSettings = @@ -393,10 +422,11 @@ protected GrpcBigtableStub( READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE); builder.add( request.getAuthorizedViewName(), - "authorized_view_name", + "table_name", READ_MODIFY_WRITE_ROW_2_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings< GenerateInitialChangeStreamPartitionsRequest, @@ -413,6 +443,7 @@ protected GrpcBigtableStub( builder.add("table_name", String.valueOf(request.getTableName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); GrpcCallSettings readChangeStreamTransportSettings = @@ -424,7 +455,21 @@ protected GrpcBigtableStub( builder.add("table_name", String.valueOf(request.getTableName())); return builder.build(); }) + .setResourceNameExtractor(request -> request.getTableName()) .build(); + GrpcCallSettings prepareQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(prepareQueryMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getInstanceName(), "name", PREPARE_QUERY_0_PATH_TEMPLATE); + builder.add( + request.getAppProfileId(), "app_profile_id", PREPARE_QUERY_1_PATH_TEMPLATE); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getInstanceName()) + .build(); GrpcCallSettings executeQueryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(executeQueryMethodDescriptor) @@ -436,6 +481,7 @@ protected GrpcBigtableStub( request.getAppProfileId(), "app_profile_id", EXECUTE_QUERY_1_PATH_TEMPLATE); return builder.build(); }) + .setResourceNameExtractor(request -> request.getInstanceName()) .build(); this.readRowsCallable = @@ -471,6 +517,9 @@ protected GrpcBigtableStub( this.readChangeStreamCallable = callableFactory.createServerStreamingCallable( readChangeStreamTransportSettings, settings.readChangeStreamSettings(), clientContext); + this.prepareQueryCallable = + callableFactory.createUnaryCallable( + prepareQueryTransportSettings, settings.prepareQuerySettings(), clientContext); this.executeQueryCallable = callableFactory.createServerStreamingCallable( executeQueryTransportSettings, settings.executeQuerySettings(), clientContext); @@ -535,6 +584,11 @@ public UnaryCallable pingAndWarmCallabl return readChangeStreamCallable; } + @Override + public UnaryCallable prepareQueryCallable() { + return prepareQueryCallable; + } + @Override public ServerStreamingCallable executeQueryCallable() { return executeQueryCallable; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MetadataExtractorInterceptor.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MetadataExtractorInterceptor.java new file mode 100644 index 0000000000..ef3aad4cbf --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MetadataExtractorInterceptor.java @@ -0,0 +1,252 @@ +/* + * Copyright 2026 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.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.ResponseParams; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.common.base.Strings; +import com.google.protobuf.InvalidProtocolBufferException; +import io.grpc.Attributes; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ClientInterceptors; +import io.grpc.ForwardingClientCall; +import io.grpc.ForwardingClientCallListener; +import io.grpc.Grpc; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import io.grpc.alts.AltsContextUtil; +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.time.Duration; +import java.util.Base64; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.annotation.Nullable; + +@InternalApi +public class MetadataExtractorInterceptor implements ClientInterceptor { + private final SidebandData sidebandData = new SidebandData(); + + public GrpcCallContext injectInto(GrpcCallContext ctx) { + // TODO: migrate to using .withTransportChannel + // This will require a change on gax's side to expose the underlying ManagedChannel in + // GrpcTransportChannel (its currently package private). + return ctx.withChannel(ClientInterceptors.intercept(ctx.getChannel(), this)) + .withCallOptions(ctx.getCallOptions().withOption(SidebandData.KEY, sidebandData)); + } + + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + return new ForwardingClientCall.SimpleForwardingClientCall( + channel.newCall(methodDescriptor, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + sidebandData.reset(); + + super.start( + new ForwardingClientCallListener.SimpleForwardingClientCallListener( + responseListener) { + @Override + public void onHeaders(Metadata headers) { + sidebandData.onResponseHeaders(headers, getAttributes()); + super.onHeaders(headers); + } + + @Override + public void onClose(Status status, Metadata trailers) { + sidebandData.onClose(status, trailers, getAttributes()); + super.onClose(status, trailers); + } + }, + headers); + } + }; + } + + public SidebandData getSidebandData() { + return sidebandData; + } + + public static class SidebandData { + private static final CallOptions.Key KEY = + CallOptions.Key.create("bigtable-sideband"); + + @Nullable + public static SidebandData from(CallOptions callOptions) { + return callOptions.getOption(KEY); + } + + private static final Metadata.Key SERVER_TIMING_HEADER_KEY = + Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER); + private static final Pattern SERVER_TIMING_HEADER_PATTERN = + Pattern.compile(".*dur=(?\\d+)"); + private static final Metadata.Key LOCATION_METADATA_KEY = + Metadata.Key.of("x-goog-ext-425905942-bin", Metadata.BINARY_BYTE_MARSHALLER); + private static final Metadata.Key PEER_INFO_KEY = + Metadata.Key.of("bigtable-peer-info", Metadata.ASCII_STRING_MARSHALLER); + + @Nullable private volatile ClusterInformation clusterInfo; + @Nullable private volatile PeerInfo peerInfo; + @Nullable private volatile Duration gfeTiming; + @Nullable private volatile Util.IpProtocol ipProtocol; + private volatile boolean isAlts = false; + + @Nullable + public ClusterInformation getClusterInfo() { + return clusterInfo; + } + + @Nullable + public PeerInfo getPeerInfo() { + return peerInfo; + } + + @Nullable + public Duration getGfeTiming() { + return gfeTiming; + } + + @Nullable + public Util.IpProtocol getIpProtocol() { + return ipProtocol; + } + + public boolean isAlts() { + return isAlts; + } + + private void reset() { + clusterInfo = null; + peerInfo = null; + gfeTiming = null; + ipProtocol = Util.IpProtocol.UNKNOWN; + } + + void onResponseHeaders(Metadata md, Attributes attributes) { + clusterInfo = extractClusterInfo(md); + gfeTiming = extractGfeLatency(md); + peerInfo = extractPeerInfo(md, gfeTiming, attributes); + ipProtocol = extractIpProtocol(attributes); + } + + void onClose(Status status, Metadata trailers, Attributes attributes) { + isAlts = AltsContextUtil.check(attributes); + if (ipProtocol == null) { + ipProtocol = extractIpProtocol(attributes); + } + if (clusterInfo == null) { + clusterInfo = extractClusterInfo(trailers); + } + } + + private static Util.IpProtocol extractIpProtocol(Attributes attributes) { + SocketAddress remoteAddr = attributes.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR); + if (remoteAddr instanceof InetSocketAddress) { + InetSocketAddress inetAddr = (InetSocketAddress) remoteAddr; + if (inetAddr.getAddress() instanceof Inet4Address) { + return Util.IpProtocol.IPV4; + } else if (inetAddr.getAddress() instanceof Inet6Address) { + return Util.IpProtocol.IPV6; + } + } + return Util.IpProtocol.UNKNOWN; + } + + @Nullable + private static Duration extractGfeLatency(Metadata metadata) { + String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY); + if (serverTiming == null) { + return null; + } + Matcher matcher = SERVER_TIMING_HEADER_PATTERN.matcher(serverTiming); + // this should always be true + if (matcher.find()) { + return Duration.ofMillis(Long.parseLong(matcher.group("dur"))); + } + return null; + } + + @Nullable + private static PeerInfo extractPeerInfo( + Metadata metadata, Duration gfeTiming, Attributes attributes) { + String encodedStr = metadata.get(PEER_INFO_KEY); + PeerInfo peerInfo = PeerInfo.newBuilder().build(); + if (!Strings.isNullOrEmpty(encodedStr)) { + try { + byte[] decoded = Base64.getUrlDecoder().decode(encodedStr); + peerInfo = PeerInfo.parseFrom(decoded); + } catch (Exception e) { + throw new IllegalArgumentException( + "Failed to parse " + + PEER_INFO_KEY.name() + + " from the response header value: " + + encodedStr); + } + } + + // TODO: remove this once transport_type is being sent by the server + // This is a temporary workaround to detect directpath until its available from + // the server + if (peerInfo.getTransportType() == PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN) { + peerInfo = + peerInfo.toBuilder() + .setTransportType(inferTransportType(gfeTiming, attributes)) + .build(); + } + + return peerInfo; + } + + private static PeerInfo.TransportType inferTransportType( + Duration gfeTiming, Attributes attributes) { + boolean isAlts = AltsContextUtil.check(attributes); + if (isAlts) { + return PeerInfo.TransportType.TRANSPORT_TYPE_DIRECT_ACCESS; + } else if (gfeTiming != null) { + return PeerInfo.TransportType.TRANSPORT_TYPE_CLOUD_PATH; + } + return PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN; + } + + @Nullable + private static ClusterInformation extractClusterInfo(Metadata metadata) { + byte[] encoded = metadata.get(LOCATION_METADATA_KEY); + if (encoded != null) { + try { + ResponseParams responseParams = ResponseParams.parseFrom(encoded); + return ClusterInformation.newBuilder() + .setZoneId(responseParams.getZoneId()) + .setClusterId(responseParams.getClusterId()) + .build(); + } catch (InvalidProtocolBufferException e) { + // Fail silently and return null + } + } + return null; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallable.java deleted file mode 100644 index 36f47c2d1f..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallable.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.MutateRowRequest; -import com.google.bigtable.v2.MutateRowResponse; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.common.util.concurrent.MoreExecutors; - -/** Simple wrapper for MutateRow to wrap the request and response protobufs. */ -class MutateRowCallable extends UnaryCallable { - private final UnaryCallable inner; - private final RequestContext requestContext; - - MutateRowCallable( - UnaryCallable inner, RequestContext requestContext) { - - this.inner = inner; - this.requestContext = requestContext; - } - - @Override - public ApiFuture futureCall(RowMutation request, ApiCallContext context) { - ApiFuture rawResponse = - inner.futureCall(request.toProto(requestContext), context); - - return ApiFutures.transform( - rawResponse, - new ApiFunction() { - @Override - public Void apply(MutateRowResponse mutateRowResponse) { - return null; - } - }, - MoreExecutors.directExecutor()); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer.java new file mode 100644 index 0000000000..86c564bcc0 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimer.java @@ -0,0 +1,42 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer; +import io.grpc.Channel; + +@InternalApi +public class NoOpChannelPrimer implements ChannelPrimer { + static NoOpChannelPrimer create() { + return new NoOpChannelPrimer(); + } + + private NoOpChannelPrimer() {} + + @Override + public void primeChannel(Channel channel) { + // No op + } + + @Override + public ApiFuture sendPrimeRequestsAsync(Channel channel) { + return ApiFutures.immediateFuture(PingAndWarmResponse.getDefaultInstance()); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java index 62f8b5abf6..121a581101 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java @@ -15,6 +15,8 @@ */ package com.google.cloud.bigtable.data.v2.stub; +import static com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util.extractStatus; + import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.DeadlineExceededException; import com.google.api.gax.rpc.ResourceExhaustedException; @@ -30,13 +32,14 @@ import com.google.common.base.Preconditions; import com.google.common.base.Stopwatch; import com.google.common.util.concurrent.RateLimiter; +import java.time.Duration; +import java.time.Instant; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.logging.Logger; import javax.annotation.Nonnull; -import org.threeten.bp.Duration; -import org.threeten.bp.Instant; +import javax.annotation.Nullable; class RateLimitingServerStreamingCallable extends ServerStreamingCallable { @@ -69,6 +72,8 @@ class RateLimitingServerStreamingCallable private final ServerStreamingCallable innerCallable; + private BigtableTracer bigtableTracer; + RateLimitingServerStreamingCallable( @Nonnull ServerStreamingCallable innerCallable) { this.limiter = new ConditionalRateLimiter(DEFAULT_QPS); @@ -84,8 +89,8 @@ public void call( limiter.acquire(); stopwatch.stop(); if (context.getTracer() instanceof BigtableTracer) { - ((BigtableTracer) context.getTracer()) - .batchRequestThrottled(stopwatch.elapsed(TimeUnit.NANOSECONDS)); + bigtableTracer = (BigtableTracer) context.getTracer(); + bigtableTracer.batchRequestThrottled(stopwatch.elapsed(TimeUnit.NANOSECONDS)); } RateLimitingResponseObserver innerObserver = new RateLimitingResponseObserver(responseObserver); innerCallable.call(request, innerObserver, context); @@ -102,9 +107,13 @@ static class ConditionalRateLimiter { private final AtomicReference nextRateUpdateTime = new AtomicReference<>(Instant.now()); + @SuppressWarnings("LongDoubleConversion") public ConditionalRateLimiter(long defaultQps) { limiter = RateLimiter.create(defaultQps); - logger.info("Rate limiting is initiated (but disabled) with rate of " + defaultQps + " QPS."); + logger.info( + "Batch write flow control: rate limiter is initiated (but disabled) with rate of " + + defaultQps + + " QPS."); } /** @@ -128,7 +137,7 @@ public void tryDisable() { if (now.isAfter(nextTime)) { boolean wasEnabled = this.enabled.getAndSet(false); if (wasEnabled) { - logger.info("Rate limiter is disabled."); + logger.info("Batch write flow control: rate limiter is disabled."); } // No need to update nextRateUpdateTime, any new RateLimitInfo can enable rate limiting and // update the rate again. @@ -139,7 +148,7 @@ public void tryDisable() { public void enable() { boolean wasEnabled = this.enabled.getAndSet(true); if (!wasEnabled) { - logger.info("Rate limiter is enabled."); + logger.info("Batch write flow control: rate limiter is enabled."); } } @@ -158,12 +167,23 @@ public double getRate() { * @param rate The new rate of the rate limiter. * @param period The period during which rate should not be updated again and the rate limiter * should not be disabled. + * @param bigtableTracer The tracer for exporting client-side metrics. + * @param factor The capped factor that we're trying to apply. + * @param status The status of the response from which the factor is retrieved or derived. */ - public void trySetRate(double rate, Duration period) { + public void trySetRate( + double rate, + Duration period, + @Nullable BigtableTracer bigtableTracer, + double factor, + @Nullable Throwable status) { Instant nextTime = nextRateUpdateTime.get(); Instant now = Instant.now(); if (now.isBefore(nextTime)) { + if (bigtableTracer != null) { + bigtableTracer.addBatchWriteFlowControlFactor(factor, status, false); + } return; } @@ -171,18 +191,28 @@ public void trySetRate(double rate, Duration period) { if (!nextRateUpdateTime.compareAndSet(nextTime, newNextTime)) { // Someone else updated it already. + if (bigtableTracer != null) { + bigtableTracer.addBatchWriteFlowControlFactor(factor, status, false); + } return; } final double oldRate = limiter.getRate(); limiter.setRate(rate); logger.info( - "Updated max rate from " + "Batch write flow control: updated max rate from " + oldRate + " to " + rate + + " applied factor " + + factor + " with period " + period.getSeconds() - + " seconds."); + + " seconds. Status=" + + extractStatus(status)); + if (bigtableTracer != null) { + bigtableTracer.setBatchWriteFlowControlTargetQps(rate); + bigtableTracer.addBatchWriteFlowControlFactor(factor, status, true); + } } @VisibleForTesting @@ -215,17 +245,21 @@ private boolean hasValidRateLimitInfo(MutateRowsResponse response) { // have presence even thought it's marked as "optional". Check the factor and // period to make sure they're not 0. if (!response.hasRateLimitInfo()) { - logger.finest("Response carries no RateLimitInfo"); + logger.finest("Batch write flow control: response carries no RateLimitInfo"); return false; } if (response.getRateLimitInfo().getFactor() <= 0 || response.getRateLimitInfo().getPeriod().getSeconds() <= 0) { - logger.finest("Response carries invalid RateLimitInfo=" + response.getRateLimitInfo()); + logger.finest( + "Batch write flow control: response carries invalid RateLimitInfo=" + + response.getRateLimitInfo()); return false; } - logger.finest("Response carries valid RateLimitInfo=" + response.getRateLimitInfo()); + logger.finest( + "Batch write flow control: response carries valid RateLimitInfo=" + + response.getRateLimitInfo()); return true; } @@ -236,7 +270,8 @@ protected void onResponseImpl(MutateRowsResponse response) { RateLimitInfo info = response.getRateLimitInfo(); updateQps( info.getFactor(), - Duration.ofSeconds(com.google.protobuf.util.Durations.toSeconds(info.getPeriod()))); + Duration.ofSeconds(com.google.protobuf.util.Durations.toSeconds(info.getPeriod())), + null); } else { limiter.tryDisable(); } @@ -250,7 +285,7 @@ protected void onErrorImpl(Throwable t) { if (t instanceof DeadlineExceededException || t instanceof UnavailableException || t instanceof ResourceExhaustedException) { - updateQps(MIN_FACTOR, DEFAULT_PERIOD); + updateQps(MIN_FACTOR, DEFAULT_PERIOD, t); } outerObserver.onError(t); } @@ -260,11 +295,11 @@ protected void onCompleteImpl() { outerObserver.onComplete(); } - private void updateQps(double factor, Duration period) { + private void updateQps(double factor, Duration period, @Nullable Throwable status) { double cappedFactor = Math.min(Math.max(factor, MIN_FACTOR), MAX_FACTOR); double currentRate = limiter.getRate(); double cappedRate = Math.min(Math.max(currentRate * cappedFactor, MIN_QPS), MAX_QPS); - limiter.trySetRate(cappedRate, period); + limiter.trySetRate(cappedRate, period, bigtableTracer, cappedFactor, status); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallable.java deleted file mode 100644 index 09e133678e..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallable.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.ReadModifyWriteRowRequest; -import com.google.bigtable.v2.ReadModifyWriteRowResponse; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter; -import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; -import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.common.util.concurrent.MoreExecutors; - -/** Simple wrapper for ReadModifyWriteRow to wrap the request and response protobufs. */ -class ReadModifyWriteRowCallable extends UnaryCallable { - private final UnaryCallable inner; - private final RequestContext requestContext; - private final DefaultRowAdapter rowAdapter; - - ReadModifyWriteRowCallable( - UnaryCallable inner, - RequestContext requestContext) { - this.inner = inner; - this.requestContext = requestContext; - this.rowAdapter = new DefaultRowAdapter(); - } - - @Override - public ApiFuture futureCall(ReadModifyWriteRow request, ApiCallContext context) { - ApiFuture rawResponse = - inner.futureCall(request.toProto(requestContext), context); - - return ApiFutures.transform( - rawResponse, - new ApiFunction() { - @Override - public Row apply(ReadModifyWriteRowResponse readModifyWriteRowResponse) { - return convertResponse(readModifyWriteRowResponse); - } - }, - MoreExecutors.directExecutor()); - } - - private Row convertResponse(ReadModifyWriteRowResponse response) { - return rowAdapter.createRowFromProto(response.getRow()); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java index 7c65bdf95a..0133dd3c2b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java @@ -83,7 +83,7 @@ public final void onResponse(ResponseT response) { @Override public final void onError(Throwable throwable) { if (!isClosed.compareAndSet(false, true)) { - logException("Received error after the stream is closed"); + logException("Received error after the stream is closed", throwable); return; } @@ -113,6 +113,10 @@ private void logException(String message) { LOGGER.log(Level.WARNING, message, new IllegalStateException(message)); } + private void logException(String message, Throwable cause) { + LOGGER.log(Level.WARNING, message, new IllegalStateException(message, cause)); + } + protected abstract void onStartImpl(StreamController streamController); protected abstract void onResponseImpl(ResponseT response); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java deleted file mode 100644 index 7658e41492..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallable.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.SampleRowKeysRequest; -import com.google.bigtable.v2.SampleRowKeysResponse; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.KeyOffset; -import com.google.common.collect.ImmutableList; -import com.google.common.util.concurrent.MoreExecutors; -import java.util.List; - -/** Simple wrapper for SampleRowKeys to wrap the request and response protobufs. */ -class SampleRowKeysCallable extends UnaryCallable> { - private final RequestContext requestContext; - private final UnaryCallable> inner; - - SampleRowKeysCallable( - UnaryCallable> inner, - RequestContext requestContext) { - - this.requestContext = requestContext; - this.inner = inner; - } - - @Override - public ApiFuture> futureCall(String tableId, ApiCallContext context) { - String tableName = - NameUtil.formatTableName( - requestContext.getProjectId(), requestContext.getInstanceId(), tableId); - - SampleRowKeysRequest request = - SampleRowKeysRequest.newBuilder() - .setTableName(tableName) - .setAppProfileId(requestContext.getAppProfileId()) - .build(); - - ApiFuture> rawResponse = inner.futureCall(request, context); - - return ApiFutures.transform( - rawResponse, - new ApiFunction, List>() { - @Override - public List apply(List rawResponse) { - return convert(rawResponse); - } - }, - MoreExecutors.directExecutor()); - } - - private static List convert(List rawResponse) { - ImmutableList.Builder results = ImmutableList.builder(); - - for (SampleRowKeysResponse element : rawResponse) { - results.add(KeyOffset.create(element.getRowKey(), element.getOffsetBytes())); - } - - return results.build(); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java new file mode 100644 index 0000000000..29b104965e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallable.java @@ -0,0 +1,72 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamController; +import java.util.function.Function; + +/** Callable to help crossing api boundary lines between models and protos */ +class TransformingServerStreamingCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + private final Function requestTransformer; + private final Function responseTransformer; + + public TransformingServerStreamingCallable( + ServerStreamingCallable inner, + Function requestTransformer, + Function responseTransformer) { + this.inner = inner; + this.requestTransformer = requestTransformer; + this.responseTransformer = responseTransformer; + } + + @Override + public void call( + OuterReqT outerReqT, + ResponseObserver outerObserver, + ApiCallContext apiCallContext) { + InnerReqT innerReq = requestTransformer.apply(outerReqT); + + inner.call( + innerReq, + new SafeResponseObserver(outerObserver) { + @Override + public void onStartImpl(StreamController streamController) { + outerObserver.onStart(streamController); + } + + @Override + public void onResponseImpl(InnerRespT innerResp) { + outerObserver.onResponse(responseTransformer.apply(innerResp)); + } + + @Override + public void onErrorImpl(Throwable throwable) { + outerObserver.onError(throwable); + } + + @Override + public void onCompleteImpl() { + outerObserver.onComplete(); + } + }, + apiCallContext); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/Version.java new file mode 100644 index 0000000000..27027aa13f --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/Version.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 + * + * 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.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-bigtable:current} + static final String VERSION = "2.76.1-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java index b41acc4ac3..976992a255 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java @@ -17,12 +17,11 @@ import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.ReadChangeStreamResponse; -import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; +import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter.ChangeStreamRecordBuilder; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.models.Value; import com.google.common.base.Preconditions; -import org.threeten.bp.Instant; /** * A state machine to produce change stream records from a stream of {@link @@ -106,6 +105,7 @@ final class ChangeStreamStateMachine { private int numDataChanges = 0; private int numNonCellMods = 0; private int numCellChunks = 0; // 1 for non-chunked cell. + /** * Expected total size of a chunked SetCell value, given by the {@link * ReadChangeStreamResponse.MutationChunk.ChunkInfo}. This value should be the same for all chunks @@ -216,6 +216,7 @@ ChangeStreamRecordT consumeChangeStreamRecord() { boolean hasCompleteChangeStreamRecord() { return completeChangeStreamRecord != null && currentState == AWAITING_STREAM_RECORD_CONSUME; } + /** * Checks if the state machine is in the middle of processing a change stream record. * @@ -328,24 +329,25 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { validate( dataChange.getChunksCount() > 0, "AWAITING_NEW_STREAM_RECORD: First data change missing mods."); - if (dataChange.getType() == Type.GARBAGE_COLLECTION) { + if (dataChange.getType() == DataChange.Type.GARBAGE_COLLECTION) { validate( dataChange.getSourceClusterId().isEmpty(), "AWAITING_NEW_STREAM_RECORD: GC mutation shouldn't have source cluster id."); builder.startGcMutation( dataChange.getRowKey(), - Instant.ofEpochSecond( + java.time.Instant.ofEpochSecond( dataChange.getCommitTimestamp().getSeconds(), dataChange.getCommitTimestamp().getNanos()), dataChange.getTiebreaker()); - } else if (dataChange.getType() == Type.USER) { + } else if (dataChange.getType() == DataChange.Type.USER) { validate( !dataChange.getSourceClusterId().isEmpty(), - "AWAITING_NEW_STREAM_RECORD: User initiated data change missing source cluster id."); + "AWAITING_NEW_STREAM_RECORD: User initiated data change missing source cluster" + + " id."); builder.startUserMutation( dataChange.getRowKey(), dataChange.getSourceClusterId(), - Instant.ofEpochSecond( + java.time.Instant.ofEpochSecond( dataChange.getCommitTimestamp().getSeconds(), dataChange.getCommitTimestamp().getNanos()), dataChange.getTiebreaker()); @@ -372,13 +374,15 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { @Override State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { throw new IllegalStateException( - "AWAITING_NEW_DATA_CHANGE: Can't handle a Heartbeat in the middle of building a ChangeStreamMutation."); + "AWAITING_NEW_DATA_CHANGE: Can't handle a Heartbeat in the middle of building a" + + " ChangeStreamMutation."); } @Override State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { throw new IllegalStateException( - "AWAITING_NEW_DATA_CHANGE: Can't handle a CloseStream in the middle of building a ChangeStreamMutation."); + "AWAITING_NEW_DATA_CHANGE: Can't handle a CloseStream in the middle of building a" + + " ChangeStreamMutation."); } @Override @@ -418,7 +422,8 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { // Case 1_2_1 validate( chunk.getChunkInfo().getChunkedValueSize() > 0, - "AWAITING_NEW_DATA_CHANGE: First chunk of a chunked cell must have a positive chunked value size."); + "AWAITING_NEW_DATA_CHANGE: First chunk of a chunked cell must have a positive" + + " chunked value size."); expectedTotalSizeOfChunkedSetCell = chunk.getChunkInfo().getChunkedValueSize(); actualTotalSizeOfChunkedSetCell = 0; builder.startCell( @@ -429,12 +434,14 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { // Case 1_2_2 validate( index == 0, - "AWAITING_NEW_DATA_CHANGE: Non-first chunked SetCell must be the first mod of a DataChange."); + "AWAITING_NEW_DATA_CHANGE: Non-first chunked SetCell must be the first mod of" + + " a DataChange."); } // Concatenate the cell value of this mod into the builder. validate( chunk.getChunkInfo().getChunkedValueSize() == expectedTotalSizeOfChunkedSetCell, - "AWAITING_NEW_DATA_CHANGE: Chunked cell value size must be the same for all chunks."); + "AWAITING_NEW_DATA_CHANGE: Chunked cell value size must be the same for all" + + " chunks."); numCellChunks++; builder.cellValue(setCell.getValue()); actualTotalSizeOfChunkedSetCell += setCell.getValue().size(); @@ -455,8 +462,8 @@ State handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { // in the following ReadChangeStream response. validate( index == dataChange.getChunksCount() - 1, - "AWAITING_NEW_DATA_CHANGE: Current mod is a chunked SetCell " - + "but not the last chunk, but it's not the last mod of the current response."); + "AWAITING_NEW_DATA_CHANGE: Current mod is a chunked SetCell but not the last" + + " chunk, but it's not the last mod of the current response."); return AWAITING_NEW_DATA_CHANGE; } } @@ -578,7 +585,7 @@ private State checkAndFinishMutationIfNeeded(ReadChangeStreamResponse.DataChange completeChangeStreamRecord = builder.finishChangeStreamMutation( dataChange.getToken(), - Instant.ofEpochSecond( + java.time.Instant.ofEpochSecond( dataChange.getEstimatedLowWatermark().getSeconds(), dataChange.getEstimatedLowWatermark().getNanos())); return AWAITING_STREAM_RECORD_CONSUME; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java index fda608eda5..716e9eaf0c 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java @@ -18,7 +18,6 @@ import com.google.api.core.InternalApi; import com.google.api.gax.retrying.StreamResumptionStrategy; import com.google.bigtable.v2.ReadChangeStreamRequest; -import com.google.bigtable.v2.ReadChangeStreamRequest.Builder; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamContinuationTokens; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter; @@ -85,7 +84,7 @@ public ReadChangeStreamRequest getResumeRequest(ReadChangeStreamRequest original return originalRequest; } - Builder builder = originalRequest.toBuilder(); + ReadChangeStreamRequest.Builder builder = originalRequest.toBuilder(); // We need to clear the start_from and use the updated continuation_tokens // to resume the request. // The partition should always be the same as the one from the original request, diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter.java deleted file mode 100644 index f6a2527302..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporter.java +++ /dev/null @@ -1,397 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.APPLICATION_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ATTEMPT_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CONNECTIVITY_ERROR_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.FIRST_RESPONSE_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METER_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.OPERATION_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.RETRY_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.SERVER_LATENCIES_NAME; - -import com.google.api.MonitoredResource; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutureCallback; -import com.google.api.core.ApiFutures; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.CredentialsProvider; -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.rpc.PermissionDeniedException; -import com.google.auth.Credentials; -import com.google.cloud.monitoring.v3.MetricServiceClient; -import com.google.cloud.monitoring.v3.MetricServiceSettings; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.MoreObjects; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.monitoring.v3.CreateTimeSeriesRequest; -import com.google.monitoring.v3.ProjectName; -import com.google.monitoring.v3.TimeSeries; -import com.google.protobuf.Empty; -import io.opentelemetry.sdk.common.CompletableResultCode; -import io.opentelemetry.sdk.metrics.InstrumentType; -import io.opentelemetry.sdk.metrics.data.AggregationTemporality; -import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.metrics.export.MetricExporter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.threeten.bp.Duration; - -/** - * Bigtable Cloud Monitoring OpenTelemetry Exporter. - * - *

    The exporter will look for all bigtable owned metrics under bigtable.googleapis.com - * instrumentation scope and upload it via the Google Cloud Monitoring API. - */ -@InternalApi -public final class BigtableCloudMonitoringExporter implements MetricExporter { - - private static final Logger logger = - Logger.getLogger(BigtableCloudMonitoringExporter.class.getName()); - - // This system property can be used to override the monitoring endpoint - // to a different environment. It's meant for internal testing only. - private static final String MONITORING_ENDPOINT = - MoreObjects.firstNonNull( - System.getProperty("bigtable.test-monitoring-endpoint"), - MetricServiceSettings.getDefaultEndpoint()); - - private static final String APPLICATION_RESOURCE_PROJECT_ID = "project_id"; - - // This the quota limit from Cloud Monitoring. More details in - // https://cloud.google.com/monitoring/quotas#custom_metrics_quotas. - private static final int EXPORT_BATCH_SIZE_LIMIT = 200; - - private final MetricServiceClient client; - - private final String bigtableProjectId; - private final String taskId; - - // The resource the client application is running on - private final MonitoredResource applicationResource; - - private final AtomicBoolean isShutdown = new AtomicBoolean(false); - - private CompletableResultCode lastExportCode; - - private final AtomicBoolean bigtableExportFailureLogged = new AtomicBoolean(false); - private final AtomicBoolean applicationExportFailureLogged = new AtomicBoolean(false); - - private static final ImmutableList BIGTABLE_TABLE_METRICS = - ImmutableSet.of( - OPERATION_LATENCIES_NAME, - ATTEMPT_LATENCIES_NAME, - SERVER_LATENCIES_NAME, - FIRST_RESPONSE_LATENCIES_NAME, - CLIENT_BLOCKING_LATENCIES_NAME, - APPLICATION_BLOCKING_LATENCIES_NAME, - RETRY_COUNT_NAME, - CONNECTIVITY_ERROR_COUNT_NAME) - .stream() - .map(m -> METER_NAME + m) - .collect(ImmutableList.toImmutableList()); - - private static final ImmutableList APPLICATION_METRICS = - ImmutableSet.of(PER_CONNECTION_ERROR_COUNT_NAME).stream() - .map(m -> METER_NAME + m) - .collect(ImmutableList.toImmutableList()); - - public static BigtableCloudMonitoringExporter create( - String projectId, @Nullable Credentials credentials) throws IOException { - MetricServiceSettings.Builder settingsBuilder = MetricServiceSettings.newBuilder(); - CredentialsProvider credentialsProvider = - Optional.ofNullable(credentials) - .map(FixedCredentialsProvider::create) - .orElse(NoCredentialsProvider.create()); - settingsBuilder.setCredentialsProvider(credentialsProvider); - settingsBuilder.setEndpoint(MONITORING_ENDPOINT); - - org.threeten.bp.Duration timeout = Duration.ofMinutes(1); - // TODO: createServiceTimeSeries needs special handling if the request failed. Leaving - // it as not retried for now. - settingsBuilder.createServiceTimeSeriesSettings().setSimpleTimeoutNoRetries(timeout); - - // Detect the resource that the client application is running on. For example, - // this could be a GCE instance or a GKE pod. Currently, we only support GCE instance and - // GKE pod. This method will return null for everything else. - MonitoredResource applicationResource = null; - try { - applicationResource = BigtableExporterUtils.detectResource(); - } catch (Exception e) { - logger.log( - Level.WARNING, - "Failed to detect resource, will skip exporting application level metrics ", - e); - } - - return new BigtableCloudMonitoringExporter( - projectId, - MetricServiceClient.create(settingsBuilder.build()), - applicationResource, - BigtableExporterUtils.getDefaultTaskValue()); - } - - @VisibleForTesting - BigtableCloudMonitoringExporter( - String projectId, - MetricServiceClient client, - @Nullable MonitoredResource applicationResource, - String taskId) { - this.client = client; - this.taskId = taskId; - this.applicationResource = applicationResource; - this.bigtableProjectId = projectId; - } - - @Override - public CompletableResultCode export(Collection collection) { - if (isShutdown.get()) { - logger.log(Level.WARNING, "Exporter is shutting down"); - return CompletableResultCode.ofFailure(); - } - - CompletableResultCode bigtableExportCode = exportBigtableResourceMetrics(collection); - CompletableResultCode applicationExportCode = exportApplicationResourceMetrics(collection); - - lastExportCode = - CompletableResultCode.ofAll(ImmutableList.of(applicationExportCode, bigtableExportCode)); - - return lastExportCode; - } - - /** Export metrics associated with a BigtableTable resource. */ - private CompletableResultCode exportBigtableResourceMetrics(Collection collection) { - // Filter bigtable table metrics - List bigtableMetricData = - collection.stream() - .filter(md -> BIGTABLE_TABLE_METRICS.contains(md.getName())) - .collect(Collectors.toList()); - - // Skips exporting if there's none - if (bigtableMetricData.isEmpty()) { - return CompletableResultCode.ofSuccess(); - } - - // Verifies metrics project id are the same as the bigtable project id set on this client - if (!bigtableMetricData.stream() - .flatMap(metricData -> metricData.getData().getPoints().stream()) - .allMatch(pd -> bigtableProjectId.equals(BigtableExporterUtils.getProjectId(pd)))) { - logger.log(Level.WARNING, "Metric data has different a projectId. Skip exporting."); - return CompletableResultCode.ofFailure(); - } - - List bigtableTimeSeries; - try { - bigtableTimeSeries = - BigtableExporterUtils.convertToBigtableTimeSeries(bigtableMetricData, taskId); - } catch (Throwable e) { - logger.log( - Level.WARNING, - "Failed to convert bigtable table metric data to cloud monitoring timeseries.", - e); - return CompletableResultCode.ofFailure(); - } - - ProjectName projectName = ProjectName.of(bigtableProjectId); - ApiFuture> future = exportTimeSeries(projectName, bigtableTimeSeries); - - CompletableResultCode bigtableExportCode = new CompletableResultCode(); - ApiFutures.addCallback( - future, - new ApiFutureCallback>() { - @Override - public void onFailure(Throwable throwable) { - if (bigtableExportFailureLogged.compareAndSet(false, true)) { - String msg = "createServiceTimeSeries request failed for bigtable metrics."; - if (throwable instanceof PermissionDeniedException) { - msg += - String.format( - " Need monitoring metric writer permission on project=%s. Follow https://cloud.google.com/bigtable/docs/client-side-metrics-setup to set up permissions.", - projectName.getProject()); - } - logger.log(Level.WARNING, msg, throwable); - } - bigtableExportCode.fail(); - } - - @Override - public void onSuccess(List emptyList) { - // When an export succeeded reset the export failure flag to false so if there's a - // transient failure it'll be logged. - bigtableExportFailureLogged.set(false); - bigtableExportCode.succeed(); - } - }, - MoreExecutors.directExecutor()); - - return bigtableExportCode; - } - - /** Export metrics associated with the resource the Application is running on. */ - private CompletableResultCode exportApplicationResourceMetrics( - Collection collection) { - if (applicationResource == null) { - return CompletableResultCode.ofSuccess(); - } - - // Filter application level metrics - List metricData = - collection.stream() - .filter(md -> APPLICATION_METRICS.contains(md.getName())) - .collect(Collectors.toList()); - - // Skip exporting if there's none - if (metricData.isEmpty()) { - return CompletableResultCode.ofSuccess(); - } - - List timeSeries; - try { - timeSeries = - BigtableExporterUtils.convertToApplicationResourceTimeSeries( - metricData, taskId, applicationResource); - } catch (Throwable e) { - logger.log( - Level.WARNING, - "Failed to convert application metric data to cloud monitoring timeseries.", - e); - return CompletableResultCode.ofFailure(); - } - - // Construct the request. The project id will be the project id of the detected monitored - // resource. - ApiFuture> gceOrGkeFuture; - CompletableResultCode exportCode = new CompletableResultCode(); - try { - ProjectName projectName = - ProjectName.of(applicationResource.getLabelsOrThrow(APPLICATION_RESOURCE_PROJECT_ID)); - - gceOrGkeFuture = exportTimeSeries(projectName, timeSeries); - - ApiFutures.addCallback( - gceOrGkeFuture, - new ApiFutureCallback>() { - @Override - public void onFailure(Throwable throwable) { - if (applicationExportFailureLogged.compareAndSet(false, true)) { - String msg = "createServiceTimeSeries request failed for bigtable metrics."; - if (throwable instanceof PermissionDeniedException) { - msg += - String.format( - " Need monitoring metric writer permission on project=%s. Follow https://cloud.google.com/bigtable/docs/client-side-metrics-setup to set up permissions.", - projectName.getProject()); - } - logger.log(Level.WARNING, msg, throwable); - } - exportCode.fail(); - } - - @Override - public void onSuccess(List emptyList) { - // When an export succeeded reset the export failure flag to false so if there's a - // transient failure it'll be logged. - applicationExportFailureLogged.set(false); - exportCode.succeed(); - } - }, - MoreExecutors.directExecutor()); - - } catch (Exception e) { - logger.log( - Level.WARNING, - "Failed to get projectName for application resource " + applicationResource); - return CompletableResultCode.ofFailure(); - } - - return exportCode; - } - - private ApiFuture> exportTimeSeries( - ProjectName projectName, List timeSeries) { - List> batchResults = new ArrayList<>(); - - for (List batch : Iterables.partition(timeSeries, EXPORT_BATCH_SIZE_LIMIT)) { - CreateTimeSeriesRequest req = - CreateTimeSeriesRequest.newBuilder() - .setName(projectName.toString()) - .addAllTimeSeries(batch) - .build(); - ApiFuture f = this.client.createServiceTimeSeriesCallable().futureCall(req); - batchResults.add(f); - } - - return ApiFutures.allAsList(batchResults); - } - - @Override - public CompletableResultCode flush() { - if (lastExportCode != null) { - return lastExportCode; - } - return CompletableResultCode.ofSuccess(); - } - - @Override - public CompletableResultCode shutdown() { - if (!isShutdown.compareAndSet(false, true)) { - logger.log(Level.WARNING, "shutdown is called multiple times"); - return CompletableResultCode.ofSuccess(); - } - CompletableResultCode flushResult = flush(); - CompletableResultCode shutdownResult = new CompletableResultCode(); - flushResult.whenComplete( - () -> { - Throwable throwable = null; - try { - client.shutdown(); - } catch (Throwable e) { - logger.log(Level.WARNING, "failed to shutdown the monitoring client", e); - throwable = e; - } - if (throwable != null) { - shutdownResult.fail(); - } else { - shutdownResult.succeed(); - } - }); - return CompletableResultCode.ofAll(Arrays.asList(flushResult, shutdownResult)); - } - - /** - * For Google Cloud Monitoring always return CUMULATIVE to keep track of the cumulative value of a - * metric over time. - */ - @Override - public AggregationTemporality getAggregationTemporality(InstrumentType instrumentType) { - return AggregationTemporality.CUMULATIVE; - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java deleted file mode 100644 index 5bf6688e17..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java +++ /dev/null @@ -1,367 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import static com.google.api.Distribution.BucketOptions; -import static com.google.api.Distribution.BucketOptions.Explicit; -import static com.google.api.MetricDescriptor.MetricKind; -import static com.google.api.MetricDescriptor.MetricKind.CUMULATIVE; -import static com.google.api.MetricDescriptor.MetricKind.GAUGE; -import static com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED; -import static com.google.api.MetricDescriptor.ValueType; -import static com.google.api.MetricDescriptor.ValueType.DISTRIBUTION; -import static com.google.api.MetricDescriptor.ValueType.DOUBLE; -import static com.google.api.MetricDescriptor.ValueType.INT64; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.BIGTABLE_PROJECT_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_UID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLUSTER_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.INSTANCE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METER_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TABLE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; - -import com.google.api.Distribution; -import com.google.api.Metric; -import com.google.api.MonitoredResource; -import com.google.cloud.opentelemetry.detection.AttributeKeys; -import com.google.cloud.opentelemetry.detection.DetectedPlatform; -import com.google.cloud.opentelemetry.detection.GCPPlatformDetector; -import com.google.common.base.MoreObjects; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableSet; -import com.google.monitoring.v3.Point; -import com.google.monitoring.v3.TimeInterval; -import com.google.monitoring.v3.TimeSeries; -import com.google.monitoring.v3.TypedValue; -import com.google.protobuf.util.Timestamps; -import io.opentelemetry.api.common.AttributeKey; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.sdk.metrics.data.AggregationTemporality; -import io.opentelemetry.sdk.metrics.data.DoublePointData; -import io.opentelemetry.sdk.metrics.data.HistogramData; -import io.opentelemetry.sdk.metrics.data.HistogramPointData; -import io.opentelemetry.sdk.metrics.data.LongPointData; -import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.metrics.data.MetricDataType; -import io.opentelemetry.sdk.metrics.data.PointData; -import io.opentelemetry.sdk.metrics.data.SumData; -import java.lang.management.ManagementFactory; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.annotation.Nullable; - -/** Utils to convert OpenTelemetry types to Google Cloud Monitoring types. */ -class BigtableExporterUtils { - - private static final Logger logger = Logger.getLogger(BigtableExporterUtils.class.getName()); - - private static final String BIGTABLE_RESOURCE_TYPE = "bigtable_client_raw"; - - // These metric labels will be promoted to the bigtable_table monitored resource fields - private static final Set> BIGTABLE_PROMOTED_RESOURCE_LABELS = - ImmutableSet.of( - BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, TABLE_ID_KEY, CLUSTER_ID_KEY, ZONE_ID_KEY); - - private BigtableExporterUtils() {} - - /** - * In most cases this should look like java-${UUID}@${hostname}. The hostname will be retrieved - * from the jvm name and fallback to the local hostname. - */ - static String getDefaultTaskValue() { - // Something like '@' - final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); - // If jvm doesn't have the expected format, fallback to the local hostname - if (jvmName.indexOf('@') < 1) { - String hostname = "localhost"; - try { - hostname = InetAddress.getLocalHost().getHostName(); - } catch (UnknownHostException e) { - logger.log(Level.INFO, "Unable to get the hostname.", e); - } - // Generate a random number and use the same format "random_number@hostname". - return "java-" + UUID.randomUUID() + "@" + hostname; - } - return "java-" + UUID.randomUUID() + jvmName; - } - - static String getProjectId(PointData pointData) { - return pointData.getAttributes().get(BIGTABLE_PROJECT_ID_KEY); - } - - static List convertToBigtableTimeSeries(List collection, String taskId) { - List allTimeSeries = new ArrayList<>(); - - for (MetricData metricData : collection) { - if (!metricData.getInstrumentationScopeInfo().getName().equals(METER_NAME)) { - // Filter out metric data for instruments that are not part of the bigtable builtin metrics - continue; - } - metricData.getData().getPoints().stream() - .map(pointData -> convertPointToBigtableTimeSeries(metricData, pointData, taskId)) - .forEach(allTimeSeries::add); - } - - return allTimeSeries; - } - - static List convertToApplicationResourceTimeSeries( - Collection collection, String taskId, MonitoredResource applicationResource) { - Preconditions.checkNotNull( - applicationResource, - "convert application metrics is called when the supported resource is not detected"); - List allTimeSeries = new ArrayList<>(); - for (MetricData metricData : collection) { - if (!metricData.getInstrumentationScopeInfo().getName().equals(METER_NAME)) { - // Filter out metric data for instruments that are not part of the bigtable builtin metrics - continue; - } - metricData.getData().getPoints().stream() - .map( - pointData -> - convertPointToApplicationResourceTimeSeries( - metricData, pointData, taskId, applicationResource)) - .forEach(allTimeSeries::add); - } - return allTimeSeries; - } - - @Nullable - static MonitoredResource detectResource() { - GCPPlatformDetector detector = GCPPlatformDetector.DEFAULT_INSTANCE; - DetectedPlatform detectedPlatform = detector.detectPlatform(); - MonitoredResource monitoredResource = null; - try { - switch (detectedPlatform.getSupportedPlatform()) { - case GOOGLE_COMPUTE_ENGINE: - monitoredResource = - createGceMonitoredResource( - detectedPlatform.getProjectId(), detectedPlatform.getAttributes()); - break; - case GOOGLE_KUBERNETES_ENGINE: - monitoredResource = - createGkeMonitoredResource( - detectedPlatform.getProjectId(), detectedPlatform.getAttributes()); - break; - } - } catch (IllegalStateException e) { - logger.log( - Level.WARNING, - "Failed to create monitored resource for " + detectedPlatform.getSupportedPlatform(), - e); - } - return monitoredResource; - } - - private static MonitoredResource createGceMonitoredResource( - String projectId, Map attributes) { - return MonitoredResource.newBuilder() - .setType("gce_instance") - .putLabels("project_id", projectId) - .putLabels("instance_id", getAttribute(attributes, AttributeKeys.GCE_INSTANCE_ID)) - .putLabels("zone", getAttribute(attributes, AttributeKeys.GCE_AVAILABILITY_ZONE)) - .build(); - } - - private static MonitoredResource createGkeMonitoredResource( - String projectId, Map attributes) { - return MonitoredResource.newBuilder() - .setType("k8s_container") - .putLabels("project_id", projectId) - .putLabels("location", getAttribute(attributes, AttributeKeys.GKE_CLUSTER_LOCATION)) - .putLabels("cluster_name", getAttribute(attributes, AttributeKeys.GKE_CLUSTER_NAME)) - .putLabels("namespace_name", MoreObjects.firstNonNull(System.getenv("NAMESPACE"), "")) - .putLabels("pod_name", MoreObjects.firstNonNull(System.getenv("HOSTNAME"), "")) - .putLabels("container_name", MoreObjects.firstNonNull(System.getenv("CONTAINER_NAME"), "")) - .build(); - } - - private static String getAttribute(Map attributes, String key) { - String value = attributes.get(key); - if (value == null) { - throw new IllegalStateException( - "Required attribute " + key + " does not exist in the attributes map " + attributes); - } - return value; - } - - private static TimeSeries convertPointToBigtableTimeSeries( - MetricData metricData, PointData pointData, String taskId) { - TimeSeries.Builder builder = - TimeSeries.newBuilder() - .setMetricKind(convertMetricKind(metricData)) - .setValueType(convertValueType(metricData.getType())); - Metric.Builder metricBuilder = Metric.newBuilder().setType(metricData.getName()); - - Attributes attributes = pointData.getAttributes(); - MonitoredResource.Builder monitoredResourceBuilder = - MonitoredResource.newBuilder().setType(BIGTABLE_RESOURCE_TYPE); - - for (AttributeKey key : attributes.asMap().keySet()) { - if (BIGTABLE_PROMOTED_RESOURCE_LABELS.contains(key)) { - monitoredResourceBuilder.putLabels(key.getKey(), String.valueOf(attributes.get(key))); - } else { - metricBuilder.putLabels(key.getKey(), String.valueOf(attributes.get(key))); - } - } - - builder.setResource(monitoredResourceBuilder.build()); - - metricBuilder.putLabels(CLIENT_UID_KEY.getKey(), taskId); - builder.setMetric(metricBuilder.build()); - - TimeInterval timeInterval = - TimeInterval.newBuilder() - .setStartTime(Timestamps.fromNanos(pointData.getStartEpochNanos())) - .setEndTime(Timestamps.fromNanos(pointData.getEpochNanos())) - .build(); - - builder.addPoints(createPoint(metricData.getType(), pointData, timeInterval)); - - return builder.build(); - } - - private static TimeSeries convertPointToApplicationResourceTimeSeries( - MetricData metricData, - PointData pointData, - String taskId, - MonitoredResource applicationResource) { - TimeSeries.Builder builder = - TimeSeries.newBuilder() - .setMetricKind(convertMetricKind(metricData)) - .setValueType(convertValueType(metricData.getType())) - .setResource(applicationResource); - - Metric.Builder metricBuilder = Metric.newBuilder().setType(metricData.getName()); - - Attributes attributes = pointData.getAttributes(); - for (AttributeKey key : attributes.asMap().keySet()) { - metricBuilder.putLabels(key.getKey(), String.valueOf(attributes.get(key))); - } - - metricBuilder.putLabels(CLIENT_UID_KEY.getKey(), taskId); - builder.setMetric(metricBuilder.build()); - - TimeInterval timeInterval = - TimeInterval.newBuilder() - .setStartTime(Timestamps.fromNanos(pointData.getStartEpochNanos())) - .setEndTime(Timestamps.fromNanos(pointData.getEpochNanos())) - .build(); - - builder.addPoints(createPoint(metricData.getType(), pointData, timeInterval)); - return builder.build(); - } - - private static MetricKind convertMetricKind(MetricData metricData) { - switch (metricData.getType()) { - case HISTOGRAM: - case EXPONENTIAL_HISTOGRAM: - return convertHistogramType(metricData.getHistogramData()); - case LONG_GAUGE: - case DOUBLE_GAUGE: - return GAUGE; - case LONG_SUM: - return convertSumDataType(metricData.getLongSumData()); - case DOUBLE_SUM: - return convertSumDataType(metricData.getDoubleSumData()); - default: - return UNRECOGNIZED; - } - } - - private static MetricKind convertHistogramType(HistogramData histogramData) { - if (histogramData.getAggregationTemporality() == AggregationTemporality.CUMULATIVE) { - return CUMULATIVE; - } - return UNRECOGNIZED; - } - - private static MetricKind convertSumDataType(SumData sum) { - if (!sum.isMonotonic()) { - return GAUGE; - } - if (sum.getAggregationTemporality() == AggregationTemporality.CUMULATIVE) { - return CUMULATIVE; - } - return UNRECOGNIZED; - } - - private static ValueType convertValueType(MetricDataType metricDataType) { - switch (metricDataType) { - case LONG_GAUGE: - case LONG_SUM: - return INT64; - case DOUBLE_GAUGE: - case DOUBLE_SUM: - return DOUBLE; - case HISTOGRAM: - case EXPONENTIAL_HISTOGRAM: - return DISTRIBUTION; - default: - return ValueType.UNRECOGNIZED; - } - } - - private static Point createPoint( - MetricDataType type, PointData pointData, TimeInterval timeInterval) { - Point.Builder builder = Point.newBuilder().setInterval(timeInterval); - switch (type) { - case HISTOGRAM: - case EXPONENTIAL_HISTOGRAM: - return builder - .setValue( - TypedValue.newBuilder() - .setDistributionValue(convertHistogramData((HistogramPointData) pointData)) - .build()) - .build(); - case DOUBLE_GAUGE: - case DOUBLE_SUM: - return builder - .setValue( - TypedValue.newBuilder() - .setDoubleValue(((DoublePointData) pointData).getValue()) - .build()) - .build(); - case LONG_GAUGE: - case LONG_SUM: - return builder - .setValue(TypedValue.newBuilder().setInt64Value(((LongPointData) pointData).getValue())) - .build(); - default: - logger.log(Level.WARNING, "unsupported metric type"); - return builder.build(); - } - } - - private static Distribution convertHistogramData(HistogramPointData pointData) { - return Distribution.newBuilder() - .setCount(pointData.getCount()) - .setMean(pointData.getCount() == 0L ? 0.0D : pointData.getSum() / pointData.getCount()) - .setBucketOptions( - BucketOptions.newBuilder() - .setExplicitBuckets(Explicit.newBuilder().addAllBounds(pointData.getBoundaries()))) - .addAllBucketCounts(pointData.getCounts()) - .build(); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java index 3445514f7b..df27fbd842 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracer.java @@ -16,15 +16,22 @@ package com.google.cloud.bigtable.data.v2.stub.metrics; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.tracing.ApiTracer; import com.google.api.gax.tracing.BaseApiTracer; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.BigtableTracerStreamingCallable; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.BigtableTracerUnaryCallable; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import java.time.Duration; import javax.annotation.Nullable; /** * A Bigtable specific {@link ApiTracer} that includes additional contexts. This class is a base * implementation that does nothing. */ +// NOTE: this class was part of the public surface so can't move to +// com.google.cloud.bigtable.data.v2.internal.csm with the rest of the metrics. @BetaApi("This surface is not stable yet it might be removed in the future.") public class BigtableTracer extends BaseApiTracer { @@ -52,6 +59,13 @@ public void afterResponse(long applicationLatency) { // noop } + /** + * Used by BigtableUnaryOperationCallable to signal that the user visible portion of the RPC is + * complete and that metrics should freeze the timers and then publish the frozen values when the + * internal portion of the operation completes. + */ + public void operationFinishEarly() {} + /** * Get the attempt number of the current call. Attempt number for the current call is passed in * and should be recorded in {@link #attemptStarted(int)}. With the getter we can access it from @@ -61,29 +75,47 @@ public int getAttempt() { return attempt; } - /** - * Record the latency between Google's network receives the RPC and reads back the first byte of - * the response from server-timing header. If server-timing header is missing, increment the - * missing header count. - */ - public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwable) { + /** Adds an annotation of the total throttled time of a batch. */ + public void batchRequestThrottled(long throttledTimeMs) { // noop } - /** Adds an annotation of the total throttled time of a batch. */ - public void batchRequestThrottled(long throttledTimeMs) { + public void setSidebandData(MetadataExtractorInterceptor.SidebandData sidebandData) { // noop } - /** - * Set the Bigtable zone and cluster so metrics can be tagged with location information. This will - * be called in BuiltinMetricsTracer. - */ - public void setLocations(String zone, String cluster) { + /** Called when the message is sent on a grpc channel. */ + public void grpcMessageSent() { // noop } - public void grpcChannelQueuedLatencies(long queuedTimeMs) { + /** + * Record the operation timeout from user settings for calculating remaining deadline. Currently, + * it's called in BuiltinMetricsTracer on attempt start from {@link BigtableTracerUnaryCallable} + * and {@link BigtableTracerStreamingCallable}. + */ + public void setTotalTimeoutDuration(Duration totalTimeoutDuration) { // noop } + + /** + * Record the target QPS for batch write flow control. + * + * @param targetQps The new target QPS for the client. + */ + @InternalApi + public void setBatchWriteFlowControlTargetQps(double targetQps) {} + + /** + * Record the factors received from server-side for batch write flow control. The factors are + * capped by min and max allowed factor values. Status and whether the factor was actually applied + * are also recorded. + * + * @param factor Capped factor from server-side. For non-OK response, min factor is used. + * @param status The status of the response from which the factor is retrieved or derived. + * @param applied Whether the factor was actually applied. + */ + @InternalApi + public void addBatchWriteFlowControlFactor( + double factor, @Nullable Throwable status, boolean applied) {} } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java deleted file mode 100644 index 7dfca8b753..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java +++ /dev/null @@ -1,93 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutureCallback; -import com.google.api.core.ApiFutures; -import com.google.api.core.InternalApi; -import com.google.api.gax.grpc.GrpcResponseMetadata; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.base.Preconditions; -import com.google.common.util.concurrent.MoreExecutors; -import javax.annotation.Nonnull; - -/** - * This callable will: - *

  • - Inject a {@link GrpcResponseMetadata} to access the headers returned by gRPC methods upon - * completion. The {@link BigtableTracer} will process metrics that were injected in the - * header/trailer and publish them to OpenCensus. If {@link GrpcResponseMetadata#getMetadata()} - * returned null, it probably means that the request has never reached GFE, and it'll increment - * the gfe_header_missing_counter in this case. - *
  • -This class will also access trailers from {@link GrpcResponseMetadata} to record zone and - * cluster ids. - *
  • -This class will also inject a {@link BigtableGrpcStreamTracer} that'll record the time an - * RPC spent in a grpc channel queue. - *
  • This class is considered an internal implementation detail and not meant to be used by - * applications. - */ -@InternalApi -public class BigtableTracerUnaryCallable - extends UnaryCallable { - - private final UnaryCallable innerCallable; - - public BigtableTracerUnaryCallable(@Nonnull UnaryCallable innerCallable) { - this.innerCallable = Preconditions.checkNotNull(innerCallable, "Inner callable must be set"); - } - - @Override - public ApiFuture futureCall(RequestT request, ApiCallContext context) { - // tracer should always be an instance of BigtableTracer - if (context.getTracer() instanceof BigtableTracer) { - final GrpcResponseMetadata responseMetadata = new GrpcResponseMetadata(); - BigtableTracerUnaryCallback callback = - new BigtableTracerUnaryCallback( - (BigtableTracer) context.getTracer(), responseMetadata); - ApiFuture future = - innerCallable.futureCall( - request, - Util.injectBigtableStreamTracer( - context, responseMetadata, (BigtableTracer) context.getTracer())); - ApiFutures.addCallback(future, callback, MoreExecutors.directExecutor()); - return future; - } else { - return innerCallable.futureCall(request, context); - } - } - - private class BigtableTracerUnaryCallback implements ApiFutureCallback { - - private final BigtableTracer tracer; - private final GrpcResponseMetadata responseMetadata; - - BigtableTracerUnaryCallback(BigtableTracer tracer, GrpcResponseMetadata responseMetadata) { - this.tracer = tracer; - this.responseMetadata = responseMetadata; - } - - @Override - public void onFailure(Throwable throwable) { - Util.recordMetricsFromMetadata(responseMetadata, tracer, throwable); - } - - @Override - public void onSuccess(ResponseT response) { - Util.recordMetricsFromMetadata(responseMetadata, tracer, null); - } - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsConstants.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsConstants.java deleted file mode 100644 index d85300828b..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsConstants.java +++ /dev/null @@ -1,220 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import com.google.api.core.InternalApi; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import io.opentelemetry.api.common.AttributeKey; -import io.opentelemetry.sdk.metrics.Aggregation; -import io.opentelemetry.sdk.metrics.InstrumentSelector; -import io.opentelemetry.sdk.metrics.InstrumentType; -import io.opentelemetry.sdk.metrics.View; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -/** Defining Bigtable builit-in metrics scope, attributes, metric names and views. */ -@InternalApi -public class BuiltinMetricsConstants { - - // Metric attribute keys for monitored resource - public static final AttributeKey BIGTABLE_PROJECT_ID_KEY = - AttributeKey.stringKey("project_id"); - public static final AttributeKey INSTANCE_ID_KEY = AttributeKey.stringKey("instance"); - public static final AttributeKey TABLE_ID_KEY = AttributeKey.stringKey("table"); - public static final AttributeKey CLUSTER_ID_KEY = AttributeKey.stringKey("cluster"); - public static final AttributeKey ZONE_ID_KEY = AttributeKey.stringKey("zone"); - - // Metric attribute keys for labels - // We need to access APP_PROFILE_KEY in EnhancedBigtableStubSettings and STREAMING_KEY in - // IT tests, so they're public. - public static final AttributeKey APP_PROFILE_KEY = AttributeKey.stringKey("app_profile"); - public static final AttributeKey STREAMING_KEY = AttributeKey.booleanKey("streaming"); - public static final AttributeKey CLIENT_NAME_KEY = AttributeKey.stringKey("client_name"); - static final AttributeKey METHOD_KEY = AttributeKey.stringKey("method"); - static final AttributeKey STATUS_KEY = AttributeKey.stringKey("status"); - static final AttributeKey CLIENT_UID_KEY = AttributeKey.stringKey("client_uid"); - - // Metric names - public static final String OPERATION_LATENCIES_NAME = "operation_latencies"; - public static final String ATTEMPT_LATENCIES_NAME = "attempt_latencies"; - static final String RETRY_COUNT_NAME = "retry_count"; - static final String CONNECTIVITY_ERROR_COUNT_NAME = "connectivity_error_count"; - static final String SERVER_LATENCIES_NAME = "server_latencies"; - static final String FIRST_RESPONSE_LATENCIES_NAME = "first_response_latencies"; - static final String APPLICATION_BLOCKING_LATENCIES_NAME = "application_latencies"; - static final String CLIENT_BLOCKING_LATENCIES_NAME = "throttling_latencies"; - static final String PER_CONNECTION_ERROR_COUNT_NAME = "per_connection_error_count"; - - // Buckets under 100,000 are identical to buckets for server side metrics handler_latencies. - // Extending client side bucket to up to 3,200,000. - private static final Aggregation AGGREGATION_WITH_MILLIS_HISTOGRAM = - Aggregation.explicitBucketHistogram( - ImmutableList.of( - 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 13.0, 16.0, 20.0, 25.0, 30.0, 40.0, - 50.0, 65.0, 80.0, 100.0, 130.0, 160.0, 200.0, 250.0, 300.0, 400.0, 500.0, 650.0, - 800.0, 1000.0, 2000.0, 5000.0, 10000.0, 20000.0, 50000.0, 100000.0, 200000.0, - 400000.0, 800000.0, 1600000.0, 3200000.0)); // max is 53.3 minutes - - private static final Aggregation AGGREGATION_PER_CONNECTION_ERROR_COUNT_HISTOGRAM = - Aggregation.explicitBucketHistogram( - ImmutableList.of( - 1.0, - 2.0, - 4.0, - 8.0, - 16.0, - 32.0, - 64.0, - 125.0, - 250.0, - 500.0, - 1_000.0, - 2_000.0, - 4_000.0, - 8_000.0, - 16_000.0, - 32_000.0, - 64_000.0, - 128_000.0, - 250_000.0, - 500_000.0, - 1_000_000.0)); - - public static final String METER_NAME = "bigtable.googleapis.com/internal/client/"; - - static final Set COMMON_ATTRIBUTES = - ImmutableSet.of( - BIGTABLE_PROJECT_ID_KEY, - INSTANCE_ID_KEY, - TABLE_ID_KEY, - APP_PROFILE_KEY, - CLUSTER_ID_KEY, - ZONE_ID_KEY, - METHOD_KEY, - CLIENT_NAME_KEY); - - static void defineView( - ImmutableMap.Builder viewMap, - String id, - Aggregation aggregation, - InstrumentType type, - String unit, - Set attributes) { - InstrumentSelector selector = - InstrumentSelector.builder() - .setName(id) - .setMeterName(METER_NAME) - .setType(type) - .setUnit(unit) - .build(); - Set attributesFilter = - ImmutableSet.builder() - .addAll( - COMMON_ATTRIBUTES.stream().map(AttributeKey::getKey).collect(Collectors.toSet())) - .addAll(attributes.stream().map(AttributeKey::getKey).collect(Collectors.toSet())) - .build(); - View view = - View.builder() - .setName(METER_NAME + id) - .setAggregation(aggregation) - .setAttributeFilter(attributesFilter) - .build(); - - viewMap.put(selector, view); - } - - public static Map getAllViews() { - ImmutableMap.Builder views = ImmutableMap.builder(); - - defineView( - views, - OPERATION_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder() - .addAll(COMMON_ATTRIBUTES) - .add(STREAMING_KEY, STATUS_KEY) - .build()); - defineView( - views, - ATTEMPT_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder() - .addAll(COMMON_ATTRIBUTES) - .add(STREAMING_KEY, STATUS_KEY) - .build()); - defineView( - views, - SERVER_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).add(STATUS_KEY).build()); - defineView( - views, - FIRST_RESPONSE_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).add(STATUS_KEY).build()); - defineView( - views, - APPLICATION_BLOCKING_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).build()); - defineView( - views, - CLIENT_BLOCKING_LATENCIES_NAME, - AGGREGATION_WITH_MILLIS_HISTOGRAM, - InstrumentType.HISTOGRAM, - "ms", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).build()); - defineView( - views, - RETRY_COUNT_NAME, - Aggregation.sum(), - InstrumentType.COUNTER, - "1", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).add(STATUS_KEY).build()); - defineView( - views, - CONNECTIVITY_ERROR_COUNT_NAME, - Aggregation.sum(), - InstrumentType.COUNTER, - "1", - ImmutableSet.builder().addAll(COMMON_ATTRIBUTES).add(STATUS_KEY).build()); - - defineView( - views, - PER_CONNECTION_ERROR_COUNT_NAME, - AGGREGATION_PER_CONNECTION_ERROR_COUNT_HISTOGRAM, - InstrumentType.HISTOGRAM, - "1", - ImmutableSet.builder() - .add(BIGTABLE_PROJECT_ID_KEY, INSTANCE_ID_KEY, APP_PROFILE_KEY, CLIENT_NAME_KEY) - .build()); - - return views.build(); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java deleted file mode 100644 index abd214d760..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright 2022 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.bigtable.data.v2.stub.metrics; - -import static com.google.api.gax.tracing.ApiTracerFactory.OperationType; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_NAME_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLUSTER_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METHOD_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.STATUS_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.STREAMING_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TABLE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; - -import com.google.api.gax.retrying.ServerStreamingAttemptException; -import com.google.api.gax.tracing.SpanName; -import com.google.cloud.bigtable.Version; -import com.google.common.base.Stopwatch; -import com.google.common.math.IntMath; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.api.metrics.DoubleHistogram; -import io.opentelemetry.api.metrics.LongCounter; -import java.util.concurrent.CancellationException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import javax.annotation.Nullable; -import org.threeten.bp.Duration; - -/** - * A {@link BigtableTracer} that records built-in metrics and publish under the - * bigtable.googleapis.com/client namespace - */ -class BuiltinMetricsTracer extends BigtableTracer { - - private static final String NAME = "java-bigtable/" + Version.VERSION; - private final OperationType operationType; - private final SpanName spanName; - - // Operation level metrics - private final AtomicBoolean opFinished = new AtomicBoolean(); - private final Stopwatch operationTimer = Stopwatch.createStarted(); - private final Stopwatch firstResponsePerOpTimer = Stopwatch.createStarted(); - - // Attempt level metrics - private int attemptCount = 0; - private Stopwatch attemptTimer; - private volatile int attempt = 0; - - // Total server latency needs to be atomic because it's accessed from different threads. E.g. - // request() from user thread and attempt failed from grpc thread. We're only measuring the extra - // time application spent blocking grpc buffer, which will be operationLatency - serverLatency. - private final AtomicLong totalServerLatencyNano = new AtomicLong(0); - // Stopwatch is not thread safe so this is a workaround to check if the stopwatch changes is - // flushed to memory. - private final Stopwatch serverLatencyTimer = Stopwatch.createUnstarted(); - private boolean serverLatencyTimerIsRunning = false; - private final Object timerLock = new Object(); - - private boolean flowControlIsDisabled = false; - - private final AtomicInteger requestLeft = new AtomicInteger(0); - - // Monitored resource labels - private String tableId = "unspecified"; - private String zone = "global"; - private String cluster = "unspecified"; - - private final AtomicLong totalClientBlockingTime = new AtomicLong(0); - - private final Attributes baseAttributes; - - private Long serverLatencies = null; - - // OpenCensus (and server) histogram buckets use [start, end), however OpenTelemetry uses (start, - // end]. To work around this, we measure all the latencies in nanoseconds and convert them - // to milliseconds and use DoubleHistogram. This should minimize the chance of a data - // point fall on the bucket boundary that causes off by one errors. - private final DoubleHistogram operationLatenciesHistogram; - private final DoubleHistogram attemptLatenciesHistogram; - private final DoubleHistogram serverLatenciesHistogram; - private final DoubleHistogram firstResponseLatenciesHistogram; - private final DoubleHistogram clientBlockingLatenciesHistogram; - private final DoubleHistogram applicationBlockingLatenciesHistogram; - private final LongCounter connectivityErrorCounter; - private final LongCounter retryCounter; - - BuiltinMetricsTracer( - OperationType operationType, - SpanName spanName, - Attributes attributes, - DoubleHistogram operationLatenciesHistogram, - DoubleHistogram attemptLatenciesHistogram, - DoubleHistogram serverLatenciesHistogram, - DoubleHistogram firstResponseLatenciesHistogram, - DoubleHistogram clientBlockingLatenciesHistogram, - DoubleHistogram applicationBlockingLatenciesHistogram, - LongCounter connectivityErrorCounter, - LongCounter retryCounter) { - this.operationType = operationType; - this.spanName = spanName; - this.baseAttributes = attributes; - - this.operationLatenciesHistogram = operationLatenciesHistogram; - this.attemptLatenciesHistogram = attemptLatenciesHistogram; - this.serverLatenciesHistogram = serverLatenciesHistogram; - this.firstResponseLatenciesHistogram = firstResponseLatenciesHistogram; - this.clientBlockingLatenciesHistogram = clientBlockingLatenciesHistogram; - this.applicationBlockingLatenciesHistogram = applicationBlockingLatenciesHistogram; - this.connectivityErrorCounter = connectivityErrorCounter; - this.retryCounter = retryCounter; - } - - @Override - public Scope inScope() { - return new Scope() { - @Override - public void close() {} - }; - } - - @Override - public void operationSucceeded() { - recordOperationCompletion(null); - } - - @Override - public void operationCancelled() { - recordOperationCompletion(new CancellationException()); - } - - @Override - public void operationFailed(Throwable error) { - recordOperationCompletion(error); - } - - @Override - public void attemptStarted(int attemptNumber) { - attemptStarted(null, attemptNumber); - } - - @Override - public void attemptStarted(Object request, int attemptNumber) { - this.attempt = attemptNumber; - attemptCount++; - attemptTimer = Stopwatch.createStarted(); - if (request != null) { - this.tableId = Util.extractTableId(request); - } - if (!flowControlIsDisabled) { - synchronized (timerLock) { - if (!serverLatencyTimerIsRunning) { - serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; - } - } - } - } - - @Override - public void attemptSucceeded() { - recordAttemptCompletion(null); - } - - @Override - public void attemptCancelled() { - recordAttemptCompletion(new CancellationException()); - } - - @Override - public void attemptFailed(Throwable error, Duration delay) { - recordAttemptCompletion(error); - } - - @Override - public void attemptPermanentFailure(Throwable throwable) { - recordAttemptCompletion(throwable); - } - - @Override - public void onRequest(int requestCount) { - requestLeft.accumulateAndGet(requestCount, IntMath::saturatedAdd); - if (flowControlIsDisabled) { - // On request is only called when auto flow control is disabled. When auto flow control is - // disabled, server latency is measured between onRequest and onResponse. - synchronized (timerLock) { - if (!serverLatencyTimerIsRunning) { - serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; - } - } - } - } - - @Override - public void responseReceived() { - // When auto flow control is enabled, server latency is measured between afterResponse and - // responseReceived. - // When auto flow control is disabled, server latency is measured between onRequest and - // responseReceived. - // When auto flow control is disabled and application requested multiple responses, server - // latency is measured between afterResponse and responseReceived. - // In all the cases, we want to stop the serverLatencyTimer here. - synchronized (timerLock) { - if (serverLatencyTimerIsRunning) { - totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); - serverLatencyTimer.reset(); - serverLatencyTimerIsRunning = false; - } - } - } - - @Override - public void afterResponse(long applicationLatency) { - if (!flowControlIsDisabled || requestLeft.decrementAndGet() > 0) { - // When auto flow control is enabled, request will never be called, so server latency is - // measured between after the last response is processed and before the next response is - // received. If flow control is disabled but requestLeft is greater than 0, - // also start the timer to count the time between afterResponse and responseReceived. - synchronized (timerLock) { - if (!serverLatencyTimerIsRunning) { - serverLatencyTimer.start(); - serverLatencyTimerIsRunning = true; - } - } - } - } - - @Override - public int getAttempt() { - return attempt; - } - - @Override - public void recordGfeMetadata(@Nullable Long latency, @Nullable Throwable throwable) { - if (latency != null) { - serverLatencies = latency; - } - } - - @Override - public void setLocations(String zone, String cluster) { - this.zone = zone; - this.cluster = cluster; - } - - @Override - public void batchRequestThrottled(long throttledTimeNanos) { - totalClientBlockingTime.addAndGet(Duration.ofNanos(throttledTimeNanos).toMillis()); - } - - @Override - public void grpcChannelQueuedLatencies(long queuedTimeNanos) { - totalClientBlockingTime.addAndGet(queuedTimeNanos); - } - - @Override - public void disableFlowControl() { - flowControlIsDisabled = true; - } - - private void recordOperationCompletion(@Nullable Throwable status) { - if (!opFinished.compareAndSet(false, true)) { - return; - } - operationTimer.stop(); - - boolean isStreaming = operationType == OperationType.ServerStreaming; - String statusStr = Util.extractStatus(status); - - // Publish metric data with all the attributes. The attributes get filtered in - // BuiltinMetricsConstants when we construct the views. - Attributes attributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, tableId) - .put(CLUSTER_ID_KEY, cluster) - .put(ZONE_ID_KEY, zone) - .put(METHOD_KEY, spanName.toString()) - .put(CLIENT_NAME_KEY, NAME) - .put(STREAMING_KEY, isStreaming) - .put(STATUS_KEY, statusStr) - .build(); - - long operationLatencyNano = operationTimer.elapsed(TimeUnit.NANOSECONDS); - - // Only record when retry count is greater than 0 so the retry - // graph will be less confusing - if (attemptCount > 1) { - retryCounter.add(attemptCount - 1, attributes); - } - - operationLatenciesHistogram.record(convertToMs(operationLatencyNano), attributes); - - // serverLatencyTimer should already be stopped in recordAttemptCompletion - long applicationLatencyNano = operationLatencyNano - totalServerLatencyNano.get(); - applicationBlockingLatenciesHistogram.record(convertToMs(applicationLatencyNano), attributes); - - if (operationType == OperationType.ServerStreaming - && spanName.getMethodName().equals("ReadRows")) { - firstResponseLatenciesHistogram.record( - convertToMs(firstResponsePerOpTimer.elapsed(TimeUnit.NANOSECONDS)), attributes); - } - } - - private void recordAttemptCompletion(@Nullable Throwable status) { - // If the attempt failed, the time spent in retry should be counted in application latency. - // Stop the stopwatch and decrement requestLeft. - synchronized (timerLock) { - if (serverLatencyTimerIsRunning) { - requestLeft.decrementAndGet(); - totalServerLatencyNano.addAndGet(serverLatencyTimer.elapsed(TimeUnit.NANOSECONDS)); - serverLatencyTimer.reset(); - serverLatencyTimerIsRunning = false; - } - } - - boolean isStreaming = operationType == OperationType.ServerStreaming; - - // Patch the status until it's fixed in gax. When an attempt failed, - // it'll throw a ServerStreamingAttemptException. Unwrap the exception - // so it could get processed by extractStatus - if (status instanceof ServerStreamingAttemptException) { - status = status.getCause(); - } - - String statusStr = Util.extractStatus(status); - - Attributes attributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, tableId) - .put(CLUSTER_ID_KEY, cluster) - .put(ZONE_ID_KEY, zone) - .put(METHOD_KEY, spanName.toString()) - .put(CLIENT_NAME_KEY, NAME) - .put(STREAMING_KEY, isStreaming) - .put(STATUS_KEY, statusStr) - .build(); - - clientBlockingLatenciesHistogram.record(convertToMs(totalClientBlockingTime.get()), attributes); - - attemptLatenciesHistogram.record( - convertToMs(attemptTimer.elapsed(TimeUnit.NANOSECONDS)), attributes); - - if (serverLatencies != null) { - serverLatenciesHistogram.record(serverLatencies, attributes); - connectivityErrorCounter.add(0, attributes); - } else { - connectivityErrorCounter.add(1, attributes); - } - } - - private static double convertToMs(long nanoSeconds) { - double toMs = 1e-6; - return nanoSeconds * toMs; - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java deleted file mode 100644 index f0ac656978..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerFactory.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2022 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.bigtable.data.v2.stub.metrics; - -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.APPLICATION_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ATTEMPT_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CONNECTIVITY_ERROR_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.FIRST_RESPONSE_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METER_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.OPERATION_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.RETRY_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.SERVER_LATENCIES_NAME; - -import com.google.api.core.InternalApi; -import com.google.api.gax.tracing.ApiTracer; -import com.google.api.gax.tracing.ApiTracerFactory; -import com.google.api.gax.tracing.BaseApiTracerFactory; -import com.google.api.gax.tracing.SpanName; -import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.api.metrics.DoubleHistogram; -import io.opentelemetry.api.metrics.LongCounter; -import io.opentelemetry.api.metrics.Meter; -import java.io.IOException; - -/** - * {@link ApiTracerFactory} that will generate OpenTelemetry metrics by using the {@link ApiTracer} - * api. - */ -@InternalApi("For internal use only") -public class BuiltinMetricsTracerFactory extends BaseApiTracerFactory { - - private final Attributes attributes; - - private static final String MILLISECOND = "ms"; - private static final String COUNT = "1"; - - private final DoubleHistogram operationLatenciesHistogram; - private final DoubleHistogram attemptLatenciesHistogram; - private final DoubleHistogram serverLatenciesHistogram; - private final DoubleHistogram firstResponseLatenciesHistogram; - private final DoubleHistogram clientBlockingLatenciesHistogram; - private final DoubleHistogram applicationBlockingLatenciesHistogram; - private final LongCounter connectivityErrorCounter; - private final LongCounter retryCounter; - - public static BuiltinMetricsTracerFactory create( - OpenTelemetry openTelemetry, Attributes attributes) throws IOException { - return new BuiltinMetricsTracerFactory(openTelemetry, attributes); - } - - BuiltinMetricsTracerFactory(OpenTelemetry openTelemetry, Attributes attributes) { - this.attributes = attributes; - Meter meter = openTelemetry.getMeter(METER_NAME); - - operationLatenciesHistogram = - meter - .histogramBuilder(OPERATION_LATENCIES_NAME) - .setDescription( - "Total time until final operation success or failure, including retries and backoff.") - .setUnit(MILLISECOND) - .build(); - attemptLatenciesHistogram = - meter - .histogramBuilder(ATTEMPT_LATENCIES_NAME) - .setDescription("Client observed latency per RPC attempt.") - .setUnit(MILLISECOND) - .build(); - serverLatenciesHistogram = - meter - .histogramBuilder(SERVER_LATENCIES_NAME) - .setDescription( - "The latency measured from the moment that the RPC entered the Google data center until the RPC was completed.") - .setUnit(MILLISECOND) - .build(); - firstResponseLatenciesHistogram = - meter - .histogramBuilder(FIRST_RESPONSE_LATENCIES_NAME) - .setDescription( - "Latency from operation start until the response headers were received. The publishing of the measurement will be delayed until the attempt response has been received.") - .setUnit(MILLISECOND) - .build(); - clientBlockingLatenciesHistogram = - meter - .histogramBuilder(CLIENT_BLOCKING_LATENCIES_NAME) - .setDescription( - "The artificial latency introduced by the client to limit the number of outstanding requests. The publishing of the measurement will be delayed until the attempt trailers have been received.") - .setUnit(MILLISECOND) - .build(); - applicationBlockingLatenciesHistogram = - meter - .histogramBuilder(APPLICATION_BLOCKING_LATENCIES_NAME) - .setDescription( - "The latency of the client application consuming available response data.") - .setUnit(MILLISECOND) - .build(); - connectivityErrorCounter = - meter - .counterBuilder(CONNECTIVITY_ERROR_COUNT_NAME) - .setDescription( - "Number of requests that failed to reach the Google datacenter. (Requests without google response headers") - .setUnit(COUNT) - .build(); - retryCounter = - meter - .counterBuilder(RETRY_COUNT_NAME) - .setDescription("The number of additional RPCs sent after the initial attempt.") - .setUnit(COUNT) - .build(); - } - - @Override - public ApiTracer newTracer(ApiTracer parent, SpanName spanName, OperationType operationType) { - return new BuiltinMetricsTracer( - operationType, - spanName, - attributes, - operationLatenciesHistogram, - attemptLatenciesHistogram, - serverLatenciesHistogram, - firstResponseLatenciesHistogram, - clientBlockingLatenciesHistogram, - applicationBlockingLatenciesHistogram, - connectivityErrorCounter, - retryCounter); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsView.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsView.java index 445160a146..2ec4fdfed4 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsView.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsView.java @@ -16,44 +16,58 @@ package com.google.cloud.bigtable.data.v2.stub.metrics; import com.google.auth.Credentials; -import com.google.auth.oauth2.GoogleCredentials; -import io.opentelemetry.sdk.metrics.InstrumentSelector; import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; -import io.opentelemetry.sdk.metrics.View; -import io.opentelemetry.sdk.metrics.export.MetricExporter; -import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader; import java.io.IOException; -import java.util.Map; +import java.util.concurrent.ScheduledExecutorService; import javax.annotation.Nullable; /** - * A util class to register built-in metrics on a custom OpenTelemetry instance. This is for - * advanced usage, and is only necessary when wanting to write built-in metrics to cloud monitoring - * and custom sinks. Please refer to {@link CustomOpenTelemetryMetricsProvider} for example usage. + * @deprecated this class is no longer used and is empty. It only exists because it's symbols were + * part of the public surface. */ +@Deprecated public class BuiltinMetricsView { - private BuiltinMetricsView() {} - /** - * Register built-in metrics on the {@link SdkMeterProviderBuilder} with application default - * credentials. - */ + @Deprecated public static void registerBuiltinMetrics(String projectId, SdkMeterProviderBuilder builder) - throws IOException { - BuiltinMetricsView.registerBuiltinMetrics( - projectId, GoogleCredentials.getApplicationDefault(), builder); - } + throws IOException {} + + @Deprecated + public static void registerBuiltinMetrics(SdkMeterProviderBuilder builder) throws IOException {} - /** Register built-in metrics on the {@link SdkMeterProviderBuilder} with credentials. */ + @Deprecated public static void registerBuiltinMetrics( String projectId, @Nullable Credentials credentials, SdkMeterProviderBuilder builder) - throws IOException { - MetricExporter metricExporter = BigtableCloudMonitoringExporter.create(projectId, credentials); - for (Map.Entry entry : - BuiltinMetricsConstants.getAllViews().entrySet()) { - builder.registerView(entry.getKey(), entry.getValue()); - } - builder.registerMetricReader(PeriodicMetricReader.create(metricExporter)); - } + throws IOException {} + + @Deprecated + public static void registerBuiltinMetrics( + String projectId, + @Nullable Credentials credentials, + SdkMeterProviderBuilder builder, + @Nullable String endpoint) + throws IOException {} + + @Deprecated + public static void registerBuiltinMetrics( + @Nullable Credentials credentials, SdkMeterProviderBuilder builder, @Nullable String endpoint) + throws IOException {} + + @Deprecated + public static void registerBuiltinMetrics( + @Nullable Credentials credentials, + SdkMeterProviderBuilder builder, + @Nullable String endpoint, + @Nullable ScheduledExecutorService executorService) + throws IOException {} + + @Deprecated + static void registerBuiltinMetricsWithUniverseDomain( + @Nullable Credentials credentials, + SdkMeterProviderBuilder builder, + @Nullable String endpoint, + String universeDomain, + @Nullable ScheduledExecutorService executorService) + throws IOException {} } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ConnectionErrorCountInterceptor.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ConnectionErrorCountInterceptor.java deleted file mode 100644 index 17fcf9018e..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ConnectionErrorCountInterceptor.java +++ /dev/null @@ -1,89 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.ClientInterceptor; -import io.grpc.ForwardingClientCall; -import io.grpc.ForwardingClientCallListener; -import io.grpc.Metadata; -import io.grpc.MethodDescriptor; -import io.grpc.Status; -import java.util.concurrent.atomic.LongAdder; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** An interceptor which counts the number of failed responses for a channel. */ -class ConnectionErrorCountInterceptor implements ClientInterceptor { - private static final Logger LOG = - Logger.getLogger(ConnectionErrorCountInterceptor.class.toString()); - private final LongAdder numOfErrors; - private final LongAdder numOfSuccesses; - - ConnectionErrorCountInterceptor() { - numOfErrors = new LongAdder(); - numOfSuccesses = new LongAdder(); - } - - @Override - public ClientCall interceptCall( - MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { - return new ForwardingClientCall.SimpleForwardingClientCall( - channel.newCall(methodDescriptor, callOptions)) { - @Override - public void start(Listener responseListener, Metadata headers) { - super.start( - new ForwardingClientCallListener.SimpleForwardingClientCallListener( - responseListener) { - @Override - public void onClose(Status status, Metadata trailers) { - // Connection accounting is non-critical, so we log the exception, but let normal - // processing proceed. - try { - handleOnCloseUnsafe(status); - } catch (Throwable t) { - if (t instanceof InterruptedException) { - Thread.currentThread().interrupt(); - } - LOG.log( - Level.WARNING, "Unexpected error while updating connection error stats", t); - } - super.onClose(status, trailers); - } - - private void handleOnCloseUnsafe(Status status) { - if (status.isOk()) { - numOfSuccesses.increment(); - } else { - numOfErrors.increment(); - } - } - }, - headers); - } - }; - } - - long getAndResetNumOfErrors() { - return numOfErrors.sumThenReset(); - } - - long getAndResetNumOfSuccesses() { - return numOfSuccesses.sumThenReset(); - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java index 8c1c5c1c90..66041e8aca 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/CustomOpenTelemetryMetricsProvider.java @@ -15,8 +15,12 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; +import com.google.auth.Credentials; import com.google.common.base.MoreObjects; import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; +import java.io.IOException; +import java.util.concurrent.ScheduledExecutorService; /** * Set a custom OpenTelemetry instance. @@ -26,19 +30,6 @@ *
    {@code
      * SdkMeterProviderBuilder sdkMeterProvider = SdkMeterProvider.builder();
      *
    - * // register Builtin metrics on your meter provider with default credentials
    - * BuiltinMetricsView.registerBuiltinMetrics("project-id", sdkMeterProvider);
    - *
    - * // register other metrics reader and views
    - * sdkMeterProvider.registerMetricReader(..);
    - * sdkMeterProvider.registerView(..);
    - *
    - * // create the OTEL instance
    - * OpenTelemetry openTelemetry = OpenTelemetrySdk
    - *     .builder()
    - *     .setMeterProvider(sdkMeterProvider.build())
    - *     .build();
    - *
      * // Override MetricsProvider in BigtableDataSettings
      * BigtableDataSettings settings = BigtableDataSettings.newBuilder()
      *   .setProjectId("my-project")
    @@ -63,6 +54,45 @@ public OpenTelemetry getOpenTelemetry() {
         return otel;
       }
     
    +  /**
    +   * @deprecated this is no longer needed and is now a no-op
    +   */
    +  @Deprecated
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder) throws IOException {}
    +
    +  /**
    +   * @deprecated this is no longer needed and is now a no-op
    +   */
    +  @Deprecated
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, Credentials credentials)
    +      throws IOException {}
    +
    +  /**
    +   * @deprecated this is no longer needed and is now a no-op
    +   */
    +  @Deprecated
    +  public static void setupSdkMeterProvider(SdkMeterProviderBuilder builder, String endpoint)
    +      throws IOException {}
    +
    +  /**
    +   * @deprecated this is no longer needed and is now a no-op
    +   */
    +  @Deprecated
    +  public static void setupSdkMeterProvider(
    +      SdkMeterProviderBuilder builder, Credentials credentials, String endpoint)
    +      throws IOException {}
    +
    +  /**
    +   * @deprecated this is no longer needed and is now a no-op
    +   */
    +  @Deprecated
    +  public static void setupSdkMeterProvider(
    +      SdkMeterProviderBuilder builder,
    +      Credentials credentials,
    +      String endpoint,
    +      ScheduledExecutorService executor)
    +      throws IOException {}
    +
       @Override
       public String toString() {
         return MoreObjects.toStringHelper(this).add("openTelemetry", otel).toString();
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/DefaultMetricsProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/DefaultMetricsProvider.java
    index b8aad8c931..02cdf7c257 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/DefaultMetricsProvider.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/DefaultMetricsProvider.java
    @@ -15,20 +15,10 @@
      */
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
    -import com.google.api.core.InternalApi;
    -import com.google.auth.Credentials;
    -import com.google.common.base.MoreObjects;
    -import io.opentelemetry.api.OpenTelemetry;
    -import io.opentelemetry.sdk.OpenTelemetrySdk;
    -import io.opentelemetry.sdk.metrics.SdkMeterProvider;
    -import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder;
    -import java.io.IOException;
    -import javax.annotation.Nullable;
    -
     /**
      * Set {@link
      * com.google.cloud.bigtable.data.v2.BigtableDataSettings.Builder#setMetricsProvider(MetricsProvider)},
    - * to {@link this#INSTANCE} to enable collecting and export client side metrics
    + * to {@link DefaultMetricsProvider#INSTANCE} to enable collecting and export client side metrics
      * https://cloud.google.com/bigtable/docs/client-side-metrics. This is the default setting in {@link
      * com.google.cloud.bigtable.data.v2.BigtableDataSettings}.
      */
    @@ -36,28 +26,10 @@ public final class DefaultMetricsProvider implements MetricsProvider {
     
       public static DefaultMetricsProvider INSTANCE = new DefaultMetricsProvider();
     
    -  private OpenTelemetry openTelemetry;
    -  private String projectId;
    -
       private DefaultMetricsProvider() {}
     
    -  @InternalApi
    -  public OpenTelemetry getOpenTelemetry(String projectId, @Nullable Credentials credentials)
    -      throws IOException {
    -    this.projectId = projectId;
    -    if (openTelemetry == null) {
    -      SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder();
    -      BuiltinMetricsView.registerBuiltinMetrics(projectId, credentials, meterProvider);
    -      openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build();
    -    }
    -    return openTelemetry;
    -  }
    -
       @Override
       public String toString() {
    -    return MoreObjects.toStringHelper(this)
    -        .add("projectId", projectId)
    -        .add("openTelemetry", openTelemetry)
    -        .toString();
    +    return "DefaultMetricsProvider";
       }
     }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionMetricTracker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionMetricTracker.java
    deleted file mode 100644
    index a891df9509..0000000000
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionMetricTracker.java
    +++ /dev/null
    @@ -1,92 +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
    - *
    - *     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.bigtable.data.v2.stub.metrics;
    -
    -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METER_NAME;
    -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME;
    -
    -import com.google.api.core.InternalApi;
    -import io.grpc.ClientInterceptor;
    -import io.opentelemetry.api.OpenTelemetry;
    -import io.opentelemetry.api.common.Attributes;
    -import io.opentelemetry.api.metrics.LongHistogram;
    -import io.opentelemetry.api.metrics.Meter;
    -import java.util.Collections;
    -import java.util.Set;
    -import java.util.WeakHashMap;
    -import java.util.concurrent.ScheduledExecutorService;
    -import java.util.concurrent.TimeUnit;
    -
    -/* Background task that goes through all connections and updates the errors_per_connection metric. */
    -@InternalApi("For internal use only")
    -public class ErrorCountPerConnectionMetricTracker implements Runnable {
    -
    -  private static final Integer PER_CONNECTION_ERROR_COUNT_PERIOD_SECONDS = 60;
    -
    -  private final LongHistogram perConnectionErrorCountHistogram;
    -  private final Attributes attributes;
    -
    -  private final Set connectionErrorCountInterceptors;
    -  private final Object interceptorsLock = new Object();
    -
    -  public ErrorCountPerConnectionMetricTracker(OpenTelemetry openTelemetry, Attributes attributes) {
    -    connectionErrorCountInterceptors =
    -        Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>()));
    -
    -    Meter meter = openTelemetry.getMeter(METER_NAME);
    -
    -    perConnectionErrorCountHistogram =
    -        meter
    -            .histogramBuilder(PER_CONNECTION_ERROR_COUNT_NAME)
    -            .ofLongs()
    -            .setDescription("Distribution of counts of channels per 'error count per minute'.")
    -            .setUnit("1")
    -            .build();
    -
    -    this.attributes = attributes;
    -  }
    -
    -  public void startConnectionErrorCountTracker(ScheduledExecutorService scheduler) {
    -    scheduler.scheduleAtFixedRate(
    -        this, 0, PER_CONNECTION_ERROR_COUNT_PERIOD_SECONDS, TimeUnit.SECONDS);
    -  }
    -
    -  public ClientInterceptor getInterceptor() {
    -    ConnectionErrorCountInterceptor connectionErrorCountInterceptor =
    -        new ConnectionErrorCountInterceptor();
    -    synchronized (interceptorsLock) {
    -      connectionErrorCountInterceptors.add(connectionErrorCountInterceptor);
    -    }
    -    return connectionErrorCountInterceptor;
    -  }
    -
    -  @Override
    -  public void run() {
    -    synchronized (interceptorsLock) {
    -      for (ConnectionErrorCountInterceptor interceptor : connectionErrorCountInterceptors) {
    -        long errors = interceptor.getAndResetNumOfErrors();
    -        long successes = interceptor.getAndResetNumOfSuccesses();
    -        // We avoid keeping track of inactive connections (i.e., without any failed or successful
    -        // requests).
    -        if (errors > 0 || successes > 0) {
    -          // TODO: add a metric to also keep track of the number of successful requests per each
    -          // connection.
    -          perConnectionErrorCountHistogram.record(errors, attributes);
    -        }
    -      }
    -    }
    -  }
    -}
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/NoopMetricsProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/NoopMetricsProvider.java
    index 9a00ddb135..66d0dfdcae 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/NoopMetricsProvider.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/NoopMetricsProvider.java
    @@ -15,13 +15,16 @@
      */
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
    +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util;
    +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer;
    +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator;
     import com.google.common.base.MoreObjects;
     
     /**
      * Set {@link
      * com.google.cloud.bigtable.data.v2.BigtableDataSettings.Builder#setMetricsProvider(MetricsProvider)},
    - * to {@link this#INSTANCE} to disable collecting and export client side metrics
    - * https://cloud.google.com/bigtable/docs/client-side-metrics.
    + * to {@link NoopMetricsProvider#INSTANCE} to disable collecting and export of client side metrics.
      */
     public final class NoopMetricsProvider implements MetricsProvider {
     
    @@ -33,4 +36,23 @@ private NoopMetricsProvider() {}
       public String toString() {
         return MoreObjects.toStringHelper(this).toString();
       }
    +
    +  /** A no-op implementation of {@link DirectPathCompatibleTracer}. */
    +  public static final class NoopDirectPathCompatibleTracer implements DirectPathCompatibleTracer {
    +
    +    public static final NoopDirectPathCompatibleTracer INSTANCE =
    +        new NoopDirectPathCompatibleTracer();
    +
    +    private NoopDirectPathCompatibleTracer() {}
    +
    +    @Override
    +    public void recordSuccess(Util.IpProtocol ipProtocol) {
    +      // No-op
    +    }
    +
    +    @Override
    +    public void recordFailure(DirectAccessInvestigator.FailureReason reason) {
    +      // No-op
    +    }
    +  }
     }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViews.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViews.java
    index 8b8296b054..c4948a20bf 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViews.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/RpcViews.java
    @@ -15,30 +15,15 @@
      */
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
    -import com.google.api.core.BetaApi;
    +import com.google.api.core.InternalApi;
    +import com.google.cloud.bigtable.data.v2.internal.csm.opencensus.RpcViewConstants;
     import com.google.common.annotations.VisibleForTesting;
    -import com.google.common.collect.ImmutableSet;
     import io.opencensus.stats.Stats;
     import io.opencensus.stats.View;
     import io.opencensus.stats.ViewManager;
     
    -@BetaApi
    +@Deprecated
     public class RpcViews {
    -  @VisibleForTesting
    -  private static final ImmutableSet BIGTABLE_CLIENT_VIEWS_SET =
    -      ImmutableSet.of(
    -          RpcViewConstants.BIGTABLE_OP_LATENCY_VIEW,
    -          RpcViewConstants.BIGTABLE_COMPLETED_OP_VIEW,
    -          RpcViewConstants.BIGTABLE_READ_ROWS_FIRST_ROW_LATENCY_VIEW,
    -          RpcViewConstants.BIGTABLE_ATTEMPT_LATENCY_VIEW,
    -          RpcViewConstants.BIGTABLE_ATTEMPTS_PER_OP_VIEW,
    -          RpcViewConstants.BIGTABLE_BATCH_THROTTLED_TIME_VIEW);
    -
    -  private static final ImmutableSet GFE_VIEW_SET =
    -      ImmutableSet.of(
    -          RpcViewConstants.BIGTABLE_GFE_LATENCY_VIEW,
    -          RpcViewConstants.BIGTABLE_GFE_HEADER_MISSING_COUNT_VIEW);
    -
       private static boolean gfeMetricsRegistered = false;
     
       /** Registers all Bigtable specific views. */
    @@ -56,16 +41,18 @@ public static void registerBigtableClientGfeViews() {
         registerBigtableClientGfeViews(Stats.getViewManager());
       }
     
    +  @InternalApi
       @VisibleForTesting
    -  static void registerBigtableClientViews(ViewManager viewManager) {
    -    for (View view : BIGTABLE_CLIENT_VIEWS_SET) {
    +  public static void registerBigtableClientViews(ViewManager viewManager) {
    +    for (View view : RpcViewConstants.BIGTABLE_CLIENT_VIEWS_SET) {
           viewManager.registerView(view);
         }
       }
     
    +  @InternalApi
       @VisibleForTesting
    -  static void registerBigtableClientGfeViews(ViewManager viewManager) {
    -    for (View view : GFE_VIEW_SET) {
    +  public static void registerBigtableClientGfeViews(ViewManager viewManager) {
    +    for (View view : RpcViewConstants.GFE_VIEW_SET) {
           viewManager.registerView(view);
         }
         gfeMetricsRegistered = true;
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java
    index 4c3fd7a42d..a5e3ebea68 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java
    @@ -16,40 +16,14 @@
     package com.google.cloud.bigtable.data.v2.stub.metrics;
     
     import com.google.api.core.InternalApi;
    -import com.google.api.gax.grpc.GrpcCallContext;
    -import com.google.api.gax.grpc.GrpcResponseMetadata;
     import com.google.api.gax.rpc.ApiCallContext;
    -import com.google.api.gax.rpc.ApiException;
    -import com.google.api.gax.rpc.StatusCode;
    -import com.google.api.gax.rpc.StatusCode.Code;
    -import com.google.bigtable.v2.AuthorizedViewName;
    -import com.google.bigtable.v2.CheckAndMutateRowRequest;
    -import com.google.bigtable.v2.MutateRowRequest;
    -import com.google.bigtable.v2.MutateRowsRequest;
    -import com.google.bigtable.v2.ReadModifyWriteRowRequest;
    -import com.google.bigtable.v2.ReadRowsRequest;
    -import com.google.bigtable.v2.ResponseParams;
    -import com.google.bigtable.v2.SampleRowKeysRequest;
    -import com.google.bigtable.v2.TableName;
     import com.google.common.collect.ImmutableMap;
    -import com.google.protobuf.InvalidProtocolBufferException;
    -import io.grpc.CallOptions;
     import io.grpc.Metadata;
    -import io.grpc.Status;
    -import io.grpc.StatusException;
    -import io.grpc.StatusRuntimeException;
    -import io.opencensus.tags.TagValue;
     import java.time.Instant;
     import java.time.temporal.ChronoUnit;
     import java.util.Arrays;
     import java.util.List;
     import java.util.Map;
    -import java.util.concurrent.CancellationException;
    -import java.util.concurrent.ExecutionException;
    -import java.util.concurrent.Future;
    -import java.util.regex.Matcher;
    -import java.util.regex.Pattern;
    -import javax.annotation.Nullable;
     
     /** Utilities to help integrating with OpenCensus. */
     @InternalApi("For internal use only")
    @@ -59,84 +33,6 @@ public class Util {
       static final Metadata.Key ATTEMPT_EPOCH_KEY =
           Metadata.Key.of("bigtable-client-attempt-epoch-usec", Metadata.ASCII_STRING_MARSHALLER);
     
    -  private static final Metadata.Key SERVER_TIMING_HEADER_KEY =
    -      Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER);
    -  private static final Pattern SERVER_TIMING_HEADER_PATTERN = Pattern.compile(".*dur=(?\\d+)");
    -  static final Metadata.Key LOCATION_METADATA_KEY =
    -      Metadata.Key.of("x-goog-ext-425905942-bin", Metadata.BINARY_BYTE_MARSHALLER);
    -
    -  /** Convert an exception into a value that can be used to create an OpenCensus tag value. */
    -  static String extractStatus(@Nullable Throwable error) {
    -    final String statusString;
    -
    -    if (error == null) {
    -      return StatusCode.Code.OK.toString();
    -    } else if (error instanceof CancellationException) {
    -      statusString = Status.Code.CANCELLED.toString();
    -    } else if (error instanceof ApiException) {
    -      statusString = ((ApiException) error).getStatusCode().getCode().toString();
    -    } else if (error instanceof StatusRuntimeException) {
    -      statusString = ((StatusRuntimeException) error).getStatus().getCode().toString();
    -    } else if (error instanceof StatusException) {
    -      statusString = ((StatusException) error).getStatus().getCode().toString();
    -    } else {
    -      statusString = Code.UNKNOWN.toString();
    -    }
    -
    -    return statusString;
    -  }
    -
    -  /**
    -   * Await the result of the future and convert it into a value that can be used as an OpenCensus
    -   * tag value.
    -   */
    -  static TagValue extractStatusFromFuture(Future future) {
    -    Throwable error = null;
    -
    -    try {
    -      future.get();
    -    } catch (InterruptedException e) {
    -      error = e;
    -      Thread.currentThread().interrupt();
    -    } catch (ExecutionException e) {
    -      error = e.getCause();
    -    } catch (RuntimeException e) {
    -      error = e;
    -    }
    -    return TagValue.create(extractStatus(error));
    -  }
    -
    -  static String extractTableId(Object request) {
    -    String tableName = null;
    -    String authorizedViewName = null;
    -    if (request instanceof ReadRowsRequest) {
    -      tableName = ((ReadRowsRequest) request).getTableName();
    -      authorizedViewName = ((ReadRowsRequest) request).getAuthorizedViewName();
    -    } else if (request instanceof MutateRowsRequest) {
    -      tableName = ((MutateRowsRequest) request).getTableName();
    -      authorizedViewName = ((MutateRowsRequest) request).getAuthorizedViewName();
    -    } else if (request instanceof MutateRowRequest) {
    -      tableName = ((MutateRowRequest) request).getTableName();
    -      authorizedViewName = ((MutateRowRequest) request).getAuthorizedViewName();
    -    } else if (request instanceof SampleRowKeysRequest) {
    -      tableName = ((SampleRowKeysRequest) request).getTableName();
    -      authorizedViewName = ((SampleRowKeysRequest) request).getAuthorizedViewName();
    -    } else if (request instanceof CheckAndMutateRowRequest) {
    -      tableName = ((CheckAndMutateRowRequest) request).getTableName();
    -      authorizedViewName = ((CheckAndMutateRowRequest) request).getAuthorizedViewName();
    -    } else if (request instanceof ReadModifyWriteRowRequest) {
    -      tableName = ((ReadModifyWriteRowRequest) request).getTableName();
    -      authorizedViewName = ((ReadModifyWriteRowRequest) request).getAuthorizedViewName();
    -    }
    -    if (tableName == null && authorizedViewName == null) return "undefined";
    -    if (tableName.isEmpty() && authorizedViewName.isEmpty()) return "undefined";
    -    if (!tableName.isEmpty()) {
    -      return TableName.parse(tableName).getTable();
    -    } else {
    -      return AuthorizedViewName.parse(authorizedViewName).getTable();
    -    }
    -  }
    -
       /**
        * Add attempt number and client timestamp from api call context to request headers. Attempt
        * number starts from 0.
    @@ -153,82 +49,4 @@ static Map> createStatsHeaders(ApiCallContext apiCallContex
         }
         return headers.build();
       }
    -
    -  private static Long getGfeLatency(@Nullable Metadata metadata) {
    -    if (metadata == null) {
    -      return null;
    -    }
    -    String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY);
    -    if (serverTiming == null) {
    -      return null;
    -    }
    -    Matcher matcher = SERVER_TIMING_HEADER_PATTERN.matcher(serverTiming);
    -    // this should always be true
    -    if (matcher.find()) {
    -      long latency = Long.valueOf(matcher.group("dur"));
    -      return latency;
    -    }
    -    return null;
    -  }
    -
    -  private static ResponseParams getResponseParams(@Nullable Metadata metadata) {
    -    if (metadata == null) {
    -      return null;
    -    }
    -    byte[] responseParams = metadata.get(Util.LOCATION_METADATA_KEY);
    -    if (responseParams != null) {
    -      try {
    -        return ResponseParams.parseFrom(responseParams);
    -      } catch (InvalidProtocolBufferException e) {
    -      }
    -    }
    -    return null;
    -  }
    -
    -  static void recordMetricsFromMetadata(
    -      GrpcResponseMetadata responseMetadata, BigtableTracer tracer, Throwable throwable) {
    -    Metadata metadata = responseMetadata.getMetadata();
    -
    -    // Get the response params from the metadata. Check both headers and trailers
    -    // because in different environments the metadata could be returned in headers or trailers
    -    @Nullable ResponseParams responseParams = getResponseParams(responseMetadata.getMetadata());
    -    if (responseParams == null) {
    -      responseParams = getResponseParams(responseMetadata.getTrailingMetadata());
    -    }
    -    // Set tracer locations if response params is not null
    -    if (responseParams != null) {
    -      tracer.setLocations(responseParams.getZoneId(), responseParams.getClusterId());
    -    }
    -
    -    // server-timing metric will be added through GrpcResponseMetadata#onHeaders(Metadata),
    -    // so it's not checking trailing metadata here.
    -    @Nullable Long latency = getGfeLatency(metadata);
    -    // For direct path, we won't see GFE server-timing header. However, if we received the
    -    // location info, we know that there isn't a connectivity issue. Set the latency to
    -    // 0 so gfe missing header won't get incremented.
    -    if (responseParams != null && latency == null) {
    -      latency = 0L;
    -    }
    -    // Record gfe metrics
    -    tracer.recordGfeMetadata(latency, throwable);
    -  }
    -
    -  /**
    -   * This method bridges gRPC stream tracing to bigtable tracing by adding a {@link
    -   * io.grpc.ClientStreamTracer} to the callContext.
    -   */
    -  static GrpcCallContext injectBigtableStreamTracer(
    -      ApiCallContext context, GrpcResponseMetadata responseMetadata, BigtableTracer tracer) {
    -    if (context instanceof GrpcCallContext) {
    -      GrpcCallContext callContext = (GrpcCallContext) context;
    -      CallOptions callOptions = callContext.getCallOptions();
    -      return responseMetadata.addHandlers(
    -          callContext.withCallOptions(
    -              callOptions.withStreamTracerFactory(new BigtableGrpcStreamTracer.Factory(tracer))));
    -    } else {
    -      // context should always be an instance of GrpcCallContext. If not throw an exception
    -      // so we can see what class context is.
    -      throw new RuntimeException("Unexpected context class: " + context.getClass().getName());
    -    }
    -  }
     }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java
    index b07e67ba94..4796ad48a0 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java
    @@ -28,7 +28,6 @@
     import com.google.api.gax.rpc.StatusCode;
     import com.google.api.gax.rpc.UnaryCallable;
     import com.google.bigtable.v2.MutateRowsRequest;
    -import com.google.bigtable.v2.MutateRowsRequest.Builder;
     import com.google.bigtable.v2.MutateRowsResponse;
     import com.google.bigtable.v2.MutateRowsResponse.Entry;
     import com.google.cloud.bigtable.data.v2.models.MutateRowsException;
    @@ -39,7 +38,6 @@
     import com.google.common.collect.Lists;
     import com.google.common.primitives.Ints;
     import com.google.common.util.concurrent.MoreExecutors;
    -import com.google.rpc.Code;
     import java.util.List;
     import java.util.Set;
     import java.util.concurrent.Callable;
    @@ -93,7 +91,7 @@ class MutateRowsAttemptCallable implements Callable {
       private static final StatusCode LOCAL_UNKNOWN_STATUS =
           new StatusCode() {
             @Override
    -        public Code getCode() {
    +        public StatusCode.Code getCode() {
               return Code.UNKNOWN;
             }
     
    @@ -111,7 +109,7 @@ public Object getTransportCode() {
       // Everything needed to build a retry request
       @Nullable private List originalIndexes;
       @Nonnull private final Set retryableCodes;
    -  @Nullable private final List permanentFailures;
    +  @Nonnull private final List permanentFailures;
       @Nonnull private final RetryAlgorithm retryAlgorithm;
       @Nonnull private TimedAttemptSettings attemptSettings;
     
    @@ -148,7 +146,8 @@ public List apply(Throwable throwable) {
         this.callContext = Preconditions.checkNotNull(callContext, "callContext");
         this.retryableCodes = Preconditions.checkNotNull(retryableCodes, "retryableCodes");
         this.retryAlgorithm = retryAlgorithm;
    -    this.attemptSettings = retryAlgorithm.createFirstAttempt();
    +    // TODO: pass in the callContext so that the retry setting can be overridden per call
    +    this.attemptSettings = retryAlgorithm.createFirstAttempt(null);
     
         permanentFailures = Lists.newArrayList();
       }
    @@ -233,7 +232,7 @@ private void handleAttemptError(Throwable rpcError) {
     
         allFailures.addAll(permanentFailures);
     
    -    Builder builder = lastRequest.toBuilder().clearEntries();
    +    MutateRowsRequest.Builder builder = lastRequest.toBuilder().clearEntries();
         List newOriginalIndexes = Lists.newArrayList();
     
         attemptSettings = retryAlgorithm.createNextAttempt(null, entryError, null, attemptSettings);
    @@ -272,7 +271,7 @@ private MutateRowsAttemptResult handleAttemptSuccess(List re
         List allFailures = Lists.newArrayList(permanentFailures);
         MutateRowsRequest lastRequest = currentRequest;
     
    -    Builder builder = lastRequest.toBuilder().clearEntries();
    +    MutateRowsRequest.Builder builder = lastRequest.toBuilder().clearEntries();
         List newOriginalIndexes = Lists.newArrayList();
         boolean[] seenIndices = new boolean[currentRequest.getEntriesCount()];
     
    @@ -280,7 +279,7 @@ private MutateRowsAttemptResult handleAttemptSuccess(List re
           for (Entry entry : response.getEntriesList()) {
             seenIndices[Ints.checkedCast(entry.getIndex())] = true;
     
    -        if (entry.getStatus().getCode() == Code.OK_VALUE) {
    +        if (entry.getStatus().getCode() == com.google.rpc.Code.OK_VALUE) {
               continue;
             }
     
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/LargeReadRowsResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/LargeReadRowsResumptionStrategy.java
    new file mode 100644
    index 0000000000..93b6b548dd
    --- /dev/null
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/LargeReadRowsResumptionStrategy.java
    @@ -0,0 +1,169 @@
    +/*
    + * 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
    + *
    + *     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.bigtable.data.v2.stub.readrows;
    +
    +import com.google.api.core.InternalApi;
    +import com.google.api.gax.retrying.StreamResumptionStrategy;
    +import com.google.api.gax.rpc.ApiException;
    +import com.google.bigtable.v2.ReadRowsRequest;
    +import com.google.bigtable.v2.RowSet;
    +import com.google.cloud.bigtable.data.v2.internal.RowSetUtil;
    +import com.google.cloud.bigtable.data.v2.models.RowAdapter;
    +import com.google.cloud.bigtable.data.v2.stub.BigtableStreamResumptionStrategy;
    +import com.google.common.base.Preconditions;
    +import com.google.protobuf.ByteString;
    +import java.util.Base64;
    +import java.util.logging.Logger;
    +
    +/**
    + * An implementation of a {@link StreamResumptionStrategy} for merged rows. This class tracks -
    + *
    + * 
      + *
    • row key for the last row that was read successfully + *
    • row key for large-row that couldn't be read + *
    • list of all row keys for large-rows + *
    + * + * Upon retry this class builds a request to omit the large rows & retry from the last row key that + * was successfully read. + * + *

    This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class LargeReadRowsResumptionStrategy + extends BigtableStreamResumptionStrategy { + private static final Logger LOGGER = + Logger.getLogger(LargeReadRowsResumptionStrategy.class.getName()); + private final RowAdapter rowAdapter; + private ByteString lastSuccessKey = ByteString.EMPTY; + // Number of rows processed excluding Marker row. + private long numProcessed; + private ByteString largeRowKey = ByteString.EMPTY; + // we modify the original request in the resumption strategy regardless of how many times it has + // failed, {@code previousFailedRequestRowset} is stored for the use case of continuous large rows + // row-keys + private RowSet previousFailedRequestRowset = null; + + public LargeReadRowsResumptionStrategy(RowAdapter rowAdapter) { + this.rowAdapter = rowAdapter; + } + + @Override + public boolean canResume() { + return true; + } + + @Override + public StreamResumptionStrategy createNew() { + return new LargeReadRowsResumptionStrategy<>(rowAdapter); + } + + @Override + public RowT processResponse(RowT response) { + // Last key can come from both the last processed row key and a synthetic row marker. The + // synthetic row marker is emitted when the server has read a lot of data that was filtered out. + // The row marker can be used to trim the start of the scan, but does not contribute to the row + // limit. + lastSuccessKey = rowAdapter.getKey(response); + + if (!rowAdapter.isScanMarkerRow(response)) { + // Only real rows count towards the rows limit. + numProcessed++; + } + return response; + } + + @Override + public Throwable processError(Throwable throwable) { + ByteString rowKeyExtracted = extractLargeRowKey(throwable); + if (rowKeyExtracted != null) { + LOGGER.warning("skipping large row " + rowKeyExtracted); + this.largeRowKey = rowKeyExtracted; + numProcessed = numProcessed + 1; + } + return throwable; + } + + private ByteString extractLargeRowKey(Throwable t) { + if (t instanceof ApiException + && ((ApiException) t).getReason() != null + && ((ApiException) t).getReason().equals("LargeRowReadError")) { + String rowKey = ((ApiException) t).getMetadata().get("rowKeyBase64Encoded"); + + byte[] decodedBytes = Base64.getDecoder().decode(rowKey); + return ByteString.copyFrom(decodedBytes); + } + return null; + } + + /** + * {@inheritDoc} + * + *

    This returns an updated request excluding all the rows keys & ranges till (including) {@link + * #lastSuccessKey} & also excludes the last encountered large row key ({@link #largeRowKey}). + * Also, this implementation takes care to update the row limit of the request to account for all + * of the received rows. + */ + @Override + public ReadRowsRequest getResumeRequest(ReadRowsRequest originalRequest) { + + // An empty lastSuccessKey means that we have not successfully read the first row, + // so resume with the original request object. + if (lastSuccessKey.isEmpty() && largeRowKey.isEmpty()) { + return originalRequest; + } + + RowSet remaining; + if (previousFailedRequestRowset == null) { + remaining = originalRequest.getRows(); + } else { + remaining = previousFailedRequestRowset; + } + + if (!lastSuccessKey.isEmpty()) { + remaining = RowSetUtil.erase(remaining, lastSuccessKey, !originalRequest.getReversed()); + } + if (!largeRowKey.isEmpty()) { + remaining = RowSetUtil.eraseLargeRow(remaining, largeRowKey); + } + this.largeRowKey = ByteString.EMPTY; + + previousFailedRequestRowset = remaining; + + // Edge case: retrying a fulfilled request. + // A fulfilled request is one that has had all of its row keys and ranges fulfilled, or if it + // had a row limit, has seen enough rows. These requests are replaced with a marker request that + // will be handled by ReadRowsRetryCompletedCallable. See docs in ReadRowsRetryCompletedCallable + // for more details. + if (remaining == null + || (originalRequest.getRowsLimit() > 0 && originalRequest.getRowsLimit() == numProcessed)) { + return ReadRowsRetryCompletedCallable.FULFILLED_REQUEST_MARKER; + } + + ReadRowsRequest.Builder builder = originalRequest.toBuilder().setRows(remaining); + + if (originalRequest.getRowsLimit() > 0) { + Preconditions.checkState( + originalRequest.getRowsLimit() > numProcessed, + "Processed rows and number of large rows should not exceed the row limit in the original" + + " request"); + builder.setRowsLimit(originalRequest.getRowsLimit() - numProcessed); + } + + return builder.build(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java deleted file mode 100644 index 2ef26605b4..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub.readrows; - -import com.google.api.core.ApiFuture; -import com.google.api.core.InternalApi; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StateCheckingResponseObserver; -import com.google.api.gax.rpc.StreamController; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.bigtable.data.v2.models.Query; - -/** - * Enhancement for `readRowsCallable().first()` to gracefully limit the row count instead of - * cancelling the RPC - */ -@InternalApi -public class ReadRowsFirstCallable extends UnaryCallable { - - private final ServerStreamingCallable inner; - - public ReadRowsFirstCallable(ServerStreamingCallable inner) { - this.inner = inner; - } - - @Override - public ApiFuture futureCall(Query query, ApiCallContext context) { - ReadRowsFirstResponseObserver observer = new ReadRowsFirstResponseObserver<>(); - this.inner.call(query.limit(1), observer, context); - return observer.getFuture(); - } - - private class ReadRowsFirstResponseObserver extends StateCheckingResponseObserver { - private StreamController innerController; - private RowT firstRow; - private SettableApiFuture settableFuture = SettableApiFuture.create(); - - @Override - protected void onStartImpl(StreamController streamController) { - this.innerController = streamController; - } - - @Override - protected void onResponseImpl(RowT response) { - if (firstRow == null) { - this.firstRow = response; - } - } - - @Override - protected void onErrorImpl(Throwable throwable) { - settableFuture.setException(throwable); - } - - @Override - protected void onCompleteImpl() { - settableFuture.set(firstRow); - } - - protected ApiFuture getFuture() { - return settableFuture; - } - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java index 2db46c0c29..de5ef19cb1 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsResumptionStrategy.java @@ -18,24 +18,24 @@ import com.google.api.core.InternalApi; import com.google.api.gax.retrying.StreamResumptionStrategy; import com.google.bigtable.v2.ReadRowsRequest; -import com.google.bigtable.v2.ReadRowsRequest.Builder; import com.google.bigtable.v2.RowSet; import com.google.cloud.bigtable.data.v2.internal.RowSetUtil; import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.stub.BigtableStreamResumptionStrategy; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; /** - * An implementation of a {@link StreamResumptionStrategy} for merged rows. This class tracks the - * last complete row seen and upon retry can build a request to resume the stream from where it left - * off. + * An implementation of a {@link BigtableStreamResumptionStrategy} for merged rows. This class + * tracks the last complete row seen and upon retry can build a request to resume the stream from + * where it left off. * *

    This class is considered an internal implementation detail and not meant to be used by * applications. */ @InternalApi public class ReadRowsResumptionStrategy - implements StreamResumptionStrategy { + extends BigtableStreamResumptionStrategy { private final RowAdapter rowAdapter; private ByteString lastKey = ByteString.EMPTY; // Number of rows processed excluding Marker row. @@ -69,6 +69,12 @@ public RowT processResponse(RowT response) { return response; } + @Override + public Throwable processError(Throwable throwable) { + // Noop + return throwable; + } + /** * {@inheritDoc} * @@ -98,7 +104,7 @@ public ReadRowsRequest getResumeRequest(ReadRowsRequest originalRequest) { return ReadRowsRetryCompletedCallable.FULFILLED_REQUEST_MARKER; } - Builder builder = originalRequest.toBuilder().setRows(remaining); + ReadRowsRequest.Builder builder = originalRequest.toBuilder().setRows(remaining); if (originalRequest.getRowsLimit() > 0) { Preconditions.checkState( diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java index 6c698a51ca..c25eb4e015 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryCompletedCallable.java @@ -48,6 +48,7 @@ public ReadRowsRetryCompletedCallable(ServerStreamingCallable responseObserver, ApiCallContext context) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java index 64ac3e29e2..9a6d1007a9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java @@ -106,7 +106,7 @@ final class StateMachine { * Initialize a new state machine that's ready for a new row. * * @param adapter The adapter that will build the final row. - * @param reversed + * @param reversed if the results will be streamed in reverse lexicographic order. */ StateMachine(RowBuilder adapter, boolean reversed) { this.adapter = adapter; @@ -190,6 +190,7 @@ RowT consumeRow() { boolean hasCompleteRow() { return currentState == AWAITING_ROW_CONSUME; } + /** * Checks if the state machine is in the middle of processing a row. * @@ -352,7 +353,8 @@ State handleChunk(CellChunk chunk) { "AWAITING_NEW_CELL: can't commit when valueSize indicates more data"); validate( !chunk.getValue().isEmpty(), - "AWAITING_NEW_CELL: must have data when valueSize promises more data in the next chunk"); + "AWAITING_NEW_CELL: must have data when valueSize promises more data in the next" + + " chunk"); expectedCellSize = chunk.getValueSize(); remainingCellBytes = expectedCellSize - chunk.getValue().size(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext.java index 8d0e6b81d0..09d3fc473e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContext.java @@ -17,29 +17,147 @@ import com.google.api.core.InternalApi; import com.google.api.core.SettableApiFuture; -import com.google.auto.value.AutoValue; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.ApiExceptions; +import com.google.api.gax.rpc.StatusCode; import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatementRefreshTimeoutException; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import io.grpc.Deadline; +import io.grpc.Status.Code; +import java.time.Instant; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import javax.annotation.Nullable; /** - * POJO used to provide a future to the ExecuteQuery callable chain in order to return metadata to - * users outside of the stream of rows. + * Used to handle the state associated with an ExecuteQuery call. This includes plan refresh, resume + * tokens, and metadata resolution. * *

    This should only be constructed by {@link ExecuteQueryCallable} not directly by users. * *

    This is considered an internal implementation detail and should not be used by applications. */ @InternalApi("For internal use only") -@AutoValue -public abstract class ExecuteQueryCallContext { +public class ExecuteQueryCallContext { + + private final BoundStatement boundStatement; + private final SettableApiFuture metadataFuture; + private PreparedQueryData latestPrepareResponse; + private @Nullable ByteString resumeToken; + private final Instant startTimeOfCall; + + private ExecuteQueryCallContext( + BoundStatement boundStatement, SettableApiFuture metadataFuture) { + this.boundStatement = boundStatement; + this.metadataFuture = metadataFuture; + this.latestPrepareResponse = boundStatement.getLatestPrepareResponse(); + this.startTimeOfCall = Instant.now(); + } - @InternalApi("For internal use only") public static ExecuteQueryCallContext create( - ExecuteQueryRequest request, SettableApiFuture metadataFuture) { - return new AutoValue_ExecuteQueryCallContext(request, metadataFuture); + BoundStatement boundStatement, SettableApiFuture metadataFuture) { + return new ExecuteQueryCallContext(boundStatement, metadataFuture); } - abstract ExecuteQueryRequest request(); + /** + * Builds a request using the latest PrepareQuery data, blocking if necessary for prepare refresh + * to complete. If waiting on refresh, throws a {@link PreparedStatementRefreshTimeoutException} + * exception based on the passed deadline. + * + *

    translates all other exceptions to be retryable so that ExecuteQuery can refresh the plan + * and try again if it has not exhausted its retries + * + *

    If currentAttemptDeadline is null it times out after Long.MAX_VALUE nanoseconds + */ + ExecuteQueryRequest buildRequestWithDeadline( + RequestContext requestContext, @Nullable Deadline currentAttemptDeadline) + throws PreparedStatementRefreshTimeoutException { + // Use max Long as default timeout for simplicity if no deadline is set + long planRefreshWaitTimeoutNanos = Long.MAX_VALUE; + if (currentAttemptDeadline != null) { + planRefreshWaitTimeoutNanos = currentAttemptDeadline.timeRemaining(TimeUnit.NANOSECONDS); + } + try { + PrepareResponse response = + latestPrepareResponse + .prepareFuture() + .get(planRefreshWaitTimeoutNanos, TimeUnit.NANOSECONDS); + return boundStatement.toProto(response.preparedQuery(), requestContext, resumeToken); + } catch (TimeoutException e) { + throw new PreparedStatementRefreshTimeoutException( + "Exceeded deadline waiting for PreparedQuery to refresh"); + } catch (ExecutionException e) { + StatusCode retryStatusCode = GrpcStatusCode.of(Code.FAILED_PRECONDITION); + Throwable cause = e.getCause(); + if (cause instanceof ApiException) { + retryStatusCode = ((ApiException) cause).getStatusCode(); + } + throw ApiExceptionFactory.createException("Plan refresh error", cause, retryStatusCode, true); + } catch (InterruptedException e) { + throw ApiExceptionFactory.createException( + "Plan refresh error", e, GrpcStatusCode.of(Code.FAILED_PRECONDITION), true); + } + } - abstract SettableApiFuture resultSetMetadataFuture(); + /** + * Metadata can change as the plan is refreshed. Once a resume token or complete has been received + * from the stream we know that the {@link com.google.bigtable.v2.PrepareQueryResponse} can no + * longer change, so we can set the metadata. + */ + void finalizeMetadata() { + // We don't ever expect an exception here, since we've already received responses at the point + // this is called + try { + Preconditions.checkState( + latestPrepareResponse.prepareFuture().isDone(), + "Unexpected attempt to finalize metadata with unresolved prepare response. This should" + + " never as this is called after we receive ExecuteQuery responses, which requires" + + " the future to be resolved"); + PrepareResponse response = + ApiExceptions.callAndTranslateApiException(latestPrepareResponse.prepareFuture()); + metadataFuture.set(response.resultSetMetadata()); + } catch (Throwable t) { + metadataFuture.setException(t); + throw t; + } + } + + /** + * If the stream receives an error before receiving any response it needs to be passed through to + * the metadata future + */ + void setMetadataException(Throwable t) { + metadataFuture.setException(t); + } + + SettableApiFuture resultSetMetadataFuture() { + return this.metadataFuture; + } + + void setLatestResumeToken(ByteString resumeToken) { + this.resumeToken = resumeToken; + } + + boolean hasResumeToken() { + return this.resumeToken != null; + } + + void triggerImmediateRefreshOfPreparedQuery() { + latestPrepareResponse = + this.boundStatement.markExpiredAndStartRefresh(latestPrepareResponse.version()); + } + + Instant startTimeOfCall() { + return this.startTimeOfCall; + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable.java index 9563b6c6f9..687bcdce30 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallable.java @@ -22,10 +22,9 @@ import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.bigtable.v2.ExecuteQueryRequest; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; /** * Callable that creates {@link SqlServerStream}s from {@link ExecuteQueryRequest}s. @@ -39,20 +38,23 @@ public class ExecuteQueryCallable extends ServerStreamingCallable { private final ServerStreamingCallable inner; - private final RequestContext requestContext; - public ExecuteQueryCallable( - ServerStreamingCallable inner, - RequestContext requestContext) { + public ExecuteQueryCallable(ServerStreamingCallable inner) { this.inner = inner; - this.requestContext = requestContext; } - public SqlServerStream call(Statement statement) { - ExecuteQueryRequest request = statement.toProto(requestContext); + /** + * This should be used to create execute query calls. This replaces the typical API which allows + * passing of an {@link ApiCallContext}. + * + *

    This class is considered an internal implementation detail and not meant to be used by + * applications. Users should only use executeQuery through the {@link + * com.google.cloud.bigtable.data.v2.BigtableDataClient} + */ + public SqlServerStream call(BoundStatement boundStatement) { SettableApiFuture metadataFuture = SettableApiFuture.create(); ServerStream rowStream = - this.call(ExecuteQueryCallContext.create(request, metadataFuture)); + this.call(ExecuteQueryCallContext.create(boundStatement, metadataFuture)); return SqlServerStreamImpl.create(metadataFuture, rowStream); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategy.java new file mode 100644 index 0000000000..e6e2562c33 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategy.java @@ -0,0 +1,61 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import com.google.api.core.InternalApi; +import com.google.api.gax.retrying.StreamResumptionStrategy; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.protobuf.ByteString; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +@InternalApi +public class ExecuteQueryResumptionStrategy + implements StreamResumptionStrategy { + + private ByteString latestResumeToken = null; + + @Nonnull + @Override + public StreamResumptionStrategy createNew() { + return new ExecuteQueryResumptionStrategy(); + } + + @Nonnull + @Override + public ExecuteQueryResponse processResponse(ExecuteQueryResponse response) { + if (!response.getResults().getResumeToken().isEmpty()) { + latestResumeToken = response.getResults().getResumeToken(); + } + return response; + } + + @Nullable + @Override + public ExecuteQueryCallContext getResumeRequest(ExecuteQueryCallContext originalRequest) { + if (latestResumeToken != null) { + // ExecuteQueryCallContext can handle null token, but we don't bother setting it for + // clarity + originalRequest.setLatestResumeToken(latestResumeToken); + } + return originalRequest; + } + + @Override + public boolean canResume() { + return true; + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallable.java new file mode 100644 index 0000000000..e36bfa57fc --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallable.java @@ -0,0 +1,88 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamController; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; + +/** + * Callable that handles passing execeptions through to the metadata future. This needs to be used + * after all retries, so that non-retriable errors don't surface as errors to users accessing the + * metadata. + * + *

    In non-error cases the metadata future is resolved by the {@link PlanRefreshingCallable} + * because the metadata needs to resolve before the SqlRowMerger starts yielding rows + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +public class MetadataErrorHandlingCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + + public MetadataErrorHandlingCallable( + ServerStreamingCallable inner) { + this.inner = inner; + } + + @Override + public void call( + ExecuteQueryCallContext request, + ResponseObserver responseObserver, + ApiCallContext context) { + MetadataErrorHandlingObserver observer = + new MetadataErrorHandlingObserver(responseObserver, request); + inner.call(request, observer, context); + } + + static final class MetadataErrorHandlingObserver extends SafeResponseObserver { + private final ExecuteQueryCallContext callContext; + private final ResponseObserver outerObserver; + + MetadataErrorHandlingObserver( + ResponseObserver outerObserver, ExecuteQueryCallContext callContext) { + super(outerObserver); + this.outerObserver = outerObserver; + this.callContext = callContext; + } + + @Override + protected void onStartImpl(StreamController streamController) { + outerObserver.onStart(streamController); + } + + @Override + protected void onResponseImpl(SqlRow response) { + outerObserver.onResponse(response); + } + + @Override + protected void onErrorImpl(Throwable throwable) { + callContext.setMetadataException(throwable); + outerObserver.onError(throwable); + } + + @Override + protected void onCompleteImpl() { + outerObserver.onComplete(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallable.java deleted file mode 100644 index 6b2f2b171f..0000000000 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallable.java +++ /dev/null @@ -1,118 +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 - * - * 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.bigtable.data.v2.stub.sql; - -import com.google.api.core.InternalApi; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ResponseObserver; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamController; -import com.google.bigtable.v2.ExecuteQueryRequest; -import com.google.bigtable.v2.ExecuteQueryResponse; -import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; -import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; -import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; - -/** - * Callable that allows passing of {@link ResultSetMetadata} back to users throught the {@link - * ExecuteQueryCallContext}. - * - *

    This is considered an internal implementation detail and should not be used by applications. - */ -@InternalApi("For internal use only") -public class MetadataResolvingCallable - extends ServerStreamingCallable { - private final ServerStreamingCallable inner; - - public MetadataResolvingCallable( - ServerStreamingCallable inner) { - this.inner = inner; - } - - @Override - public void call( - ExecuteQueryCallContext callContext, - ResponseObserver responseObserver, - ApiCallContext apiCallContext) { - MetadataObserver observer = - new MetadataObserver(responseObserver, callContext.resultSetMetadataFuture()); - inner.call(callContext.request(), observer, apiCallContext); - } - - static final class MetadataObserver extends SafeResponseObserver { - - private final SettableApiFuture metadataFuture; - private final ResponseObserver outerObserver; - // This doesn't need to be synchronized because this is called above the reframer - // so onResponse will be called sequentially - private boolean isFirstResponse; - - MetadataObserver( - ResponseObserver outerObserver, - SettableApiFuture metadataFuture) { - super(outerObserver); - this.outerObserver = outerObserver; - this.metadataFuture = metadataFuture; - this.isFirstResponse = true; - } - - @Override - protected void onStartImpl(StreamController streamController) { - outerObserver.onStart(streamController); - } - - @Override - protected void onResponseImpl(ExecuteQueryResponse response) { - if (isFirstResponse && !response.hasMetadata()) { - IllegalStateException e = - new IllegalStateException("First response must always contain metadata"); - metadataFuture.setException(e); - throw e; - } - isFirstResponse = false; - if (response.hasMetadata()) { - try { - ResultSetMetadata md = ProtoResultSetMetadata.fromProto(response.getMetadata()); - metadataFuture.set(md); - } catch (Throwable t) { - metadataFuture.setException(t); - throw t; - } - } - outerObserver.onResponse(response); - } - - @Override - protected void onErrorImpl(Throwable throwable) { - // When we support retries this will have to move after the retrying callable in a separate - // observer. - metadataFuture.setException(throwable); - outerObserver.onError(throwable); - } - - @Override - protected void onCompleteImpl() { - if (!metadataFuture.isDone()) { - IllegalStateException missingMetadataException = - new IllegalStateException("Unexpected Stream complete without receiving metadata"); - metadataFuture.setException(missingMetadataException); - throw missingMetadataException; - } - outerObserver.onComplete(); - } - } -} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallable.java new file mode 100644 index 0000000000..c1d3d1c3a7 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallable.java @@ -0,0 +1,233 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode.Code; +import com.google.api.gax.rpc.StreamController; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatementRefreshTimeoutException; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; +import com.google.common.annotations.VisibleForTesting; +import com.google.rpc.PreconditionFailure; +import com.google.rpc.PreconditionFailure.Violation; +import io.grpc.Deadline; +import io.grpc.Status; +import java.time.Duration; +import java.time.Instant; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; + +/** + * Callable that allows passing of {@link ResultSetMetadata} back to users throught the {@link + * ExecuteQueryCallContext}. + * + *

    This is considered an internal implementation detail and should not be used by applications. + */ +@InternalApi("For internal use only") +public class PlanRefreshingCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + private final RequestContext requestContext; + + public PlanRefreshingCallable( + ServerStreamingCallable inner, + RequestContext requestContext) { + this.inner = inner; + this.requestContext = requestContext; + } + + @Override + public void call( + ExecuteQueryCallContext executeQueryCallContext, + ResponseObserver responseObserver, + @Nullable ApiCallContext apiCallContext) { + PlanRefreshingObserver observer = + new PlanRefreshingObserver(responseObserver, executeQueryCallContext); + ExecuteQueryRequest request; + @Nullable GrpcCallContext grpcCallContext = (GrpcCallContext) apiCallContext; + // Convert timeout to an absolute deadline, so we can use it for both the plan refresh and + // the ExecuteQuery rpc + Deadline deadline = getDeadline(grpcCallContext, executeQueryCallContext.startTimeOfCall()); + try { + // TODO: this blocks. That is ok because ResultSet is synchronous. If we ever + // need to make this async that needs to change + request = executeQueryCallContext.buildRequestWithDeadline(requestContext, deadline); + } catch (PreparedStatementRefreshTimeoutException e) { + // If we timed out waiting for refresh, return the retryable error, but don't trigger a + // new refresh since one is ongoing + responseObserver.onError(e); + return; + } catch (Throwable throwable) { + // If we already have a resumeToken we can't refresh the plan, so we throw an error. + // This is not expected to happen, as the plan must be resolved in order for us to + // receive a token + if (executeQueryCallContext.hasResumeToken()) { + responseObserver.onError( + new IllegalStateException( + "Unexpected plan refresh attempt after first token", throwable)); + } + // We trigger refresh so the next attempt will use a fresh plan + executeQueryCallContext.triggerImmediateRefreshOfPreparedQuery(); + responseObserver.onError(throwable); + return; + } + ApiCallContext contextWithAbsoluteDeadline = + Optional.ofNullable(grpcCallContext) + .map(c -> c.withCallOptions(grpcCallContext.getCallOptions().withDeadline(deadline))) + .orElse(null); + inner.call(request, observer, contextWithAbsoluteDeadline); + } + + // Checks for an attempt timeout first, then a total timeout. If found, converts the timeout + // to an absolute deadline. Adjusts totalTimeout based on the time since startTimeOfOverallRequest + @VisibleForTesting + static @Nullable Deadline getDeadline( + GrpcCallContext grpcCallContext, Instant startTimeOfOverallRequest) { + Optional attemptDeadline = + Optional.ofNullable(grpcCallContext) + .flatMap(c -> Optional.ofNullable(c.getTimeoutDuration())) + .map(d -> Deadline.after(d.toNanos(), TimeUnit.NANOSECONDS)); + if (attemptDeadline.isPresent()) { + return attemptDeadline.get(); + } + return Optional.ofNullable(grpcCallContext) + .flatMap(c -> Optional.ofNullable(c.getRetrySettings())) + .map(RetrySettings::getTotalTimeoutDuration) + // TotalTimeout of zero means there is no timeout + .filter(duration -> !duration.isZero()) + .map( + d -> { + Duration elapsedTime = Duration.between(startTimeOfOverallRequest, Instant.now()); + Duration remaining = d.minus(elapsedTime); + // zero is treated as no deadline, so if full deadline is elapsed pass 1 nano + long adjusted = Math.max(remaining.toNanos(), 1); + return Deadline.after(adjusted, TimeUnit.NANOSECONDS); + }) + .orElse(null); + } + + @InternalApi + static boolean isPlanRefreshError(Throwable t) { + if (!(t instanceof ApiException)) { + return false; + } + ApiException e = (ApiException) t; + if (!e.getStatusCode().getCode().equals(Code.FAILED_PRECONDITION)) { + return false; + } + if (e.getErrorDetails() == null) { + return false; + } + PreconditionFailure preconditionFailure = e.getErrorDetails().getPreconditionFailure(); + if (preconditionFailure == null) { + return false; + } + for (Violation violation : preconditionFailure.getViolationsList()) { + if (violation.getType().contains("PREPARED_QUERY_EXPIRED")) { + return true; + } + } + return false; + } + + static final class PlanRefreshingObserver extends SafeResponseObserver { + + private final ExecuteQueryCallContext callContext; + private final ResponseObserver outerObserver; + // This doesn't need to be synchronized because this is called above the reframer + // so onResponse will be called sequentially + private boolean hasReceivedResumeToken; + + PlanRefreshingObserver( + ResponseObserver outerObserver, ExecuteQueryCallContext callContext) { + super(outerObserver); + this.outerObserver = outerObserver; + this.callContext = callContext; + this.hasReceivedResumeToken = false; + } + + @Override + protected void onStartImpl(StreamController streamController) { + outerObserver.onStart(streamController); + } + + @Override + protected void onResponseImpl(ExecuteQueryResponse response) { + // Defer finalizing metadata until we receive a resume token, because this is the + // only point we can guarantee it won't change. + // + // An example of why this is necessary, for query "SELECT * FROM table": + // - Make a request, table has one column family 'cf' + // - Return an incomplete batch + // - request fails with transient error + // - Meanwhile the table has had a second column family added 'cf2' + // - Retry the request, get an error indicating the `prepared_query` has expired + // - Refresh the prepared_query and retry the request, the new prepared_query + // contains both 'cf' & 'cf2' + // - It sends a new incomplete batch and resets the old outdated batch + // - It send the next chunk with a checksum and resume_token, closing the batch. + // In this case the row merger and the ResultSet should be using the updated schema from + // the refreshed prepare request. + if (!hasReceivedResumeToken && !response.getResults().getResumeToken().isEmpty()) { + callContext.finalizeMetadata(); + hasReceivedResumeToken = true; + } + outerObserver.onResponse(response); + } + + @Override + protected void onErrorImpl(Throwable throwable) { + boolean refreshPlan = isPlanRefreshError(throwable); + // If we've received a resume token we shouldn't receive this error. Safeguard against + // accidentally changing the schema mid-response though + if (refreshPlan && !hasReceivedResumeToken) { + callContext.triggerImmediateRefreshOfPreparedQuery(); + outerObserver.onError( + new ApiException(throwable, GrpcStatusCode.of(Status.Code.FAILED_PRECONDITION), true)); + } else if (refreshPlan) { + outerObserver.onError( + new IllegalStateException( + "Unexpected plan refresh attempt after first token", throwable)); + } else { + // Note that we do not set exceptions on the metadata future here. This + // needs to be done after the retries, so that retryable errors aren't set on + // the future + outerObserver.onError(throwable); + } + } + + @Override + protected void onCompleteImpl() { + if (!callContext.resultSetMetadataFuture().isDone()) { + // If stream succeeds with no responses, we can finalize the metadata + callContext.finalizeMetadata(); + } + outerObserver.onComplete(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java index deefda4cad..351656dcd4 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachine.java @@ -26,11 +26,18 @@ import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.common.hash.HashCode; +import com.google.common.hash.HashFunction; +import com.google.common.hash.Hashing; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Queue; +import java.util.function.Supplier; +import org.checkerframework.checker.nullness.qual.Nullable; /** * Used to transform a stream of {@link com.google.bigtable.v2.ProtoRowsBatch} bytes chunks into @@ -41,7 +48,7 @@ * *

      *
    • Add results with {@link #addPartialResultSet(PartialResultSet)} until {@link - * #hasCompleteBatch()} is true + * #hasCompleteBatches()} is true *
    • Call {@link #populateQueue(Queue)} to materialize results from the complete batch. *
    • Repeat until all {@link PartialResultSet}s have been processed *
    • Ensure that there is no incomplete data using {@link #isBatchInProgress()} @@ -52,75 +59,119 @@ @InternalApi final class ProtoRowsMergingStateMachine { enum State { - /** Waiting for the first chunk of bytes for a new batch */ - AWAITING_NEW_BATCH, - /** Waiting for the next chunk of bytes, to combine with the bytes currently being buffered. */ - AWAITING_PARTIAL_BATCH, - /** Buffering a complete batch of rows, waiting for populateQueue to be called for the batch */ + /** Waiting for data to be added to the state machine */ + AWAITING_NEW_DATA, + /** Buffering a complete set of rows, waiting for populateQueue to be called */ AWAITING_BATCH_CONSUME, } - private final ResultSetMetadata metadata; + private static final HashFunction CRC32C = Hashing.crc32c(); + + private final Supplier metadataSupplier; + private @Nullable ResultSetMetadata metadata; private State state; private ByteString batchBuffer; - private ProtoRows completeBatch; + private List> parsedBatches; + private boolean hasReceivedFirstResumeToken; - ProtoRowsMergingStateMachine(ResultSetMetadata metadata) { - this.metadata = metadata; - state = State.AWAITING_NEW_BATCH; + ProtoRowsMergingStateMachine(Supplier metadataSupplier) { + this.metadataSupplier = metadataSupplier; + state = State.AWAITING_NEW_DATA; batchBuffer = ByteString.empty(); + parsedBatches = new ArrayList<>(); + hasReceivedFirstResumeToken = false; } /** * Adds the bytes from the given PartialResultSet to the current buffer. If a resume token is * present, attempts to parse the bytes to the underlying protobuf row format + * + *

      See the comments on {@link PartialResultSet} protobuf message definition for explanation of + * the protocol implemented below. + * + *

      Translated to use local variable names the expected logic is as follows:
      +   * if results.reset {
      +   *   reset batchBuffer
      +   *   reset parsedBatches
      +   * }
      +   * if results.proto_rows_batch is set {
      +   *   append result.proto_rows_batch.batch_data to batchBuffer
      +   * }
      +   * if results.batch_checksum is set {
      +   *   validate the checksum matches the crc32c hash of batchBuffer
      +   *   parse batchBuffer as a ProtoRows message, clearing batchBuffer
      +   *   add the parsed data to parsedBatches
      +   * }
      +   * if results.resume_token is set {
      +   *   yield the results in parsedBatches to the row merger.
      +   *   this is controlled by the AWAITING_BATCH_CONSUME state.
      +   * }
      +   * 
      */ void addPartialResultSet(PartialResultSet results) { Preconditions.checkState( state != State.AWAITING_BATCH_CONSUME, "Attempting to add partial result set to state machine in state AWAITING_BATCH_CONSUME"); + // If the API indicates we should reset we need to clear buffered data + if (results.getReset()) { + batchBuffer = ByteString.EMPTY; + parsedBatches.clear(); + } // ByteString has an efficient concat which generally involves no copying batchBuffer = batchBuffer.concat(results.getProtoRowsBatch().getBatchData()); - state = State.AWAITING_PARTIAL_BATCH; - if (results.getResumeToken().isEmpty()) { - return; - } - // A resume token means the batch is complete and safe to yield - // We can receive resume tokens with no new data. In this case we yield an empty batch. - if (batchBuffer.isEmpty()) { - completeBatch = ProtoRows.getDefaultInstance(); - } else { + if (results.hasBatchChecksum()) { + HashCode hash = CRC32C.hashBytes(batchBuffer.toByteArray()); + Preconditions.checkState( + hash.hashCode() == results.getBatchChecksum(), "Unexpected checksum mismatch"); try { - completeBatch = ProtoRows.parseFrom(batchBuffer); + ProtoRows completeBatch = ProtoRows.parseFrom(batchBuffer); + batchBuffer = ByteString.EMPTY; + parsedBatches.add(completeBatch.getValuesList()); } catch (InvalidProtocolBufferException e) { throw new InternalError("Unexpected exception parsing response protobuf", e); } } - // Empty buffers can benefit from resetting because ByteString.concat builds a rope - batchBuffer = ByteString.empty(); - state = State.AWAITING_BATCH_CONSUME; + boolean hasResumeToken = !results.getResumeToken().isEmpty(); + if (hasResumeToken) { + if (!hasReceivedFirstResumeToken) { + // Don't resolve the metadata until we receive the first resume token. + // This is safe because we only use the metadata in populateQueue, which can't be called + // until we receive a resume token. For details on why this is necessary, see + // MetadataResolvingCallable + metadata = metadataSupplier.get(); + hasReceivedFirstResumeToken = true; + } + Preconditions.checkState( + batchBuffer.isEmpty(), "Received resumeToken with buffered data and no checksum"); + state = State.AWAITING_BATCH_CONSUME; + } } - /** Returns true if there is a complete batch buffered, false otherwise */ - boolean hasCompleteBatch() { + /** Returns true if there are complete batches, ready to yield. False otherwise */ + boolean hasCompleteBatches() { return state == State.AWAITING_BATCH_CONSUME; } /** Returns true if there is a partial or complete batch buffered, false otherwise */ boolean isBatchInProgress() { - return hasCompleteBatch() || state == State.AWAITING_PARTIAL_BATCH; + boolean hasBufferedData = !batchBuffer.isEmpty() || !parsedBatches.isEmpty(); + return hasCompleteBatches() || hasBufferedData; } /** - * Populates the given queue with the complete batch of rows + * Populates the given queue with the currently buffered rows of rows * - * @throws IllegalStateException if there is not a complete batch + * @throws IllegalStateException if there is no yieldable data */ void populateQueue(Queue queue) { Preconditions.checkState( state == State.AWAITING_BATCH_CONSUME, "Attempting to populate Queue from state machine without completed batch"); - Iterator valuesIterator = completeBatch.getValuesList().iterator(); + Preconditions.checkState( + batchBuffer.isEmpty(), "Unexpected buffered partial batch while consuming rows."); + Preconditions.checkNotNull(metadata, "Unexpected empty metadata when parsing response"); + + Iterator valuesIterator = Iterables.concat(parsedBatches).iterator(); while (valuesIterator.hasNext()) { ImmutableList.Builder rowDataBuilder = ImmutableList.builder(); for (ColumnMetadata c : metadata.getColumns()) { @@ -132,9 +183,8 @@ void populateQueue(Queue queue) { } queue.add(ProtoSqlRow.create(metadata, rowDataBuilder.build())); } - // reset the batch to be empty - completeBatch = ProtoRows.getDefaultInstance(); - state = State.AWAITING_NEW_BATCH; + this.parsedBatches = new ArrayList<>(); + state = State.AWAITING_NEW_DATA; } @InternalApi("VisibleForTestingOnly") @@ -144,14 +194,16 @@ static void validateValueAndType(SqlType type, Value value) { return; } switch (type.getCode()) { - // Primitive types + // Primitive types case STRING: checkExpectedKind(value, Value.KindCase.STRING_VALUE, type); break; case BYTES: + case PROTO: checkExpectedKind(value, Value.KindCase.BYTES_VALUE, type); break; case INT64: + case ENUM: checkExpectedKind(value, Value.KindCase.INT_VALUE, type); break; case FLOAT64: @@ -167,7 +219,7 @@ static void validateValueAndType(SqlType type, Value value) { case DATE: checkExpectedKind(value, Value.KindCase.DATE_VALUE, type); break; - // Complex types + // Complex types case ARRAY: checkExpectedKind(value, Value.KindCase.ARRAY_VALUE, type); SqlType.Array arrayType = (SqlType.Array) type; @@ -180,6 +232,12 @@ static void validateValueAndType(SqlType type, Value value) { checkExpectedKind(value, Value.KindCase.ARRAY_VALUE, type); List fieldValues = value.getArrayValue().getValuesList(); SqlType.Struct structType = (SqlType.Struct) type; + if (fieldValues.size() != structType.getFields().size()) { + throw new IllegalStateException( + String.format( + "Unexpected malformed struct data. Expected %s fields, received: %s", + structType.getFields().size(), fieldValues.size())); + } for (int i = 0; i < fieldValues.size(); i++) { validateValueAndType(structType.getType(i), fieldValues.get(i)); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger.java index 6178a1efcd..a4f2c618e9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMerger.java @@ -18,13 +18,13 @@ import com.google.api.core.InternalApi; import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.PartialResultSet; -import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; import com.google.cloud.bigtable.data.v2.internal.SqlRow; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; import com.google.cloud.bigtable.gaxx.reframing.Reframer; import com.google.common.base.Preconditions; import java.util.ArrayDeque; import java.util.Queue; +import java.util.function.Supplier; /** * Used to transform a stream of ExecuteQueryResponse objects into rows. This class is not thread @@ -33,18 +33,17 @@ @InternalApi public final class SqlRowMerger implements Reframer { - enum State { - AWAITING_METADATA, - PROCESSING_DATA, - } - private final Queue queue; - private ProtoRowsMergingStateMachine stateMachine; - private State currentState; + private final ProtoRowsMergingStateMachine stateMachine; - public SqlRowMerger() { + /** + * @param metadataSupplier a supplier of {@link ResultSetMetadata}. This is expected to return + * successfully once the first call to push has been made. + *

      This exists to facilitate plan refresh that can happen after creation of the row merger. + */ + public SqlRowMerger(Supplier metadataSupplier) { queue = new ArrayDeque<>(); - currentState = State.AWAITING_METADATA; + stateMachine = new ProtoRowsMergingStateMachine(metadataSupplier); } /** @@ -52,38 +51,19 @@ public SqlRowMerger() { * * @param response the next response in the stream of query responses */ - // Suppress this because it won't be forced to be exhaustive once it is open-sourced, so we want a - // default. - @SuppressWarnings("UnnecessaryDefaultInEnumSwitch") @Override public void push(ExecuteQueryResponse response) { - switch (currentState) { - case AWAITING_METADATA: - Preconditions.checkState( - response.hasMetadata(), - "Expected metadata response, but received: %s", - response.getResponseCase().name()); - ResultSetMetadata responseMetadata = - ProtoResultSetMetadata.fromProto(response.getMetadata()); - stateMachine = new ProtoRowsMergingStateMachine(responseMetadata); - currentState = State.PROCESSING_DATA; - break; - case PROCESSING_DATA: - Preconditions.checkState( - response.hasResults(), - "Expected results response, but received: %s", - response.getResponseCase().name()); - PartialResultSet results = response.getResults(); - processProtoRows(results); - break; - default: - throw new IllegalStateException("Unknown State: " + currentState.name()); - } + Preconditions.checkState( + response.hasResults(), + "Expected results response, but received: %s", + response.getResponseCase().name()); + PartialResultSet results = response.getResults(); + processProtoRows(results); } private void processProtoRows(PartialResultSet results) { stateMachine.addPartialResultSet(results); - if (stateMachine.hasCompleteBatch()) { + if (stateMachine.hasCompleteBatches()) { stateMachine.populateQueue(queue); } } @@ -105,14 +85,7 @@ public boolean hasFullFrame() { */ @Override public boolean hasPartialFrame() { - switch (currentState) { - case AWAITING_METADATA: - return false; - case PROCESSING_DATA: - return hasFullFrame() || stateMachine.isBatchInProgress(); - default: - throw new IllegalStateException("Unknown State: " + currentState.name()); - } + return hasFullFrame() || stateMachine.isBatchInProgress(); } /** pops a completed row from the FIFO queue built from the given responses. */ diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallable.java index 6d5d0ea4a4..c788fe9230 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallable.java @@ -17,6 +17,7 @@ import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiExceptions; import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.bigtable.v2.ExecuteQueryResponse; @@ -38,7 +39,10 @@ public void call( ExecuteQueryCallContext callContext, ResponseObserver responseObserver, ApiCallContext apiCallContext) { - SqlRowMerger merger = new SqlRowMerger(); + SqlRowMerger merger = + new SqlRowMerger( + () -> + ApiExceptions.callAndTranslateApiException(callContext.resultSetMetadataFuture())); ReframingResponseObserver observer = new ReframingResponseObserver<>(responseObserver, merger); inner.call(callContext, observer, apiCallContext); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelObserver.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelObserver.java new file mode 100644 index 0000000000..2230e14bf2 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelObserver.java @@ -0,0 +1,37 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PeerInfo; + +/** Provides observability about a single channel in the channel pool. */ +@InternalApi +public interface BigtableChannelObserver { + /** Gets the current number of outstanding Unary RPCs on this channel. */ + int getOutstandingUnaryRpcs(); + + /** Gets the current number of outstanding Streaming RPCs on this channel. */ + int getOutstandingStreamingRpcs(); + + /** Get the current number of errors request count since the last observed period */ + long getAndResetErrorCount(); + + /** Get the current number of successful requests since the last observed period */ + long getAndResetSuccessCount(); + + PeerInfo.TransportType getTransportType(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool.java new file mode 100644 index 0000000000..4a127a5502 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPool.java @@ -0,0 +1,816 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPoolHealthChecker.ProbeResult; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ForwardingClientCall.SimpleForwardingClientCall; +import io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import java.io.IOException; +import java.time.Clock; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.Random; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * A {@link ManagedChannel} that will send requests round-robin via a set of channels. + * + *

      Spreads over a set of child connections, and actively manages lifecycle of connections. + * Dynamically resizes pool based on number of outstanding connections. + * + *

      Internal API + */ +@InternalApi +public class BigtableChannelPool extends ManagedChannel implements BigtableChannelPoolObserver { + @VisibleForTesting + static final Logger LOG = Logger.getLogger(BigtableChannelPool.class.getName()); + + private static final java.time.Duration REFRESH_PERIOD = java.time.Duration.ofMinutes(50); + + private final BigtableChannelPoolSettings settings; + private final Supplier channelSupplier; + + private final ChannelPrimer channelPrimer; + private final Object entryWriteLock = new Object(); + @VisibleForTesting final AtomicReference> entries = new AtomicReference<>(); + private final AtomicInteger indexTicker = new AtomicInteger(); + private final String authority; + private final Random rng = new Random(); + private final Supplier picker; + private ScheduledFuture resizeFuture = null; + private ScheduledFuture refreshFuture = null; + + public static BigtableChannelPool create( + BigtableChannelPoolSettings settings, + Supplier channelSupplier, + ChannelPrimer channelPrimer, + ScheduledExecutorService backgroundExecutor) + throws IOException { + return new BigtableChannelPool(settings, channelSupplier, channelPrimer, backgroundExecutor); + } + + /** + * Initializes the channel pool. Assumes that all channels have the same authority. + * + * @param settings options for controling the ChannelPool sizing behavior + * @param channelFactory method to create the channels + * @param executor periodically refreshes the channels + */ + @VisibleForTesting + BigtableChannelPool( + BigtableChannelPoolSettings settings, + Supplier channelSupplier, + ChannelPrimer channelPrimer, + ScheduledExecutorService executor) + throws IOException { + this.settings = settings; + this.channelSupplier = channelSupplier; + this.channelPrimer = channelPrimer; + Clock systemClock = Clock.systemUTC(); + ChannelPoolHealthChecker channelPoolHealthChecker = + new ChannelPoolHealthChecker(entries::get, channelPrimer, executor, systemClock); + channelPoolHealthChecker.start(); + + ImmutableList.Builder initialListBuilder = ImmutableList.builder(); + + for (int i = 0; i < settings.getInitialChannelCount(); i++) { + ManagedChannel newChannel = channelSupplier.get(); + channelPrimer.primeChannel(newChannel); + initialListBuilder.add(new Entry(newChannel)); + } + + entries.set(initialListBuilder.build()); + authority = entries.get().get(0).channel.authority(); + + switch (settings.getLoadBalancingStrategy()) { + case ROUND_ROBIN: + picker = this::pickEntryIndexRoundRobin; + break; + case LEAST_IN_FLIGHT: + picker = this::pickEntryIndexLeastInFlight; + break; + case POWER_OF_TWO_LEAST_IN_FLIGHT: + picker = this::pickEntryIndexPowerOfTwoLeastInFlight; + break; + default: + throw new IllegalStateException( + String.format( + "Unknown load balancing strategy %s", settings.getLoadBalancingStrategy())); + } + + if (!settings.isStaticSize()) { + this.resizeFuture = + executor.scheduleAtFixedRate( + this::resizeSafely, + BigtableChannelPoolSettings.RESIZE_INTERVAL.getSeconds(), + BigtableChannelPoolSettings.RESIZE_INTERVAL.getSeconds(), + TimeUnit.SECONDS); + } + if (settings.isPreemptiveRefreshEnabled()) { + this.refreshFuture = + executor.scheduleAtFixedRate( + this::refreshSafely, + REFRESH_PERIOD.getSeconds(), + REFRESH_PERIOD.getSeconds(), + TimeUnit.SECONDS); + } + } + + /** {@inheritDoc} */ + @Override + public String authority() { + return authority; + } + + /** + * Create a {@link ClientCall} on a Channel from the pool to the remote operation specified by the + * given {@link MethodDescriptor}. The returned {@link ClientCall} does not trigger any remote + * behavior until {@link ClientCall#start(ClientCall.Listener, io.grpc.Metadata)} is invoked. + */ + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + return new AffinityChannel(pickEntryIndex()).newCall(methodDescriptor, callOptions); + } + + /** + * Pick the index of an entry to use for the next call. The returned value *should* be within + * range, but callers should not assume that this is always the case as race conditions are + * possible. + */ + private int pickEntryIndex() { + return picker.get(); + } + + /** Pick an entry using the Round Robin algorithm. */ + private int pickEntryIndexRoundRobin() { + return Math.abs(indexTicker.getAndIncrement() % entries.get().size()); + } + + /** Pick an entry at random. */ + private int pickEntryIndexRandom() { + return rng.nextInt(entries.get().size()); + } + + /** Pick an entry using the least-in-flight algorithm. */ + private int pickEntryIndexLeastInFlight() { + List localEntries = entries.get(); + int minRpcs = Integer.MAX_VALUE; + List candidates = new ArrayList<>(); + + for (int i = 0; i < localEntries.size(); i++) { + Entry entry = localEntries.get(i); + int rpcs = entry.totalOutstandingRpcs(); + if (rpcs < minRpcs) { + minRpcs = rpcs; + candidates.clear(); + candidates.add(i); + } else if (rpcs == minRpcs) { + candidates.add(i); + } + } + // If there are multiple matching entries, pick one at random. + return candidates.get(rng.nextInt(candidates.size())); + } + + /** Pick an entry using the power-of-two algorithm. */ + private int pickEntryIndexPowerOfTwoLeastInFlight() { + List localEntries = entries.get(); + int choice1 = pickEntryIndexRandom(); + int choice2 = pickEntryIndexRandom(); + if (choice1 == choice2) { + // Try to pick two different entries. If this picks the same entry again, it's likely that + // there's only one healthy channel in the pool and we should proceed anyway. + choice2 = pickEntryIndexRandom(); + } + + Entry entry1 = localEntries.get(choice1); + Entry entry2 = localEntries.get(choice2); + return entry1.totalOutstandingRpcs() < entry2.totalOutstandingRpcs() ? choice1 : choice2; + } + + Channel getChannel(int index) { + return new AffinityChannel(index); + } + + /** {@inheritDoc} */ + @Override + public ManagedChannel shutdown() { + LOG.fine("Initiating graceful shutdown due to explicit request"); + + // Resize and refresh tasks can block on channel priming. We don't need + // to wait for the channels to be ready since we're shutting down the + // pool. Allowing interrupt to speed it up. + // Background executor lifecycle is managed by BigtableClientContext. + // Do not shut it down here. + if (resizeFuture != null) { + resizeFuture.cancel(true); + } + if (refreshFuture != null) { + refreshFuture.cancel(true); + } + List localEntries = entries.get(); + for (Entry entry : localEntries) { + entry.channel.shutdown(); + } + return this; + } + + /** {@inheritDoc} */ + @Override + public boolean isShutdown() { + List localEntries = entries.get(); + for (Entry entry : localEntries) { + if (!entry.channel.isShutdown()) { + return false; + } + } + return true; + } + + /** {@inheritDoc} */ + @Override + public boolean isTerminated() { + List localEntries = entries.get(); + for (Entry entry : localEntries) { + if (!entry.channel.isTerminated()) { + return false; + } + } + + return true; + } + + /** {@inheritDoc} */ + @Override + public ManagedChannel shutdownNow() { + LOG.fine("Initiating immediate shutdown due to explicit request"); + + if (resizeFuture != null) { + resizeFuture.cancel(true); + } + if (refreshFuture != null) { + refreshFuture.cancel(true); + } + + List localEntries = entries.get(); + for (Entry entry : localEntries) { + entry.channel.shutdownNow(); + } + + return this; + } + + /** {@inheritDoc} */ + @Override + public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { + long endTimeNanos = System.nanoTime() + unit.toNanos(timeout); + List localEntries = entries.get(); + for (Entry entry : localEntries) { + long awaitTimeNanos = endTimeNanos - System.nanoTime(); + if (awaitTimeNanos <= 0) { + break; + } + entry.channel.awaitTermination(awaitTimeNanos, TimeUnit.NANOSECONDS); + } + return isTerminated(); + } + + private void resizeSafely() { + try { + synchronized (entryWriteLock) { + resize(); + } + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to resize channel pool", e); + } + } + + /** + * Resize the number of channels based on the number of outstanding RPCs. + * + *

      This method is expected to be called on a fixed interval. On every invocation it will: + * + *

        + *
      • Get the maximum number of outstanding RPCs since last invocation + *
      • Determine a valid range of number of channels to handle that many outstanding RPCs + *
      • If the current number of channel falls outside of that range, add or remove at most + * {@link BigtableChannelPoolSettings#MAX_RESIZE_DELTA} to get closer to middle of that + * range. + *
      + * + *

      Not threadsafe, must be called under the entryWriteLock monitor + */ + @VisibleForTesting + void resize() { + List localEntries = entries.get(); + // Estimate the peak of RPCs in the last interval by summing the peak of RPCs per channel + int actualOutstandingRpcs = + localEntries.stream().mapToInt(Entry::getAndResetMaxOutstanding).sum(); + + // Number of channels if each channel operated at max capacity + int minChannels = + (int) Math.ceil(actualOutstandingRpcs / (double) settings.getMaxRpcsPerChannel()); + // Limit the threshold to absolute range + if (minChannels < settings.getMinChannelCount()) { + minChannels = settings.getMinChannelCount(); + } + + // Number of channels if each channel operated at minimum capacity + // Note: getMinRpcsPerChannel() can return 0, but division by 0 shouldn't cause a problem. + int maxChannels = + (int) Math.ceil(actualOutstandingRpcs / (double) settings.getMinRpcsPerChannel()); + // Limit the threshold to absolute range + if (maxChannels > settings.getMaxChannelCount()) { + maxChannels = settings.getMaxChannelCount(); + } + if (maxChannels < minChannels) { + maxChannels = minChannels; + } + + // If the pool were to be resized, try to aim for the middle of the bound, but limit rate of + // change. + int tentativeTarget = (maxChannels + minChannels) / 2; + int currentSize = localEntries.size(); + int delta = tentativeTarget - currentSize; + int dampenedTarget = tentativeTarget; + if (Math.abs(delta) > BigtableChannelPoolSettings.MAX_RESIZE_DELTA) { + dampenedTarget = + currentSize + (int) Math.copySign(BigtableChannelPoolSettings.MAX_RESIZE_DELTA, delta); + } + + // Only resize the pool when thresholds are crossed + if (localEntries.size() < minChannels) { + LOG.fine( + String.format( + "Detected throughput peak of %d, expanding channel pool size: %d -> %d.", + actualOutstandingRpcs, currentSize, dampenedTarget)); + + expand(dampenedTarget); + } else if (localEntries.size() > maxChannels) { + LOG.fine( + String.format( + "Detected throughput drop to %d, shrinking channel pool size: %d -> %d.", + actualOutstandingRpcs, currentSize, dampenedTarget)); + + shrink(dampenedTarget); + } + } + + /** Not threadsafe, must be called under the entryWriteLock monitor */ + private void shrink(int desiredSize) { + ImmutableList localEntries = entries.get(); + Preconditions.checkState( + localEntries.size() >= desiredSize, "current size is already smaller than the desired"); + + // Set the new list + entries.set(localEntries.subList(0, desiredSize)); + // clean up removed entries + List removed = localEntries.subList(desiredSize, localEntries.size()); + removed.forEach(Entry::requestShutdown); + } + + /** Not threadsafe, must be called under the entryWriteLock monitor */ + private void expand(int desiredSize) { + List localEntries = entries.get(); + Preconditions.checkState( + localEntries.size() <= desiredSize, "current size is already bigger than the desired"); + + ImmutableList.Builder newEntries = ImmutableList.builder().addAll(localEntries); + + for (int i = 0; i < desiredSize - localEntries.size(); i++) { + try { + ManagedChannel newChannel = channelSupplier.get(); + this.channelPrimer.primeChannel(newChannel); + newEntries.add(new Entry(newChannel)); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to add channel", e); + } + } + + entries.set(newEntries.build()); + } + + private void refreshSafely() { + try { + refresh(); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to pre-emptively refresh channnels", e); + } + } + + /** + * Replace all of the channels in the channel pool with fresh ones. This is meant to mitigate the + * hourly GFE disconnects by giving clients the ability to prime the channel on reconnect. + * + *

      This is done on a best effort basis. If the replacement channel fails to construct, the old + * channel will continue to be used. + */ + @InternalApi("Visible for testing") + void refresh() { + // Note: synchronization is necessary in case refresh is called concurrently: + // - thread1 fails to replace a single entry + // - thread2 succeeds replacing an entry + // - thread1 loses the race to replace the list + // - then thread2 will shut down channel that thread1 will put back into circulation (after it + // replaces the list) + synchronized (entryWriteLock) { + LOG.fine("Refreshing all channels"); + ArrayList newEntries = new ArrayList<>(entries.get()); + + for (int i = 0; i < newEntries.size(); i++) { + try { + ManagedChannel newChannel = channelSupplier.get(); + this.channelPrimer.primeChannel(newChannel); + newEntries.set(i, new Entry(newChannel)); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to refresh channel, leaving old channel", e); + } + } + + ImmutableList replacedEntries = entries.getAndSet(ImmutableList.copyOf(newEntries)); + + // Shutdown the channels that were cycled out. + for (Entry e : replacedEntries) { + if (!newEntries.contains(e)) { + e.requestShutdown(); + } + } + } + } + + /** + * Get and retain a Channel Entry. The returned Entry will have its rpc count incremented, + * preventing it from getting recycled. + */ + private Entry getRetainedEntry(int affinity, boolean isStreaming) { + // If an entry is not retainable, that usually means that it's about to be replaced and if we + // retry we should get a new useable entry. + // The maximum number of concurrent calls to this method for any given time span is at most 2, + // so the loop can actually be 2 times. But going for 5 times for a safety margin for potential + // code evolving + for (int i = 0; i < 5; i++) { + Entry entry = getEntry(affinity); + if (entry.retain(isStreaming)) { + return entry; + } + } + // It is unlikely to reach here unless the pool code evolves to increase the maximum possible + // concurrent calls to this method. If it does, this is a bug in the channel pool implementation + // the number of retries above should be greater than the number of contending maintenance + // tasks. + throw new IllegalStateException("Bug: failed to retain a channel"); + } + + /** + * Returns one of the channels managed by this pool. The pool continues to "own" the channel, and + * the caller should not shut it down. + * + * @param affinity Two calls to this method with the same affinity returns the same channel most + * of the time, if the channel pool was refreshed since the last call, a new channel will be + * returned. The reverse is not true: Two calls with different affinities might return the + * same channel. However, the implementation should attempt to spread load evenly. + */ + private Entry getEntry(int affinity) { + List localEntries = entries.get(); + + int index = Math.abs(affinity % localEntries.size()); + + return localEntries.get(index); + } + + /** Gets the current list of BigtableChannelInsight objects. */ + @Override + public List getChannelInfos() { + return entries.get(); + } + + /** Bundles a gRPC {@link ManagedChannel} with some usage accounting. */ + static class Entry implements BigtableChannelObserver { + private final ManagedChannel channel; + + /** + * The primary purpose of keeping a count for outstanding RPCs is to track when a channel is + * safe to close. In grpc, initialization & starting of rpcs is split between 2 methods: + * Channel#newCall() and ClientCall#start. gRPC already has a mechanism to safely close channels + * that have rpcs that have been started. However, it does not protect calls that have been + * created but not started. In the sequence: Channel#newCall() Channel#shutdown() + * ClientCall#Start(), gRpc will error out the call telling the caller that the channel is + * shutdown. + * + *

      Hence, the increment of outstanding RPCs has to happen when the ClientCall is initialized, + * as part of Channel#newCall(), not after the ClientCall is started. The decrement of + * outstanding RPCs has to happen when the ClientCall is closed or the ClientCall failed to + * start. + */ + @VisibleForTesting final AtomicInteger errorCount = new AtomicInteger(0); + + @VisibleForTesting final AtomicInteger successCount = new AtomicInteger(0); + @VisibleForTesting final AtomicInteger outstandingUnaryRpcs = new AtomicInteger(0); + + @VisibleForTesting final AtomicInteger outstandingStreamingRpcs = new AtomicInteger(0); + + private final AtomicInteger maxOutstandingUnaryRpcs = new AtomicInteger(); + private final AtomicInteger maxOutstandingStreamingRpcs = new AtomicInteger(); + + /** this contains the PeerInfo field of the most recent rpc on this channel entry. */ + @VisibleForTesting + volatile PeerInfo.TransportType transportType = PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN; + + /** Queue storing the last 5 minutes of probe results */ + @VisibleForTesting + final ConcurrentLinkedQueue probeHistory = new ConcurrentLinkedQueue<>(); + + /** + * Keep both # of failed and # of successful probes so that we don't have to check size() on the + * ConcurrentLinkedQueue all the time + */ + final AtomicInteger failedProbesInWindow = new AtomicInteger(); + + final AtomicInteger successfulProbesInWindow = new AtomicInteger(); + + // Flag that the channel should be closed once all the outstanding RPCs complete. + private final AtomicBoolean shutdownRequested = new AtomicBoolean(); + // Flag that the channel has been closed. + private final AtomicBoolean shutdownInitiated = new AtomicBoolean(); + + @VisibleForTesting + Entry(ManagedChannel channel) { + this.channel = channel; + } + + void setTransportType(CallOptions callOptions) { + MetadataExtractorInterceptor.SidebandData sidebandData = + MetadataExtractorInterceptor.SidebandData.from(callOptions); + + // Set to the specific transport type if present, otherwise default to UNKNOWN + // we could check the Status and set it to unknown, but we might have PeerInfo with some non + // OK Status + transportType = + Optional.ofNullable(sidebandData) + .map(MetadataExtractorInterceptor.SidebandData::getPeerInfo) + .map(PeerInfo::getTransportType) + .orElse(PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN); + } + + ManagedChannel getManagedChannel() { + return this.channel; + } + + @VisibleForTesting + int totalOutstandingRpcs() { + return outstandingUnaryRpcs.get() + outstandingStreamingRpcs.get(); + } + + int getAndResetMaxOutstanding() { + int currentUnary = outstandingUnaryRpcs.get(); + int currentStreaming = outstandingStreamingRpcs.get(); + int prevMaxUnary = maxOutstandingUnaryRpcs.getAndSet(currentUnary); + int prevMaxStreaming = maxOutstandingStreamingRpcs.getAndSet(currentStreaming); + return prevMaxStreaming + prevMaxUnary; + } + + /** + * Try to increment the outstanding RPC count. The method will return false if the channel is + * closing and the caller should pick a different channel. If the method returned true, the + * channel has been successfully retained and it is the responsibility of the caller to release + * it. + */ + @VisibleForTesting + boolean retain(boolean isStreaming) { + AtomicInteger counter = isStreaming ? outstandingStreamingRpcs : outstandingUnaryRpcs; + AtomicInteger maxCounter = + isStreaming ? maxOutstandingStreamingRpcs : maxOutstandingUnaryRpcs; + int currentOutstanding = counter.incrementAndGet(); + maxCounter.accumulateAndGet(currentOutstanding, Math::max); + // abort if the channel is closing + if (shutdownRequested.get()) { + release(isStreaming); + return false; + } + return true; + } + + /** + * Notify the channel that the number of outstanding RPCs has decreased. If shutdown has been + * previously requested, this method will shutdown the channel if its the last outstanding RPC. + */ + void release(boolean isStreaming) { + int newCount = + isStreaming + ? outstandingStreamingRpcs.decrementAndGet() + : outstandingUnaryRpcs.decrementAndGet(); + if (newCount < 0) { + LOG.log(Level.WARNING, "Bug! Reference count is negative (" + newCount + ")!"); + } + + // Must check toalOutstandingRpcs after shutdownRequested (in reverse order of retain()) to + // ensure + // mutual exclusion. + if (shutdownRequested.get() && totalOutstandingRpcs() == 0) { + shutdown(); + } + } + + /** + * Request a shutdown. The actual shutdown will be delayed until there are no more outstanding + * RPCs. + */ + private void requestShutdown() { + shutdownRequested.set(true); + if (totalOutstandingRpcs() == 0) { + shutdown(); + } + } + + /** Ensure that shutdown is only called once. */ + private void shutdown() { + if (shutdownInitiated.compareAndSet(false, true)) { + channel.shutdown(); + } + } + + /** Gets the current number of outstanding Unary RPCs on this channel. */ + @Override + public int getOutstandingUnaryRpcs() { + return outstandingUnaryRpcs.get(); + } + + @Override + public int getOutstandingStreamingRpcs() { + return outstandingStreamingRpcs.get(); + } + + /** Get the current number of errors request count since the last observed period */ + @Override + public long getAndResetErrorCount() { + return errorCount.getAndSet(0); + } + + /** Get the current number of successful requests since the last observed period */ + @Override + public long getAndResetSuccessCount() { + return successCount.getAndSet(0); + } + + @Override + public PeerInfo.TransportType getTransportType() { + return transportType; + } + + void incrementErrorCount() { + errorCount.incrementAndGet(); + } + + void incrementSuccessCount() { + successCount.incrementAndGet(); + } + } + + /** Thin wrapper to ensure that new calls are properly reference counted. */ + private class AffinityChannel extends Channel { + private final int index; + + public AffinityChannel(int index) { + this.index = index; + } + + @Override + public String authority() { + return authority; + } + + @Override + public ClientCall newCall( + MethodDescriptor methodDescriptor, CallOptions callOptions) { + boolean isStreaming = + methodDescriptor.getType() == MethodDescriptor.MethodType.SERVER_STREAMING; + Entry entry = getRetainedEntry(index, isStreaming); + return new ReleasingClientCall<>( + entry.channel.newCall(methodDescriptor, callOptions), entry, isStreaming, callOptions); + } + } + + /** ClientCall wrapper that makes sure to decrement the outstanding RPC count on completion. */ + static class ReleasingClientCall extends SimpleForwardingClientCall { + @Nullable private CancellationException cancellationException; + final Entry entry; + private final boolean isStreaming; + private final CallOptions callOptions; + private final AtomicBoolean wasClosed = new AtomicBoolean(); + private final AtomicBoolean wasReleased = new AtomicBoolean(); + + public ReleasingClientCall( + ClientCall delegate, + Entry entry, + boolean isStreaming, + CallOptions callOptions) { + super(delegate); + this.entry = entry; + this.isStreaming = isStreaming; + this.callOptions = callOptions; + } + + @Override + public void start(Listener responseListener, Metadata headers) { + if (cancellationException != null) { + throw new IllegalStateException("Call is already cancelled", cancellationException); + } + try { + super.start( + new SimpleForwardingClientCallListener(responseListener) { + @Override + public void onHeaders(Metadata headers) { + super.onHeaders(headers); + entry.setTransportType(callOptions); + } + + @Override + public void onClose(Status status, Metadata trailers) { + if (!wasClosed.compareAndSet(false, true)) { + LOG.log( + Level.WARNING, + "Call is being closed more than once. Please make sure that onClose() is not" + + " being manually called."); + return; + } + try { + // status for increment success and error count + if (status.isOk()) { + entry.incrementSuccessCount(); + } else { + entry.incrementErrorCount(); + } + super.onClose(status, trailers); + } finally { + if (wasReleased.compareAndSet(false, true)) { + entry.release(isStreaming); + } else { + LOG.log( + Level.WARNING, + "Entry was released before the call is closed. This may be due to an" + + " exception on start of the call."); + } + } + } + }, + headers); + } catch (Exception e) { + // In case start failed, make sure to release + if (wasReleased.compareAndSet(false, true)) { + entry.release(isStreaming); + } else { + LOG.log( + Level.WARNING, + "The entry is already released. This indicates that onClose() has already been called" + + " previously"); + } + throw e; + } + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + this.cancellationException = new CancellationException(message); + super.cancel(message, cause); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolObserver.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolObserver.java new file mode 100644 index 0000000000..0b6d3c8664 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolObserver.java @@ -0,0 +1,26 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.InternalApi; +import java.util.List; + +@InternalApi +@FunctionalInterface +public interface BigtableChannelPoolObserver { + /** Gets the current list of BigtableChannelInfo objects. */ + List getChannelInfos(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings.java new file mode 100644 index 0000000000..c88e0f056a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettings.java @@ -0,0 +1,237 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.auto.value.AutoValue; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.base.Strings; +import java.time.Duration; +import java.util.Locale; +import java.util.logging.Logger; + +/** + * Settings to control {@link BigtableChannelPool} behavior. + * + *

      To facilitate low latency/high throughout applications, gax provides a {@link + * BigtableChannelPool}. The pool is meant to facilitate high throughput/low latency clients. By + * splitting load across multiple gRPC channels the client can spread load across multiple frontends + * and overcome gRPC's limit of 100 concurrent RPCs per channel. However oversizing the {@link + * BigtableChannelPool} can lead to underutilized channels which will lead to high tail latency due + * to GFEs disconnecting idle channels. + * + *

      The {@link BigtableChannelPool} is designed to adapt to varying traffic patterns by tracking + * outstanding RPCs and resizing the pool size. This class configures the behavior. In general + * clients should aim to have less than 50 concurrent RPCs per channel and at least 1 outstanding + * per channel per minute. + * + *

      The settings in this class will be applied every minute. + */ +@BetaApi("surface for channel pool sizing is not yet stable") +@AutoValue +public abstract class BigtableChannelPoolSettings { + @VisibleForTesting + static final Logger LOG = Logger.getLogger(BigtableChannelPoolSettings.class.getName()); + + /** How often to check and possibly resize the {@link BigtableChannelPool}. */ + static final Duration RESIZE_INTERVAL = Duration.ofMinutes(1); + + /** The maximum number of channels that can be added or removed at a time. */ + static final int MAX_RESIZE_DELTA = 2; + + /** Environment variable used to set load balancing strategy. */ + private static final String CBT_LOAD_BALANCING_STRATEGY_ENV_VAR = "CBT_LOAD_BALANCING_STRATEGY"; + + /** Load balancing strategy to use if environment variable is unset or invalid. */ + private static final LoadBalancingStrategy DEFAULT_LOAD_BALANCING_STRATEGY = + LoadBalancingStrategy.ROUND_ROBIN; + + /** Supported load-balancing strategies. */ + public enum LoadBalancingStrategy { + // Sequentially iterate across all channels. + ROUND_ROBIN, + // Pick the channel with the fewest in-flight requests. If multiple channels match, pick at + // random. + LEAST_IN_FLIGHT, + // Out of two random channels, pick the channel with the fewest in-flight requests. + POWER_OF_TWO_LEAST_IN_FLIGHT, + } + + /** + * Threshold to start scaling down the channel pool. + * + *

      When the average of the maximum number of outstanding RPCs in a single minute drop below + * this threshold, channels will be removed from the pool. + */ + public abstract int getMinRpcsPerChannel(); + + /** + * Threshold to start scaling up the channel pool. + * + *

      When the average of the maximum number of outstanding RPCs in a single minute surpass this + * threshold, channels will be added to the pool. For google services, gRPC channels will start + * locally queuing RPC when there are 100 concurrent RPCs. + */ + public abstract int getMaxRpcsPerChannel(); + + /** + * The absolute minimum size of the channel pool. + * + *

      Regardless of the current throughput, the number of channels will not drop below this limit + */ + public abstract int getMinChannelCount(); + + /** + * The absolute maximum size of the channel pool. + * + *

      Regardless of the current throughput, the number of channels will not exceed this limit + */ + public abstract int getMaxChannelCount(); + + /** + * The initial size of the channel pool. + * + *

      During client construction the client open this many connections. This will be scaled up or + * down in the next period. + */ + public abstract int getInitialChannelCount(); + + /** + * If all of the channels should be replaced on an hourly basis. + * + *

      The GFE will forcibly disconnect active channels after an hour. To minimize the cost of + * reconnects, this will create a new channel asynchronuously, prime it and then swap it with an + * old channel. + */ + public abstract boolean isPreemptiveRefreshEnabled(); + + /** The load balancing strategy to use for distributing RPCs across channels. */ + @InternalApi("Use CBT_LOAD_BALANCING_STRATEGY environment variable") + public abstract LoadBalancingStrategy getLoadBalancingStrategy(); + + /** + * Helper to check if the {@link BigtableChannelPool} implementation can skip dynamic size logic + */ + boolean isStaticSize() { + // When range is restricted to a single size + if (getMinChannelCount() == getMaxChannelCount()) { + return true; + } + // When the scaling threshold are not set + if (getMinRpcsPerChannel() == 0 && getMaxRpcsPerChannel() == Integer.MAX_VALUE) { + return true; + } + + return false; + } + + /** + * Use environment variable CBT_LOAD_BALANCING_STRATEGY to pick a load-balancing strategy. + * + * @return load-balancing strategy to use. + */ + private static LoadBalancingStrategy loadBalancingStrategyFromEnv() { + String strategyString = System.getenv(CBT_LOAD_BALANCING_STRATEGY_ENV_VAR); + if (Strings.isNullOrEmpty(strategyString)) { + return DEFAULT_LOAD_BALANCING_STRATEGY; + } + try { + return LoadBalancingStrategy.valueOf(strategyString.trim().toUpperCase(Locale.ENGLISH)); + } catch (IllegalArgumentException e) { + throw new IllegalStateException( + String.format("Invalid load-balancing strategy %s", strategyString)); + } + } + + public abstract Builder toBuilder(); + + public static BigtableChannelPoolSettings copyFrom(ChannelPoolSettings externalSettings) { + return BigtableChannelPoolSettings.builder() + .setMinRpcsPerChannel(externalSettings.getMinRpcsPerChannel()) + .setMaxRpcsPerChannel(externalSettings.getMaxRpcsPerChannel()) + .setMinChannelCount(externalSettings.getMinChannelCount()) + .setMaxChannelCount(externalSettings.getMaxChannelCount()) + .setInitialChannelCount(externalSettings.getInitialChannelCount()) + .setPreemptiveRefreshEnabled(externalSettings.isPreemptiveRefreshEnabled()) + .setLoadBalancingStrategy(loadBalancingStrategyFromEnv()) + .build(); + } + + public static BigtableChannelPoolSettings staticallySized(int size) { + return builder() + .setInitialChannelCount(size) + .setMinRpcsPerChannel(0) + .setMaxRpcsPerChannel(Integer.MAX_VALUE) + .setMinChannelCount(size) + .setMaxChannelCount(size) + .setLoadBalancingStrategy(loadBalancingStrategyFromEnv()) + .build(); + } + + public static Builder builder() { + return new AutoValue_BigtableChannelPoolSettings.Builder() + .setInitialChannelCount(1) + .setMinChannelCount(1) + .setMaxChannelCount(200) + .setMinRpcsPerChannel(0) + .setMaxRpcsPerChannel(Integer.MAX_VALUE) + .setPreemptiveRefreshEnabled(false) + .setLoadBalancingStrategy(loadBalancingStrategyFromEnv()); + } + + @AutoValue.Builder + public abstract static class Builder { + public abstract Builder setMinRpcsPerChannel(int count); + + public abstract Builder setMaxRpcsPerChannel(int count); + + public abstract Builder setMinChannelCount(int count); + + public abstract Builder setMaxChannelCount(int count); + + public abstract Builder setInitialChannelCount(int count); + + public abstract Builder setPreemptiveRefreshEnabled(boolean enabled); + + @InternalApi("Use CBT_LOAD_BALANCING_STRATEGY environment variable") + public abstract Builder setLoadBalancingStrategy(LoadBalancingStrategy strategy); + + abstract BigtableChannelPoolSettings autoBuild(); + + public BigtableChannelPoolSettings build() { + BigtableChannelPoolSettings s = autoBuild(); + + Preconditions.checkState( + s.getMinRpcsPerChannel() <= s.getMaxRpcsPerChannel(), "rpcsPerChannel range is invalid"); + Preconditions.checkState( + s.getMinChannelCount() > 0, "Minimum channel count must be at least 1"); + Preconditions.checkState( + s.getMinChannelCount() <= s.getMaxRpcsPerChannel(), "absolute channel range is invalid"); + Preconditions.checkState( + s.getMinChannelCount() <= s.getInitialChannelCount(), + "initial channel count be at least minChannelCount"); + Preconditions.checkState( + s.getInitialChannelCount() <= s.getMaxChannelCount(), + "initial channel count must be less than maxChannelCount"); + Preconditions.checkState( + s.getInitialChannelCount() > 0, "Initial channel count must be greater than 0"); + return s; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java new file mode 100644 index 0000000000..e0d120d277 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/BigtableTransportChannelProvider.java @@ -0,0 +1,264 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.TransportChannel; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.auth.Credentials; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.ChannelPoolMetricsTracer; +import com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessChecker; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.common.base.Preconditions; +import io.grpc.ManagedChannel; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * An instance of TransportChannelProvider that provides a TransportChannel through a supplied + * InstantiatingGrpcChannelProvider. + */ +@InternalApi +public final class BigtableTransportChannelProvider implements TransportChannelProvider { + private static final Logger LOG = + Logger.getLogger(BigtableTransportChannelProvider.class.getName()); + private final InstantiatingGrpcChannelProvider delegate; + private final ChannelPrimer channelPrimer; + @Nullable private final ChannelPoolMetricsTracer channelPoolMetricsTracer; + @Nullable private final ScheduledExecutorService backgroundExecutor; + private final DirectAccessChecker directAccessChecker; + + private BigtableTransportChannelProvider( + InstantiatingGrpcChannelProvider instantiatingGrpcChannelProvider, + ChannelPrimer channelPrimer, + @Nullable ChannelPoolMetricsTracer channelPoolMetricsTracer, + @Nullable ScheduledExecutorService backgroundExecutor, + DirectAccessChecker directAccessChecker) { + delegate = Preconditions.checkNotNull(instantiatingGrpcChannelProvider); + this.channelPrimer = channelPrimer; + this.channelPoolMetricsTracer = channelPoolMetricsTracer; + this.backgroundExecutor = backgroundExecutor; + this.directAccessChecker = directAccessChecker; + } + + @Override + public boolean shouldAutoClose() { + return delegate.shouldAutoClose(); + } + + @SuppressWarnings("deprecation") + @Override + public boolean needsExecutor() { + return delegate.needsExecutor(); + } + + @Override + @Deprecated + public BigtableTransportChannelProvider withExecutor(ScheduledExecutorService executor) { + return withExecutor((Executor) executor); + } + + // This executor if set is for handling rpc callbacks so we can't use it as the background + // executor + @Override + public BigtableTransportChannelProvider withExecutor(Executor executor) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withExecutor(executor); + return new BigtableTransportChannelProvider( + newChannelProvider, + channelPrimer, + channelPoolMetricsTracer, + backgroundExecutor, + directAccessChecker); + } + + @Override + public boolean needsBackgroundExecutor() { + return delegate.needsBackgroundExecutor(); + } + + @Override + public TransportChannelProvider withBackgroundExecutor(ScheduledExecutorService executor) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withBackgroundExecutor(executor); + return new BigtableTransportChannelProvider( + newChannelProvider, channelPrimer, channelPoolMetricsTracer, executor, directAccessChecker); + } + + @Override + public boolean needsHeaders() { + return delegate.needsHeaders(); + } + + @Override + public BigtableTransportChannelProvider withHeaders(Map headers) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withHeaders(headers); + return new BigtableTransportChannelProvider( + newChannelProvider, + channelPrimer, + channelPoolMetricsTracer, + backgroundExecutor, + directAccessChecker); + } + + @Override + public boolean needsEndpoint() { + return delegate.needsEndpoint(); + } + + @Override + public TransportChannelProvider withEndpoint(String endpoint) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withEndpoint(endpoint); + return new BigtableTransportChannelProvider( + newChannelProvider, + channelPrimer, + channelPoolMetricsTracer, + backgroundExecutor, + directAccessChecker); + } + + @Deprecated + @Override + public boolean acceptsPoolSize() { + return delegate.acceptsPoolSize(); + } + + @Deprecated + @Override + public TransportChannelProvider withPoolSize(int size) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withPoolSize(size); + return new BigtableTransportChannelProvider( + newChannelProvider, + channelPrimer, + channelPoolMetricsTracer, + backgroundExecutor, + directAccessChecker); + } + + /** Expected to only be called once when BigtableClientContext is created */ + @Override + public TransportChannel getTransportChannel() throws IOException { + InstantiatingGrpcChannelProvider directAccessProvider = + EnhancedBigtableStubSettings.applyDirectAccessTraitsInternal(delegate.toBuilder()) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) + .build(); + + boolean isDirectAccessEligible = false; + + try { + GrpcTransportChannel grpcTransportChannel = + (GrpcTransportChannel) directAccessProvider.getTransportChannel(); + ManagedChannel directAccessChannel = (ManagedChannel) grpcTransportChannel.getChannel(); + isDirectAccessEligible = directAccessChecker.check(directAccessChannel); + } catch (Exception e) { + LOG.log(Level.WARNING, "Failed to check for direct access.", e); + directAccessChecker.investigateFailure(e); + } + + InstantiatingGrpcChannelProvider selectedProvider; + if (isDirectAccessEligible) { + selectedProvider = directAccessProvider; + } else { + selectedProvider = delegate; + } + + // This provider's main purpose is to replace the default GAX ChannelPool + // with a custom BigtableChannelPool, reusing the delegate's configuration. + + // To create our pool, we need a factory for raw gRPC channels. + // We achieve this by configuring our delegate to not use its own pooling + // (by setting pool size to 1) and then calling getTransportChannel() on it. + InstantiatingGrpcChannelProvider singleChannelProvider = + selectedProvider.toBuilder() + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) + .build(); + + Supplier channelSupplier = + () -> { + try { + GrpcTransportChannel channel = + (GrpcTransportChannel) singleChannelProvider.getTransportChannel(); + return (ManagedChannel) channel.getChannel(); + } catch (IOException e) { + throw new java.io.UncheckedIOException(e); + } + }; + + BigtableChannelPoolSettings btPoolSettings = + BigtableChannelPoolSettings.copyFrom(delegate.getChannelPoolSettings()); + + BigtableChannelPool btChannelPool = + BigtableChannelPool.create( + btPoolSettings, channelSupplier, channelPrimer, backgroundExecutor); + + if (channelPoolMetricsTracer != null) { + channelPoolMetricsTracer.registerChannelInsightsProvider(btChannelPool); + channelPoolMetricsTracer.registerLoadBalancingStrategy( + btPoolSettings.getLoadBalancingStrategy()); + } + + return GrpcTransportChannel.create(btChannelPool); + } + + @Override + public String getTransportName() { + return "bigtable"; + } + + @Override + public boolean needsCredentials() { + return delegate.needsCredentials(); + } + + @Override + public TransportChannelProvider withCredentials(Credentials credentials) { + InstantiatingGrpcChannelProvider newChannelProvider = + (InstantiatingGrpcChannelProvider) delegate.withCredentials(credentials); + return new BigtableTransportChannelProvider( + newChannelProvider, + channelPrimer, + channelPoolMetricsTracer, + backgroundExecutor, + directAccessChecker); + } + + /** Creates a BigtableTransportChannelProvider. */ + public static BigtableTransportChannelProvider create( + InstantiatingGrpcChannelProvider instantiatingGrpcChannelProvider, + ChannelPrimer channelPrimer, + ChannelPoolMetricsTracer outstandingRpcsMetricTracker, + ScheduledExecutorService backgroundExecutor, + DirectAccessChecker directAccessChecker) { + return new BigtableTransportChannelProvider( + instantiatingGrpcChannelProvider, + channelPrimer, + outstandingRpcsMetricTracker, + backgroundExecutor, + directAccessChecker); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthChecker.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthChecker.java new file mode 100644 index 0000000000..9634b778ae --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthChecker.java @@ -0,0 +1,258 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.ApiFuture; +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.cloud.bigtable.data.v2.stub.BigtableChannelPrimer; +import com.google.cloud.bigtable.data.v2.stub.NoOpChannelPrimer; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPool.Entry; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.common.util.concurrent.MoreExecutors; +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.util.Comparator; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +/** Class that manages the health checking in the BigtableChannelPool */ +class ChannelPoolHealthChecker { + + private static final Logger logger = Logger.getLogger(ChannelPoolHealthChecker.class.getName()); + + // Configuration constants + // Window_Duration is the duration over which we keep probe results + private static final Duration WINDOW_DURATION = Duration.ofMinutes(5); + // Interval at which we probe channel health + private static final Duration PROBE_INTERVAL = Duration.ofSeconds(30); + // Timeout deadline for a probe + @VisibleForTesting static final Duration PROBE_DEADLINE = Duration.ofMillis(500); + // Minimum interval between new idle channel evictions + private static final Duration MIN_EVICTION_INTERVAL = Duration.ofMinutes(10); + // Minimum number of probes that must be sent to a channel before it will be considered for + // eviction + private static final int MIN_PROBES_FOR_EVALUATION = 4; + // Percentage of probes that must fail for a channel to be considered unhealthy + private static final int SINGLE_CHANNEL_FAILURE_PERCENT_THRESHOLD = 60; + // "Circuitbreaker" - If this or a higher percentage of channels in a pool are bad, we will not + // evict any channels + private static final int POOLWIDE_BAD_CHANNEL_CIRCUITBREAKER_PERCENT = 70; + + /** Inner class to represent the result of a single probe. */ + @AutoValue + abstract static class ProbeResult { + abstract Instant startTime(); + + abstract boolean isSuccessful(); + + static ProbeResult create(Instant startTime, boolean success) { + return new AutoValue_ChannelPoolHealthChecker_ProbeResult(startTime, success); + } + } + + private final Supplier> entrySupplier; + private volatile Instant lastEviction; + private final ScheduledExecutorService executor; + + private final ChannelPrimer channelPrimer; + + private ScheduledFuture probeTaskScheduledFuture; + private ScheduledFuture detectAndRemoveTaskScheduledFuture; + + private final Clock clock; + + /** Constructor for the pool health checker. */ + public ChannelPoolHealthChecker( + Supplier> entrySupplier, + ChannelPrimer channelPrimer, + ScheduledExecutorService executor, + Clock clock) { + this.entrySupplier = entrySupplier; + this.lastEviction = Instant.MIN; + this.channelPrimer = channelPrimer; + this.executor = executor; + this.clock = clock; + } + + void start() { + if (channelPrimer instanceof NoOpChannelPrimer) { + return; + } + + if (!(channelPrimer instanceof BigtableChannelPrimer)) { + logger.log( + Level.WARNING, + "Provided channelPrimer not an instance of BigtableChannelPrimer, not checking channel" + + " health."); + return; + } + + Duration initialDelayProbe = + Duration.ofMillis(ThreadLocalRandom.current().nextLong(PROBE_INTERVAL.toMillis())); + this.probeTaskScheduledFuture = + executor.scheduleAtFixedRate( + this::runProbes, + initialDelayProbe.toMillis(), + PROBE_INTERVAL.toMillis(), + TimeUnit.MILLISECONDS); + Duration initialDelayDetect = + Duration.ofMillis(ThreadLocalRandom.current().nextLong(PROBE_INTERVAL.toMillis())); + this.detectAndRemoveTaskScheduledFuture = + executor.scheduleAtFixedRate( + this::detectAndRemoveOutlierEntries, + initialDelayDetect.toMillis(), + PROBE_INTERVAL.toMillis(), + TimeUnit.MILLISECONDS); + } + + /** Stop running health checking */ + public void stop() { + if (probeTaskScheduledFuture != null) { + probeTaskScheduledFuture.cancel(false); + } + if (detectAndRemoveTaskScheduledFuture != null) { + detectAndRemoveTaskScheduledFuture.cancel(false); + } + } + + /** Runs probes on all the channels in the pool. */ + @VisibleForTesting + void runProbes() { + Preconditions.checkState( + channelPrimer instanceof BigtableChannelPrimer, + "Health checking can only be enabled with BigtableChannelPrimer, found %s", + channelPrimer); + BigtableChannelPrimer primer = (BigtableChannelPrimer) channelPrimer; + + for (Entry entry : this.entrySupplier.get()) { + ApiFuture probeFuture = + primer.sendPrimeRequestsAsync(entry.getManagedChannel()); + probeFuture.addListener( + () -> onComplete(entry, clock.instant(), probeFuture), MoreExecutors.directExecutor()); + } + } + + /** Callback that will update Entry data on probe complete. */ + @VisibleForTesting + void onComplete(Entry entry, Instant startTime, ApiFuture probeFuture) { + boolean success; + try { + probeFuture.get(PROBE_DEADLINE.toMillis(), TimeUnit.MILLISECONDS); + success = true; + } catch (Exception e) { + success = false; + logger.log(Level.WARNING, "Probe failed", e); + } + addProbeResult(entry, ProbeResult.create(startTime, success)); + } + + @VisibleForTesting + void addProbeResult(Entry entry, ProbeResult result) { + entry.probeHistory.add(result); + if (result.isSuccessful()) { + entry.successfulProbesInWindow.incrementAndGet(); + } else { + entry.failedProbesInWindow.incrementAndGet(); + } + pruneHistory(entry); + } + + @VisibleForTesting + void pruneHistory(Entry entry) { + Instant windowStart = clock.instant().minus(WINDOW_DURATION); + while (!entry.probeHistory.isEmpty() + && entry.probeHistory.peek().startTime().isBefore(windowStart)) { + ProbeResult removedResult = entry.probeHistory.poll(); + if (removedResult.isSuccessful()) { + entry.successfulProbesInWindow.decrementAndGet(); + } else { + entry.failedProbesInWindow.decrementAndGet(); + } + } + } + + /** Checks if a single entry is currently healthy based on its probe history. */ + @VisibleForTesting + boolean isEntryHealthy(Entry entry) { + int failedProbes = entry.failedProbesInWindow.get(); + int totalProbes = failedProbes + entry.successfulProbesInWindow.get(); + + if (totalProbes < MIN_PROBES_FOR_EVALUATION) { + return true; // Not enough data, assume healthy. + } + + double failureRate = ((double) failedProbes / totalProbes) * 100.0; + return failureRate < SINGLE_CHANNEL_FAILURE_PERCENT_THRESHOLD; + } + + /** + * Finds a channel that is an outlier in terms of health. + * + * @return the entry to be evicted. Returns null if nothing to evict. + */ + @Nullable + @VisibleForTesting + Entry findOutlierEntry() { + List unhealthyEntries = + this.entrySupplier.get().stream() + .filter(entry -> !isEntryHealthy(entry)) + .collect(Collectors.toList()); + + int poolSize = this.entrySupplier.get().size(); + if (unhealthyEntries.isEmpty() || poolSize == 0) { + return null; + } + + // If more than CIRCUITBREAKER_PERCENT of channels are unhealthy we won't evict + double unhealthyPercent = (double) unhealthyEntries.size() / poolSize * 100.0; + if (unhealthyPercent >= POOLWIDE_BAD_CHANNEL_CIRCUITBREAKER_PERCENT) { + return null; + } + + return unhealthyEntries.stream() + .max(Comparator.comparingInt(entry -> entry.failedProbesInWindow.get())) + .orElse(null); + } + + /** Periodically detects and removes outlier channels from the pool. */ + @VisibleForTesting + void detectAndRemoveOutlierEntries() { + if (clock.instant().isBefore(lastEviction.plus(MIN_EVICTION_INTERVAL))) { + // Primitive but effective rate-limiting. + return; + } + Entry outlier = findOutlierEntry(); + if (outlier != null) { + this.lastEviction = clock.instant(); + outlier.failedProbesInWindow.set(0); + outlier.successfulProbesInWindow.set(0); + outlier.probeHistory.clear(); + outlier.getManagedChannel().enterIdle(); + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPrimer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPrimer.java new file mode 100644 index 0000000000..29dac62a51 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPrimer.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.ApiFuture; +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.PingAndWarmResponse; +import io.grpc.Channel; +import io.grpc.ManagedChannel; + +@InternalApi("For internal use by google-cloud-java clients only") +public interface ChannelPrimer { + /** + * @deprecated Use {@link #primeChannel(Channel)} + */ + @Deprecated + default void primeChannel(ManagedChannel channel) { + primeChannel((Channel) channel); + } + + void primeChannel(Channel channel); + + /** + * @deprecated Use {@link #sendPrimeRequestsAsync(Channel)} + */ + @Deprecated + default ApiFuture sendPrimeRequestsAsync(ManagedChannel channel) { + return sendPrimeRequestsAsync((Channel) channel); + } + + ApiFuture sendPrimeRequestsAsync(Channel channel); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/AttemptCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/AttemptCallable.java index 3599e1e4df..6d5c75ea99 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/AttemptCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/AttemptCallable.java @@ -24,7 +24,6 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.common.base.Preconditions; import java.util.concurrent.Callable; -import org.threeten.bp.Duration; // TODO: remove this once ApiResultRetryAlgorithm is added to gax. /** @@ -59,9 +58,9 @@ public ResponseT call() { try { // Set the RPC timeout if the caller did not provide their own. - Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeout(); + java.time.Duration rpcTimeout = externalFuture.getAttemptSettings().getRpcTimeoutDuration(); if (!rpcTimeout.isZero() && callContext.getTimeout() == null) { - callContext = callContext.withTimeout(rpcTimeout); + callContext = callContext.withTimeoutDuration(rpcTimeout); } externalFuture.setAttemptFuture(new NonCancellableFuture()); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/Callables.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/Callables.java index a78e7643b0..d25ec22a3a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/Callables.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/Callables.java @@ -73,4 +73,24 @@ public static ServerStreamingCallable return new RetryingServerStreamingCallable<>( innerCallable, retryingExecutor, settings.getResumptionStrategy()); } + + public static + ServerStreamingCallable retryingForLargeRows( + ServerStreamingCallable innerCallable, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + + ServerStreamingCallSettings settings = callSettings; + + StreamingRetryAlgorithm retryAlgorithm = + new StreamingRetryAlgorithm<>( + new LargeRowRetryAlgorithm<>(), + new ExponentialRetryAlgorithm(settings.getRetrySettings(), clientContext.getClock())); + + ScheduledRetryingExecutor retryingExecutor = + new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor()); + + return new RetryingServerStreamingCallable<>( + innerCallable, retryingExecutor, settings.getResumptionStrategy()); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/LargeRowRetryAlgorithm.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/LargeRowRetryAlgorithm.java new file mode 100644 index 0000000000..2ec43cadd1 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/LargeRowRetryAlgorithm.java @@ -0,0 +1,111 @@ +/* + * 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 + * + * 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.bigtable.gaxx.retrying; + +import com.google.api.core.InternalApi; +import com.google.api.gax.retrying.BasicResultRetryAlgorithm; +import com.google.api.gax.retrying.RetryingContext; +import com.google.api.gax.retrying.TimedAttemptSettings; +import com.google.api.gax.rpc.ApiException; +import com.google.protobuf.util.Durations; +import com.google.rpc.RetryInfo; +import javax.annotation.Nullable; + +/** + * This retry algorithm checks the metadata of an exception for additional error details. It also + * allows to retry for {@link com.google.api.gax.rpc.FailedPreconditionException} with + * ErrorDetails.Reason as "LargeRowReadError" (for large rows). If the metadata has a RetryInfo + * field, use the retry delay to set the wait time between attempts. + */ +@InternalApi +public class LargeRowRetryAlgorithm extends BasicResultRetryAlgorithm { + + @Override + public TimedAttemptSettings createNextAttempt( + Throwable prevThrowable, ResponseT prevResponse, TimedAttemptSettings prevSettings) { + java.time.Duration retryDelay = extractRetryDelay(prevThrowable); + if (retryDelay != null) { + return prevSettings.toBuilder() + .setRandomizedRetryDelayDuration(retryDelay) + .setAttemptCount(prevSettings.getAttemptCount() + 1) + .setOverallAttemptCount(prevSettings.getAttemptCount() + 1) + .build(); + } + return null; + } + + /** Returns true if previousThrowable is an {@link ApiException} that is retryable. */ + @Override + public boolean shouldRetry(Throwable previousThrowable, ResponseT previousResponse) { + return shouldRetry(null, previousThrowable, previousResponse); + } + + /** + * If {@link RetryingContext#getRetryableCodes()} is not null: Returns true if the status code of + * previousThrowable is in the list of retryable code of the {@link RetryingContext}. + * + *

      Otherwise it returns the result of {@link #shouldRetry(Throwable, Object)}. + */ + @Override + public boolean shouldRetry( + @Nullable RetryingContext context, Throwable previousThrowable, ResponseT previousResponse) { + if (extractRetryDelay(previousThrowable) != null) { + // First check if server wants us to retry + return true; + } + if (isLargeRowException(previousThrowable)) { + return true; + } + if (context != null && context.getRetryableCodes() != null) { + // Ignore the isRetryable() value of the throwable if the RetryingContext has a specific list + // of codes that should be retried. + return ((previousThrowable instanceof ApiException) + && context + .getRetryableCodes() + .contains(((ApiException) previousThrowable).getStatusCode().getCode())); + } + + // Server didn't have retry information and there's no retry context, use the local status + // code config. + return previousThrowable instanceof ApiException + && ((ApiException) previousThrowable).isRetryable(); + } + + public boolean isLargeRowException(Throwable previousThrowable) { + return (previousThrowable != null) + && (previousThrowable instanceof ApiException) + && ((ApiException) previousThrowable).getReason() != null + && ((ApiException) previousThrowable).getReason().equals("LargeRowReadError"); + } + + static java.time.Duration extractRetryDelay(@Nullable Throwable throwable) { + if (throwable == null) { + return null; + } + if (!(throwable instanceof ApiException)) { + return null; + } + ApiException exception = (ApiException) throwable; + if (exception.getErrorDetails() == null) { + return null; + } + if (exception.getErrorDetails().getRetryInfo() == null) { + return null; + } + RetryInfo retryInfo = exception.getErrorDetails().getRetryInfo(); + return java.time.Duration.ofMillis(Durations.toMillis(retryInfo.getRetryDelay())); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryInfoRetryAlgorithm.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryInfoRetryAlgorithm.java index 085b48bbb5..c02318fd26 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryInfoRetryAlgorithm.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryInfoRetryAlgorithm.java @@ -22,8 +22,7 @@ import com.google.api.gax.rpc.ApiException; import com.google.protobuf.util.Durations; import com.google.rpc.RetryInfo; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.threeten.bp.Duration; +import javax.annotation.Nullable; // TODO move this algorithm to gax /** @@ -36,11 +35,11 @@ public class RetryInfoRetryAlgorithm extends BasicResultRetryAlgorith @Override public TimedAttemptSettings createNextAttempt( Throwable prevThrowable, ResponseT prevResponse, TimedAttemptSettings prevSettings) { - Duration retryDelay = extractRetryDelay(prevThrowable); + java.time.Duration retryDelay = extractRetryDelay(prevThrowable); if (retryDelay != null) { - return prevSettings - .toBuilder() - .setRandomizedRetryDelay(retryDelay) + return prevSettings.toBuilder() + .setRetryDelayDuration(retryDelay) + .setRandomizedRetryDelayDuration(retryDelay) .setAttemptCount(prevSettings.getAttemptCount() + 1) .setOverallAttemptCount(prevSettings.getAttemptCount() + 1) .build(); @@ -81,8 +80,7 @@ public boolean shouldRetry( && ((ApiException) previousThrowable).isRetryable(); } - @Nullable - static Duration extractRetryDelay(@Nullable Throwable throwable) { + static java.time.Duration extractRetryDelay(@Nullable Throwable throwable) { if (throwable == null) { return null; } @@ -97,6 +95,6 @@ static Duration extractRetryDelay(@Nullable Throwable throwable) { return null; } RetryInfo retryInfo = exception.getErrorDetails().getRetryInfo(); - return Duration.ofMillis(Durations.toMillis(retryInfo.getRetryDelay())); + return java.time.Duration.ofMillis(Durations.toMillis(retryInfo.getRetryDelay())); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryingCallable.java index d78bf08322..d9cea20fce 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/RetryingCallable.java @@ -36,15 +36,16 @@ public RetryingCallable( ApiCallContext callContextPrototype, UnaryCallable callable, RetryingExecutorWithContext executor) { - this.callContextPrototype = (ApiCallContext) Preconditions.checkNotNull(callContextPrototype); - this.callable = (UnaryCallable) Preconditions.checkNotNull(callable); - this.executor = (RetryingExecutorWithContext) Preconditions.checkNotNull(executor); + this.callContextPrototype = Preconditions.checkNotNull(callContextPrototype); + this.callable = Preconditions.checkNotNull(callable); + this.executor = Preconditions.checkNotNull(executor); } + @Override public RetryingFuture futureCall(RequestT request, ApiCallContext inputContext) { ApiCallContext context = this.callContextPrototype.nullToSelf(inputContext); AttemptCallable retryCallable = - new AttemptCallable(this.callable, request, context); + new AttemptCallable<>(this.callable, request, context); RetryingFuture retryingFuture = this.executor.createFuture(retryCallable, inputContext); retryCallable.setExternalFuture(retryingFuture); @@ -52,6 +53,7 @@ public RetryingFuture futureCall(RequestT request, ApiCallContext inp return retryingFuture; } + @Override public String toString() { return String.format("retrying(%s)", this.callable); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ServerStreamingAttemptCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ServerStreamingAttemptCallable.java index 793cf2e91c..7f5c39ec0a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ServerStreamingAttemptCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ServerStreamingAttemptCallable.java @@ -25,6 +25,7 @@ import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StateCheckingResponseObserver; import com.google.api.gax.rpc.StreamController; +import com.google.cloud.bigtable.data.v2.stub.BigtableStreamResumptionStrategy; import com.google.common.base.Preconditions; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; @@ -344,6 +345,9 @@ private void onAttemptError(Throwable throwable) { synchronized (lock) { localCancellationCause = cancellationCause; } + if (resumptionStrategy instanceof BigtableStreamResumptionStrategy) { + throwable = ((BigtableStreamResumptionStrategy) resumptionStrategy).processError(throwable); + } if (localCancellationCause != null) { // Take special care to preserve the cancellation's stack trace. diff --git a/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json index 942551b0d3..7194bc2752 100644 --- a/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json +++ b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json @@ -1,4 +1,58 @@ [ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ClientLibraryDestination", "queryAllDeclaredConstructors": true, @@ -116,6 +170,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.GoSettings", "queryAllDeclaredConstructors": true, @@ -305,6 +368,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ResourceDescriptor", "queryAllDeclaredConstructors": true, @@ -377,6 +458,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.bigtable.admin.v2.AppProfile", "queryAllDeclaredConstructors": true, @@ -440,6 +539,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.bigtable.admin.v2.AppProfile$MultiClusterRoutingUseAny$RowAffinity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.AppProfile$MultiClusterRoutingUseAny$RowAffinity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.bigtable.admin.v2.AppProfile$Priority", "queryAllDeclaredConstructors": true, @@ -764,6 +881,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.bigtable.admin.v2.Cluster$NodeScalingFactor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.bigtable.admin.v2.Cluster$State", "queryAllDeclaredConstructors": true, @@ -1017,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata$Builder", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateLogicalViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split$Builder", + "name": "com.google.bigtable.admin.v2.CreateMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites$Builder", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateSchemaBundleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteBackupRequest", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteBackupRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteClusterRequest", + "name": "com.google.bigtable.admin.v2.CreateTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteClusterRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest", + "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest$Builder", + "name": "com.google.bigtable.admin.v2.CreateTableRequest$Split$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest", + "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest$Builder", + "name": "com.google.bigtable.admin.v2.DataBoostReadLocalWrites$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteTableRequest", + "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DeleteTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteAppProfileRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DropRowRangeRequest", + "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.DropRowRangeRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.EncryptionInfo", + "name": "com.google.bigtable.admin.v2.DeleteBackupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.EncryptionInfo$Builder", + "name": "com.google.bigtable.admin.v2.DeleteBackupRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.EncryptionInfo$EncryptionType", + "name": "com.google.bigtable.admin.v2.DeleteClusterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule", + "name": "com.google.bigtable.admin.v2.DeleteClusterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Builder", + "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Intersection", + "name": "com.google.bigtable.admin.v2.DeleteInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Intersection$Builder", + "name": "com.google.bigtable.admin.v2.DeleteLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Union", + "name": "com.google.bigtable.admin.v2.DeleteLogicalViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GcRule$Union$Builder", + "name": "com.google.bigtable.admin.v2.DeleteMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest", + "name": "com.google.bigtable.admin.v2.DeleteMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse", + "name": "com.google.bigtable.admin.v2.DeleteSchemaBundleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse$Builder", + "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAppProfileRequest", + "name": "com.google.bigtable.admin.v2.DeleteSnapshotRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAppProfileRequest$Builder", + "name": "com.google.bigtable.admin.v2.DeleteTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest", + "name": "com.google.bigtable.admin.v2.DeleteTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest$Builder", + "name": "com.google.bigtable.admin.v2.DropRowRangeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetBackupRequest", + "name": "com.google.bigtable.admin.v2.DropRowRangeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetBackupRequest$Builder", + "name": "com.google.bigtable.admin.v2.EncryptionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetClusterRequest", + "name": "com.google.bigtable.admin.v2.EncryptionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetClusterRequest$Builder", + "name": "com.google.bigtable.admin.v2.EncryptionInfo$EncryptionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetInstanceRequest", + "name": "com.google.bigtable.admin.v2.GcRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetInstanceRequest$Builder", + "name": "com.google.bigtable.admin.v2.GcRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetSnapshotRequest", + "name": "com.google.bigtable.admin.v2.GcRule$Intersection", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetSnapshotRequest$Builder", + "name": "com.google.bigtable.admin.v2.GcRule$Intersection$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetTableRequest", + "name": "com.google.bigtable.admin.v2.GcRule$Union", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.GetTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.GcRule$Union$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.HotTablet", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.HotTablet$Builder", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance$Builder", + "name": "com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance$State", + "name": "com.google.bigtable.admin.v2.GetAppProfileRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Instance$Type", + "name": "com.google.bigtable.admin.v2.GetAppProfileRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest", + "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest$Builder", + "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse", + "name": "com.google.bigtable.admin.v2.GetBackupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse$Builder", + "name": "com.google.bigtable.admin.v2.GetBackupRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest", + "name": "com.google.bigtable.admin.v2.GetClusterRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest$Builder", + "name": "com.google.bigtable.admin.v2.GetClusterRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse", + "name": "com.google.bigtable.admin.v2.GetInstanceRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse$Builder", + "name": "com.google.bigtable.admin.v2.GetInstanceRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsRequest", + "name": "com.google.bigtable.admin.v2.GetLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsRequest$Builder", + "name": "com.google.bigtable.admin.v2.GetLogicalViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsResponse", + "name": "com.google.bigtable.admin.v2.GetMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListBackupsResponse$Builder", + "name": "com.google.bigtable.admin.v2.GetMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersRequest", + "name": "com.google.bigtable.admin.v2.GetSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersRequest$Builder", + "name": "com.google.bigtable.admin.v2.GetSchemaBundleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersResponse", + "name": "com.google.bigtable.admin.v2.GetSnapshotRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListClustersResponse$Builder", + "name": "com.google.bigtable.admin.v2.GetSnapshotRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest", + "name": "com.google.bigtable.admin.v2.GetTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest$Builder", + "name": "com.google.bigtable.admin.v2.GetTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse", + "name": "com.google.bigtable.admin.v2.HotTablet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse$Builder", + "name": "com.google.bigtable.admin.v2.HotTablet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesRequest", + "name": "com.google.bigtable.admin.v2.Instance", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesRequest$Builder", + "name": "com.google.bigtable.admin.v2.Instance$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesResponse", + "name": "com.google.bigtable.admin.v2.Instance$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1881,691 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListInstancesResponse$Builder", + "name": "com.google.bigtable.admin.v2.Instance$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAppProfilesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAppProfilesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListBackupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListBackupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListBackupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListBackupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListClustersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListClustersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListClustersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListClustersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListHotTabletsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListHotTabletsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListLogicalViewsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListLogicalViewsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListLogicalViewsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListLogicalViewsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListMaterializedViewsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListMaterializedViewsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListMaterializedViewsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListMaterializedViewsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSchemaBundlesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSchemaBundlesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSchemaBundlesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSchemaBundlesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListTablesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListTablesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListTablesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ListTablesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.LogicalView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.LogicalView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.MaterializedView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.MaterializedView$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.OperationProgress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.OperationProgress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ProtoSchema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.ProtoSchema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreSourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreTableMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreTableMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreTableRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.RestoreTableRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SchemaBundle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.SchemaBundle$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Snapshot", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Snapshot$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.admin.v2.Snapshot$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest", + "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsRequest$Builder", + "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +2592,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse", + "name": "com.google.bigtable.admin.v2.SnapshotTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +2601,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListSnapshotsResponse$Builder", + "name": "com.google.bigtable.admin.v2.SnapshotTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +2610,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesRequest", + "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +2619,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesRequest$Builder", + "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +2628,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesResponse", + "name": "com.google.bigtable.admin.v2.StorageType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +2637,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ListTablesResponse$Builder", + "name": "com.google.bigtable.admin.v2.Table", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +2646,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest", + "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +2655,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Builder", + "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +2664,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification", + "name": "com.google.bigtable.admin.v2.Table$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +2673,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest$Modification$Builder", + "name": "com.google.bigtable.admin.v2.Table$ClusterState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +2682,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OperationProgress", + "name": "com.google.bigtable.admin.v2.Table$ClusterState$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +2691,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OperationProgress$Builder", + "name": "com.google.bigtable.admin.v2.Table$ClusterState$ReplicationState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +2700,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata", + "name": "com.google.bigtable.admin.v2.Table$TimestampGranularity", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +2709,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.Table$View", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +2718,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata", + "name": "com.google.bigtable.admin.v2.TieredStorageConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +2727,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterMetadata$Builder", + "name": "com.google.bigtable.admin.v2.TieredStorageConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +2736,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest", + "name": "com.google.bigtable.admin.v2.TieredStorageRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +2745,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateClusterRequest$Builder", + "name": "com.google.bigtable.admin.v2.TieredStorageRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +2754,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest", + "name": "com.google.bigtable.admin.v2.Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +2763,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.PartialUpdateInstanceRequest$Builder", + "name": "com.google.bigtable.admin.v2.Type$Aggregate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +2772,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreInfo", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2781,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreInfo$Builder", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2790,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreSourceType", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +2799,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableMetadata", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +2808,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2817,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableRequest", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2826,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.RestoreTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2835,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2844,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot$Builder", + "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2853,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Snapshot$State", + "name": "com.google.bigtable.admin.v2.Type$Array", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2862,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata", + "name": "com.google.bigtable.admin.v2.Type$Array$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2871,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2880,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableRequest", + "name": "com.google.bigtable.admin.v2.Type$Bool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2889,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.SnapshotTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.Type$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2898,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites", + "name": "com.google.bigtable.admin.v2.Type$Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2907,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StandardReadRemoteWrites$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2916,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.StorageType", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2925,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2124,7 +2934,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2133,7 +2943,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy$Builder", + "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2142,7 +2952,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$Builder", + "name": "com.google.bigtable.admin.v2.Type$Date", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2151,7 +2961,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState", + "name": "com.google.bigtable.admin.v2.Type$Date$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2160,7 +2970,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState$Builder", + "name": "com.google.bigtable.admin.v2.Type$Enum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2169,7 +2979,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$ClusterState$ReplicationState", + "name": "com.google.bigtable.admin.v2.Type$Enum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2178,7 +2988,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$TimestampGranularity", + "name": "com.google.bigtable.admin.v2.Type$Float32", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2187,7 +2997,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Table$View", + "name": "com.google.bigtable.admin.v2.Type$Float32$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2196,7 +3006,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type", + "name": "com.google.bigtable.admin.v2.Type$Float64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2205,7 +3015,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate", + "name": "com.google.bigtable.admin.v2.Type$Float64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2214,7 +3024,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2223,7 +3033,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", + "name": "com.google.bigtable.admin.v2.Type$Int64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2232,7 +3042,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2241,7 +3051,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2250,7 +3060,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Max$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2259,7 +3069,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2268,7 +3078,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Min$Builder", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$OrderedCodeBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2277,7 +3087,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum", + "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$OrderedCodeBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2286,7 +3096,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Aggregate$Sum$Builder", + "name": "com.google.bigtable.admin.v2.Type$Map", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2295,7 +3105,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Array", + "name": "com.google.bigtable.admin.v2.Type$Map$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2304,7 +3114,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Array$Builder", + "name": "com.google.bigtable.admin.v2.Type$Proto", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2313,7 +3123,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bool", + "name": "com.google.bigtable.admin.v2.Type$Proto$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2322,7 +3132,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bool$Builder", + "name": "com.google.bigtable.admin.v2.Type$String", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2331,7 +3141,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2340,7 +3150,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2349,7 +3159,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2358,7 +3168,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2367,7 +3177,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2376,7 +3186,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2385,7 +3195,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Bytes$Encoding$Raw$Builder", + "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2394,7 +3204,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Date", + "name": "com.google.bigtable.admin.v2.Type$Struct", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2403,7 +3213,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Date$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2412,7 +3222,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Float32", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2421,7 +3231,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Float32$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2430,7 +3240,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Float64", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$DelimitedBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2439,7 +3249,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Float64$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$DelimitedBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2448,7 +3258,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$OrderedCodeBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2457,7 +3267,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$OrderedCodeBytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2466,7 +3276,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Singleton", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2475,7 +3285,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes", + "name": "com.google.bigtable.admin.v2.Type$Struct$Encoding$Singleton$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2484,7 +3294,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$BigEndianBytes$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Field", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2493,7 +3303,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Int64$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.Type$Struct$Field$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2502,7 +3312,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Map", + "name": "com.google.bigtable.admin.v2.Type$Timestamp", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2511,7 +3321,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Map$Builder", + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2520,7 +3330,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String", + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2529,7 +3339,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Builder", + "name": "com.google.bigtable.admin.v2.Type$Timestamp$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2538,7 +3348,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding", + "name": "com.google.bigtable.admin.v2.UndeleteTableMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2547,7 +3357,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Builder", + "name": "com.google.bigtable.admin.v2.UndeleteTableMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2556,7 +3366,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes", + "name": "com.google.bigtable.admin.v2.UndeleteTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2565,7 +3375,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Bytes$Builder", + "name": "com.google.bigtable.admin.v2.UndeleteTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2574,7 +3384,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw", + "name": "com.google.bigtable.admin.v2.UpdateAppProfileMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2583,7 +3393,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$String$Encoding$Utf8Raw$Builder", + "name": "com.google.bigtable.admin.v2.UpdateAppProfileMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2592,7 +3402,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Struct", + "name": "com.google.bigtable.admin.v2.UpdateAppProfileRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2601,7 +3411,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Struct$Builder", + "name": "com.google.bigtable.admin.v2.UpdateAppProfileRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2610,7 +3420,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Struct$Field", + "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2619,7 +3429,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Struct$Field$Builder", + "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2628,7 +3438,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Timestamp", + "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2637,7 +3447,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.Type$Timestamp$Builder", + "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2646,7 +3456,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UndeleteTableMetadata", + "name": "com.google.bigtable.admin.v2.UpdateBackupRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2655,7 +3465,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UndeleteTableMetadata$Builder", + "name": "com.google.bigtable.admin.v2.UpdateBackupRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2664,7 +3474,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UndeleteTableRequest", + "name": "com.google.bigtable.admin.v2.UpdateClusterMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2673,7 +3483,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UndeleteTableRequest$Builder", + "name": "com.google.bigtable.admin.v2.UpdateClusterMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2682,7 +3492,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAppProfileMetadata", + "name": "com.google.bigtable.admin.v2.UpdateInstanceMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2691,7 +3501,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAppProfileMetadata$Builder", + "name": "com.google.bigtable.admin.v2.UpdateInstanceMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2700,7 +3510,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAppProfileRequest", + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2709,7 +3519,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAppProfileRequest$Builder", + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2718,7 +3528,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata", + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2727,7 +3537,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata$Builder", + "name": "com.google.bigtable.admin.v2.UpdateLogicalViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2736,7 +3546,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest", + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2745,7 +3555,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest$Builder", + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2754,7 +3564,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateBackupRequest", + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2763,7 +3573,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateBackupRequest$Builder", + "name": "com.google.bigtable.admin.v2.UpdateMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2772,7 +3582,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateClusterMetadata", + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2781,7 +3591,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateClusterMetadata$Builder", + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2790,7 +3600,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateInstanceMetadata", + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2799,7 +3609,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.admin.v2.UpdateInstanceMetadata$Builder", + "name": "com.google.bigtable.admin.v2.UpdateSchemaBundleRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3464,6 +4274,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, @@ -3518,6 +4337,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, @@ -3635,6 +4481,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, @@ -3941,6 +4805,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-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.data.v2/reflect-config.json b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.data.v2/reflect-config.json index 800f8d368c..fd3a9f86ff 100644 --- a/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.data.v2/reflect-config.json +++ b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.data.v2/reflect-config.json @@ -1,4 +1,58 @@ [ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ClientLibraryDestination", "queryAllDeclaredConstructors": true, @@ -116,6 +170,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.GoSettings", "queryAllDeclaredConstructors": true, @@ -305,6 +368,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.api.ResourceDescriptor", "queryAllDeclaredConstructors": true, @@ -414,7 +495,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ArrayValue", + "name": "com.google.api.SelectiveGapicGeneration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -423,7 +504,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ArrayValue$Builder", + "name": "com.google.api.SelectiveGapicGeneration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -432,7 +513,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Cell", + "name": "com.google.bigtable.v2.ArrayValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -441,7 +522,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Cell$Builder", + "name": "com.google.bigtable.v2.ArrayValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -450,7 +531,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowRequest", + "name": "com.google.bigtable.v2.AuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -459,7 +540,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowRequest$Builder", + "name": "com.google.bigtable.v2.AuthorizedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -468,7 +549,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowResponse", + "name": "com.google.bigtable.v2.AuthorizedViewResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -477,7 +558,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.CheckAndMutateRowResponse$Builder", + "name": "com.google.bigtable.v2.AuthorizedViewResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -486,7 +567,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Column", + "name": "com.google.bigtable.v2.BackendIdentifier", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -495,7 +576,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Column$Builder", + "name": "com.google.bigtable.v2.BackendIdentifier$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -504,7 +585,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnMetadata", + "name": "com.google.bigtable.v2.Cell", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -513,7 +594,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnMetadata$Builder", + "name": "com.google.bigtable.v2.Cell$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -522,7 +603,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnRange", + "name": "com.google.bigtable.v2.CheckAndMutateRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -531,7 +612,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ColumnRange$Builder", + "name": "com.google.bigtable.v2.CheckAndMutateRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -540,7 +621,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ExecuteQueryRequest", + "name": "com.google.bigtable.v2.CheckAndMutateRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -549,7 +630,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ExecuteQueryRequest$Builder", + "name": "com.google.bigtable.v2.CheckAndMutateRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -558,7 +639,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ExecuteQueryResponse", + "name": "com.google.bigtable.v2.ClientConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -567,7 +648,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ExecuteQueryResponse$Builder", + "name": "com.google.bigtable.v2.ClientConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -576,7 +657,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Family", + "name": "com.google.bigtable.v2.ClientConfiguration$PollingConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -585,7 +666,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Family$Builder", + "name": "com.google.bigtable.v2.ClientConfiguration$PollingConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -594,7 +675,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FeatureFlags", + "name": "com.google.bigtable.v2.CloseSessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -603,7 +684,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FeatureFlags$Builder", + "name": "com.google.bigtable.v2.CloseSessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -612,7 +693,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FullReadStatsView", + "name": "com.google.bigtable.v2.CloseSessionRequest$CloseSessionReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +702,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.FullReadStatsView$Builder", + "name": "com.google.bigtable.v2.ClusterInformation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +711,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest", + "name": "com.google.bigtable.v2.ClusterInformation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +720,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest$Builder", + "name": "com.google.bigtable.v2.Column", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +729,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", + "name": "com.google.bigtable.v2.Column$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +738,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse$Builder", + "name": "com.google.bigtable.v2.ColumnMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +747,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowRequest", + "name": "com.google.bigtable.v2.ColumnMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +756,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowRequest$Builder", + "name": "com.google.bigtable.v2.ColumnRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +765,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowResponse", + "name": "com.google.bigtable.v2.ColumnRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +774,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowResponse$Builder", + "name": "com.google.bigtable.v2.ErrorResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +783,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest", + "name": "com.google.bigtable.v2.ErrorResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +792,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Builder", + "name": "com.google.bigtable.v2.ExecuteQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +801,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Entry", + "name": "com.google.bigtable.v2.ExecuteQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +810,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsRequest$Entry$Builder", + "name": "com.google.bigtable.v2.ExecuteQueryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +819,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse", + "name": "com.google.bigtable.v2.ExecuteQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +828,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Builder", + "name": "com.google.bigtable.v2.Family", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +837,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Entry", + "name": "com.google.bigtable.v2.Family$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +846,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.MutateRowsResponse$Entry$Builder", + "name": "com.google.bigtable.v2.FeatureFlags", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +855,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation", + "name": "com.google.bigtable.v2.FeatureFlags$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +864,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$AddToCell", + "name": "com.google.bigtable.v2.FullReadStatsView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +873,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$AddToCell$Builder", + "name": "com.google.bigtable.v2.FullReadStatsView$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +882,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$Builder", + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +891,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn", + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +900,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn$Builder", + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +909,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily", + "name": "com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +918,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily$Builder", + "name": "com.google.bigtable.v2.GetClientConfigurationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +927,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromRow", + "name": "com.google.bigtable.v2.GetClientConfigurationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +936,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$DeleteFromRow$Builder", + "name": "com.google.bigtable.v2.GoAwayResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +945,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$MergeToCell", + "name": "com.google.bigtable.v2.GoAwayResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +954,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$MergeToCell$Builder", + "name": "com.google.bigtable.v2.HeartbeatResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +963,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$SetCell", + "name": "com.google.bigtable.v2.HeartbeatResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +972,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Mutation$SetCell$Builder", + "name": "com.google.bigtable.v2.Idempotency", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +981,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PartialResultSet", + "name": "com.google.bigtable.v2.Idempotency$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +990,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PartialResultSet$Builder", + "name": "com.google.bigtable.v2.LoadBalancingOptions", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +999,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmRequest", + "name": "com.google.bigtable.v2.LoadBalancingOptions$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +1008,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmRequest$Builder", + "name": "com.google.bigtable.v2.LoadBalancingOptions$LeastInFlight", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmResponse", + "name": "com.google.bigtable.v2.LoadBalancingOptions$LeastInFlight$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.PingAndWarmResponse$Builder", + "name": "com.google.bigtable.v2.LoadBalancingOptions$PeakEwma", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoFormat", + "name": "com.google.bigtable.v2.LoadBalancingOptions$PeakEwma$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoFormat$Builder", + "name": "com.google.bigtable.v2.LoadBalancingOptions$Random", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoRows", + "name": "com.google.bigtable.v2.LoadBalancingOptions$Random$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoRows$Builder", + "name": "com.google.bigtable.v2.MaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoRowsBatch", + "name": "com.google.bigtable.v2.MaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoRowsBatch$Builder", + "name": "com.google.bigtable.v2.MaterializedViewResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoSchema", + "name": "com.google.bigtable.v2.MaterializedViewResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ProtoSchema$Builder", + "name": "com.google.bigtable.v2.MutateRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RateLimitInfo", + "name": "com.google.bigtable.v2.MutateRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RateLimitInfo$Builder", + "name": "com.google.bigtable.v2.MutateRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamRequest", + "name": "com.google.bigtable.v2.MutateRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamRequest$Builder", + "name": "com.google.bigtable.v2.MutateRowsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse", + "name": "com.google.bigtable.v2.MutateRowsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Builder", + "name": "com.google.bigtable.v2.MutateRowsRequest$Entry", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream", + "name": "com.google.bigtable.v2.MutateRowsRequest$Entry$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream$Builder", + "name": "com.google.bigtable.v2.MutateRowsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange", + "name": "com.google.bigtable.v2.MutateRowsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Builder", + "name": "com.google.bigtable.v2.MutateRowsResponse$Entry", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Type", + "name": "com.google.bigtable.v2.MutateRowsResponse$Entry$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat", + "name": "com.google.bigtable.v2.Mutation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat$Builder", + "name": "com.google.bigtable.v2.Mutation$AddToCell", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk", + "name": "com.google.bigtable.v2.Mutation$AddToCell$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$Builder", + "name": "com.google.bigtable.v2.Mutation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo", + "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo$Builder", + "name": "com.google.bigtable.v2.Mutation$DeleteFromColumn$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadIterationStats", + "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadIterationStats$Builder", + "name": "com.google.bigtable.v2.Mutation$DeleteFromFamily$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest", + "name": "com.google.bigtable.v2.Mutation$DeleteFromRow", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest$Builder", + "name": "com.google.bigtable.v2.Mutation$DeleteFromRow$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse", + "name": "com.google.bigtable.v2.Mutation$MergeToCell", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse$Builder", + "name": "com.google.bigtable.v2.Mutation$MergeToCell$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRule", + "name": "com.google.bigtable.v2.Mutation$SetCell", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadModifyWriteRule$Builder", + "name": "com.google.bigtable.v2.Mutation$SetCell$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest", + "name": "com.google.bigtable.v2.OpenAuthorizedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest$Builder", + "name": "com.google.bigtable.v2.OpenAuthorizedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsRequest$RequestStatsView", + "name": "com.google.bigtable.v2.OpenAuthorizedViewRequest$Permission", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse", + "name": "com.google.bigtable.v2.OpenAuthorizedViewResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$Builder", + "name": "com.google.bigtable.v2.OpenAuthorizedViewResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk", + "name": "com.google.bigtable.v2.OpenMaterializedViewRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk$Builder", + "name": "com.google.bigtable.v2.OpenMaterializedViewRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestLatencyStats", + "name": "com.google.bigtable.v2.OpenMaterializedViewRequest$Permission", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestLatencyStats$Builder", + "name": "com.google.bigtable.v2.OpenMaterializedViewResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestStats", + "name": "com.google.bigtable.v2.OpenMaterializedViewResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RequestStats$Builder", + "name": "com.google.bigtable.v2.OpenSessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResponseParams", + "name": "com.google.bigtable.v2.OpenSessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResponseParams$Builder", + "name": "com.google.bigtable.v2.OpenSessionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResultSetMetadata", + "name": "com.google.bigtable.v2.OpenSessionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ResultSetMetadata$Builder", + "name": "com.google.bigtable.v2.OpenTableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Row", + "name": "com.google.bigtable.v2.OpenTableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Row$Builder", + "name": "com.google.bigtable.v2.OpenTableRequest$Permission", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter", + "name": "com.google.bigtable.v2.OpenTableResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Builder", + "name": "com.google.bigtable.v2.OpenTableResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Chain", + "name": "com.google.bigtable.v2.PartialResultSet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Chain$Builder", + "name": "com.google.bigtable.v2.PartialResultSet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Condition", + "name": "com.google.bigtable.v2.PeerInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Condition$Builder", + "name": "com.google.bigtable.v2.PeerInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Interleave", + "name": "com.google.bigtable.v2.PeerInfo$TransportType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowFilter$Interleave$Builder", + "name": "com.google.bigtable.v2.PingAndWarmRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowRange", + "name": "com.google.bigtable.v2.PingAndWarmRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowRange$Builder", + "name": "com.google.bigtable.v2.PingAndWarmResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowSet", + "name": "com.google.bigtable.v2.PingAndWarmResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.RowSet$Builder", + "name": "com.google.bigtable.v2.PrepareQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysRequest", + "name": "com.google.bigtable.v2.PrepareQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysRequest$Builder", + "name": "com.google.bigtable.v2.PrepareQueryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysResponse", + "name": "com.google.bigtable.v2.PrepareQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.SampleRowKeysResponse$Builder", + "name": "com.google.bigtable.v2.ProtoFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationToken", + "name": "com.google.bigtable.v2.ProtoFormat$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationToken$Builder", + "name": "com.google.bigtable.v2.ProtoRows", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationTokens", + "name": "com.google.bigtable.v2.ProtoRows$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamContinuationTokens$Builder", + "name": "com.google.bigtable.v2.ProtoRowsBatch", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamPartition", + "name": "com.google.bigtable.v2.ProtoRowsBatch$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.StreamPartition$Builder", + "name": "com.google.bigtable.v2.ProtoSchema", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.TimestampRange", + "name": "com.google.bigtable.v2.ProtoSchema$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.TimestampRange$Builder", + "name": "com.google.bigtable.v2.RateLimitInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type", + "name": "com.google.bigtable.v2.RateLimitInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate", + "name": "com.google.bigtable.v2.ReadChangeStreamRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Max", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Max$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$CloseStream$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Min", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Min$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Sum", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$DataChange$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Aggregate$Sum$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Array", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$Heartbeat$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Array$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bool", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bool$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Builder", + "name": "com.google.bigtable.v2.ReadChangeStreamResponse$MutationChunk$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes", + "name": "com.google.bigtable.v2.ReadIterationStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes$Builder", + "name": "com.google.bigtable.v2.ReadIterationStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes$Encoding", + "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw", + "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Date", + "name": "com.google.bigtable.v2.ReadModifyWriteRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Date$Builder", + "name": "com.google.bigtable.v2.ReadModifyWriteRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Float32", + "name": "com.google.bigtable.v2.ReadRowsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Float32$Builder", + "name": "com.google.bigtable.v2.ReadRowsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Float64", + "name": "com.google.bigtable.v2.ReadRowsRequest$RequestStatsView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Float64$Builder", + "name": "com.google.bigtable.v2.ReadRowsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64", + "name": "com.google.bigtable.v2.ReadRowsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64$Builder", + "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64$Encoding", + "name": "com.google.bigtable.v2.ReadRowsResponse$CellChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes", + "name": "com.google.bigtable.v2.RequestLatencyStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes$Builder", + "name": "com.google.bigtable.v2.RequestLatencyStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Int64$Encoding$Builder", + "name": "com.google.bigtable.v2.RequestStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Map", + "name": "com.google.bigtable.v2.RequestStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Map$Builder", + "name": "com.google.bigtable.v2.ResponseParams", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String", + "name": "com.google.bigtable.v2.ResponseParams$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Builder", + "name": "com.google.bigtable.v2.ResultSetMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding", + "name": "com.google.bigtable.v2.ResultSetMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding$Builder", + "name": "com.google.bigtable.v2.Row", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes", + "name": "com.google.bigtable.v2.Row$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes$Builder", + "name": "com.google.bigtable.v2.RowFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Raw", + "name": "com.google.bigtable.v2.RowFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Raw$Builder", + "name": "com.google.bigtable.v2.RowFilter$Chain", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Struct", + "name": "com.google.bigtable.v2.RowFilter$Chain$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Struct$Builder", + "name": "com.google.bigtable.v2.RowFilter$Condition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Struct$Field", + "name": "com.google.bigtable.v2.RowFilter$Condition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Struct$Field$Builder", + "name": "com.google.bigtable.v2.RowFilter$Interleave", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2133,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Timestamp", + "name": "com.google.bigtable.v2.RowFilter$Interleave$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2142,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Type$Timestamp$Builder", + "name": "com.google.bigtable.v2.RowRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2151,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Value", + "name": "com.google.bigtable.v2.RowRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2160,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.Value$Builder", + "name": "com.google.bigtable.v2.RowSet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2169,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ValueRange", + "name": "com.google.bigtable.v2.RowSet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2178,7 @@ "allPublicClasses": true }, { - "name": "com.google.bigtable.v2.ValueRange$Builder", + "name": "com.google.bigtable.v2.SampleRowKeysRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2187,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.Any", + "name": "com.google.bigtable.v2.SampleRowKeysRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2196,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.Any$Builder", + "name": "com.google.bigtable.v2.SampleRowKeysResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2124,7 +2205,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.BoolValue", + "name": "com.google.bigtable.v2.SampleRowKeysResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2133,7 +2214,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.BoolValue$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2142,7 +2223,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.BytesValue", + "name": "com.google.bigtable.v2.SessionClientConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2151,7 +2232,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.BytesValue$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2160,7 +2241,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2169,7 +2250,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$CloudPathOnly", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2178,7 +2259,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$CloudPathOnly$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2187,7 +2268,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$DirectAccessOnly", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2196,7 +2277,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$DirectAccessOnly$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2205,7 +2286,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$DirectAccessWithFallback", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2214,7 +2295,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$Edition", + "name": "com.google.bigtable.v2.SessionClientConfiguration$ChannelPoolConfiguration$DirectAccessWithFallback$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2223,7 +2304,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "name": "com.google.bigtable.v2.SessionClientConfiguration$SessionPoolConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2232,7 +2313,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "name": "com.google.bigtable.v2.SessionClientConfiguration$SessionPoolConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2241,7 +2322,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "name": "com.google.bigtable.v2.SessionMutateRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2250,7 +2331,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "name": "com.google.bigtable.v2.SessionMutateRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2259,7 +2340,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "name": "com.google.bigtable.v2.SessionMutateRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2268,7 +2349,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "name": "com.google.bigtable.v2.SessionMutateRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2277,7 +2358,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "name": "com.google.bigtable.v2.SessionParametersResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2286,7 +2367,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "name": "com.google.bigtable.v2.SessionParametersResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2295,7 +2376,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "name": "com.google.bigtable.v2.SessionReadRowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2304,7 +2385,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "name": "com.google.bigtable.v2.SessionReadRowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2313,7 +2394,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "name": "com.google.bigtable.v2.SessionReadRowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2322,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "name": "com.google.bigtable.v2.SessionReadRowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2331,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "name": "com.google.bigtable.v2.SessionRefreshConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2340,7 +2421,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "name": "com.google.bigtable.v2.SessionRefreshConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2349,7 +2430,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "name": "com.google.bigtable.v2.SessionRefreshConfig$Metadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2358,7 +2439,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "name": "com.google.bigtable.v2.SessionRefreshConfig$Metadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2367,7 +2448,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "name": "com.google.bigtable.v2.SessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2376,7 +2457,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "name": "com.google.bigtable.v2.SessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2385,7 +2466,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "name": "com.google.bigtable.v2.SessionRequestStats", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2394,7 +2475,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "name": "com.google.bigtable.v2.SessionRequestStats$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2403,7 +2484,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "name": "com.google.bigtable.v2.SessionResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2412,7 +2493,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "name": "com.google.bigtable.v2.SessionResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2421,7 +2502,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "name": "com.google.bigtable.v2.SessionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2430,7 +2511,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "name": "com.google.bigtable.v2.StreamContinuationToken", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2439,7 +2520,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "name": "com.google.bigtable.v2.StreamContinuationToken$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2448,7 +2529,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "name": "com.google.bigtable.v2.StreamContinuationTokens", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2457,7 +2538,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "name": "com.google.bigtable.v2.StreamContinuationTokens$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2466,7 +2547,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "name": "com.google.bigtable.v2.StreamPartition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2475,7 +2556,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "name": "com.google.bigtable.v2.StreamPartition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2484,7 +2565,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "name": "com.google.bigtable.v2.TableRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2493,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "name": "com.google.bigtable.v2.TableRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2502,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "name": "com.google.bigtable.v2.TableResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2511,7 +2592,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "name": "com.google.bigtable.v2.TableResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2520,7 +2601,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "name": "com.google.bigtable.v2.TelemetryConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2529,7 +2610,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "name": "com.google.bigtable.v2.TelemetryConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2538,7 +2619,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "name": "com.google.bigtable.v2.TelemetryConfiguration$Level", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2547,7 +2628,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "name": "com.google.bigtable.v2.TimestampRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2556,7 +2637,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "name": "com.google.bigtable.v2.TimestampRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2565,7 +2646,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "name": "com.google.bigtable.v2.Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2574,7 +2655,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "name": "com.google.bigtable.v2.Type$Aggregate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2583,7 +2664,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2592,7 +2673,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2601,7 +2682,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$HyperLogLogPlusPlusUniqueCount$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2610,7 +2691,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "name": "com.google.bigtable.v2.Type$Aggregate$Max", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2619,7 +2700,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Max$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2628,7 +2709,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "name": "com.google.bigtable.v2.Type$Aggregate$Min", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2637,7 +2718,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "name": "com.google.bigtable.v2.Type$Aggregate$Min$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2646,7 +2727,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "name": "com.google.bigtable.v2.Type$Aggregate$Sum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2655,7 +2736,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "name": "com.google.bigtable.v2.Type$Aggregate$Sum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2664,7 +2745,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "name": "com.google.bigtable.v2.Type$Array", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2673,7 +2754,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "name": "com.google.bigtable.v2.Type$Array$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2682,7 +2763,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "name": "com.google.bigtable.v2.Type$Bool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2691,7 +2772,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "name": "com.google.bigtable.v2.Type$Bool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2700,7 +2781,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "name": "com.google.bigtable.v2.Type$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2709,7 +2790,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "name": "com.google.bigtable.v2.Type$Bytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2718,7 +2799,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "name": "com.google.bigtable.v2.Type$Bytes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2727,7 +2808,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2736,7 +2817,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2745,7 +2826,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2754,7 +2835,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "name": "com.google.bigtable.v2.Type$Bytes$Encoding$Raw$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2763,7 +2844,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "name": "com.google.bigtable.v2.Type$Date", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2772,7 +2853,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "name": "com.google.bigtable.v2.Type$Date$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2781,7 +2862,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "name": "com.google.bigtable.v2.Type$Enum", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2790,7 +2871,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "name": "com.google.bigtable.v2.Type$Enum$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2799,7 +2880,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "name": "com.google.bigtable.v2.Type$Float32", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2808,7 +2889,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "name": "com.google.bigtable.v2.Type$Float32$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2817,7 +2898,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "name": "com.google.bigtable.v2.Type$Float64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2826,7 +2907,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "name": "com.google.bigtable.v2.Type$Float64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2835,7 +2916,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "name": "com.google.bigtable.v2.Type$Int64", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2844,7 +2925,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "name": "com.google.bigtable.v2.Type$Int64$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2853,7 +2934,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "name": "com.google.bigtable.v2.Type$Int64$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2862,7 +2943,7 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2871,7 +2952,1213 @@ "allPublicClasses": true }, { - "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "name": "com.google.bigtable.v2.Type$Int64$Encoding$BigEndianBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Int64$Encoding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Int64$Encoding$OrderedCodeBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Int64$Encoding$OrderedCodeBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Map", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Map$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Proto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Proto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Bytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Raw", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$String$Encoding$Utf8Raw$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$DelimitedBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$DelimitedBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$OrderedCodeBytes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$OrderedCodeBytes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$Singleton", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Encoding$Singleton$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Field", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Struct$Field$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Timestamp$Encoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Type$Timestamp$Encoding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ValueRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.ValueRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcRequest$Metadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcRequest$Metadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.bigtable.v2.VirtualRpcResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "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, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "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, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "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, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3050,6 +4337,258 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.rpc.BadRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.BadRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.BadRequest$FieldViolation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.BadRequest$FieldViolation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.DebugInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.DebugInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.ErrorInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.ErrorInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Help", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Help$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Help$Link", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Help$Link$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.LocalizedMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.LocalizedMessage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.PreconditionFailure", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.PreconditionFailure$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.PreconditionFailure$Violation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.PreconditionFailure$Violation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.QuotaFailure", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.QuotaFailure$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.QuotaFailure$Violation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.QuotaFailure$Violation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.RequestInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.RequestInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.ResourceInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.ResourceInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.RetryInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.RetryInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.rpc.Status", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-bigtable/src/main/resources/bigtable-default-client-config.textproto b/google-cloud-bigtable/src/main/resources/bigtable-default-client-config.textproto new file mode 100644 index 0000000000..44306311bb --- /dev/null +++ b/google-cloud-bigtable/src/main/resources/bigtable-default-client-config.textproto @@ -0,0 +1,49 @@ +# proto-file: google/bigtable/v2/bigtable.proto +# proto-message: google.bigtable.v2.ClientConfiguration + +polling_configuration { + polling_interval { + seconds: 300 + } + validity_duration { + seconds: 315576000000 + } + max_rpc_retry_count: 5 +} + +session_configuration { + session_load: 0 + + channel_configuration { + min_server_count: 2 + max_server_count: 25 + per_server_session_count: 10 + direct_access_with_fallback { + check_interval { + seconds: 60 + } + error_rate_threshold: 0.8 + } + } + + session_pool_configuration { + headroom: 0.5 + min_session_count: 5 + max_session_count: 400 + new_session_creation_budget: 50 + new_session_creation_penalty { + seconds: 60 + } + consecutive_session_failure_threshold: 10 + new_session_queue_length: 10 + load_balancing_options { + least_in_flight { + random_subset_size: 0 + } + } + } +} + +telemetry_configuration { + debug_tag_level: WARN +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/VersionTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/VersionTest.java index e07f7a4a5a..2ee9d40140 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/VersionTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/VersionTest.java @@ -26,7 +26,7 @@ public class VersionTest { @Test public void testVersion() { - assertThat(Version.VERSION).matches("\\d+\\.\\d+\\.\\d(?:-SNAPSHOT)?"); + assertThat(Version.VERSION).matches("\\d+\\.\\d+\\.\\d(?:-session)?(?:-SNAPSHOT)?"); assertThat(Version.VERSION).isGreaterThan("1.22.0"); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java index 777f0f7cbd..d99725029d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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,8 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -35,12 +37,18 @@ import com.google.bigtable.admin.v2.CreateAppProfileRequest; import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.HotTablet; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.InstanceName; @@ -52,12 +60,22 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; import com.google.bigtable.admin.v2.LocationName; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.LogicalViewName; +import com.google.bigtable.admin.v2.MaterializedView; +import com.google.bigtable.admin.v2.MaterializedViewName; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; import com.google.bigtable.admin.v2.ProjectName; import com.google.bigtable.admin.v2.StorageType; import com.google.bigtable.admin.v2.UpdateAppProfileRequest; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; import com.google.iam.v1.Binding; @@ -138,6 +156,8 @@ public void createInstanceTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -198,6 +218,8 @@ public void createInstanceTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -258,6 +280,8 @@ public void getInstanceTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -300,6 +324,8 @@ public void getInstanceTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -422,6 +448,8 @@ public void updateInstanceTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -432,6 +460,8 @@ public void updateInstanceTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); Instance actualResponse = client.updateInstance(request); @@ -448,6 +478,8 @@ public void updateInstanceTest() throws Exception { Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); Assert.assertEquals(request.getCreateTime(), actualRequest.getCreateTime()); Assert.assertEquals(request.getSatisfiesPzs(), actualRequest.getSatisfiesPzs()); + Assert.assertEquals(request.getSatisfiesPzi(), actualRequest.getSatisfiesPzi()); + Assert.assertEquals(request.getTagsMap(), actualRequest.getTagsMap()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -467,6 +499,8 @@ public void updateInstanceExceptionTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); client.updateInstance(request); Assert.fail("No exception raised"); @@ -484,6 +518,8 @@ public void partialUpdateInstanceTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .putAllTags(new HashMap()) .build(); Operation resultOperation = Operation.newBuilder() @@ -911,6 +947,7 @@ public void updateClusterTest() throws Exception { Assert.assertEquals(request.getLocation(), actualRequest.getLocation()); Assert.assertEquals(request.getState(), actualRequest.getState()); Assert.assertEquals(request.getServeNodes(), actualRequest.getServeNodes()); + Assert.assertEquals(request.getNodeScalingFactor(), actualRequest.getNodeScalingFactor()); Assert.assertEquals(request.getClusterConfig(), actualRequest.getClusterConfig()); Assert.assertEquals(request.getDefaultStorageType(), actualRequest.getDefaultStorageType()); Assert.assertEquals(request.getEncryptionConfig(), actualRequest.getEncryptionConfig()); @@ -1444,6 +1481,80 @@ public void deleteAppProfileExceptionTest2() throws Exception { } } + @Test + public void deleteAppProfileTest3() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + boolean ignoreWarnings = true; + + client.deleteAppProfile(name, ignoreWarnings); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAppProfileRequest actualRequest = ((DeleteAppProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(ignoreWarnings, actualRequest.getIgnoreWarnings()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAppProfileExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]"); + boolean ignoreWarnings = true; + client.deleteAppProfile(name, ignoreWarnings); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAppProfileTest4() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + boolean ignoreWarnings = true; + + client.deleteAppProfile(name, ignoreWarnings); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAppProfileRequest actualRequest = ((DeleteAppProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(ignoreWarnings, actualRequest.getIgnoreWarnings()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAppProfileExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + boolean ignoreWarnings = true; + client.deleteAppProfile(name, ignoreWarnings); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getIamPolicyTest() throws Exception { Policy expectedResponse = @@ -1779,4 +1890,830 @@ public void listHotTabletsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void createLogicalViewTest() throws Exception { + LogicalView expectedResponse = + LogicalView.newBuilder() + .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLogicalViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + LogicalView logicalView = LogicalView.newBuilder().build(); + String logicalViewId = "logicalViewId-1408054263"; + + LogicalView actualResponse = + client.createLogicalViewAsync(parent, logicalView, logicalViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLogicalViewRequest actualRequest = ((CreateLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(logicalView, actualRequest.getLogicalView()); + Assert.assertEquals(logicalViewId, actualRequest.getLogicalViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLogicalViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + LogicalView logicalView = LogicalView.newBuilder().build(); + String logicalViewId = "logicalViewId-1408054263"; + client.createLogicalViewAsync(parent, logicalView, logicalViewId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createLogicalViewTest2() throws Exception { + LogicalView expectedResponse = + LogicalView.newBuilder() + .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createLogicalViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + LogicalView logicalView = LogicalView.newBuilder().build(); + String logicalViewId = "logicalViewId-1408054263"; + + LogicalView actualResponse = + client.createLogicalViewAsync(parent, logicalView, logicalViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLogicalViewRequest actualRequest = ((CreateLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(logicalView, actualRequest.getLogicalView()); + Assert.assertEquals(logicalViewId, actualRequest.getLogicalViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLogicalViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + LogicalView logicalView = LogicalView.newBuilder().build(); + String logicalViewId = "logicalViewId-1408054263"; + client.createLogicalViewAsync(parent, logicalView, logicalViewId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getLogicalViewTest() throws Exception { + LogicalView expectedResponse = + LogicalView.newBuilder() + .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]"); + + LogicalView actualResponse = client.getLogicalView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalViewRequest actualRequest = ((GetLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]"); + client.getLogicalView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalViewTest2() throws Exception { + LogicalView expectedResponse = + LogicalView.newBuilder() + .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + LogicalView actualResponse = client.getLogicalView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalViewRequest actualRequest = ((GetLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.getLogicalView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalViewsTest() throws Exception { + LogicalView responsesElement = LogicalView.newBuilder().build(); + ListLogicalViewsResponse expectedResponse = + ListLogicalViewsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalViews(Arrays.asList(responsesElement)) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListLogicalViewsPagedResponse pagedListResponse = client.listLogicalViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalViewsList().get(0), resources.get(0)); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLogicalViewsRequest actualRequest = ((ListLogicalViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLogicalViewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listLogicalViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalViewsTest2() throws Exception { + LogicalView responsesElement = LogicalView.newBuilder().build(); + ListLogicalViewsResponse expectedResponse = + ListLogicalViewsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalViews(Arrays.asList(responsesElement)) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLogicalViewsPagedResponse pagedListResponse = client.listLogicalViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalViewsList().get(0), resources.get(0)); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLogicalViewsRequest actualRequest = ((ListLogicalViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLogicalViewsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLogicalViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateLogicalViewTest() throws Exception { + LogicalView expectedResponse = + LogicalView.newBuilder() + .setName(LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]").toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateLogicalViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + LogicalView logicalView = LogicalView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + LogicalView actualResponse = client.updateLogicalViewAsync(logicalView, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateLogicalViewRequest actualRequest = ((UpdateLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(logicalView, actualRequest.getLogicalView()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateLogicalViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + LogicalView logicalView = LogicalView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLogicalViewAsync(logicalView, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteLogicalViewTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]"); + + client.deleteLogicalView(name); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLogicalViewRequest actualRequest = ((DeleteLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLogicalViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + LogicalViewName name = LogicalViewName.of("[PROJECT]", "[INSTANCE]", "[LOGICAL_VIEW]"); + client.deleteLogicalView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteLogicalViewTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteLogicalView(name); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteLogicalViewRequest actualRequest = ((DeleteLogicalViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteLogicalViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.deleteLogicalView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMaterializedViewTest() throws Exception { + MaterializedView expectedResponse = + MaterializedView.newBuilder() + .setName( + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]") + .toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMaterializedViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + MaterializedView materializedView = MaterializedView.newBuilder().build(); + String materializedViewId = "materializedViewId682270903"; + + MaterializedView actualResponse = + client.createMaterializedViewAsync(parent, materializedView, materializedViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMaterializedViewRequest actualRequest = + ((CreateMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(materializedView, actualRequest.getMaterializedView()); + Assert.assertEquals(materializedViewId, actualRequest.getMaterializedViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMaterializedViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + MaterializedView materializedView = MaterializedView.newBuilder().build(); + String materializedViewId = "materializedViewId682270903"; + client.createMaterializedViewAsync(parent, materializedView, materializedViewId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createMaterializedViewTest2() throws Exception { + MaterializedView expectedResponse = + MaterializedView.newBuilder() + .setName( + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]") + .toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMaterializedViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + MaterializedView materializedView = MaterializedView.newBuilder().build(); + String materializedViewId = "materializedViewId682270903"; + + MaterializedView actualResponse = + client.createMaterializedViewAsync(parent, materializedView, materializedViewId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMaterializedViewRequest actualRequest = + ((CreateMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(materializedView, actualRequest.getMaterializedView()); + Assert.assertEquals(materializedViewId, actualRequest.getMaterializedViewId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMaterializedViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + MaterializedView materializedView = MaterializedView.newBuilder().build(); + String materializedViewId = "materializedViewId682270903"; + client.createMaterializedViewAsync(parent, materializedView, materializedViewId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getMaterializedViewTest() throws Exception { + MaterializedView expectedResponse = + MaterializedView.newBuilder() + .setName( + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]") + .toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + MaterializedViewName name = + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]"); + + MaterializedView actualResponse = client.getMaterializedView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMaterializedViewRequest actualRequest = ((GetMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMaterializedViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + MaterializedViewName name = + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]"); + client.getMaterializedView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMaterializedViewTest2() throws Exception { + MaterializedView expectedResponse = + MaterializedView.newBuilder() + .setName( + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]") + .toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + MaterializedView actualResponse = client.getMaterializedView(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMaterializedViewRequest actualRequest = ((GetMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMaterializedViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.getMaterializedView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMaterializedViewsTest() throws Exception { + MaterializedView responsesElement = MaterializedView.newBuilder().build(); + ListMaterializedViewsResponse expectedResponse = + ListMaterializedViewsResponse.newBuilder() + .setNextPageToken("") + .addAllMaterializedViews(Arrays.asList(responsesElement)) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + ListMaterializedViewsPagedResponse pagedListResponse = client.listMaterializedViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMaterializedViewsList().get(0), resources.get(0)); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMaterializedViewsRequest actualRequest = + ((ListMaterializedViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMaterializedViewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.listMaterializedViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMaterializedViewsTest2() throws Exception { + MaterializedView responsesElement = MaterializedView.newBuilder().build(); + ListMaterializedViewsResponse expectedResponse = + ListMaterializedViewsResponse.newBuilder() + .setNextPageToken("") + .addAllMaterializedViews(Arrays.asList(responsesElement)) + .build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMaterializedViewsPagedResponse pagedListResponse = client.listMaterializedViews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMaterializedViewsList().get(0), resources.get(0)); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMaterializedViewsRequest actualRequest = + ((ListMaterializedViewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMaterializedViewsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMaterializedViews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateMaterializedViewTest() throws Exception { + MaterializedView expectedResponse = + MaterializedView.newBuilder() + .setName( + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]") + .toString()) + .setQuery("query107944136") + .setEtag("etag3123477") + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMaterializedViewTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableInstanceAdmin.addResponse(resultOperation); + + MaterializedView materializedView = MaterializedView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MaterializedView actualResponse = + client.updateMaterializedViewAsync(materializedView, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMaterializedViewRequest actualRequest = + ((UpdateMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(materializedView, actualRequest.getMaterializedView()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMaterializedViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + MaterializedView materializedView = MaterializedView.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateMaterializedViewAsync(materializedView, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteMaterializedViewTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + MaterializedViewName name = + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]"); + + client.deleteMaterializedView(name); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMaterializedViewRequest actualRequest = + ((DeleteMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMaterializedViewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + MaterializedViewName name = + MaterializedViewName.of("[PROJECT]", "[INSTANCE]", "[MATERIALIZED_VIEW]"); + client.deleteMaterializedView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteMaterializedViewTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableInstanceAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteMaterializedView(name); + + List actualRequests = mockBigtableInstanceAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMaterializedViewRequest actualRequest = + ((DeleteMaterializedViewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMaterializedViewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableInstanceAdmin.addException(exception); + + try { + String name = "name3373707"; + client.deleteMaterializedView(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java index 95cd5022ff..9f5a50c41e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse; import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; @@ -42,10 +43,12 @@ import com.google.bigtable.admin.v2.CopyBackupRequest; import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -54,6 +57,7 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.InstanceName; @@ -61,6 +65,8 @@ import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; @@ -68,14 +74,19 @@ import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreInfo; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; +import com.google.bigtable.admin.v2.SchemaBundleName; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotName; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; import com.google.bigtable.admin.v2.TableName; +import com.google.bigtable.admin.v2.TieredStorageConfig; +import com.google.bigtable.admin.v2.Type; import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; @@ -156,6 +167,8 @@ public void createTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -205,6 +218,8 @@ public void createTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -254,6 +269,8 @@ public void createTableFromSnapshotTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -315,6 +332,8 @@ public void createTableFromSnapshotTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -374,6 +393,8 @@ public void createTableFromSnapshotTest3() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -435,6 +456,8 @@ public void createTableFromSnapshotTest4() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -582,6 +605,8 @@ public void getTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -625,6 +650,8 @@ public void getTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -668,6 +695,8 @@ public void updateTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -790,6 +819,8 @@ public void undeleteTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -841,6 +872,8 @@ public void undeleteTableTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1309,6 +1342,8 @@ public void modifyColumnFamiliesTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -1356,6 +1391,8 @@ public void modifyColumnFamiliesTest2() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -2511,6 +2548,8 @@ public void restoreTableTest() throws Exception { .setRestoreInfo(RestoreInfo.newBuilder().build()) .setChangeStreamConfig(ChangeStreamConfig.newBuilder().build()) .setDeletionProtection(true) + .setTieredStorageConfig(TieredStorageConfig.newBuilder().build()) + .setRowKeySchema(Type.Struct.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2829,7 +2868,8 @@ public void getIamPolicyTest() throws Exception { .build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); Policy actualResponse = client.getIamPolicy(resource); Assert.assertEquals(expectedResponse, actualResponse); @@ -2851,7 +2891,8 @@ public void getIamPolicyExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); client.getIamPolicy(resource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -2911,7 +2952,8 @@ public void setIamPolicyTest() throws Exception { .build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); Policy policy = Policy.newBuilder().build(); Policy actualResponse = client.setIamPolicy(resource, policy); @@ -2935,7 +2977,8 @@ public void setIamPolicyExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); Policy policy = Policy.newBuilder().build(); client.setIamPolicy(resource, policy); Assert.fail("No exception raised"); @@ -2994,7 +3037,8 @@ public void testIamPermissionsTest() throws Exception { TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); mockBigtableTableAdmin.addResponse(expectedResponse); - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); List permissions = new ArrayList<>(); TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); @@ -3018,7 +3062,8 @@ public void testIamPermissionsExceptionTest() throws Exception { mockBigtableTableAdmin.addException(exception); try { - ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]"); + ResourceName resource = + AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]"); List permissions = new ArrayList<>(); client.testIamPermissions(resource, permissions); Assert.fail("No exception raised"); @@ -3065,4 +3110,410 @@ public void testIamPermissionsExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void createSchemaBundleTest() throws Exception { + SchemaBundle expectedResponse = + SchemaBundle.newBuilder() + .setName( + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]") + .toString()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaBundleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + String schemaBundleId = "schemaBundleId2039843326"; + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + + SchemaBundle actualResponse = + client.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSchemaBundleRequest actualRequest = ((CreateSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(schemaBundleId, actualRequest.getSchemaBundleId()); + Assert.assertEquals(schemaBundle, actualRequest.getSchemaBundle()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSchemaBundleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + String schemaBundleId = "schemaBundleId2039843326"; + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + client.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createSchemaBundleTest2() throws Exception { + SchemaBundle expectedResponse = + SchemaBundle.newBuilder() + .setName( + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]") + .toString()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSchemaBundleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + String parent = "parent-995424086"; + String schemaBundleId = "schemaBundleId2039843326"; + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + + SchemaBundle actualResponse = + client.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSchemaBundleRequest actualRequest = ((CreateSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(schemaBundleId, actualRequest.getSchemaBundleId()); + Assert.assertEquals(schemaBundle, actualRequest.getSchemaBundle()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSchemaBundleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + String schemaBundleId = "schemaBundleId2039843326"; + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + client.createSchemaBundleAsync(parent, schemaBundleId, schemaBundle).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateSchemaBundleTest() throws Exception { + SchemaBundle expectedResponse = + SchemaBundle.newBuilder() + .setName( + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]") + .toString()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSchemaBundleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SchemaBundle actualResponse = client.updateSchemaBundleAsync(schemaBundle, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSchemaBundleRequest actualRequest = ((UpdateSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(schemaBundle, actualRequest.getSchemaBundle()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSchemaBundleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + SchemaBundle schemaBundle = SchemaBundle.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSchemaBundleAsync(schemaBundle, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getSchemaBundleTest() throws Exception { + SchemaBundle expectedResponse = + SchemaBundle.newBuilder() + .setName( + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]") + .toString()) + .setEtag("etag3123477") + .build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + SchemaBundleName name = + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]"); + + SchemaBundle actualResponse = client.getSchemaBundle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSchemaBundleRequest actualRequest = ((GetSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSchemaBundleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + SchemaBundleName name = + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]"); + client.getSchemaBundle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSchemaBundleTest2() throws Exception { + SchemaBundle expectedResponse = + SchemaBundle.newBuilder() + .setName( + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]") + .toString()) + .setEtag("etag3123477") + .build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + SchemaBundle actualResponse = client.getSchemaBundle(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSchemaBundleRequest actualRequest = ((GetSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSchemaBundleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + String name = "name3373707"; + client.getSchemaBundle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemaBundlesTest() throws Exception { + SchemaBundle responsesElement = SchemaBundle.newBuilder().build(); + ListSchemaBundlesResponse expectedResponse = + ListSchemaBundlesResponse.newBuilder() + .setNextPageToken("") + .addAllSchemaBundles(Arrays.asList(responsesElement)) + .build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + + ListSchemaBundlesPagedResponse pagedListResponse = client.listSchemaBundles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemaBundlesList().get(0), resources.get(0)); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchemaBundlesRequest actualRequest = ((ListSchemaBundlesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchemaBundlesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); + client.listSchemaBundles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchemaBundlesTest2() throws Exception { + SchemaBundle responsesElement = SchemaBundle.newBuilder().build(); + ListSchemaBundlesResponse expectedResponse = + ListSchemaBundlesResponse.newBuilder() + .setNextPageToken("") + .addAllSchemaBundles(Arrays.asList(responsesElement)) + .build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSchemaBundlesPagedResponse pagedListResponse = client.listSchemaBundles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchemaBundlesList().get(0), resources.get(0)); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchemaBundlesRequest actualRequest = ((ListSchemaBundlesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchemaBundlesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSchemaBundles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSchemaBundleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + SchemaBundleName name = + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]"); + + client.deleteSchemaBundle(name); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSchemaBundleRequest actualRequest = ((DeleteSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSchemaBundleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + SchemaBundleName name = + SchemaBundleName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[SCHEMA_BUNDLE]"); + client.deleteSchemaBundle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSchemaBundleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBigtableTableAdmin.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteSchemaBundle(name); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSchemaBundleRequest actualRequest = ((DeleteSchemaBundleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSchemaBundleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + String name = "name3373707"; + client.deleteSchemaBundle(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java index d8522db71a..84ff973033 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java @@ -40,6 +40,10 @@ import com.google.cloud.Role; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListLogicalViewsPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AppProfile; import com.google.cloud.bigtable.admin.v2.models.AppProfile.MultiClusterRoutingPolicy; @@ -50,12 +54,19 @@ import com.google.cloud.bigtable.admin.v2.models.CreateAppProfileRequest; import com.google.cloud.bigtable.admin.v2.models.CreateClusterRequest; import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.models.Instance; +import com.google.cloud.bigtable.admin.v2.models.LogicalView; +import com.google.cloud.bigtable.admin.v2.models.MaterializedView; import com.google.cloud.bigtable.admin.v2.models.PartialListClustersException; import com.google.cloud.bigtable.admin.v2.models.PartialListInstancesException; +import com.google.cloud.bigtable.admin.v2.models.StaticClusterSize; import com.google.cloud.bigtable.admin.v2.models.StorageType; import com.google.cloud.bigtable.admin.v2.models.UpdateAppProfileRequest; import com.google.cloud.bigtable.admin.v2.models.UpdateInstanceRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateMaterializedViewRequest; import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStub; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -65,7 +76,10 @@ import com.google.protobuf.FieldMask; import io.grpc.Status; import io.grpc.Status.Code; +import java.nio.charset.StandardCharsets; import java.util.List; +import java.util.Set; +import java.util.TreeSet; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Before; @@ -82,12 +96,12 @@ import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; -@RunWith(JUnit4.class) /** * Tests for {@link BigtableInstanceAdminClient}. This test class uses Mockito so it has been * explicitly excluded from Native Image testing by not following the naming convention of (IT* and * *ClientTest). */ +@RunWith(JUnit4.class) public class BigtableInstanceAdminClientTests { @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN); @@ -95,6 +109,8 @@ public class BigtableInstanceAdminClientTests { private static final String INSTANCE_ID = "my-instance"; private static final String CLUSTER_ID = "my-cluster"; private static final String APP_PROFILE_ID = "my-app-profile"; + private static final String MATERIALIZED_VIEW_ID = "my-materialized-view"; + private static final String LOGICAL_VIEW_ID = "my-logical-view"; private static final String PROJECT_NAME = NameUtil.formatProjectName(PROJECT_ID); private static final String INSTANCE_NAME = NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID); @@ -102,6 +118,10 @@ public class BigtableInstanceAdminClientTests { NameUtil.formatClusterName(PROJECT_ID, INSTANCE_ID, CLUSTER_ID); private static final String APP_PROFILE_NAME = NameUtil.formatAppProfileName(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); + private static final String MATERIALIZED_VIEW_NAME = + NameUtil.formatMaterializedViewName(PROJECT_ID, INSTANCE_ID, MATERIALIZED_VIEW_ID); + private static final String LOGICAL_VIEW_NAME = + NameUtil.formatLogicalViewName(PROJECT_ID, INSTANCE_ID, LOGICAL_VIEW_ID); private BigtableInstanceAdminClient adminClient; @@ -229,6 +249,65 @@ public class BigtableInstanceAdminClientTests { com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> mockTestIamPermissionsCallable; + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata> + mockCreateMaterializedViewCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.GetMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView> + mockGetMaterializedViewCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.ListMaterializedViewsRequest, + ListMaterializedViewsPagedResponse> + mockListMaterializedViewsCallable; + + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata> + mockUpdateMaterializedViewCallable; + + @Mock + private UnaryCallable + mockDeleteMaterializedViewCallable; + + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.CreateLogicalViewMetadata> + mockCreateLogicalViewCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.GetLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView> + mockGetLogicalViewCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.ListLogicalViewsRequest, ListLogicalViewsPagedResponse> + mockListLogicalViewsCallable; + + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata> + mockUpdateLogicalViewCallable; + + @Mock + private UnaryCallable + mockDeleteLogicalViewCallable; + @Before public void setUp() { adminClient = BigtableInstanceAdminClient.create(PROJECT_ID, mockStub); @@ -546,7 +625,7 @@ public void testCreateCluster() { adminClient.createCluster( CreateClusterRequest.of(INSTANCE_ID, CLUSTER_ID) .setZone("us-east1-c") - .setServeNodes(3) + .setScalingMode(StaticClusterSize.of(3)) .setStorageType(StorageType.SSD)); // Verify assertThat(actualResult).isEqualTo(Cluster.fromProto(expectedResponse)); @@ -1034,6 +1113,160 @@ public void testCreateAppProfileAddPriority() { assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); } + @Test + public void testCreateAppProfileAddRowAffinity() { + // Setup + Mockito.when(mockStub.createAppProfileCallable()).thenReturn(mockCreateAppProfileCallable); + + com.google.bigtable.admin.v2.CreateAppProfileRequest expectedRequest = + com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .setAppProfile( + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .newBuilder() + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build()))) + .build(); + + com.google.bigtable.admin.v2.AppProfile expectedResponse = + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName(APP_PROFILE_NAME) + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build())) + .build(); + + Mockito.when(mockCreateAppProfileCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + AppProfile actualResult = + adminClient.createAppProfile( + CreateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) + .setDescription("my description") + .setRoutingPolicy(MultiClusterRoutingPolicy.withRowAffinity())); + + // Verify + assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); + } + + @Test + public void testCreateAppProfileAddRowAffinityAddMultipleClusterIds() { + // Setup + Mockito.when(mockStub.createAppProfileCallable()).thenReturn(mockCreateAppProfileCallable); + + com.google.bigtable.admin.v2.CreateAppProfileRequest expectedRequest = + com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .setAppProfile( + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .newBuilder() + .addClusterIds("cluster-id-1") + .addClusterIds("cluster-id-2") + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build()))) + .build(); + + com.google.bigtable.admin.v2.AppProfile expectedResponse = + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName(APP_PROFILE_NAME) + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() + .addClusterIds("cluster-id-1") + .addClusterIds("cluster-id-2") + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build())) + .build(); + + Mockito.when(mockCreateAppProfileCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + AppProfile actualResult = + adminClient.createAppProfile( + CreateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) + .setDescription("my description") + .setRoutingPolicy( + MultiClusterRoutingPolicy.withRowAffinity("cluster-id-1", "cluster-id-2"))); + + // Verify + assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); + } + + @Test + public void testCreateAppProfileAddRowAffinityAddSetOfClusterIds() { + // Setup + Mockito.when(mockStub.createAppProfileCallable()).thenReturn(mockCreateAppProfileCallable); + + // We want to make sure the expected request has the same ordering as the request we build + // from CreateAppProfileRequest. Use a TreeSet to for stable ordering. + Set clusterIds = new TreeSet<>(); + clusterIds.add("cluster-id-1"); + clusterIds.add("cluster-id-2"); + + com.google.bigtable.admin.v2.CreateAppProfileRequest expectedRequest = + com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .setAppProfile( + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .newBuilder() + .addAllClusterIds(clusterIds) + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build()))) + .build(); + + com.google.bigtable.admin.v2.AppProfile expectedResponse = + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName(APP_PROFILE_NAME) + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() + .addAllClusterIds(clusterIds) + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build())) + .build(); + + Mockito.when(mockCreateAppProfileCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + AppProfile actualResult = + adminClient.createAppProfile( + CreateAppProfileRequest.of(INSTANCE_ID, APP_PROFILE_ID) + .setDescription("my description") + .setRoutingPolicy(MultiClusterRoutingPolicy.withRowAffinity(clusterIds))); + + // Verify + assertThat(actualResult).isEqualTo(AppProfile.fromProto(expectedResponse)); + } + @Test public void testGetAppProfile() { // Setup @@ -1291,7 +1524,7 @@ public void testGetIamPolicy() { .isEqualTo( Policy.newBuilder() .addIdentity(Role.of("bigtable.user"), Identity.user("someone@example.com")) - .setEtag(BaseEncoding.base64().encode("my-etag".getBytes())) + .setEtag(BaseEncoding.base64().encode("my-etag".getBytes(StandardCharsets.UTF_8))) .build()); } @@ -1336,7 +1569,7 @@ public void testSetIamPolicy() { .isEqualTo( Policy.newBuilder() .addIdentity(Role.of("bigtable.user"), Identity.user("someone@example.com")) - .setEtag(BaseEncoding.base64().encode("my-etag".getBytes())) + .setEtag(BaseEncoding.base64().encode("my-etag".getBytes(StandardCharsets.UTF_8))) .build()); } @@ -1405,4 +1638,360 @@ public void testExistsFalse() { // Verify assertThat(found).isFalse(); } + + @Test + public void testCreateMaterializedView() { + // Setup + Mockito.when(mockStub.createMaterializedViewOperationCallable()) + .thenReturn(mockCreateMaterializedViewCallable); + + com.google.bigtable.admin.v2.CreateMaterializedViewRequest expectedRequest = + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setMaterializedViewId(MATERIALIZED_VIEW_ID) + .setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table")) + .build(); + + com.google.bigtable.admin.v2.MaterializedView expectedResponse = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table") + .build(); + + mockOperationResult(mockCreateMaterializedViewCallable, expectedRequest, expectedResponse); + + // Execute + MaterializedView actualResult = + adminClient.createMaterializedView( + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table")); + + // Verify + assertThat(actualResult).isEqualTo(MaterializedView.fromProto(expectedResponse)); + } + + @Test + public void testGetMaterializedView() { + // Setup + Mockito.when(mockStub.getMaterializedViewCallable()) + .thenReturn(mockGetMaterializedViewCallable); + + com.google.bigtable.admin.v2.GetMaterializedViewRequest expectedRequest = + com.google.bigtable.admin.v2.GetMaterializedViewRequest.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .build(); + + com.google.bigtable.admin.v2.MaterializedView expectedResponse = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table") + .build(); + + Mockito.when(mockGetMaterializedViewCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + MaterializedView actualResult = + adminClient.getMaterializedView(INSTANCE_ID, MATERIALIZED_VIEW_ID); + + // Verify + assertThat(actualResult).isEqualTo(MaterializedView.fromProto(expectedResponse)); + } + + @Test + public void testListMaterializedViews() { + // Setup + Mockito.when(mockStub.listMaterializedViewsPagedCallable()) + .thenReturn(mockListMaterializedViewsCallable); + + com.google.bigtable.admin.v2.ListMaterializedViewsRequest expectedRequest = + com.google.bigtable.admin.v2.ListMaterializedViewsRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .build(); + + // 3 MaterializedViews spread across 2 pages + List expectedProtos = Lists.newArrayList(); + for (int i = 0; i < 3; i++) { + expectedProtos.add( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(MATERIALIZED_VIEW_NAME + i) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table" + i) + .build()); + } + // 2 on the first page + ListMaterializedViewsPage page0 = Mockito.mock(ListMaterializedViewsPage.class); + Mockito.when(page0.getValues()).thenReturn(expectedProtos.subList(0, 2)); + Mockito.when(page0.hasNextPage()).thenReturn(true); + + // 1 on the last page + ListMaterializedViewsPage page1 = Mockito.mock(ListMaterializedViewsPage.class); + Mockito.when(page1.getValues()).thenReturn(expectedProtos.subList(2, 3)); + + // Link page0 to page1 + Mockito.when(page0.getNextPageAsync()).thenReturn(ApiFutures.immediateFuture(page1)); + + // Link page to the response + ListMaterializedViewsPagedResponse response0 = + Mockito.mock(ListMaterializedViewsPagedResponse.class); + Mockito.when(response0.getPage()).thenReturn(page0); + + Mockito.when(mockListMaterializedViewsCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(response0)); + + // Execute + List actualResults = adminClient.listMaterializedViews(INSTANCE_ID); + + // Verify + List expectedResults = Lists.newArrayList(); + for (com.google.bigtable.admin.v2.MaterializedView expectedProto : expectedProtos) { + expectedResults.add(MaterializedView.fromProto(expectedProto)); + } + + assertThat(actualResults).containsExactlyElementsIn(expectedResults); + } + + @Test + public void testUpdateMaterializedView() { + // Setup + Mockito.when(mockStub.updateMaterializedViewOperationCallable()) + .thenReturn(mockUpdateMaterializedViewCallable); + + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest expectedRequest = + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.newBuilder() + .setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .setDeletionProtection(false)) + .setUpdateMask(FieldMask.newBuilder().addPaths("deletion_protection")) + .build(); + + com.google.bigtable.admin.v2.MaterializedView expectedResponse = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .setDeletionProtection(false) + .build(); + + mockOperationResult(mockUpdateMaterializedViewCallable, expectedRequest, expectedResponse); + + // Execute + MaterializedView actualResult = + adminClient.updateMaterializedView( + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false)); + + // Verify + assertThat(actualResult).isEqualTo(MaterializedView.fromProto(expectedResponse)); + } + + @Test + public void testDeleteMaterializedView() throws Exception { + // Setup + Mockito.when(mockStub.deleteMaterializedViewCallable()) + .thenReturn(mockDeleteMaterializedViewCallable); + + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest expectedRequest = + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.newBuilder() + .setName(MATERIALIZED_VIEW_NAME) + .build(); + + final AtomicInteger wasCalled = new AtomicInteger(0); + + Mockito.when(mockDeleteMaterializedViewCallable.futureCall(expectedRequest)) + .thenAnswer( + new Answer>() { + @Override + public ApiFuture answer(InvocationOnMock invocationOnMock) { + wasCalled.incrementAndGet(); + return ApiFutures.immediateFuture(Empty.getDefaultInstance()); + } + }); + + // Execute + adminClient.deleteMaterializedView(INSTANCE_ID, MATERIALIZED_VIEW_ID); + + adminClient.deleteMaterializedViewAsync(INSTANCE_ID, MATERIALIZED_VIEW_ID).get(); + + // Verify + assertThat(wasCalled.get()).isEqualTo(2); + } + + @Test + public void testCreateLogicalView() { + // Setup + Mockito.when(mockStub.createLogicalViewOperationCallable()) + .thenReturn(mockCreateLogicalViewCallable); + + com.google.bigtable.admin.v2.CreateLogicalViewRequest expectedRequest = + com.google.bigtable.admin.v2.CreateLogicalViewRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setLogicalViewId(LOGICAL_VIEW_ID) + .setLogicalView( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setQuery("SELECT 1 FROM Table")) + .build(); + + com.google.bigtable.admin.v2.LogicalView expectedResponse = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .setQuery("SELECT 1 FROM Table") + .build(); + + mockOperationResult(mockCreateLogicalViewCallable, expectedRequest, expectedResponse); + + // Execute + LogicalView actualResult = + adminClient.createLogicalView( + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("SELECT 1 FROM Table")); + + // Verify + assertThat(actualResult).isEqualTo(LogicalView.fromProto(expectedResponse)); + } + + @Test + public void testGetLogicalView() { + // Setup + Mockito.when(mockStub.getLogicalViewCallable()).thenReturn(mockGetLogicalViewCallable); + + com.google.bigtable.admin.v2.GetLogicalViewRequest expectedRequest = + com.google.bigtable.admin.v2.GetLogicalViewRequest.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .build(); + + com.google.bigtable.admin.v2.LogicalView expectedResponse = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .setQuery("SELECT 1 FROM Table") + .build(); + + Mockito.when(mockGetLogicalViewCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + LogicalView actualResult = adminClient.getLogicalView(INSTANCE_ID, LOGICAL_VIEW_ID); + + // Verify + assertThat(actualResult).isEqualTo(LogicalView.fromProto(expectedResponse)); + } + + @Test + public void testListLogicalViews() { + // Setup + Mockito.when(mockStub.listLogicalViewsPagedCallable()).thenReturn(mockListLogicalViewsCallable); + + com.google.bigtable.admin.v2.ListLogicalViewsRequest expectedRequest = + com.google.bigtable.admin.v2.ListLogicalViewsRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .build(); + + // 3 LogicalViews spread across 2 pages + List expectedProtos = Lists.newArrayList(); + for (int i = 0; i < 3; i++) { + expectedProtos.add( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(LOGICAL_VIEW_NAME + i) + .setQuery("SELECT 1 FROM Table" + i) + .build()); + } + // 2 on the first page + ListLogicalViewsPage page0 = Mockito.mock(ListLogicalViewsPage.class); + Mockito.when(page0.getValues()).thenReturn(expectedProtos.subList(0, 2)); + Mockito.when(page0.hasNextPage()).thenReturn(true); + + // 1 on the last page + ListLogicalViewsPage page1 = Mockito.mock(ListLogicalViewsPage.class); + Mockito.when(page1.getValues()).thenReturn(expectedProtos.subList(2, 3)); + + // Link page0 to page1 + Mockito.when(page0.getNextPageAsync()).thenReturn(ApiFutures.immediateFuture(page1)); + + // Link page to the response + ListLogicalViewsPagedResponse response0 = Mockito.mock(ListLogicalViewsPagedResponse.class); + Mockito.when(response0.getPage()).thenReturn(page0); + + Mockito.when(mockListLogicalViewsCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(response0)); + + // Execute + List actualResults = adminClient.listLogicalViews(INSTANCE_ID); + + // Verify + List expectedResults = Lists.newArrayList(); + for (com.google.bigtable.admin.v2.LogicalView expectedProto : expectedProtos) { + expectedResults.add(LogicalView.fromProto(expectedProto)); + } + + assertThat(actualResults).containsExactlyElementsIn(expectedResults); + } + + @Test + public void testUpdateLogicalView() { + // Setup + Mockito.when(mockStub.updateLogicalViewOperationCallable()) + .thenReturn(mockUpdateLogicalViewCallable); + + com.google.bigtable.admin.v2.UpdateLogicalViewRequest expectedRequest = + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.newBuilder() + .setLogicalView( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .setQuery("SELECT 1 FROM Table")) + .setUpdateMask(FieldMask.newBuilder().addPaths("query")) + .build(); + + com.google.bigtable.admin.v2.LogicalView expectedResponse = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .setQuery("SELECT 1 FROM Table") + .build(); + + mockOperationResult(mockUpdateLogicalViewCallable, expectedRequest, expectedResponse); + + // Execute + LogicalView actualResult = + adminClient.updateLogicalView( + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("SELECT 1 FROM Table")); + + // Verify + assertThat(actualResult).isEqualTo(LogicalView.fromProto(expectedResponse)); + } + + @Test + public void testDeleteLogicalView() throws Exception { + // Setup + Mockito.when(mockStub.deleteLogicalViewCallable()).thenReturn(mockDeleteLogicalViewCallable); + + com.google.bigtable.admin.v2.DeleteLogicalViewRequest expectedRequest = + com.google.bigtable.admin.v2.DeleteLogicalViewRequest.newBuilder() + .setName(LOGICAL_VIEW_NAME) + .build(); + + final AtomicInteger wasCalled = new AtomicInteger(0); + + Mockito.when(mockDeleteLogicalViewCallable.futureCall(expectedRequest)) + .thenAnswer( + new Answer>() { + @Override + public ApiFuture answer(InvocationOnMock invocationOnMock) { + wasCalled.incrementAndGet(); + return ApiFutures.immediateFuture(Empty.getDefaultInstance()); + } + }); + + // Execute + adminClient.deleteLogicalView(INSTANCE_ID, LOGICAL_VIEW_ID); + + adminClient.deleteLogicalViewAsync(INSTANCE_ID, LOGICAL_VIEW_ID).get(); + + // Verify + assertThat(wasCalled.get()).isEqualTo(2); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java index 7ac632f29b..9337dcef9a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java @@ -89,9 +89,7 @@ public void testStubSettings() throws IOException { .containsExactly(Code.INVALID_ARGUMENT); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .build() .getStubSettings() .createInstanceSettings() @@ -123,6 +121,16 @@ public void testStubSettings() throws IOException { "getIamPolicySettings", "setIamPolicySettings", "testIamPermissionsSettings", + "createMaterializedViewSettings", + "getMaterializedViewSettings", + "listMaterializedViewsSettings", + "updateMaterializedViewSettings", + "deleteMaterializedViewSettings", + "createLogicalViewSettings", + "getLogicalViewSettings", + "listLogicalViewsSettings", + "updateLogicalViewSettings", + "deleteLogicalViewSettings", }; @Test @@ -155,6 +163,6 @@ void checkToString(BigtableInstanceAdminSettings settings) { for (String subSettings : SETTINGS_LIST) { assertThat(toString).contains(subSettings + "="); } - assertThat(toString.contains(settings.getStubSettings().toString())); + assertThat(toString).contains(settings.getStubSettings().toString()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java index a7f2f74a17..8104ee146c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java @@ -35,6 +35,7 @@ import com.google.bigtable.admin.v2.CopyBackupMetadata; import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata; import com.google.bigtable.admin.v2.CreateBackupMetadata; +import com.google.bigtable.admin.v2.CreateSchemaBundleMetadata; import com.google.bigtable.admin.v2.DeleteBackupRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -44,12 +45,15 @@ import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListTablesRequest; import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification; +import com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata; import com.google.bigtable.admin.v2.RestoreSourceType; import com.google.bigtable.admin.v2.RestoreTableMetadata; +import com.google.bigtable.admin.v2.SchemaBundleName; import com.google.bigtable.admin.v2.Table.ClusterState; import com.google.bigtable.admin.v2.Table.View; import com.google.bigtable.admin.v2.TableName; import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata; +import com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata; import com.google.bigtable.admin.v2.UpdateTableMetadata; import com.google.cloud.Identity; import com.google.cloud.Policy; @@ -58,29 +62,35 @@ import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse; +import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPage; +import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSchemaBundlesPagedResponse; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPage; import com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.admin.v2.models.AuthorizedView; import com.google.cloud.bigtable.admin.v2.models.Backup; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; import com.google.cloud.bigtable.admin.v2.models.CopyBackupRequest; import com.google.cloud.bigtable.admin.v2.models.CreateAuthorizedViewRequest; import com.google.cloud.bigtable.admin.v2.models.CreateBackupRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateSchemaBundleRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.EncryptionInfo; import com.google.cloud.bigtable.admin.v2.models.ModifyColumnFamiliesRequest; +import com.google.cloud.bigtable.admin.v2.models.OptimizeRestoredTableOperationToken; import com.google.cloud.bigtable.admin.v2.models.RestoreTableRequest; import com.google.cloud.bigtable.admin.v2.models.RestoredTableResult; +import com.google.cloud.bigtable.admin.v2.models.SchemaBundle; import com.google.cloud.bigtable.admin.v2.models.SubsetView; import com.google.cloud.bigtable.admin.v2.models.Table; import com.google.cloud.bigtable.admin.v2.models.Type; import com.google.cloud.bigtable.admin.v2.models.UpdateAuthorizedViewRequest; import com.google.cloud.bigtable.admin.v2.models.UpdateBackupRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateSchemaBundleRequest; import com.google.cloud.bigtable.admin.v2.stub.EnhancedBigtableTableAdminStub; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.io.BaseEncoding; -import com.google.longrunning.Operation; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; import com.google.protobuf.Empty; @@ -89,11 +99,18 @@ import com.google.protobuf.util.Timestamps; import io.grpc.Status; import io.grpc.Status.Code; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; import org.junit.Before; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -106,12 +123,12 @@ import org.mockito.stubbing.Answer; import org.threeten.bp.Instant; -@RunWith(JUnit4.class) /** * Tests for {@link BigtableTableAdminClient}. This test class uses Mockito so it has been * explicitly excluded from Native Image testing by not following the naming convention of (IT* and * *ClientTest). */ +@RunWith(JUnit4.class) public class BigtableTableAdminClientTests { @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); @@ -121,6 +138,11 @@ public class BigtableTableAdminClientTests { private static final String CLUSTER_ID = "my-cluster"; private static final String BACKUP_ID = "my-backup"; private static final String AUTHORIZED_VIEW_ID = "my-authorized-view"; + private static final String SCHEMA_BUNDLE_ID = "my-schema-bundle"; + // Location: `google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb` + private static final String TEST_PROTO_SCHEMA_BUNDLE = "proto_schema_bundle.pb"; + // Location: `google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb` + private static final String TEST_UPDATED_PROTO_SCHEMA_BUNDLE = "updated_proto_schema_bundle.pb"; private static final String INSTANCE_NAME = NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID); private static final String TABLE_NAME = @@ -156,6 +178,8 @@ public class BigtableTableAdminClientTests { @Mock private UnaryCallable mockDropRowRangeCallable; @Mock private UnaryCallable mockAwaitReplicationCallable; + @Mock private UnaryCallable mockAwaitConsistencyCallable; + @Mock private OperationCallable< com.google.bigtable.admin.v2.CreateBackupRequest, @@ -175,10 +199,6 @@ public class BigtableTableAdminClientTests { @Mock private UnaryCallable mockListBackupCallable; @Mock private UnaryCallable mockDeleteBackupCallable; - @Mock - private UnaryCallable - mockRestoreTableCallable; - @Mock private OperationCallable< com.google.bigtable.admin.v2.RestoreTableRequest, @@ -222,6 +242,35 @@ public class BigtableTableAdminClientTests { private UnaryCallable mockDeleteAuthorizedViewCallable; + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.CreateSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle, + CreateSchemaBundleMetadata> + mockCreateSchemaBundleOperationCallable; + + @Mock + private OperationCallable< + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle, + UpdateSchemaBundleMetadata> + mockUpdateSchemaBundleOperationCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.GetSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle> + mockGetSchemaBundleCallable; + + @Mock + private UnaryCallable< + com.google.bigtable.admin.v2.ListSchemaBundlesRequest, ListSchemaBundlesPagedResponse> + mockListSchemaBundlesCallable; + + @Mock + private UnaryCallable + mockDeleteSchemaBundleCallable; + @Mock private UnaryCallable mockGetIamPolicyCallable; @@ -235,6 +284,10 @@ public class BigtableTableAdminClientTests { com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse> mockTestIamPermissionsCallable; + @Mock + private OperationCallable + mockOptimizeRestoredTableCallable; + @Before public void setUp() { adminClient = BigtableTableAdminClient.create(PROJECT_ID, INSTANCE_ID, mockStub); @@ -296,6 +349,43 @@ public void testCreateTable() { assertThat(result).isEqualTo(Table.fromProto(expectedResponse)); } + @Test + public void testCreateTableWithDeletionProtectionSet() { + // Setup + Mockito.when(mockStub.createTableCallable()).thenReturn(mockCreateTableCallable); + + com.google.bigtable.admin.v2.CreateTableRequest expectedRequest = + com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() + .setParent(INSTANCE_NAME) + .setTableId(TABLE_ID) + .setTable( + com.google.bigtable.admin.v2.Table.newBuilder() + .setDeletionProtection(true) + .putColumnFamilies( + "cf1", + ColumnFamily.newBuilder() + .setGcRule(GcRule.getDefaultInstance()) + .setValueType(TypeProtos.intSumType()) + .build())) + .build(); + + com.google.bigtable.admin.v2.Table expectedResponse = + com.google.bigtable.admin.v2.Table.newBuilder().setName(TABLE_NAME).build(); + + Mockito.when(mockCreateTableCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + Table result = + adminClient.createTable( + CreateTableRequest.of(TABLE_ID) + .addFamily("cf1", Type.int64Sum()) + .setDeletionProtection(true)); + + // Verify + assertThat(result).isEqualTo(Table.fromProto(expectedResponse)); + } + @Test public void testUpdateTable() { // Setup @@ -328,6 +418,8 @@ public void testUpdateTable() { assertThat(actualResult.getId()).isEqualTo(TABLE_ID); assertThat(actualResult.getChangeStreamRetention()) .isEqualTo(org.threeten.bp.Duration.ofHours(24)); + assertThat(actualResult.getChangeStreamRetention().toMillis()) + .isEqualTo(actualResult.getChangeStreamRetention().toMillis()); } @Test @@ -459,7 +551,7 @@ public void testGetEncryptionInfos() { Map> actualResult = adminClient.getEncryptionInfo(TABLE_ID); - // Verify that the encryption info is transfered from the proto to the model. + // Verify that the encryption info is transferred from the proto to the model. assertThat(actualResult) .containsExactly( "cluster1", ImmutableList.of(EncryptionInfo.fromProto(expectedEncryptionInfo))); @@ -543,6 +635,7 @@ public void testDropRowRange() { } @Test + @Deprecated public void testAwaitReplication() { // Setup Mockito.when(mockStub.awaitReplicationCallable()).thenReturn(mockAwaitReplicationCallable); @@ -566,6 +659,30 @@ public void testAwaitReplication() { assertThat(wasCalled.get()).isTrue(); } + @Test + public void testAwaitConsistencyForDataBoost() { + // Setup + Mockito.when(mockStub.awaitConsistencyCallable()).thenReturn(mockAwaitConsistencyCallable); + + ConsistencyRequest consistencyRequest = ConsistencyRequest.forDataBoost(TABLE_ID); + + final AtomicBoolean wasCalled = new AtomicBoolean(false); + + Mockito.when(mockAwaitConsistencyCallable.futureCall(consistencyRequest)) + .thenAnswer( + (Answer>) + invocationOnMock -> { + wasCalled.set(true); + return ApiFutures.immediateFuture(null); + }); + + // Execute + adminClient.awaitConsistency(consistencyRequest); + + // Verify + assertThat(wasCalled.get()).isTrue(); + } + @Test public void testExistsTrue() { // Setup @@ -615,7 +732,59 @@ public void testCreateBackup() { Timestamp expireTime = Timestamp.newBuilder().setSeconds(789).build(); long sizeBytes = 123456789; CreateBackupRequest req = - CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setSourceTableId(TABLE_ID); + CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setSourceTableId(TABLE_ID) + .setExpireTime(Instant.ofEpochMilli(Timestamps.toMillis(expireTime))); + mockOperationResult( + mockCreateBackupOperationCallable, + req.toProto(PROJECT_ID, INSTANCE_ID), + com.google.bigtable.admin.v2.Backup.newBuilder() + .setName(backupName) + .setSourceTable(TABLE_NAME) + .setStartTime(startTime) + .setEndTime(endTime) + .setExpireTime(expireTime) + .setSizeBytes(sizeBytes) + .build(), + CreateBackupMetadata.newBuilder() + .setName(backupName) + .setStartTime(startTime) + .setEndTime(endTime) + .setSourceTable(TABLE_NAME) + .build()); + // Execute + Backup actualResult = adminClient.createBackup(req); + + // Verify + assertThat(actualResult.getId()).isEqualTo(BACKUP_ID); + assertThat(actualResult.getSourceTableId()).isEqualTo(TABLE_ID); + assertThat(actualResult.getStartTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(startTime))); + assertThat(actualResult.getEndTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(endTime))); + assertThat(actualResult.getExpireTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(expireTime))); + assertThat(actualResult.getSizeBytes()).isEqualTo(sizeBytes); + } + + @Test + public void testCreateHotBackup() { + // Setup + Mockito.when(mockStub.createBackupOperationCallable()) + .thenReturn(mockCreateBackupOperationCallable); + + String backupName = NameUtil.formatBackupName(PROJECT_ID, INSTANCE_ID, CLUSTER_ID, BACKUP_ID); + Timestamp startTime = Timestamp.newBuilder().setSeconds(123).build(); + Timestamp endTime = Timestamp.newBuilder().setSeconds(456).build(); + Timestamp expireTime = Timestamp.newBuilder().setSeconds(789).build(); + Timestamp hotToStandardTime = Timestamp.newBuilder().setSeconds(500).build(); + long sizeBytes = 123456789; + CreateBackupRequest req = + CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setSourceTableId(TABLE_ID) + .setExpireTime(Instant.ofEpochMilli(Timestamps.toMillis(expireTime))) + .setBackupType(Backup.BackupType.HOT) + .setHotToStandardTime(Instant.ofEpochMilli(Timestamps.toMillis(hotToStandardTime))); mockOperationResult( mockCreateBackupOperationCallable, req.toProto(PROJECT_ID, INSTANCE_ID), @@ -626,6 +795,8 @@ public void testCreateBackup() { .setEndTime(endTime) .setExpireTime(expireTime) .setSizeBytes(sizeBytes) + .setBackupType(com.google.bigtable.admin.v2.Backup.BackupType.HOT) + .setHotToStandardTime(hotToStandardTime) .build(), CreateBackupMetadata.newBuilder() .setName(backupName) @@ -645,6 +816,9 @@ public void testCreateBackup() { .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(endTime))); assertThat(actualResult.getExpireTime()) .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(expireTime))); + assertThat(actualResult.getBackupType()).isEqualTo(Backup.BackupType.HOT); + assertThat(actualResult.getHotToStandardTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(hotToStandardTime))); assertThat(actualResult.getSizeBytes()).isEqualTo(sizeBytes); } @@ -674,6 +848,7 @@ public void testGetBackup() { .setEndTime(endTime) .setSizeBytes(sizeBytes) .setState(state) + .setBackupType(com.google.bigtable.admin.v2.Backup.BackupType.STANDARD) .build())); // Execute @@ -690,6 +865,7 @@ public void testGetBackup() { .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(endTime))); assertThat(actualResult.getSizeBytes()).isEqualTo(sizeBytes); assertThat(actualResult.getState()).isEqualTo(Backup.State.fromProto(state)); + assertThat(actualResult.getBackupType()).isEqualTo(Backup.BackupType.STANDARD); } @Test @@ -698,6 +874,7 @@ public void testUpdateBackup() { Mockito.when(mockStub.updateBackupCallable()).thenReturn(mockUpdateBackupCallable); Timestamp expireTime = Timestamp.newBuilder().setSeconds(123456789).build(); + Timestamp hotToStandardTime = Timestamp.newBuilder().setSeconds(123456789).build(); long sizeBytes = 12345L; UpdateBackupRequest req = UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID); Mockito.when(mockUpdateBackupCallable.futureCall(req.toProto(PROJECT_ID, INSTANCE_ID))) @@ -709,6 +886,7 @@ public void testUpdateBackup() { .setSourceTable(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setExpireTime(expireTime) .setSizeBytes(sizeBytes) + .setHotToStandardTime(hotToStandardTime) .build())); // Execute @@ -719,6 +897,8 @@ public void testUpdateBackup() { assertThat(actualResult.getSourceTableId()).isEqualTo(TABLE_ID); assertThat(actualResult.getExpireTime()) .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(expireTime))); + assertThat(actualResult.getHotToStandardTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(hotToStandardTime))); assertThat(actualResult.getSizeBytes()).isEqualTo(sizeBytes); } @@ -888,6 +1068,7 @@ public void testCopyBackup() { String srcTableId = "src-table"; String srcClusterId = "src-cluster"; String srcBackupId = "src-backup"; + Instant expireTime = Instant.now().plus(org.threeten.bp.Duration.ofDays(15)); long sizeBytes = 123456789; @@ -1161,6 +1342,218 @@ public void testDeleteAuthorizedView() { assertThat(wasCalled.get()).isTrue(); } + @Test + public void testCreateSchemaBundle() throws IOException, URISyntaxException { + // Setup + Mockito.when(mockStub.createSchemaBundleOperationCallable()) + .thenReturn(mockCreateSchemaBundleOperationCallable); + byte[] content = Files.readAllBytes(Paths.get(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + com.google.bigtable.admin.v2.CreateSchemaBundleRequest expectedRequest = + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.newBuilder() + .setParent(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setSchemaBundleId(SCHEMA_BUNDLE_ID) + .setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content)))) + .build(); + + com.google.bigtable.admin.v2.SchemaBundle expectedResponse = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content))) + .build(); + + mockOperationResult( + mockCreateSchemaBundleOperationCallable, + expectedRequest, + expectedResponse, + CreateSchemaBundleMetadata.newBuilder() + .setName(expectedRequest.getSchemaBundle().getName()) + .build()); + + CreateSchemaBundleRequest req = + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + // Execute + SchemaBundle actualResult = adminClient.createSchemaBundle(req); + + // Verify + assertThat(actualResult).isEqualTo(SchemaBundle.fromProto(expectedResponse)); + } + + @Test + public void testUpdateSchemaBundle() throws IOException, URISyntaxException { + // Setup + Mockito.when(mockStub.updateSchemaBundleOperationCallable()) + .thenReturn(mockUpdateSchemaBundleOperationCallable); + byte[] content = + Files.readAllBytes(Paths.get(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE))); + + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest expectedRequest = + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder() + .setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content))) + .build()) + .setUpdateMask(FieldMask.newBuilder().addPaths("proto_schema")) + .build(); + + com.google.bigtable.admin.v2.SchemaBundle expectedResponse = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content))) + .build(); + + mockOperationResult( + mockUpdateSchemaBundleOperationCallable, + expectedRequest, + expectedResponse, + UpdateSchemaBundleMetadata.newBuilder() + .setName(expectedRequest.getSchemaBundle().getName()) + .build()); + + UpdateSchemaBundleRequest req = + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE)); + + // Execute + SchemaBundle actualResult = adminClient.updateSchemaBundle(req); + + // Verify + assertThat(actualResult).isEqualTo(SchemaBundle.fromProto(expectedResponse)); + } + + @Test + public void testGetSchemaBundle() { + // Setup + Mockito.when(mockStub.getSchemaBundleCallable()).thenReturn(mockGetSchemaBundleCallable); + + com.google.bigtable.admin.v2.GetSchemaBundleRequest expectedRequest = + com.google.bigtable.admin.v2.GetSchemaBundleRequest.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .build(); + + com.google.bigtable.admin.v2.SchemaBundle expectedResponse = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema"))) + .build(); + + Mockito.when(mockGetSchemaBundleCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // Execute + SchemaBundle actualResult = adminClient.getSchemaBundle(TABLE_ID, SCHEMA_BUNDLE_ID); + + // Verify + assertThat(actualResult).isEqualTo(SchemaBundle.fromProto(expectedResponse)); + } + + @Test + public void testListSchemaBundles() { + // Setup + Mockito.when(mockStub.listSchemaBundlesPagedCallable()) + .thenReturn(mockListSchemaBundlesCallable); + + com.google.bigtable.admin.v2.ListSchemaBundlesRequest expectedRequest = + com.google.bigtable.admin.v2.ListSchemaBundlesRequest.newBuilder() + .setParent(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .build(); + + // 3 SchemaBundles spread across 2 pages + List expectedProtos = Lists.newArrayList(); + for (int i = 0; i < 3; i++) { + expectedProtos.add( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID + i)) + .build()); + } + + // 2 on the first page + ListSchemaBundlesPage page0 = Mockito.mock(ListSchemaBundlesPage.class); + Mockito.when(page0.getValues()).thenReturn(expectedProtos.subList(0, 2)); + Mockito.when(page0.hasNextPage()).thenReturn(true); + + // 1 on the last page + ListSchemaBundlesPage page1 = Mockito.mock(ListSchemaBundlesPage.class); + Mockito.when(page1.getValues()).thenReturn(expectedProtos.subList(2, 3)); + + // Link page0 to page1 + Mockito.when(page0.getNextPageAsync()).thenReturn(ApiFutures.immediateFuture(page1)); + + // Link page to the response + ListSchemaBundlesPagedResponse response0 = Mockito.mock(ListSchemaBundlesPagedResponse.class); + Mockito.when(response0.getPage()).thenReturn(page0); + + Mockito.when(mockListSchemaBundlesCallable.futureCall(expectedRequest)) + .thenReturn(ApiFutures.immediateFuture(response0)); + + // Execute + List actualResults = adminClient.listSchemaBundles(TABLE_ID); + + // Verify + List expectedResults = Lists.newArrayList(); + for (com.google.bigtable.admin.v2.SchemaBundle expectedProto : expectedProtos) { + expectedResults.add(SchemaBundleName.parse(expectedProto.getName()).getSchemaBundle()); + } + + assertThat(actualResults).containsExactlyElementsIn(expectedResults); + } + + @Test + public void testDeleteSchemaBundle() { + // Setup + Mockito.when(mockStub.deleteSchemaBundleCallable()).thenReturn(mockDeleteSchemaBundleCallable); + + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest expectedRequest = + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .build(); + + final AtomicBoolean wasCalled = new AtomicBoolean(false); + + Mockito.when(mockDeleteSchemaBundleCallable.futureCall(expectedRequest)) + .thenAnswer( + (Answer>) + invocationOnMock -> { + wasCalled.set(true); + return ApiFutures.immediateFuture(Empty.getDefaultInstance()); + }); + + // Execute + adminClient.deleteSchemaBundle(TABLE_ID, SCHEMA_BUNDLE_ID); + + // Verify + assertThat(wasCalled.get()).isTrue(); + } + @Test public void testGetBackupIamPolicy() { // Setup @@ -1191,7 +1584,7 @@ public void testGetBackupIamPolicy() { .isEqualTo( Policy.newBuilder() .addIdentity(Role.of("bigtable.viewer"), Identity.user("someone@example.com")) - .setEtag(BaseEncoding.base64().encode("my-etag".getBytes())) + .setEtag(BaseEncoding.base64().encode("my-etag".getBytes(StandardCharsets.UTF_8))) .build()); } @@ -1237,7 +1630,7 @@ public void testSetIamPolicy() { .isEqualTo( Policy.newBuilder() .addIdentity(Role.of("bigtable.viewer"), Identity.user("someone@example.com")) - .setEtag(BaseEncoding.base64().encode("my-etag".getBytes())) + .setEtag(BaseEncoding.base64().encode("my-etag".getBytes(StandardCharsets.UTF_8))) .build()); } @@ -1268,6 +1661,84 @@ public void testTestIamPermissions() { assertThat(actualResult).containsExactly("bigtable.backups.get"); } + @Test + public void testWaitForConsistencyWithToken() { + // Setup + Mockito.when(mockStub.awaitConsistencyCallable()).thenReturn(mockAwaitConsistencyCallable); + + String token = "my-token"; + ConsistencyRequest expectedRequest = ConsistencyRequest.forReplication(TABLE_ID, token); + + final AtomicBoolean wasCalled = new AtomicBoolean(false); + + Mockito.when(mockAwaitConsistencyCallable.futureCall(expectedRequest)) + .thenAnswer( + (Answer>) + invocationOnMock -> { + wasCalled.set(true); + return ApiFutures.immediateFuture(null); + }); + + // Execute + adminClient.waitForConsistency(TABLE_ID, token); + + // Verify + assertThat(wasCalled.get()).isTrue(); + } + + @Test + public void testAwaitOptimizeRestoredTable() throws Exception { + // Setup + Mockito.when(mockStub.awaitOptimizeRestoredTableCallable()) + .thenReturn(mockOptimizeRestoredTableCallable); + + String optimizeToken = "my-optimization-token"; + + // 1. Mock the Token + OptimizeRestoredTableOperationToken mockToken = + Mockito.mock(OptimizeRestoredTableOperationToken.class); + Mockito.when(mockToken.getOperationName()).thenReturn(optimizeToken); + + // 2. Mock the Result (wrapping the token) + RestoredTableResult mockResult = Mockito.mock(RestoredTableResult.class); + Mockito.when(mockResult.getOptimizeRestoredTableOperationToken()).thenReturn(mockToken); + + // 3. Mock the Input Future (returning the result) + ApiFuture mockRestoreFuture = Mockito.mock(ApiFuture.class); + Mockito.when(mockRestoreFuture.get()).thenReturn(mockResult); + + // 4. Mock the Stub's behavior (resuming the Optimize Op) + OperationFuture mockOptimizeOp = + Mockito.mock(OperationFuture.class); + Mockito.when(mockOptimizeRestoredTableCallable.resumeFutureCall(optimizeToken)) + .thenReturn(mockOptimizeOp); + + // Execute + ApiFuture result = adminClient.awaitOptimizeRestoredTable(mockRestoreFuture); + + // Verify + assertThat(result).isEqualTo(mockOptimizeOp); + Mockito.verify(mockOptimizeRestoredTableCallable).resumeFutureCall(optimizeToken); + } + + @Ignore("TODO: fix this test") + @Test + public void testAwaitOptimizeRestoredTable_NoOp() throws Exception { + // Setup: Result with NO optimization token (null or empty) + RestoredTableResult mockResult = Mockito.mock(RestoredTableResult.class); + Mockito.when(mockResult.getOptimizeRestoredTableOperationToken()).thenReturn(null); + + // Mock the Input Future + ApiFuture mockRestoreFuture = Mockito.mock(ApiFuture.class); + Mockito.when(mockRestoreFuture.get()).thenReturn(mockResult); + + // Execute + ApiFuture result = adminClient.awaitOptimizeRestoredTable(mockRestoreFuture); + + // Verify: Returns immediate success (Empty) without calling the stub + assertThat(result.get()).isEqualTo(Empty.getDefaultInstance()); + } + private void mockOperationResult( OperationCallable callable, ReqT request, @@ -1285,4 +1756,10 @@ private void mockOperationResult( OperationFutures.immediateOperationFuture(operationSnapshot); Mockito.when(callable.futureCall(request)).thenReturn(operationFuture); } + + private String getResourceFilePath(String filePath) throws URISyntaxException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL protoSchema = cl.getResource(filePath); + return Paths.get(protoSchema.toURI()).toAbsolutePath().toString(); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java index 506f73700b..0aac3b8c99 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java @@ -31,7 +31,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mockito; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class BigtableTableAdminSettingsTest { @@ -96,9 +95,7 @@ public void testStubSettings() throws IOException { .containsExactly(Code.INVALID_ARGUMENT); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .build() .getStubSettings() .createTableSettings() @@ -146,6 +143,13 @@ public void testStubSettings() throws IOException { "deleteAuthorizedViewSettings", "listAuthorizedViewsSettings", "getAuthorizedViewSettings", + "createSchemaBundleSettings", + "createSchemaBundleOperationSettings", + "updateSchemaBundleSettings", + "updateSchemaBundleOperationSettings", + "getSchemaBundleSettings", + "listSchemaBundlesSettings", + "deleteSchemaBundleSettings" }; @Test @@ -165,7 +169,9 @@ public void testToString() throws IOException { stubSettings .getBackupSettings() .setRetrySettings( - RetrySettings.newBuilder().setTotalTimeout(Duration.ofMinutes(812)).build()); + RetrySettings.newBuilder() + .setTotalTimeout(org.threeten.bp.Duration.ofMinutes(812)) + .build()); BigtableTableAdminSettings settings = builder.build(); checkToString(settings); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java deleted file mode 100644 index 354a725b6e..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java +++ /dev/null @@ -1,66 +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.bigtable.admin.v2; - -import static com.google.common.truth.Truth.assertWithMessage; - -import com.google.api.core.InternalApi; -import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStub; -import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub; -import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableInstanceAdminCallableFactory; -import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableInstanceAdminStub; -import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableTableAdminCallableFactory; -import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableTableAdminStub; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -/** - * Tests that the underlying GAPIC api is marked as {@code @InternalApi}. This transformation - * happens in synth.py. - */ -@RunWith(Parameterized.class) -public class HiddenGapicApiTest { - private Class testClass; - - @Parameters - public static Object[] data() { - return new Object[] { - GrpcBigtableInstanceAdminCallableFactory.class, - GrpcBigtableInstanceAdminStub.class, - BaseBigtableInstanceAdminSettings.class, - GrpcBigtableTableAdminCallableFactory.class, - GrpcBigtableTableAdminStub.class, - BaseBigtableTableAdminSettings.class, - BigtableInstanceAdminStub.class, - BigtableTableAdminStub.class, - BaseBigtableInstanceAdminClient.class, - BaseBigtableTableAdminClient.class, - }; - } - - public HiddenGapicApiTest(Class testClass) { - this.testClass = testClass; - } - - @Test - public void test() { - assertWithMessage("%s should be annotated with @InternaOnly", testClass.getName()) - .that(testClass.getAnnotation(InternalApi.class)) - .isNotNull(); - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdmin.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdmin.java index ffefe14a16..643504c3c8 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdmin.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdminImpl.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdminImpl.java index 4a7e35e96a..7a1d8d08a0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdminImpl.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdminImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,18 @@ import com.google.bigtable.admin.v2.CreateAppProfileRequest; import com.google.bigtable.admin.v2.CreateClusterRequest; import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.CreateLogicalViewRequest; +import com.google.bigtable.admin.v2.CreateMaterializedViewRequest; import com.google.bigtable.admin.v2.DeleteAppProfileRequest; import com.google.bigtable.admin.v2.DeleteClusterRequest; import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.DeleteLogicalViewRequest; +import com.google.bigtable.admin.v2.DeleteMaterializedViewRequest; import com.google.bigtable.admin.v2.GetAppProfileRequest; import com.google.bigtable.admin.v2.GetClusterRequest; import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.GetLogicalViewRequest; +import com.google.bigtable.admin.v2.GetMaterializedViewRequest; import com.google.bigtable.admin.v2.Instance; import com.google.bigtable.admin.v2.ListAppProfilesRequest; import com.google.bigtable.admin.v2.ListAppProfilesResponse; @@ -38,9 +44,17 @@ import com.google.bigtable.admin.v2.ListHotTabletsResponse; import com.google.bigtable.admin.v2.ListInstancesRequest; import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.ListLogicalViewsRequest; +import com.google.bigtable.admin.v2.ListLogicalViewsResponse; +import com.google.bigtable.admin.v2.ListMaterializedViewsRequest; +import com.google.bigtable.admin.v2.ListMaterializedViewsResponse; +import com.google.bigtable.admin.v2.LogicalView; +import com.google.bigtable.admin.v2.MaterializedView; import com.google.bigtable.admin.v2.PartialUpdateClusterRequest; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; import com.google.bigtable.admin.v2.UpdateAppProfileRequest; +import com.google.bigtable.admin.v2.UpdateLogicalViewRequest; +import com.google.bigtable.admin.v2.UpdateMaterializedViewRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -184,7 +198,8 @@ public void partialUpdateInstance( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method PartialUpdateInstance, expected %s or %s", + "Unrecognized response type %s for method PartialUpdateInstance, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -308,7 +323,8 @@ public void partialUpdateCluster( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method PartialUpdateCluster, expected %s or %s", + "Unrecognized response type %s for method PartialUpdateCluster, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -522,4 +538,219 @@ public void listHotTablets( Exception.class.getName()))); } } + + @Override + public void createLogicalView( + CreateLogicalViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateLogicalView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLogicalView( + GetLogicalViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LogicalView) { + requests.add(request); + responseObserver.onNext(((LogicalView) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLogicalView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LogicalView.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLogicalViews( + ListLogicalViewsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLogicalViewsResponse) { + requests.add(request); + responseObserver.onNext(((ListLogicalViewsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLogicalViews, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLogicalViewsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateLogicalView( + UpdateLogicalViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateLogicalView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteLogicalView( + DeleteLogicalViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteLogicalView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMaterializedView( + CreateMaterializedViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateMaterializedView, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMaterializedView( + GetMaterializedViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MaterializedView) { + requests.add(request); + responseObserver.onNext(((MaterializedView) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetMaterializedView, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MaterializedView.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMaterializedViews( + ListMaterializedViewsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMaterializedViewsResponse) { + requests.add(request); + responseObserver.onNext(((ListMaterializedViewsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListMaterializedViews, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListMaterializedViewsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateMaterializedView( + UpdateMaterializedViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateMaterializedView, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMaterializedView( + DeleteMaterializedViewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteMaterializedView, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdmin.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdmin.java index 2b48974975..384f5a2d87 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdmin.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdmin.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java index 98b5850479..a2fe476ea7 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,10 +25,12 @@ import com.google.bigtable.admin.v2.CopyBackupRequest; import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest; import com.google.bigtable.admin.v2.CreateBackupRequest; +import com.google.bigtable.admin.v2.CreateSchemaBundleRequest; import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest; import com.google.bigtable.admin.v2.CreateTableRequest; import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest; import com.google.bigtable.admin.v2.DeleteBackupRequest; +import com.google.bigtable.admin.v2.DeleteSchemaBundleRequest; import com.google.bigtable.admin.v2.DeleteSnapshotRequest; import com.google.bigtable.admin.v2.DeleteTableRequest; import com.google.bigtable.admin.v2.DropRowRangeRequest; @@ -36,24 +38,29 @@ import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; import com.google.bigtable.admin.v2.GetAuthorizedViewRequest; import com.google.bigtable.admin.v2.GetBackupRequest; +import com.google.bigtable.admin.v2.GetSchemaBundleRequest; import com.google.bigtable.admin.v2.GetSnapshotRequest; import com.google.bigtable.admin.v2.GetTableRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest; import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse; import com.google.bigtable.admin.v2.ListBackupsRequest; import com.google.bigtable.admin.v2.ListBackupsResponse; +import com.google.bigtable.admin.v2.ListSchemaBundlesRequest; +import com.google.bigtable.admin.v2.ListSchemaBundlesResponse; import com.google.bigtable.admin.v2.ListSnapshotsRequest; import com.google.bigtable.admin.v2.ListSnapshotsResponse; import com.google.bigtable.admin.v2.ListTablesRequest; import com.google.bigtable.admin.v2.ListTablesResponse; import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; import com.google.bigtable.admin.v2.RestoreTableRequest; +import com.google.bigtable.admin.v2.SchemaBundle; import com.google.bigtable.admin.v2.Snapshot; import com.google.bigtable.admin.v2.SnapshotTableRequest; import com.google.bigtable.admin.v2.Table; import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateSchemaBundleRequest; import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -136,7 +143,8 @@ public void createTableFromSnapshot( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method CreateTableFromSnapshot, expected %s or %s", + "Unrecognized response type %s for method CreateTableFromSnapshot, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -259,7 +267,8 @@ public void createAuthorizedView( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method CreateAuthorizedView, expected %s or %s", + "Unrecognized response type %s for method CreateAuthorizedView, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -323,7 +332,8 @@ public void updateAuthorizedView( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method UpdateAuthorizedView, expected %s or %s", + "Unrecognized response type %s for method UpdateAuthorizedView, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Operation.class.getName(), Exception.class.getName()))); @@ -344,7 +354,8 @@ public void deleteAuthorizedView( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method DeleteAuthorizedView, expected %s or %s", + "Unrecognized response type %s for method DeleteAuthorizedView, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Empty.class.getName(), Exception.class.getName()))); @@ -365,7 +376,8 @@ public void modifyColumnFamilies( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method ModifyColumnFamilies, expected %s or %s", + "Unrecognized response type %s for method ModifyColumnFamilies, expected %s or" + + " %s", response == null ? "null" : response.getClass().getName(), Table.class.getName(), Exception.class.getName()))); @@ -407,7 +419,8 @@ public void generateConsistencyToken( responseObserver.onError( new IllegalArgumentException( String.format( - "Unrecognized response type %s for method GenerateConsistencyToken, expected %s or %s", + "Unrecognized response type %s for method GenerateConsistencyToken, expected %s" + + " or %s", response == null ? "null" : response.getClass().getName(), GenerateConsistencyTokenResponse.class.getName(), Exception.class.getName()))); @@ -722,4 +735,110 @@ public void testIamPermissions( Exception.class.getName()))); } } + + @Override + public void createSchemaBundle( + CreateSchemaBundleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSchemaBundle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSchemaBundle( + UpdateSchemaBundleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSchemaBundle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSchemaBundle( + GetSchemaBundleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SchemaBundle) { + requests.add(request); + responseObserver.onNext(((SchemaBundle) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSchemaBundle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SchemaBundle.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSchemaBundles( + ListSchemaBundlesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSchemaBundlesResponse) { + requests.add(request); + responseObserver.onNext(((ListSchemaBundlesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSchemaBundles, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSchemaBundlesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSchemaBundle( + DeleteSchemaBundleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSchemaBundle, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/internal/NameUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/internal/NameUtilTest.java index 7622ce5dfa..c2d8321407 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/internal/NameUtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/internal/NameUtilTest.java @@ -16,27 +16,25 @@ package com.google.cloud.bigtable.admin.v2.internal; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; +import com.google.cloud.bigtable.data.v2.models.MaterializedViewId; import com.google.cloud.bigtable.data.v2.models.TableId; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class NameUtilTest { - @Rule public ExpectedException exception = ExpectedException.none(); - @Test public void extractBackupIdFromBackupNameTest() { String testBackupName = "projects/my-project/instances/my-instance/clusters/my-cluster/backups/my-backup"; assertThat(NameUtil.extractBackupIdFromBackupName(testBackupName)).isEqualTo("my-backup"); - exception.expect(IllegalArgumentException.class); - NameUtil.extractBackupIdFromBackupName("bad-format"); + assertThrows( + IllegalArgumentException.class, () -> NameUtil.extractBackupIdFromBackupName("bad-format")); } @Test @@ -59,6 +57,37 @@ public void formatAuthorizedViewNameTest() { .isEqualTo(testAuthorizedViewName); } + @Test + public void formatSchemabundleNameTest() { + String testSchemaBundleName = + "projects/my-project/instances/my-instance/tables/my-table/schemaBundles/my-schema-bundle"; + + assertThat( + NameUtil.formatSchemaBundleName( + "my-project", "my-instance", "my-table", "my-schema-bundle")) + .isEqualTo(testSchemaBundleName); + } + + @Test + public void formatMaterializedViewNameTest() { + String testMaterializedViewName = + "projects/my-project/instances/my-instance/materializedViews/my-materialized-view"; + + assertThat( + NameUtil.formatMaterializedViewName( + "my-project", "my-instance", "my-materialized-view")) + .isEqualTo(testMaterializedViewName); + } + + @Test + public void formatLogicalViewNameTest() { + String testLogicalViewName = + "projects/my-project/instances/my-instance/logicalViews/my-logical-view"; + + assertThat(NameUtil.formatLogicalViewName("my-project", "my-instance", "my-logical-view")) + .isEqualTo(testLogicalViewName); + } + @Test public void extractAuthorizedViewIdFromAuthorizedViewNameTest() { String testAuthorizedViewName = @@ -67,8 +96,22 @@ public void extractAuthorizedViewIdFromAuthorizedViewNameTest() { assertThat(NameUtil.extractAuthorizedViewIdFromAuthorizedViewName(testAuthorizedViewName)) .isEqualTo("my-authorized-view"); - exception.expect(IllegalArgumentException.class); - NameUtil.extractAuthorizedViewIdFromAuthorizedViewName("bad-format"); + assertThrows( + IllegalArgumentException.class, + () -> NameUtil.extractAuthorizedViewIdFromAuthorizedViewName("bad-format")); + } + + @Test + public void extractSchemaBundleIdFromSchemaBundleNameTest() { + String testSchemaBundleName = + "projects/my-project/instances/my-instance/tables/my-table/schemaBundles/my-schema-bundle"; + + assertThat(NameUtil.extractSchemaBundleIdFromSchemaBundleName(testSchemaBundleName)) + .isEqualTo("my-schema-bundle"); + + assertThrows( + IllegalArgumentException.class, + () -> NameUtil.extractSchemaBundleIdFromSchemaBundleName("bad-format")); } @Test @@ -81,9 +124,11 @@ public void extractTableIdFromAuthorizedViewNameTest() { .extractTableIdFromAuthorizedViewName(testAuthorizedViewName)) .isEqualTo("my-table"); - exception.expect(IllegalArgumentException.class); - com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTableIdFromAuthorizedViewName( - "bad-format"); + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil + .extractTableIdFromAuthorizedViewName("bad-format")); } @Test @@ -96,29 +141,82 @@ public void extractTableNameFromAuthorizedViewNameTest() { .extractTableNameFromAuthorizedViewName(testAuthorizedViewName)) .isEqualTo("projects/my-project/instances/my-instance/tables/my-table"); - exception.expect(IllegalArgumentException.class); - com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTableNameFromAuthorizedViewName( - "bad-format"); + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil + .extractTableNameFromAuthorizedViewName("bad-format")); } @Test - public void testExtractTargetId() { + public void testExtractTargetId2() { String testTableName = "projects/my-project/instances/my-instance/tables/my-table"; String testAuthorizedViewName = "projects/my-project/instances/my-instance/tables/my-table/authorizedViews/my-authorized-view"; assertThat( - com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId(testTableName, "")) + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + testTableName, "", "")) .isEqualTo(TableId.of("my-table")); assertThat( com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( - "", testAuthorizedViewName)) + "", testAuthorizedViewName, "")) .isEqualTo(AuthorizedViewId.of("my-table", "my-authorized-view")); - exception.expect(IllegalArgumentException.class); - com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId("", ""); + // No name is provided + assertThrows( + IllegalArgumentException.class, + () -> com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId("", "")); + + // Multiple names are provided + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + testTableName, testAuthorizedViewName)); + } - exception.expect(IllegalArgumentException.class); - com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( - testTableName, testAuthorizedViewName); + @Test + public void testExtractTargetId3() { + String testTableName = "projects/my-project/instances/my-instance/tables/my-table"; + String testAuthorizedViewName = + "projects/my-project/instances/my-instance/tables/my-table/authorizedViews/my-authorized-view"; + String testMaterializedViewName = + "projects/my-project/instances/my-instance/materializedViews/my-materialized-view"; + assertThat( + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + testTableName, "", "")) + .isEqualTo(TableId.of("my-table")); + assertThat( + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + "", testAuthorizedViewName, "")) + .isEqualTo(AuthorizedViewId.of("my-table", "my-authorized-view")); + assertThat( + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + "", "", testMaterializedViewName)) + .isEqualTo(MaterializedViewId.of("my-materialized-view")); + + // No name is provided + assertThrows( + IllegalArgumentException.class, + () -> com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId("", "", "")); + + // Multiple names are provided + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + testTableName, testAuthorizedViewName, "")); + + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + testTableName, "", testMaterializedViewName)); + + assertThrows( + IllegalArgumentException.class, + () -> + com.google.cloud.bigtable.data.v2.internal.NameUtil.extractTargetId( + "", testAuthorizedViewName, testMaterializedViewName)); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableAuthorizedViewIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableAuthorizedViewIT.java index eb23e0325a..2a351fc831 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableAuthorizedViewIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableAuthorizedViewIT.java @@ -21,6 +21,7 @@ import static com.google.common.truth.TruthJUnit.assume; import static org.junit.Assert.fail; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.rpc.FailedPreconditionException; import com.google.api.gax.rpc.NotFoundException; @@ -35,6 +36,7 @@ import com.google.cloud.bigtable.admin.v2.models.UpdateAuthorizedViewRequest; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -56,7 +58,7 @@ public class BigtableAuthorizedViewIT { @ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule(); @Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator(); private static final Logger LOGGER = Logger.getLogger(BigtableAuthorizedViewIT.class.getName()); - private static final int[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + private static final long[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; private static BigtableTableAdminClient tableAdmin; private static BigtableDataClient dataClient; @@ -254,9 +256,11 @@ private CreateAuthorizedViewRequest createAuthorizedViewRequest(String authorize private static Table createAndPopulateTestTable( BigtableTableAdminClient tableAdmin, BigtableDataClient dataClient) throws InterruptedException { - String tableId = - PrefixGenerator.newPrefix("BigtableAuthorizedViewIT#createAndPopulateTestTable"); - Table testTable = tableAdmin.createTable(CreateTableRequest.of(tableId).addFamily("cf1")); + TableId tableId = + TableId.of( + PrefixGenerator.newPrefix("BigtableAuthorizedViewIT#createAndPopulateTestTable")); + Table testTable = + tableAdmin.createTable(CreateTableRequest.of(tableId.getTableId()).addFamily("cf1")); // Populate test data. byte[] rowBytes = new byte[1024]; @@ -265,9 +269,10 @@ private static Table createAndPopulateTestTable( try (Batcher batcher = dataClient.newBulkMutationBatcher(tableId)) { for (int i = 0; i < 10; i++) { - batcher.add( - RowMutationEntry.create("test-row-" + i) - .setCell("cf1", ByteString.EMPTY, ByteString.copyFrom(rowBytes))); + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("test-row-" + i) + .setCell("cf1", ByteString.EMPTY, ByteString.copyFrom(rowBytes))); } } return testTable; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java index 9230cecc70..eabaa128bc 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableBackupIT.java @@ -20,6 +20,7 @@ import static com.google.common.truth.TruthJUnit.assume; import static org.junit.Assert.assertThrows; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.rpc.DeadlineExceededException; import com.google.api.gax.rpc.NotFoundException; @@ -31,7 +32,7 @@ import com.google.cloud.bigtable.admin.v2.models.CreateBackupRequest; import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; -import com.google.cloud.bigtable.admin.v2.models.Instance.Type; +import com.google.cloud.bigtable.admin.v2.models.Instance; import com.google.cloud.bigtable.admin.v2.models.RestoreTableRequest; import com.google.cloud.bigtable.admin.v2.models.RestoredTableResult; import com.google.cloud.bigtable.admin.v2.models.StorageType; @@ -39,6 +40,7 @@ import com.google.cloud.bigtable.admin.v2.models.UpdateBackupRequest; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -69,17 +71,19 @@ public class BigtableBackupIT { private static final Logger LOGGER = Logger.getLogger(BigtableBackupIT.class.getName()); - private static final int[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; - private static BigtableTableAdminClient tableAdmin; + private static BigtableTableAdminClient tableAdminHot; private static BigtableInstanceAdminClient instanceAdmin; private static BigtableDataClient dataClient; private static String targetCluster; + private static String targetClusterHot; private static Table testTable; + private static Table testTableHot; + private static Instance testInstance; @BeforeClass - public static void setUpClass() throws InterruptedException { + public static void setUpClass() throws InterruptedException, IOException { assume() .withMessage("BigtableInstanceAdminClient is not supported on Emulator") .that(testEnvRule.env()) @@ -91,6 +95,26 @@ public static void setUpClass() throws InterruptedException { targetCluster = testEnvRule.env().getPrimaryClusterId(); testTable = createAndPopulateTestTable(tableAdmin, dataClient); + + String newInstanceId = PrefixGenerator.newPrefix("backupIT"); + targetClusterHot = newInstanceId + "-c1"; + + testInstance = + instanceAdmin.createInstance( + CreateInstanceRequest.of(newInstanceId) + .setDisplayName("BigtableBackupIT") + .addCluster( + targetClusterHot, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD)); + + tableAdminHot = + BigtableTableAdminClient.create( + testEnvRule.env().getTableAdminSettings().toBuilder() + .setInstanceId(newInstanceId) + .build()); + + testTableHot = + tableAdminHot.createTable( + CreateTableRequest.of(PrefixGenerator.newPrefix("hot-table")).addFamily("cf")); } @AfterClass @@ -102,6 +126,13 @@ public static void tearDownClass() { // Ignore. } } + if (testInstance != null) { + try { + instanceAdmin.deleteInstance(testInstance.getId()); + } catch (Exception e) { + LOGGER.log(Level.WARNING, "Failed to clean up instance ", e); + } + } } private static void deleteBackupIgnoreErrors( @@ -164,6 +195,66 @@ public void createAndGetBackupTest() { } } + @Test + public void createAndGetHotBackupTest() { + String backupId = prefixGenerator.newPrefix(); + Instant expireTime = Instant.now().plus(Duration.ofHours(24)); + Instant hotToStandardTime = Instant.now().plus(Duration.ofHours(24)); + + CreateBackupRequest request = + CreateBackupRequest.of(targetClusterHot, backupId) + .setSourceTableId(testTableHot.getId()) + .setExpireTime(expireTime) + .setBackupType(Backup.BackupType.HOT) + .setHotToStandardTime(hotToStandardTime); + try { + Backup response = tableAdminHot.createBackup(request); + assertWithMessage("Got wrong backup Id in CreateBackup") + .that(response.getId()) + .isEqualTo(backupId); + assertWithMessage("Got wrong source table name in CreateBackup") + .that(response.getSourceTableId()) + .isEqualTo(testTableHot.getId()); + assertWithMessage("Got wrong expire time in CreateBackup") + .that(response.getExpireTime()) + .isEqualTo(expireTime); + assertWithMessage("Got wrong backup type in CreateBackup") + .that(response.getBackupType()) + .isEqualTo(Backup.BackupType.HOT); + assertWithMessage("Got wrong hot to standard time in CreateBackup") + .that(response.getHotToStandardTime()) + .isEqualTo(hotToStandardTime); + + Backup result = tableAdminHot.getBackup(targetClusterHot, backupId); + assertWithMessage("Got wrong backup Id in GetBackup API") + .that(result.getId()) + .isEqualTo(backupId); + assertWithMessage("Got wrong source table name in GetBackup API") + .that(result.getSourceTableId()) + .isEqualTo(testTableHot.getId()); + assertWithMessage("Got wrong expire time in GetBackup API") + .that(result.getExpireTime()) + .isEqualTo(expireTime); + assertWithMessage("Got wrong hot to standard time in GetBackup API") + .that(result.getHotToStandardTime()) + .isEqualTo(hotToStandardTime); + assertWithMessage("Got empty start time in GetBackup API") + .that(result.getStartTime()) + .isNotNull(); + assertWithMessage("Got wrong size bytes in GetBackup API") + .that(result.getSizeBytes()) + .isEqualTo(0L); + assertWithMessage("Got wrong state in GetBackup API") + .that(result.getState()) + .isAnyOf(Backup.State.CREATING, Backup.State.READY); + assertWithMessage("Got wrong backup type in GetBackup API") + .that(result.getBackupType()) + .isEqualTo(Backup.BackupType.HOT); + } finally { + deleteBackupIgnoreErrors(tableAdminHot, targetClusterHot, backupId); + } + } + @Test public void listBackupTest() { String backupId1 = prefixGenerator.newPrefix(); @@ -188,16 +279,26 @@ public void listBackupTest() { @Test public void updateBackupTest() { String backupId = prefixGenerator.newPrefix(); - tableAdmin.createBackup(createBackupRequest(backupId)); + tableAdminHot.createBackup( + CreateBackupRequest.of(targetClusterHot, backupId) + .setSourceTableId(testTableHot.getId()) + .setExpireTime(Instant.now().plus(Duration.ofDays(15))) + .setBackupType(Backup.BackupType.HOT) + .setHotToStandardTime(Instant.now().plus(Duration.ofDays(10)))); Instant expireTime = Instant.now().plus(Duration.ofDays(20)); UpdateBackupRequest req = - UpdateBackupRequest.of(targetCluster, backupId).setExpireTime(expireTime); + UpdateBackupRequest.of(targetClusterHot, backupId) + .setExpireTime(expireTime) + .clearHotToStandardTime(); try { - Backup backup = tableAdmin.updateBackup(req); + Backup backup = tableAdminHot.updateBackup(req); assertWithMessage("Incorrect expire time").that(backup.getExpireTime()).isEqualTo(expireTime); + assertWithMessage("Incorrect hot to standard time") + .that(backup.getHotToStandardTime()) + .isNull(); } finally { - deleteBackupIgnoreErrors(targetCluster, backupId); + deleteBackupIgnoreErrors(tableAdminHot, targetClusterHot, backupId); } } @@ -265,7 +366,7 @@ public void crossInstanceRestoreTest() .addCluster(targetInstance, testEnvRule.env().getSecondaryZone(), 1, StorageType.SSD) .setDisplayName("backups-dest-test-instance") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try (BigtableTableAdminClient destTableAdmin = testEnvRule.env().getTableAdminClientForInstance(targetInstance)) { @@ -365,7 +466,7 @@ public void crossInstanceCopyBackupTest() .addCluster(destCluster, testEnvRule.env().getSecondaryZone(), 1, StorageType.SSD) .setDisplayName("backups-dest-test-instance") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try (BigtableTableAdminClient destTableAdmin = testEnvRule.env().getTableAdminClientForInstance(destInstance)) { @@ -442,8 +543,10 @@ private CreateBackupRequest createBackupRequest(String backupId) { private static Table createAndPopulateTestTable( BigtableTableAdminClient tableAdmin, BigtableDataClient dataClient) throws InterruptedException { - String tableId = PrefixGenerator.newPrefix("BigtableBackupIT#createAndPopulateTestTable"); - Table testTable = tableAdmin.createTable(CreateTableRequest.of(tableId).addFamily("cf1")); + TableId tableId = + TableId.of(PrefixGenerator.newPrefix("BigtableBackupIT#createAndPopulateTestTable")); + Table testTable = + tableAdmin.createTable(CreateTableRequest.of(tableId.getTableId()).addFamily("cf1")); // Populate test data. byte[] rowBytes = new byte[1024]; @@ -452,9 +555,10 @@ private static Table createAndPopulateTestTable( try (Batcher batcher = dataClient.newBulkMutationBatcher(tableId)) { for (int i = 0; i < 10; i++) { - batcher.add( - RowMutationEntry.create("test-row-" + i) - .setCell("cf1", ByteString.EMPTY, ByteString.copyFrom(rowBytes))); + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("test-row-" + i) + .setCell("cf1", ByteString.EMPTY, ByteString.copyFrom(rowBytes))); } } return testTable; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableCmekIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableCmekIT.java index 11f4a99b1c..4d3d05f5b4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableCmekIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableCmekIT.java @@ -30,6 +30,7 @@ import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.EncryptionInfo; +import com.google.cloud.bigtable.admin.v2.models.StaticClusterSize; import com.google.cloud.bigtable.admin.v2.models.StorageType; import com.google.cloud.bigtable.common.Status; import com.google.cloud.bigtable.common.Status.Code; @@ -61,7 +62,7 @@ @RunWith(JUnit4.class) public class BigtableCmekIT { - private static final int[] BACKOFF_DURATION = {5, 10, 50, 100, 150, 200, 250, 300}; + private static final long[] BACKOFF_DURATION = {5, 10, 50, 100, 150, 200, 250, 300}; private static final Logger LOGGER = Logger.getLogger(BigtableCmekIT.class.getName()); private static final String TEST_TABLE_ID = "test-table-for-cmek-it"; private static final String BACKUP_ID = "test-table-for-cmek-it-backup"; @@ -100,23 +101,21 @@ public static void validatePlatform() throws IOException { Sets.difference( ImmutableSet.of( testEnvRule.env().getPrimaryZone(), testEnvRule.env().getSecondaryZone()), - ImmutableSet.of(zones)) + ImmutableSet.copyOf(zones)) .iterator() .next(); instanceAdmin = testEnvRule.env().getInstanceAdminClient(); tableAdmin = BigtableTableAdminClient.create( - testEnvRule - .env() - .getTableAdminSettings() - .toBuilder() + testEnvRule.env().getTableAdminSettings().toBuilder() .setInstanceId(instanceId) .build()); LOGGER.info("Creating cluster in zone: " + zones.get(0)); instanceAdmin.createInstance( CreateInstanceRequest.of(instanceId) + .setDisplayName("BigtableCmekIT") .addCmekCluster(clusterId1, zones.get(0), 1, StorageType.SSD, kmsKeyName)); // Create a table. Key is inherited from the cluster configuration tableAdmin.createTable(CreateTableRequest.of(TEST_TABLE_ID).addFamily("cf")); @@ -146,7 +145,7 @@ public void instanceAndClusterTest() { instanceAdmin.createCluster( CreateClusterRequest.of(instanceId, clusterId2) .setZone(zones.get(1)) - .setServeNodes(1) + .setScalingMode(StaticClusterSize.of(1)) .setStorageType(StorageType.SSD) .setKmsKeyName(kmsKeyName)); @@ -158,7 +157,7 @@ public void instanceAndClusterTest() { instanceAdmin.createCluster( CreateClusterRequest.of(instanceId, clusterId3) .setZone(otherZone) - .setServeNodes(1) + .setScalingMode(StaticClusterSize.of(1)) .setStorageType(StorageType.SSD) .setKmsKeyName(kmsKeyName)); Assert.fail("should have thrown an error"); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java index 76413165bd..0adc7462a7 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableInstanceAdminClientIT.java @@ -19,6 +19,7 @@ import static com.google.common.truth.Truth.assertWithMessage; import static com.google.common.truth.TruthJUnit.assume; +import com.google.api.gax.rpc.FailedPreconditionException; import com.google.cloud.Policy; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; import com.google.cloud.bigtable.admin.v2.models.AppProfile; @@ -28,7 +29,6 @@ import com.google.cloud.bigtable.admin.v2.models.CreateClusterRequest; import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; import com.google.cloud.bigtable.admin.v2.models.Instance; -import com.google.cloud.bigtable.admin.v2.models.Instance.Type; import com.google.cloud.bigtable.admin.v2.models.StaticClusterSize; import com.google.cloud.bigtable.admin.v2.models.StorageType; import com.google.cloud.bigtable.admin.v2.models.UpdateAppProfileRequest; @@ -36,7 +36,10 @@ import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; +import java.time.Duration; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; @@ -49,6 +52,8 @@ public class BigtableInstanceAdminClientIT { @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); + private static final Logger logger = + Logger.getLogger(BigtableInstanceAdminClientIT.class.getName()); @Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator(); private String instanceId = testEnvRule.env().getInstanceId(); @@ -110,7 +115,7 @@ public void appProfileTestMultiClusterWithIds() { .addCluster(newClusterId2, testEnvRule.env().getSecondaryZone(), 1, StorageType.SSD) .setDisplayName("Multi-Cluster-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try { assertThat(client.exists(newInstanceId)).isTrue(); @@ -201,7 +206,7 @@ public void appProfileTestPriority() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD) .setDisplayName("Priority-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try { assertThat(client.exists(newInstanceId)).isTrue(); @@ -252,7 +257,7 @@ public void appProfileTestDataBoost() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD) .setDisplayName("Priority-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try { assertThat(client.exists(newInstanceId)).isTrue(); @@ -279,6 +284,43 @@ public void appProfileTestDataBoost() { } } + @Test + public void appProfileTestRowAffinity() { + String newInstanceId = prefixGenerator.newPrefix(); + String newClusterId = newInstanceId + "-c1"; + String newClusterId2 = newInstanceId + "-c2"; + + client.createInstance( + CreateInstanceRequest.of(newInstanceId) + .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD) + .addCluster(newClusterId2, testEnvRule.env().getSecondaryZone(), 1, StorageType.SSD) + .setDisplayName("Row-Affinity-Instance-Test") + .addLabel("state", "readytodelete") + .setType(Instance.Type.PRODUCTION)); + + try { + assertThat(client.exists(newInstanceId)).isTrue(); + + String testAppProfile = prefixGenerator.newPrefix(); + + CreateAppProfileRequest request = + CreateAppProfileRequest.of(newInstanceId, testAppProfile) + .setRoutingPolicy( + AppProfile.MultiClusterRoutingPolicy.withRowAffinity(newClusterId, newClusterId2)) + .setDescription("row affinity app profile"); + + AppProfile newlyCreateAppProfile = client.createAppProfile(request); + AppProfile.RoutingPolicy routingPolicy = newlyCreateAppProfile.getPolicy(); + assertThat(routingPolicy) + .isEqualTo( + AppProfile.MultiClusterRoutingPolicy.withRowAffinity(newClusterId, newClusterId2)); + } finally { + if (client.exists(newInstanceId)) { + client.deleteInstance(newInstanceId); + } + } + } + @Test public void iamUpdateTest() { Policy policy = client.getIamPolicy(instanceId); @@ -309,7 +351,7 @@ public void instanceAndClusterCreationDeletionTest() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 3, StorageType.SSD) .setDisplayName("Fresh-Instance-Name") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); try { assertThat(client.exists(newInstanceId)).isTrue(); @@ -344,7 +386,7 @@ private void clusterCreationDeletionTestHelper(String newInstanceId) { CreateClusterRequest.of(newInstanceId, newClusterId) .setZone(testEnvRule.env().getSecondaryZone()) .setStorageType(StorageType.SSD) - .setServeNodes(3)); + .setScalingMode(StaticClusterSize.of(3))); try { assertThat(client.getCluster(newInstanceId, newClusterId)).isNotNull(); @@ -383,7 +425,7 @@ public void createClusterWithAutoscalingTest() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.HDD) .setDisplayName("Multi-Cluster-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); String clusterId = prefixGenerator.newPrefix(); CreateClusterRequest createClusterRequest = @@ -410,7 +452,7 @@ public void createClusterWithAutoscalingTest() { } @Test - public void createClusterWithAutoscalingAndPartialUpdateTest() { + public void createClusterWithAutoscalingAndPartialUpdateTest() throws Exception { String newInstanceId = prefixGenerator.newPrefix(); String newClusterId = newInstanceId + "-c1"; @@ -420,7 +462,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD) .setDisplayName("Multi-Cluster-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); String clusterId = prefixGenerator.newPrefix(); CreateClusterRequest createClusterRequest = @@ -448,8 +490,16 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedCluster.getAutoscalingCpuPercentageTarget()).isEqualTo(20); assertThat(retrievedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); + // The test might trigger cluster autoscaling, which races against the update cluster calls in + // this test and causing the update cluster calls to fail with "FAILED_PRECONDITION: Cannot + // update cluster that is currently being modified" error. + // In order to avoid test flakiness due to this race condition, we wrap all the update cluster + // call with a retry loop. + // TODO: After we have a proper fix for the issue, remove the + // updateClusterAutoScalingConfigWithRetry function and all the calls to it. + Cluster updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId).setMaxNodes(3)); assertThat(updatedCluster.getAutoscalingMinServeNodes()).isEqualTo(1); assertThat(updatedCluster.getAutoscalingMaxServeNodes()).isEqualTo(3); @@ -463,7 +513,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId).setMinNodes(2)); assertThat(updatedCluster.getAutoscalingMinServeNodes()).isEqualTo(2); assertThat(updatedCluster.getAutoscalingMaxServeNodes()).isEqualTo(3); @@ -477,7 +527,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) .setCpuUtilizationTargetPercent(40)); assertThat(updatedCluster.getAutoscalingMinServeNodes()).isEqualTo(2); @@ -492,7 +542,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) .setCpuUtilizationTargetPercent(45) .setMaxNodes(5)); @@ -508,7 +558,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2561); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) .setStorageUtilizationGibPerNode(2777)); assertThat(updatedCluster.getAutoscalingMinServeNodes()).isEqualTo(2); @@ -523,7 +573,7 @@ public void createClusterWithAutoscalingAndPartialUpdateTest() { assertThat(retrievedUpdatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(2777); updatedCluster = - client.updateClusterAutoscalingConfig( + updateClusterAutoScalingConfigWithRetry( ClusterAutoscalingConfig.of(newInstanceId, clusterId) // testing default case .setStorageUtilizationGibPerNode(0)); @@ -553,7 +603,7 @@ public void createClusterWithManualScalingTest() { .addCluster(newClusterId, testEnvRule.env().getPrimaryZone(), 1, StorageType.SSD) .setDisplayName("Multi-Cluster-Instance-Test") .addLabel("state", "readytodelete") - .setType(Type.PRODUCTION)); + .setType(Instance.Type.PRODUCTION)); String clusterId = prefixGenerator.newPrefix(); CreateClusterRequest createClusterRequest = @@ -614,4 +664,20 @@ private void basicClusterOperationTestHelper(String targetInstanceId, String tar assertThat(updatedCluster.getAutoscalingCpuPercentageTarget()).isEqualTo(0); assertThat(updatedCluster.getStorageUtilizationGibPerNode()).isEqualTo(0); } + + private Cluster updateClusterAutoScalingConfigWithRetry( + ClusterAutoscalingConfig clusterAutoscalingConfig) throws Exception { + int retryCount = 0; + int maxRetries = 10; + while (true) { + try { + return client.updateClusterAutoscalingConfig(clusterAutoscalingConfig); + } catch (FailedPreconditionException e) { + if (++retryCount == maxRetries) throw e; + logger.log( + Level.INFO, "Retrying updateClusterAutoscalingConfig, retryCount: " + retryCount); + Thread.sleep(Duration.ofMinutes(1).toMillis()); + } + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableLogicalViewIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableLogicalViewIT.java new file mode 100644 index 0000000000..89da11da3a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableLogicalViewIT.java @@ -0,0 +1,204 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.it; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.google.common.truth.TruthJUnit.assume; +import static org.junit.Assert.fail; + +import com.google.api.gax.rpc.FailedPreconditionException; +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.CreateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.LogicalView; +import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.admin.v2.models.UpdateLogicalViewRequest; +import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; +import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; +import io.grpc.StatusRuntimeException; +import java.util.List; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class BigtableLogicalViewIT { + @ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule(); + @Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator(); + private static final Logger LOGGER = Logger.getLogger(BigtableLogicalViewIT.class.getName()); + private static final long[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + + private static BigtableInstanceAdminClient client; + private static Table testTable; + + private final String instanceId = testEnvRule.env().getInstanceId(); + + // TODO: Update this test once emulator supports InstanceAdmin operation + // https://github.com/googleapis/google-cloud-go/issues/1069 + @BeforeClass + public static void validatePlatform() { + assume() + .withMessage("BigtableInstanceAdminClient doesn't support on Emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + } + + @Before + public void setUp() throws InterruptedException { + client = testEnvRule.env().getInstanceAdminClient(); + testTable = createTestTable(testEnvRule.env().getTableAdminClient()); + } + + @After + public void tearDown() throws InterruptedException { + if (testTable != null) { + testEnvRule.env().getTableAdminClient().deleteTable(testTable.getId()); + } + } + + @Test + public void createLogicalViewAndGetLogicalViewTest() { + String logicalViewId = prefixGenerator.newPrefix(); + + CreateLogicalViewRequest request = + CreateLogicalViewRequest.of(instanceId, logicalViewId) + .setQuery(getQuery()) + .setDeletionProtection(false); + try { + LogicalView response = client.createLogicalView(request); + assertWithMessage("Got wrong logical view Id in CreateLogicalView") + .that(response.getId()) + .isEqualTo(logicalViewId); + assertWithMessage("Got wrong deletion protection in CreateLogicalView") + .that(response.isDeletionProtected()) + .isFalse(); + assertWithMessage("Got wrong query in CreateLogicalView") + .that(response.getQuery()) + .isEqualTo(getQuery()); + + response = client.getLogicalView(instanceId, logicalViewId); + assertWithMessage("Got wrong logical view Id in getLogicalView") + .that(response.getId()) + .isEqualTo(logicalViewId); + assertWithMessage("Got wrong deletion protection in getLogicalView") + .that(response.isDeletionProtected()) + .isFalse(); + assertWithMessage("Got wrong query in getLogicalView") + .that(response.getQuery()) + .isEqualTo(getQuery()); + } finally { + client.deleteLogicalView(instanceId, logicalViewId); + } + } + + @Test + public void listLogicalViewsTest() { + String logicalViewId = prefixGenerator.newPrefix(); + + try { + LogicalView logicalView = client.createLogicalView(createLogicalViewRequest(logicalViewId)); + + List response = client.listLogicalViews(instanceId); + assertWithMessage("Got wrong logical view Ids in listLogicalViews") + .that(response) + .contains(logicalView); + } finally { + client.deleteLogicalView(instanceId, logicalViewId); + } + } + + @Test + public void updateLogicalViewAndDeleteLogicalViewTest() throws InterruptedException { + String logicalViewId = prefixGenerator.newPrefix(); + + // Create a deletion-protected logical view. + CreateLogicalViewRequest request = + createLogicalViewRequest(logicalViewId).setDeletionProtection(true); + + LogicalView response = client.createLogicalView(request); + assertWithMessage("Got wrong deletion protection in CreateLogicalView") + .that(response.isDeletionProtected()) + .isTrue(); + + // We should not be able to delete the logical view. + try { + client.deleteLogicalView(instanceId, logicalViewId); + fail("A delete-protected logical view should not have been able to be deleted"); + } catch (FailedPreconditionException e) { + assertWithMessage("Incorrect exception type") + .that(e.getCause()) + .isInstanceOf(StatusRuntimeException.class); + } + + // Update the deletion protection bit and query of the logical view. + String query = "SELECT 1 AS value"; + UpdateLogicalViewRequest updateRequest = + UpdateLogicalViewRequest.of(response).setQuery(query).setDeletionProtection(false); + response = client.updateLogicalView(updateRequest); + assertWithMessage("Got wrong deletion protection in UpdateLogicalView") + .that(response.isDeletionProtected()) + .isFalse(); + assertWithMessage("Got wrong query in UpdateLogicalView") + .that(response.getQuery()) + .isEqualTo(query); + + // Now we should be able to successfully delete the LogicalView. + client.deleteLogicalView(instanceId, logicalViewId); + try { + for (int i = 0; i < BACKOFF_DURATION.length; i++) { + client.getLogicalView(instanceId, logicalViewId); + + LOGGER.info( + "Wait for " + + BACKOFF_DURATION[i] + + " seconds for deleting logical view " + + logicalViewId); + Thread.sleep(BACKOFF_DURATION[i] * 1000); + } + fail("LogicalView was not deleted."); + } catch (NotFoundException e) { + assertWithMessage("Incorrect exception type") + .that(e.getCause()) + .isInstanceOf(StatusRuntimeException.class); + } + } + + private CreateLogicalViewRequest createLogicalViewRequest(String logicalViewId) { + return CreateLogicalViewRequest.of(instanceId, logicalViewId).setQuery(getQuery()); + } + + private String getQuery() { + return "SELECT _key, cf1['column'] as column FROM `" + testTable.getId() + "`"; + } + + private static Table createTestTable(BigtableTableAdminClient tableAdmin) + throws InterruptedException { + String tableId = PrefixGenerator.newPrefix("BigtableLogicalViewIT#createTestTable"); + Table testTable = tableAdmin.createTable(CreateTableRequest.of(tableId).addFamily("cf1")); + + return testTable; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java new file mode 100644 index 0000000000..1ae8c7bd94 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableMaterializedViewIT.java @@ -0,0 +1,203 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.it; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.google.common.truth.TruthJUnit.assume; +import static org.junit.Assert.fail; + +import com.google.api.gax.rpc.FailedPreconditionException; +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.CreateMaterializedViewRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.MaterializedView; +import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.admin.v2.models.UpdateMaterializedViewRequest; +import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; +import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.List; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class BigtableMaterializedViewIT { + + @ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule(); + @Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator(); + private static final Logger LOGGER = Logger.getLogger(BigtableMaterializedViewIT.class.getName()); + private static final long[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + + private BigtableInstanceAdminClient client; + private Table testTable; + private final String instanceId = testEnvRule.env().getInstanceId(); + + // TODO: Update this test once emulator supports InstanceAdmin operation + // https://github.com/googleapis/google-cloud-go/issues/1069 + @BeforeClass + public static void validatePlatform() throws IOException { + assume() + .withMessage("BigtableInstanceAdminClient doesn't support on Emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + } + + @Before + public void setUp() throws InterruptedException, IOException { + client = testEnvRule.env().getInstanceAdminClient(); + testTable = createTestTable(testEnvRule.env().getTableAdminClient()); + } + + @After + public void tearDown() throws InterruptedException { + if (testTable != null) { + testEnvRule.env().getTableAdminClient().deleteTable(testTable.getId()); + } + } + + @Test + public void createMaterializedViewAndGetMaterializedViewTest() { + String materializedViewId = prefixGenerator.newPrefix(); + + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.of(instanceId, materializedViewId) + .setQuery(getQuery()) + .setDeletionProtection(false); + try { + MaterializedView response = client.createMaterializedView(request); + assertWithMessage("Got wrong materialized view Id in CreateMaterializedView") + .that(response.getId()) + .isEqualTo(materializedViewId); + assertWithMessage("Got wrong deletion protection in CreateMaterializedView") + .that(response.isDeletionProtected()) + .isFalse(); + assertWithMessage("Got wrong deletion protection in CreateMaterializedView") + .that(response.getQuery()) + .isEqualTo(getQuery()); + + response = client.getMaterializedView(instanceId, materializedViewId); + assertWithMessage("Got wrong materialized view Id in getMaterializedView") + .that(response.getId()) + .isEqualTo(materializedViewId); + assertWithMessage("Got wrong deletion protection in getMaterializedView") + .that(response.isDeletionProtected()) + .isFalse(); + assertWithMessage("Got wrong deletion protection in getMaterializedView") + .that(response.getQuery()) + .isEqualTo(getQuery()); + } finally { + client.deleteMaterializedView(instanceId, materializedViewId); + } + } + + @Test + public void listMaterializedViewsTest() { + String materializedViewId = prefixGenerator.newPrefix(); + + try { + MaterializedView materializedView = + client.createMaterializedView(createMaterializedViewRequest(materializedViewId)); + + List response = client.listMaterializedViews(instanceId); + assertWithMessage("Got wrong materialized view Ids in listMaterializedViews") + .that(response) + .contains(materializedView); + } finally { + client.deleteMaterializedView(instanceId, materializedViewId); + } + } + + @Test + public void updateMaterializedViewAndDeleteMaterializedViewTest() throws InterruptedException { + String materializedViewId = prefixGenerator.newPrefix(); + + // Create a deletion-protected materialized view. + CreateMaterializedViewRequest request = + createMaterializedViewRequest(materializedViewId).setDeletionProtection(true); + + MaterializedView response = client.createMaterializedView(request); + assertWithMessage("Got wrong deletion protection in CreateMaterializedView") + .that(response.isDeletionProtected()) + .isTrue(); + + // We should not be able to delete the materialized view. + try { + client.deleteMaterializedView(instanceId, materializedViewId); + fail("A delete-protected materialized view should not have been able to be deleted"); + } catch (FailedPreconditionException e) { + assertWithMessage("Incorrect exception type") + .that(e.getCause()) + .isInstanceOf(StatusRuntimeException.class); + } + + // Update the deletion protection bit of the materialized view. + UpdateMaterializedViewRequest updateRequest = + UpdateMaterializedViewRequest.of(response).setDeletionProtection(false); + response = client.updateMaterializedView(updateRequest); + assertWithMessage("Got wrong deletion protection in UpdateMaterializedView") + .that(response.isDeletionProtected()) + .isFalse(); + + // Now we should be able to successfully delete the MaterializedView. + client.deleteMaterializedView(instanceId, materializedViewId); + try { + for (int i = 0; i < BACKOFF_DURATION.length; i++) { + client.getMaterializedView(instanceId, materializedViewId); + + LOGGER.info( + "Wait for " + + BACKOFF_DURATION[i] + + " seconds for deleting materialized view " + + materializedViewId); + Thread.sleep(BACKOFF_DURATION[i] * 1000); + } + fail("MaterializedView was not deleted."); + } catch (NotFoundException e) { + assertWithMessage("Incorrect exception type") + .that(e.getCause()) + .isInstanceOf(StatusRuntimeException.class); + } + } + + private CreateMaterializedViewRequest createMaterializedViewRequest(String materializedViewId) { + return CreateMaterializedViewRequest.of(instanceId, materializedViewId).setQuery(getQuery()); + } + + private String getQuery() { + return "SELECT _key, MAX(cf1['column']) as column FROM `" + + testTable.getId() + + "` GROUP BY _key"; + } + + private Table createTestTable(BigtableTableAdminClient tableAdmin) throws InterruptedException { + String tableId = PrefixGenerator.newPrefix("BigtableMaterializedViewIT#createTestTable"); + Table testTable = tableAdmin.createTable(CreateTableRequest.of(tableId).addFamily("cf1")); + + return testTable; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableSchemaBundleIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableSchemaBundleIT.java new file mode 100644 index 0000000000..18473f2c36 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableSchemaBundleIT.java @@ -0,0 +1,226 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.it; + +import static com.google.common.truth.Truth.assertWithMessage; +import static com.google.common.truth.TruthJUnit.assume; +import static org.junit.Assert.fail; + +import com.google.api.core.ApiFuture; +import com.google.api.gax.batching.Batcher; +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.CreateSchemaBundleRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.SchemaBundle; +import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.admin.v2.models.UpdateSchemaBundleRequest; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; +import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; +import com.google.protobuf.ByteString; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; +import java.util.Random; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class BigtableSchemaBundleIT { + @ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule(); + @Rule public final PrefixGenerator prefixGenerator = new PrefixGenerator(); + private static final Logger LOGGER = Logger.getLogger(BigtableSchemaBundleIT.class.getName()); + private static final long[] BACKOFF_DURATION = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}; + // Location: `google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb` + private static final String TEST_PROTO_SCHEMA_BUNDLE = "proto_schema_bundle.pb"; + // Location: + // `google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb` + private static final String TEST_UPDATED_PROTO_SCHEMA_BUNDLE = "updated_proto_schema_bundle.pb"; + + private static BigtableTableAdminClient tableAdmin; + private static BigtableDataClient dataClient; + private Table testTable; + + @BeforeClass + public static void setUpClass() throws InterruptedException { + assume() + .withMessage("BigtableInstanceAdminClient is not supported on Emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + + tableAdmin = testEnvRule.env().getTableAdminClient(); + dataClient = testEnvRule.env().getDataClient(); + } + + @Before + public void setUp() throws InterruptedException { + testTable = createAndPopulateTestTable(tableAdmin, dataClient); + } + + @After + public void tearDown() { + if (testTable != null) { + try { + tableAdmin.deleteTable(testTable.getId()); + } catch (Exception e) { + // Ignore. + } + } + } + + @Test + public void createSchemaBundleAndGetSchemaBundleTest() throws IOException, URISyntaxException { + String SchemaBundleId = prefixGenerator.newPrefix(); + byte[] content = Files.readAllBytes(Paths.get(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.of(testTable.getId(), SchemaBundleId) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + try { + SchemaBundle response = tableAdmin.createSchemaBundle(request); + assertWithMessage("Got wrong schema bundle Id in createSchemaBundle") + .that(response.getId()) + .isEqualTo(SchemaBundleId); + assertWithMessage("Got wrong proto schema in createSchemaBundle") + .that(response.getProtoSchema()) + .isEqualTo(ByteString.copyFrom(content)); + + response = tableAdmin.getSchemaBundle(testTable.getId(), SchemaBundleId); + assertWithMessage("Got wrong schema bundle Id in getSchemaBundle") + .that(response.getId()) + .isEqualTo(SchemaBundleId); + assertWithMessage("Got wrong proto schema in getSchemaBundle") + .that(response.getProtoSchema()) + .isEqualTo(ByteString.copyFrom(content)); + } finally { + tableAdmin.deleteSchemaBundle(testTable.getId(), SchemaBundleId); + } + } + + @Test + public void listSchemaBundlesTest() throws IOException, URISyntaxException { + String SchemaBundleId1 = prefixGenerator.newPrefix(); + String SchemaBundleId2 = prefixGenerator.newPrefix(); + + tableAdmin.createSchemaBundle(createSchemaBundleRequest(SchemaBundleId1)); + tableAdmin.createSchemaBundle(createSchemaBundleRequest(SchemaBundleId2)); + + List response = tableAdmin.listSchemaBundles(testTable.getId()); + // Concurrent tests running may cause flakiness. Use containsAtLeast instead of + // containsExactly. + assertWithMessage("Got wrong schema bundle Ids in listSchemaBundles") + .that(response) + .containsAtLeast( + tableAdmin.getSchemaBundle(testTable.getId(), SchemaBundleId1).getId(), + tableAdmin.getSchemaBundle(testTable.getId(), SchemaBundleId2).getId()); + } + + @Test + public void updateSchemaBundleAndDeleteSchemaBundleTest() + throws InterruptedException, IOException, URISyntaxException { + String SchemaBundleId = prefixGenerator.newPrefix(); + + // Create a schema bundle. + CreateSchemaBundleRequest request = createSchemaBundleRequest(SchemaBundleId); + + SchemaBundle response; + + SchemaBundle ignored = tableAdmin.createSchemaBundle(request); + + // Update the schema bundle. + byte[] content = + Files.readAllBytes(Paths.get(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE))); + UpdateSchemaBundleRequest updateRequest = + UpdateSchemaBundleRequest.of(testTable.getId(), SchemaBundleId) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE)); + response = tableAdmin.updateSchemaBundle(updateRequest); + assertWithMessage("Got wrong deletion protection in UpdateSchemaBundle") + .that(response.getProtoSchema()) + .isEqualTo(ByteString.copyFrom(content)); + + // Now we should be able to successfully delete the SchemaBundle. + tableAdmin.deleteSchemaBundle(testTable.getId(), SchemaBundleId); + try { + for (int i = 0; i < BACKOFF_DURATION.length; i++) { + tableAdmin.getSchemaBundle(testTable.getId(), SchemaBundleId); + + LOGGER.info( + "Wait for " + + BACKOFF_DURATION[i] + + " seconds for deleting schema bundle " + + SchemaBundleId); + Thread.sleep(BACKOFF_DURATION[i] * 1000); + } + fail("SchemaBundle was not deleted."); + } catch (NotFoundException e) { + assertWithMessage("Incorrect exception type") + .that(e.getCause()) + .isInstanceOf(StatusRuntimeException.class); + } + } + + private CreateSchemaBundleRequest createSchemaBundleRequest(String SchemaBundleId) + throws IOException, URISyntaxException { + return CreateSchemaBundleRequest.of(testTable.getId(), SchemaBundleId) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + } + + private static Table createAndPopulateTestTable( + BigtableTableAdminClient tableAdmin, BigtableDataClient dataClient) + throws InterruptedException { + TableId tableId = + TableId.of(PrefixGenerator.newPrefix("BigtableSchemaBundleIT#createAndPopulateTestTable")); + Table testTable = + tableAdmin.createTable(CreateTableRequest.of(tableId.getTableId()).addFamily("cf1")); + + // Populate test data. + byte[] rowBytes = new byte[1024]; + Random random = new Random(); + random.nextBytes(rowBytes); + + try (Batcher batcher = dataClient.newBulkMutationBatcher(tableId)) { + for (int i = 0; i < 10; i++) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("test-row-" + i) + .setCell("cf1", ByteString.EMPTY, ByteString.copyFrom(rowBytes))); + } + } + return testTable; + } + + private String getResourceFilePath(String filePath) throws URISyntaxException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL protoSchema = cl.getResource(filePath); + return Paths.get(protoSchema.toURI()).toAbsolutePath().toString(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java index a1b5c97e34..e88ccbb9b6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/it/BigtableTableAdminClientIT.java @@ -28,6 +28,7 @@ import com.google.cloud.Policy; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; import com.google.cloud.bigtable.admin.v2.models.ColumnFamily; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.GCRules.DurationRule; import com.google.cloud.bigtable.admin.v2.models.GCRules.IntersectionRule; @@ -46,6 +47,7 @@ import org.junit.After; import org.junit.Before; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -222,9 +224,26 @@ public void dropRowRange() { } @Test - public void awaitReplication() { + public void awaitConsistency() { tableAdmin.createTable(CreateTableRequest.of(tableId)); - tableAdmin.awaitReplication(tableId); + tableAdmin.awaitConsistency(ConsistencyRequest.forReplication(tableId)); + } + + /** + * Note: Data Boost consistency is essentially a check that the data you are trying to read was + * written at least 35 minutes ago. The test thus takes ~35 minutes, and we should add a separate + * profile to run this concurrently with the other tests. + */ + @Test + @Ignore + public void awaitDataBoostConsistency() { + assume() + .withMessage("Data Boost consistency not supported on Emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + tableAdmin.createTable(CreateTableRequest.of(tableId)); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forDataBoost(tableId); + tableAdmin.awaitConsistency(consistencyRequest); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AppProfileTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AppProfileTest.java index 8215e5f8fc..c0ad53b674 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AppProfileTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AppProfileTest.java @@ -291,4 +291,56 @@ public void testFromProtoWithDataBoostIsolation() { AppProfile.DataBoostIsolationReadOnlyPolicy.of( AppProfile.ComputeBillingOwner.UNSPECIFIED)); } + + @Test + public void testFromProtoWithRowAffinityNoClusterGroup() { + AppProfile profile = + AppProfile.fromProto( + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName(AppProfileName.of("my-project", "my-instance", "my-profile").toString()) + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build()) + .build()) + .setEtag("my-etag") + .build()); + + assertThat(profile.getInstanceId()).isEqualTo("my-instance"); + assertThat(profile.getId()).isEqualTo("my-profile"); + assertThat(profile.getDescription()).isEqualTo("my description"); + System.out.println(profile.getPolicy()); + System.out.println(AppProfile.MultiClusterRoutingPolicy.withRowAffinity()); + assertThat(profile.getPolicy()) + .isEqualTo(AppProfile.MultiClusterRoutingPolicy.withRowAffinity()); + } + + @Test + public void testFromProtoWithRowAffinityClusterGroup() { + AppProfile profile = + AppProfile.fromProto( + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName(AppProfileName.of("my-project", "my-instance", "my-profile").toString()) + .setDescription("my description") + .setMultiClusterRoutingUseAny( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() + .addAllClusterIds(ImmutableList.of("cluster-id-1", "cluster-id-2")) + .setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity.newBuilder() + .build()) + .build()) + .setEtag("my-etag") + .build()); + + assertThat(profile.getInstanceId()).isEqualTo("my-instance"); + assertThat(profile.getId()).isEqualTo("my-profile"); + assertThat(profile.getDescription()).isEqualTo("my description"); + assertThat(profile.getPolicy()) + .isEqualTo( + AppProfile.MultiClusterRoutingPolicy.withRowAffinity("cluster-id-1", "cluster-id-2")); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AuthorizedViewTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AuthorizedViewTest.java index 6eace3ee97..d5a87c7cfa 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AuthorizedViewTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/AuthorizedViewTest.java @@ -148,12 +148,13 @@ public void testEquality() { assertThat(authorizedView) .isNotEqualTo( - com.google.bigtable.admin.v2.AuthorizedView.newBuilder() - .setName(authorizedViewName.toString()) - .setDeletionProtection(false) - .setSubsetView( - com.google.bigtable.admin.v2.AuthorizedView.SubsetView.newBuilder().build()) - .build()); + AuthorizedView.fromProto( + com.google.bigtable.admin.v2.AuthorizedView.newBuilder() + .setName(authorizedViewName.toString()) + .setDeletionProtection(false) + .setSubsetView( + com.google.bigtable.admin.v2.AuthorizedView.SubsetView.newBuilder().build()) + .build())); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/BackupTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/BackupTest.java index 8b9e7e919a..2fc9ad2390 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/BackupTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/BackupTest.java @@ -48,11 +48,29 @@ public void testBackupStateEnumUpToDate() { assertThat(actualModelValues).containsExactlyElementsIn(validModelValues); } + @Test + public void testBackupTypeEnumUpToDate() { + List validProtoValues = + Lists.newArrayList(com.google.bigtable.admin.v2.Backup.BackupType.values()); + + List validModelValues = Lists.newArrayList(Backup.BackupType.values()); + + List actualModelValues = Lists.newArrayList(); + + for (com.google.bigtable.admin.v2.Backup.BackupType protoValue : validProtoValues) { + Backup.BackupType modelValue = Backup.BackupType.fromProto(protoValue); + actualModelValues.add(modelValue); + } + + assertThat(actualModelValues).containsExactlyElementsIn(validModelValues); + } + @Test public void testFromProto() { Timestamp expireTime = Timestamp.newBuilder().setSeconds(1234).build(); Timestamp startTime = Timestamp.newBuilder().setSeconds(1234).build(); Timestamp endTime = Timestamp.newBuilder().setSeconds(1234).build(); + Timestamp hotToStandardTime = Timestamp.newBuilder().setSeconds(1234).build(); com.google.bigtable.admin.v2.Backup proto = com.google.bigtable.admin.v2.Backup.newBuilder() .setName("projects/my-project/instances/instance1/clusters/cluster1/backups/backup1") @@ -62,8 +80,10 @@ public void testFromProto() { .setExpireTime(expireTime) .setStartTime(startTime) .setEndTime(endTime) + .setHotToStandardTime(hotToStandardTime) .setSizeBytes(123456) .setState(com.google.bigtable.admin.v2.Backup.State.READY) + .setBackupType(com.google.bigtable.admin.v2.Backup.BackupType.HOT) .build(); Backup result = Backup.fromProto(proto); @@ -76,8 +96,11 @@ public void testFromProto() { assertThat(result.getStartTime()) .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(startTime))); assertThat(result.getEndTime()).isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(endTime))); + assertThat(result.getHotToStandardTime()) + .isEqualTo(Instant.ofEpochMilli(Timestamps.toMillis(hotToStandardTime))); assertThat(result.getSizeBytes()).isEqualTo(123456); assertThat(result.getState()).isEqualTo(Backup.State.READY); + assertThat(result.getBackupType()).isEqualTo(Backup.BackupType.HOT); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java new file mode 100644 index 0000000000..c3b99a4e68 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java @@ -0,0 +1,100 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.CheckConsistencyRequest; +import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ConsistencyRequestTest { + private final String PROJECT_ID = "my-project"; + private final String INSTANCE_ID = "my-instance"; + private final String TABLE_ID = "my-table"; + private final String CONSISTENCY_TOKEN = "my-token"; + + @Test + public void testToCheckConsistencyProtoWithStandard() { + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + + TableAdminRequestContext requestContext = + TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID); + + CheckConsistencyRequest checkConsistencyRequest = + consistencyRequest.toCheckConsistencyProto(requestContext, CONSISTENCY_TOKEN); + + assertThat(checkConsistencyRequest.getName()) + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); + assertThat(checkConsistencyRequest.getConsistencyToken()).isEqualTo(CONSISTENCY_TOKEN); + assertThat(checkConsistencyRequest.getModeCase()) + .isEqualTo(CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES); + } + + @Test + public void testToCheckConsistencyProtoWithDataBoost() { + ConsistencyRequest consistencyRequest = ConsistencyRequest.forDataBoost(TABLE_ID); + + TableAdminRequestContext requestContext = + TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID); + + CheckConsistencyRequest checkConsistencyRequest = + consistencyRequest.toCheckConsistencyProto(requestContext, CONSISTENCY_TOKEN); + + assertThat(checkConsistencyRequest.getName()) + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); + assertThat(checkConsistencyRequest.getConsistencyToken()).isEqualTo(CONSISTENCY_TOKEN); + assertThat(checkConsistencyRequest.getModeCase()) + .isEqualTo(CheckConsistencyRequest.ModeCase.DATA_BOOST_READ_LOCAL_WRITES); + } + + @Test + public void testToGenerateTokenProto() { + ConsistencyRequest consistencyRequest = ConsistencyRequest.forDataBoost(TABLE_ID); + + TableAdminRequestContext requestContext = + TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID); + + GenerateConsistencyTokenRequest generateRequest = + consistencyRequest.toGenerateTokenProto(requestContext); + + assertThat(generateRequest.getName()) + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); + } + + @Test + public void testToCheckConsistencyProtoWithToken() { + ConsistencyRequest consistencyRequest = + ConsistencyRequest.forReplication(TABLE_ID, CONSISTENCY_TOKEN); + + TableAdminRequestContext requestContext = + TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID); + + CheckConsistencyRequest checkConsistencyRequest = + consistencyRequest.toCheckConsistencyProto(requestContext, CONSISTENCY_TOKEN); + + assertThat(checkConsistencyRequest.getName()) + .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)); + assertThat(checkConsistencyRequest.getConsistencyToken()).isEqualTo(CONSISTENCY_TOKEN); + assertThat(checkConsistencyRequest.getModeCase()) + .isEqualTo(CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java index 088dc2bcfe..32f882b30f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateAppProfileRequestTest.java @@ -101,4 +101,17 @@ public void testDataBoostIsolationReadOnly() { .setComputeBillingOwner(DataBoostIsolationReadOnly.ComputeBillingOwner.HOST_PAYS) .build()); } + + @Test + public void testRowAffinity() { + CreateAppProfileRequest wrapper = + CreateAppProfileRequest.of("my-instance", "my-profile") + .setRoutingPolicy(MultiClusterRoutingPolicy.withRowAffinity()); + + assertThat(wrapper.toProto("my-project").getAppProfile().getMultiClusterRoutingUseAny()) + .isEqualTo( + MultiClusterRoutingUseAny.newBuilder() + .setRowAffinity(MultiClusterRoutingUseAny.RowAffinity.newBuilder().build()) + .build()); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequestTest.java index f4a1e12f65..821919264e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateBackupRequestTest.java @@ -19,6 +19,7 @@ import com.google.bigtable.admin.v2.Backup; import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.cloud.bigtable.admin.v2.models.Backup.BackupType; import com.google.protobuf.util.Timestamps; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,13 +36,16 @@ public class CreateBackupRequestTest { private static final String INSTANCE_ID = "my-instance"; private static final String CLUSTER_ID = "my-cluster"; private static final Instant EXPIRE_TIME = Instant.now().plus(Duration.ofDays(15)); + private static final Instant HOT_TO_STANDARD_TIME = Instant.now().plus(Duration.ofDays(10)); @Test public void testToProto() { CreateBackupRequest request = CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId(TABLE_ID) - .setExpireTime(EXPIRE_TIME); + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); com.google.bigtable.admin.v2.CreateBackupRequest requestProto = com.google.bigtable.admin.v2.CreateBackupRequest.newBuilder() @@ -50,6 +54,9 @@ public void testToProto() { Backup.newBuilder() .setSourceTable(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) .setExpireTime(Timestamps.fromMillis(EXPIRE_TIME.toEpochMilli())) + .setBackupType(Backup.BackupType.HOT) + .setHotToStandardTime( + Timestamps.fromMillis(HOT_TO_STANDARD_TIME.toEpochMilli())) .build()) .setParent(NameUtil.formatClusterName(PROJECT_ID, INSTANCE_ID, CLUSTER_ID)) .build(); @@ -61,19 +68,33 @@ public void testEquality() { CreateBackupRequest request = CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId(TABLE_ID) - .setExpireTime(EXPIRE_TIME); + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); assertThat(request) .isEqualTo( CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId(TABLE_ID) - .setExpireTime(EXPIRE_TIME)); + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME)); assertThat(request) .isNotEqualTo( CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId("another-table") - .setExpireTime(EXPIRE_TIME)); + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME)); + + assertThat(request) + .isNotEqualTo( + CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setSourceTableId(TABLE_ID) + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.STANDARD) + .setHotToStandardTime(HOT_TO_STANDARD_TIME)); } @Test @@ -81,13 +102,17 @@ public void testHashCode() { CreateBackupRequest request = CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId(TABLE_ID) - .setExpireTime(EXPIRE_TIME); + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); assertThat(request.hashCode()) .isEqualTo( CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId(TABLE_ID) .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME) .hashCode()); assertThat(request.hashCode()) @@ -95,6 +120,17 @@ public void testHashCode() { CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) .setSourceTableId("another-table") .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.HOT) + .setHotToStandardTime(HOT_TO_STANDARD_TIME) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + CreateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setSourceTableId(TABLE_ID) + .setExpireTime(EXPIRE_TIME) + .setBackupType(BackupType.BACKUP_TYPE_UNSPECIFIED) + .setHotToStandardTime(HOT_TO_STANDARD_TIME) .hashCode()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java index 566641039a..fe28948347 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateClusterRequestTest.java @@ -128,6 +128,7 @@ public void testOptionalFields() { .setDisplayName("custom display name") .addLabel("my label", "with some value") .addLabel("my other label", "with some value") + .addTag("tagKeys/123", "tagValues/456") .setType(Instance.Type.DEVELOPMENT) .addCluster("cluster1", "us-east1-c", 1, StorageType.SSD); @@ -142,6 +143,7 @@ public void testOptionalFields() { .setDisplayName("custom display name") .putLabels("my label", "with some value") .putLabels("my other label", "with some value") + .putTags("tagKeys/123", "tagValues/456") .setType(com.google.bigtable.admin.v2.Instance.Type.DEVELOPMENT)) .putClusters( "cluster1", diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequestTest.java new file mode 100644 index 0000000000..eededde65b --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateLogicalViewRequestTest.java @@ -0,0 +1,93 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class CreateLogicalViewRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String LOGICAL_VIEW_ID = "my-logical-view"; + + @Test + public void testToProto() { + String query = "SELECT * FROM Table"; + CreateLogicalViewRequest request = + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery(query) + .setDeletionProtection(true); + + com.google.bigtable.admin.v2.CreateLogicalViewRequest requestProto = + com.google.bigtable.admin.v2.CreateLogicalViewRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setLogicalViewId(LOGICAL_VIEW_ID) + .setLogicalView( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setQuery(query) + .setDeletionProtection(true)) + .build(); + assertThat(request.toProto(PROJECT_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() { + CreateLogicalViewRequest request = + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(true); + + assertThat(request) + .isEqualTo( + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(true)); + + assertThat(request) + .isNotEqualTo( + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 2") + .setDeletionProtection(true)); + } + + @Test + public void testHashCode() { + CreateLogicalViewRequest request = + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(true); + + assertThat(request.hashCode()) + .isEqualTo( + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(true) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + CreateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("test 2") + .setDeletionProtection(true) + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequestTest.java new file mode 100644 index 0000000000..1a116f40fd --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateMaterializedViewRequestTest.java @@ -0,0 +1,93 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class CreateMaterializedViewRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String MATERIALIZED_VIEW_ID = "my-materialized-view"; + + @Test + public void testToProto() { + String query = "SELECT * FROM Table"; + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(true) + .setQuery(query); + + com.google.bigtable.admin.v2.CreateMaterializedViewRequest requestProto = + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setMaterializedViewId(MATERIALIZED_VIEW_ID) + .setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setDeletionProtection(true) + .setQuery(query)) + .build(); + assertThat(request.toProto(PROJECT_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() { + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(false); + + assertThat(request) + .isEqualTo( + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(false)); + + assertThat(request) + .isNotEqualTo( + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 2") + .setDeletionProtection(false)); + } + + @Test + public void testHashCode() { + CreateMaterializedViewRequest request = + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(false); + + assertThat(request.hashCode()) + .isEqualTo( + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 1") + .setDeletionProtection(false) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + CreateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setQuery("test 2") + .setDeletionProtection(false) + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequestTest.java new file mode 100644 index 0000000000..2d37eccff5 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateSchemaBundleRequestTest.java @@ -0,0 +1,107 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.protobuf.ByteString; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class CreateSchemaBundleRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + private static final String SCHEMA_BUNDLE_ID = "my-schema-bundle"; + // Location: `google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb` + private static final String TEST_PROTO_SCHEMA_BUNDLE = "proto_schema_bundle.pb"; + // Location: `google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb` + private static final String TEST_UPDATED_PROTO_SCHEMA_BUNDLE = "updated_proto_schema_bundle.pb"; + + @Test + public void testToProto() throws IOException, URISyntaxException { + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + byte[] content = Files.readAllBytes(Paths.get(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + com.google.bigtable.admin.v2.CreateSchemaBundleRequest requestProto = + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.newBuilder() + .setParent(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setSchemaBundleId(SCHEMA_BUNDLE_ID) + .setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content)) + .build()) + .build()) + .build(); + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() throws IOException, URISyntaxException { + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + assertThat(request) + .isEqualTo( + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + assertThat(request) + .isNotEqualTo( + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE))); + } + + @Test + public void testHashCode() throws IOException, URISyntaxException { + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + assertThat(request.hashCode()) + .isEqualTo( + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + CreateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE)) + .hashCode()); + } + + private String getResourceFilePath(String filePath) throws URISyntaxException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL protoSchema = cl.getResource(filePath); + return Paths.get(protoSchema.toURI()).toAbsolutePath().toString(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequestTest.java index 0f7a58c078..cbc85c9d32 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/CreateTableRequestTest.java @@ -48,7 +48,9 @@ public void testToProto() { .addFamily("another-family", GCRULES.maxAge(100, TimeUnit.HOURS)) .addSplit(splitKey) .addSplit(secondSplitKey) - .addChangeStreamRetention(Duration.ofHours(24)); + .addChangeStreamRetention(Duration.ofHours(24)) + .setDeletionProtection(true) + .setAutomatedBackup(Duration.ofHours(24), Duration.ofHours(24)); com.google.bigtable.admin.v2.CreateTableRequest requestProto = com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() @@ -70,7 +72,19 @@ public void testToProto() { ChangeStreamConfig.newBuilder() .setRetentionPeriod( com.google.protobuf.Duration.newBuilder().setSeconds(86400)) - .build())) + .build()) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder() + .setSeconds(86400) + .setNanos(0)) + .setFrequency( + com.google.protobuf.Duration.newBuilder() + .setSeconds(86400) + .setNanos(0)) + .build()) + .setDeletionProtection(true)) .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .addInitialSplits( com.google.bigtable.admin.v2.CreateTableRequest.Split.newBuilder().setKey(splitKey)) @@ -134,6 +148,7 @@ public void testEquality() { CreateTableRequest.of(TABLE_ID) .addFamily("family-id") .addFamily("another-family", GCRULES.maxAge(100, TimeUnit.HOURS)) + .setAutomatedBackup(Duration.ofHours(100), Duration.ofHours(100)) .addSplit(splitKey); assertThat(request) @@ -141,6 +156,7 @@ public void testEquality() { CreateTableRequest.of(TABLE_ID) .addFamily("family-id") .addFamily("another-family", GCRULES.maxAge(Duration.ofHours(100))) + .setAutomatedBackup(Duration.ofHours(100), Duration.ofHours(100)) .addSplit(splitKey)); assertThat(request) @@ -148,6 +164,7 @@ public void testEquality() { CreateTableRequest.of(TABLE_ID) .addFamily("family-id") .addFamily("another-family") + .setAutomatedBackup(Duration.ofHours(100), Duration.ofHours(10)) .addSplit(splitKey)); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GCRulesTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GCRulesTest.java index 61a1527a34..b949851ca1 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GCRulesTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GCRulesTest.java @@ -90,7 +90,6 @@ public void durationTimeUnitNegative() { public void versions() { VersionRule actual = GCRULES.maxVersions(10); GcRule expected = buildVersionsRule(10); - assertNotNull(actual.getMaxVersions()); assertThat(actual.toProto()).isEqualTo(expected); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilderTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilderTest.java new file mode 100644 index 0000000000..aafcc7b1d4 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/GcRuleBuilderTest.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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.GcRule; +import com.google.protobuf.util.Durations; +import java.time.Duration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class GcRuleBuilderTest { + + @Test + public void maxAge_createsCorrectProto() { + GcRule rule = GcRuleBuilder.maxAge(Duration.ofHours(1)); + + assertThat(rule.hasMaxAge()).isTrue(); + assertThat(rule.getMaxAge()).isEqualTo(Durations.fromHours(1)); + } + + @Test + public void maxVersions_createsCorrectProto() { + GcRule rule = GcRuleBuilder.maxVersions(5); + + assertThat(rule.hasMaxNumVersions()).isTrue(); + assertThat(rule.getMaxNumVersions()).isEqualTo(5); + } + + @Test + public void intersection_buildsNestedRules() { + // Expected Proto structure + GcRule expected = + GcRule.newBuilder() + .setIntersection( + GcRule.Intersection.newBuilder() + .addRules(GcRule.newBuilder().setMaxNumVersions(1).build()) + .addRules(GcRule.newBuilder().setMaxAge(Durations.fromHours(2)).build())) + .build(); + + // Using the new Builder + GcRule actual = + GcRuleBuilder.intersection() + .add(GcRuleBuilder.maxVersions(1)) + .add(GcRuleBuilder.maxAge(Duration.ofHours(2))) + .build(); + + assertThat(actual).isEqualTo(expected); + } + + @Test + public void union_buildsNestedRules() { + // Expected Proto structure + GcRule expected = + GcRule.newBuilder() + .setUnion( + GcRule.Union.newBuilder() + .addRules(GcRule.newBuilder().setMaxNumVersions(10).build()) + .addRules(GcRule.newBuilder().setMaxAge(Durations.fromDays(5)).build())) + .build(); + + // Using the new Builder + GcRule actual = + GcRuleBuilder.union() + .add(GcRuleBuilder.maxVersions(10)) + .add(GcRuleBuilder.maxAge(Duration.ofDays(5))) + .build(); + + assertThat(actual).isEqualTo(expected); + } + + @Test + public void nestedComplexRules_workCorrectly() { + // Expected Proto structure: Union of (Version(1) OR Intersection(Age(1h) AND Version(5))) + GcRule expected = + GcRule.newBuilder() + .setUnion( + GcRule.Union.newBuilder() + .addRules(GcRule.newBuilder().setMaxNumVersions(1).build()) + .addRules( + GcRule.newBuilder() + .setIntersection( + GcRule.Intersection.newBuilder() + .addRules( + GcRule.newBuilder() + .setMaxAge(Durations.fromHours(1)) + .build()) + .addRules(GcRule.newBuilder().setMaxNumVersions(5).build()) + .build()) + .build()) + .build()) + .build(); + + // Using the new Builder + GcRule actual = + GcRuleBuilder.union() + .add(GcRuleBuilder.maxVersions(1)) + .add( + GcRuleBuilder.intersection() + .add(GcRuleBuilder.maxAge(Duration.ofHours(1))) + .add(GcRuleBuilder.maxVersions(5)) + .build()) + .build(); + + // Verify the structure matches the raw proto construction + assertThat(actual).isEqualTo(expected); + + // Verify specific properties + assertThat(actual.getUnion().getRulesCount()).isEqualTo(2); + assertThat(actual.getUnion().getRules(1).getIntersection().getRulesCount()).isEqualTo(2); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/InstanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/InstanceTest.java index 78fdf15b03..35b776fbe4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/InstanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/InstanceTest.java @@ -36,6 +36,8 @@ public void testFromProto() { .setState(com.google.bigtable.admin.v2.Instance.State.READY) .putLabels("label1", "value1") .putLabels("label2", "value2") + .putTags("tagKeys/123", "tagValues/456") + .putTags("tagKeys/234", "tagValues/567") .build(); Instance result = Instance.fromProto(proto); @@ -48,6 +50,8 @@ public void testFromProto() { .containsExactly( "label1", "value1", "label2", "value2"); + assertThat(result.getTags()) + .containsExactly("tagKeys/123", "tagValues/456", "tagKeys/234", "tagValues/567"); } @Test @@ -59,6 +63,7 @@ public void testRequiresName() { .setState(com.google.bigtable.admin.v2.Instance.State.READY) .putLabels("label1", "value1") .putLabels("label2", "value2") + .putTags("tagKeys/123", "tagValues/456") .build(); Exception actualException = null; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java new file mode 100644 index 0000000000..4e6111f370 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/LogicalViewTest.java @@ -0,0 +1,113 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.LogicalViewName; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class LogicalViewTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String LOGICAL_VIEW_ID = "my-logical-view"; + + @Test + public void testFromProto() { + LogicalViewName logicalViewName = LogicalViewName.of(PROJECT_ID, INSTANCE_ID, LOGICAL_VIEW_ID); + + com.google.bigtable.admin.v2.LogicalView logicalViewProto = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(logicalViewName.toString()) + .setQuery("SELECT 1 from Table") + .setDeletionProtection(true) + .build(); + + LogicalView result = LogicalView.fromProto(logicalViewProto); + + assertThat(result.getId()).isEqualTo(LOGICAL_VIEW_ID); + assertThat(result.getQuery()).isEqualTo("SELECT 1 from Table"); + assertThat(result.isDeletionProtected()).isEqualTo(true); + } + + @Test + public void testRequiresName() { + com.google.bigtable.admin.v2.LogicalView proto = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setQuery("SELECT 1 FROM Table") + .build(); + + Exception actualException = null; + + try { + LogicalView.fromProto(proto); + } catch (Exception e) { + actualException = e; + } + + assertThat(actualException).isInstanceOf(IllegalArgumentException.class); + } + + @Test + public void testEquality() { + LogicalViewName logicalViewName = LogicalViewName.of(PROJECT_ID, INSTANCE_ID, LOGICAL_VIEW_ID); + com.google.bigtable.admin.v2.LogicalView proto = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(logicalViewName.toString()) + .setQuery("SELECT 1 FROM Table") + .setDeletionProtection(true) + .build(); + LogicalView logicalView = LogicalView.fromProto(proto); + + assertThat(logicalView).isEqualTo(LogicalView.fromProto(proto)); + + assertThat(logicalView) + .isNotEqualTo( + LogicalView.fromProto( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(logicalViewName.toString()) + .setQuery("SELECT 2 FROM Table") + .setDeletionProtection(true) + .build())); + } + + @Test + public void testHashCode() { + LogicalViewName logicalViewName = LogicalViewName.of(PROJECT_ID, INSTANCE_ID, LOGICAL_VIEW_ID); + com.google.bigtable.admin.v2.LogicalView proto = + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(logicalViewName.toString()) + .setQuery("SELECT 1 FROM Table") + .setDeletionProtection(true) + .build(); + LogicalView logicalView = LogicalView.fromProto(proto); + + assertThat(logicalView.hashCode()).isEqualTo(LogicalView.fromProto(proto).hashCode()); + + assertThat(logicalView.hashCode()) + .isNotEqualTo( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setName(logicalViewName.toString()) + .setQuery("SELECT 2 FROM Table") + .setDeletionProtection(true) + .build() + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/MaterializedViewTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/MaterializedViewTest.java new file mode 100644 index 0000000000..a7a3c01718 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/MaterializedViewTest.java @@ -0,0 +1,117 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.MaterializedViewName; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class MaterializedViewTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String MATERIALIZED_VIEW_ID = "my-materialized-view"; + + @Test + public void testFromProto() { + MaterializedViewName materializedViewName = + MaterializedViewName.of(PROJECT_ID, INSTANCE_ID, MATERIALIZED_VIEW_ID); + + com.google.bigtable.admin.v2.MaterializedView materializedViewProto = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(materializedViewName.toString()) + .setDeletionProtection(true) + .setQuery("SELECT 1 from Table") + .build(); + + MaterializedView result = MaterializedView.fromProto(materializedViewProto); + + assertThat(result.getId()).isEqualTo(MATERIALIZED_VIEW_ID); + assertThat(result.isDeletionProtected()).isTrue(); + assertThat(result.getQuery()).isEqualTo("SELECT 1 from Table"); + } + + @Test + public void testRequiresName() { + com.google.bigtable.admin.v2.MaterializedView proto = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setDeletionProtection(true) + .setQuery("SELECT 1 FROM Table") + .build(); + + Exception actualException = null; + + try { + MaterializedView.fromProto(proto); + } catch (Exception e) { + actualException = e; + } + + assertThat(actualException).isInstanceOf(IllegalArgumentException.class); + } + + @Test + public void testEquality() { + MaterializedViewName materializedViewName = + MaterializedViewName.of(PROJECT_ID, INSTANCE_ID, MATERIALIZED_VIEW_ID); + com.google.bigtable.admin.v2.MaterializedView proto = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(materializedViewName.toString()) + .setDeletionProtection(true) + .setQuery("SELECT 1 FROM Table") + .build(); + MaterializedView materializedView = MaterializedView.fromProto(proto); + + assertThat(materializedView).isEqualTo(MaterializedView.fromProto(proto)); + + assertThat(materializedView) + .isNotEqualTo( + MaterializedView.fromProto( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(materializedViewName.toString()) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table") + .build())); + } + + @Test + public void testHashCode() { + MaterializedViewName materializedViewName = + MaterializedViewName.of(PROJECT_ID, INSTANCE_ID, MATERIALIZED_VIEW_ID); + com.google.bigtable.admin.v2.MaterializedView proto = + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(materializedViewName.toString()) + .setDeletionProtection(true) + .setQuery("SELECT 1 FROM Table") + .build(); + MaterializedView materializedView = MaterializedView.fromProto(proto); + + assertThat(materializedView.hashCode()).isEqualTo(MaterializedView.fromProto(proto).hashCode()); + + assertThat(materializedView.hashCode()) + .isNotEqualTo( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setName(materializedViewName.toString()) + .setDeletionProtection(false) + .setQuery("SELECT 1 FROM Table") + .build() + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundleTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundleTest.java new file mode 100644 index 0000000000..f83bc7dcc4 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/SchemaBundleTest.java @@ -0,0 +1,149 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.SchemaBundleName; +import com.google.protobuf.ByteString; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class SchemaBundleTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + private static final String SCHEMA_BUNDLE_ID = "my-schema-bundle"; + + @Test + public void testFromProto() { + SchemaBundleName schemaBundleName = + SchemaBundleName.of(PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID); + + com.google.bigtable.admin.v2.SchemaBundle schemaBundleProto = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .build()) + .build(); + + SchemaBundle result = SchemaBundle.fromProto(schemaBundleProto); + + assertThat(result.getId()).isEqualTo(SCHEMA_BUNDLE_ID); + assertThat(result.getTableId()).isEqualTo(TABLE_ID); + assertThat(result.getProtoSchema()).isEqualTo(ByteString.copyFromUtf8("schema")); + } + + @Test + public void testRequiresName() { + com.google.bigtable.admin.v2.SchemaBundle proto = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .build()) + .build(); + Exception actualException = null; + + try { + SchemaBundle.fromProto(proto); + } catch (Exception e) { + actualException = e; + } + + assertThat(actualException).isInstanceOf(IllegalArgumentException.class); + } + + @Test + public void testRequiresSchemaBundleType() { + SchemaBundleName schemaBundleName = + SchemaBundleName.of(PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID); + com.google.bigtable.admin.v2.SchemaBundle proto = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .build(); + Exception actualException = null; + + try { + SchemaBundle.fromProto(proto); + } catch (Exception e) { + actualException = e; + } + + assertThat(actualException).isInstanceOf(IllegalArgumentException.class); + } + + @Test + public void testEquality() { + SchemaBundleName schemaBundleName = + SchemaBundleName.of(PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID); + com.google.bigtable.admin.v2.SchemaBundle proto = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .build()) + .build(); + SchemaBundle schemaBundle = SchemaBundle.fromProto(proto); + + assertThat(schemaBundle).isEqualTo(SchemaBundle.fromProto(proto)); + + assertThat(schemaBundle) + .isNotEqualTo( + SchemaBundle.fromProto( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema2")) + .build()) + .build())); + } + + @Test + public void testHashCode() { + SchemaBundleName schemaBundleName = + SchemaBundleName.of(PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID); + com.google.bigtable.admin.v2.SchemaBundle proto = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .build()) + .build(); + SchemaBundle schemaBundle = SchemaBundle.fromProto(proto); + + assertThat(schemaBundle.hashCode()).isEqualTo(SchemaBundle.fromProto(proto).hashCode()); + + assertThat(schemaBundle.hashCode()) + .isNotEqualTo( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName(schemaBundleName.toString()) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFromUtf8("schema")) + .build()) + .build() + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableTest.java index b94be17e7f..c5821fb9eb 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/TableTest.java @@ -16,6 +16,7 @@ package com.google.cloud.bigtable.admin.v2.models; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; import com.google.bigtable.admin.v2.ColumnFamily; import com.google.bigtable.admin.v2.GcRule; @@ -67,6 +68,14 @@ public void testFromProto() { .setSeconds(1) .setNanos(99))) .build()) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder().setSeconds(1).setNanos(99)) + .setFrequency( + com.google.protobuf.Duration.newBuilder().setSeconds(1).setNanos(99)) + .build()) + .setDeletionProtection(true) .build(); Table result = Table.fromProto(proto); @@ -78,6 +87,20 @@ public void testFromProto() { "cluster1", Table.ReplicationState.READY, "cluster2", Table.ReplicationState.INITIALIZING); assertThat(result.getColumnFamilies()).hasSize(3); + assertThat(result.isAutomatedBackupEnabled()).isTrue(); + assertEquals( + "AutomatedBackupPolicy{com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy.retention_period=seconds:" + + " 1\n" + + // + "nanos: 99\n" + + // + ", com.google.bigtable.admin.v2.Table$AutomatedBackupPolicy.frequency=seconds: 1\n" + + // + "nanos: 99\n" + + // + "}", + result.getAutomatedBackupPolicy().viewConfig()); + assertThat(result.isDeletionProtected()).isTrue(); for (Entry entry : proto.getColumnFamiliesMap().entrySet()) { assertThat(result.getColumnFamilies()) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java index 04cf3f0813..1ca24201ae 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateAppProfileRequestTest.java @@ -102,8 +102,7 @@ public void testUpdateExistingStandardIsolation() { .isEqualTo( com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() .setAppProfile( - existingProto - .toBuilder() + existingProto.toBuilder() .setStandardIsolation( StandardIsolation.newBuilder() .setPriority( @@ -136,8 +135,7 @@ public void testUpdateExistingDataBoostIsolationReadOnly() { .isEqualTo( com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() .setAppProfile( - existingProto - .toBuilder() + existingProto.toBuilder() .setDataBoostIsolationReadOnly( DataBoostIsolationReadOnly.newBuilder() .setComputeBillingOwner( @@ -146,4 +144,33 @@ public void testUpdateExistingDataBoostIsolationReadOnly() { .setUpdateMask(FieldMask.newBuilder().addPaths("data_boost_isolation_read_only")) .build()); } + + @Test + public void testUpdateRowAffinity() { + com.google.bigtable.admin.v2.AppProfile existingProto = + com.google.bigtable.admin.v2.AppProfile.newBuilder() + .setName("projects/my-project/instances/my-instance/appProfiles/my-profile") + .setEtag("my-etag") + .setDescription("description") + .setMultiClusterRoutingUseAny(MultiClusterRoutingUseAny.getDefaultInstance()) + .build(); + + AppProfile existingWrapper = AppProfile.fromProto(existingProto); + + UpdateAppProfileRequest updateWrapper = + UpdateAppProfileRequest.of(existingWrapper) + .setRoutingPolicy(AppProfile.MultiClusterRoutingPolicy.withRowAffinity()); + + assertThat(updateWrapper.toProto("my-project")) + .isEqualTo( + com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() + .setAppProfile( + existingProto.toBuilder() + .setMultiClusterRoutingUseAny( + MultiClusterRoutingUseAny.newBuilder() + .setRowAffinity( + MultiClusterRoutingUseAny.RowAffinity.newBuilder().build()))) + .setUpdateMask(FieldMask.newBuilder().addPaths("multi_cluster_routing_use_any")) + .build()); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequestTest.java index c8d34833f3..c2df69ca56 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateBackupRequestTest.java @@ -29,19 +29,20 @@ @RunWith(JUnit4.class) public class UpdateBackupRequestTest { - - private static final String TABLE_ID = "my-table"; private static final String BACKUP_ID = "my-backup"; private static final String PROJECT_ID = "my-project"; private static final String INSTANCE_ID = "my-instance"; private static final String CLUSTER_ID = "my-cluster"; private static final Instant EXPIRE_TIME = Instant.now().plus(Duration.ofDays(15)); private static final Instant EXPIRE_TIME_2 = Instant.now().plus(Duration.ofDays(20)); + private static final Instant HOT_TO_STANDARD_TIME = Instant.now().plus(Duration.ofDays(10)); @Test public void testToProto() { UpdateBackupRequest request = - UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME); + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); com.google.bigtable.admin.v2.UpdateBackupRequest requestProto = com.google.bigtable.admin.v2.UpdateBackupRequest.newBuilder() @@ -50,8 +51,14 @@ public void testToProto() { .setName( NameUtil.formatBackupName(PROJECT_ID, INSTANCE_ID, CLUSTER_ID, BACKUP_ID)) .setExpireTime(Timestamps.fromMillis(EXPIRE_TIME.toEpochMilli())) + .setHotToStandardTime( + Timestamps.fromMillis(HOT_TO_STANDARD_TIME.toEpochMilli())) + .build()) + .setUpdateMask( + FieldMask.newBuilder() + .addPaths("expire_time") + .addPaths("hot_to_standard_time") .build()) - .setUpdateMask(FieldMask.newBuilder().addPaths("expire_time").build()) .build(); assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); } @@ -59,22 +66,49 @@ public void testToProto() { @Test public void testEquality() { UpdateBackupRequest request = - UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME); + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); + assertThat(request) + .isEqualTo( + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .setHotToStandardTime(HOT_TO_STANDARD_TIME)); assertThat(request) - .isEqualTo(UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME)); + .isNotEqualTo( + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME_2) + .setHotToStandardTime(HOT_TO_STANDARD_TIME)); assertThat(request) - .isNotEqualTo(UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME_2)); + .isNotEqualTo( + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .clearHotToStandardTime()); } @Test public void testHashCode() { UpdateBackupRequest request = - UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME); + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .setHotToStandardTime(HOT_TO_STANDARD_TIME); assertThat(request.hashCode()) .isEqualTo( - UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME).hashCode()); + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .setHotToStandardTime(HOT_TO_STANDARD_TIME) + .hashCode()); + assertThat(request.hashCode()) + .isNotEqualTo( + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME_2) + .setHotToStandardTime(HOT_TO_STANDARD_TIME) + .hashCode()); assertThat(request.hashCode()) .isNotEqualTo( - UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID).setExpireTime(EXPIRE_TIME_2).hashCode()); + UpdateBackupRequest.of(CLUSTER_ID, BACKUP_ID) + .setExpireTime(EXPIRE_TIME) + .clearHotToStandardTime() + .hashCode()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java index b5561769b6..5793ce6993 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateInstanceRequestTest.java @@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat; import com.google.bigtable.admin.v2.Instance; -import com.google.bigtable.admin.v2.Instance.Type; import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest; import com.google.common.collect.ImmutableMap; import com.google.protobuf.FieldMask; @@ -98,7 +97,7 @@ public void testType() { .setInstance( Instance.newBuilder() .setName("projects/my-project/instances/my-instance") - .setType(Type.PRODUCTION)) + .setType(Instance.Type.PRODUCTION)) .build(); assertThat(actual).isEqualTo(expected); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequestTest.java new file mode 100644 index 0000000000..da54bb5ac1 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateLogicalViewRequestTest.java @@ -0,0 +1,95 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.protobuf.FieldMask; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class UpdateLogicalViewRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String LOGICAL_VIEW_ID = "my-logical-view"; + + @Test + public void testToProto() { + UpdateLogicalViewRequest request = + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 1") + .setDeletionProtection(true); + + com.google.bigtable.admin.v2.UpdateLogicalViewRequest requestProto = + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.newBuilder() + .setLogicalView( + com.google.bigtable.admin.v2.LogicalView.newBuilder() + .setQuery("query 1") + .setDeletionProtection(true) + .setName( + NameUtil.formatLogicalViewName(PROJECT_ID, INSTANCE_ID, LOGICAL_VIEW_ID))) + .setUpdateMask( + FieldMask.newBuilder().addPaths("deletion_protection").addPaths("query").build()) + .build(); + assertThat(request.toProto(PROJECT_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() { + UpdateLogicalViewRequest request = + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 1") + .setDeletionProtection(true); + + assertThat(request) + .isEqualTo( + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 1") + .setDeletionProtection(true)); + + assertThat(request) + .isNotEqualTo( + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 2") + .setDeletionProtection(true)); + } + + @Test + public void testHashCode() { + UpdateLogicalViewRequest request = + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 1") + .setDeletionProtection(true); + + assertThat(request.hashCode()) + .isEqualTo( + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 1") + .setDeletionProtection(true) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + UpdateLogicalViewRequest.of(INSTANCE_ID, LOGICAL_VIEW_ID) + .setQuery("query 2") + .setDeletionProtection(true) + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequestTest.java new file mode 100644 index 0000000000..17cbecea9a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateMaterializedViewRequestTest.java @@ -0,0 +1,87 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.protobuf.FieldMask; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class UpdateMaterializedViewRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String MATERIALIZED_VIEW_ID = "my-materialized-view"; + + @Test + public void testToProto() { + UpdateMaterializedViewRequest request = + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(true); + + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest requestProto = + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.newBuilder() + .setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.newBuilder() + .setDeletionProtection(true) + .setName( + NameUtil.formatMaterializedViewName( + PROJECT_ID, INSTANCE_ID, MATERIALIZED_VIEW_ID))) + .setUpdateMask(FieldMask.newBuilder().addPaths("deletion_protection").build()) + .build(); + assertThat(request.toProto(PROJECT_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() { + UpdateMaterializedViewRequest request = + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false); + + assertThat(request) + .isEqualTo( + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false)); + + assertThat(request) + .isNotEqualTo( + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(true)); + } + + @Test + public void testHashCode() { + UpdateMaterializedViewRequest request = + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false); + + assertThat(request.hashCode()) + .isEqualTo( + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(false) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + UpdateMaterializedViewRequest.of(INSTANCE_ID, MATERIALIZED_VIEW_ID) + .setDeletionProtection(true) + .hashCode()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequestTest.java new file mode 100644 index 0000000000..994d56068a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateSchemaBundleRequestTest.java @@ -0,0 +1,145 @@ +/* + * 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 + * + * 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.bigtable.admin.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.admin.v2.ProtoSchema; +import com.google.cloud.bigtable.admin.v2.internal.NameUtil; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class UpdateSchemaBundleRequestTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + private static final String SCHEMA_BUNDLE_ID = "my-schema-bundle"; + // Location: `google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb` + private static final String TEST_PROTO_SCHEMA_BUNDLE = "proto_schema_bundle.pb"; + // Location: `google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb` + private static final String TEST_UPDATED_PROTO_SCHEMA_BUNDLE = "updated_proto_schema_bundle.pb"; + + @Test + public void testToProto() throws IOException, URISyntaxException { + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)) + .setIgnoreWarnings(true); + byte[] content = Files.readAllBytes(Paths.get(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest requestProto = + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder() + .setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content)) + .build()) + .build()) + .setUpdateMask(FieldMask.newBuilder().addPaths("proto_schema")) + .setIgnoreWarnings(true) + .build(); + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testUpdateProtoSchema() throws IOException, URISyntaxException { + byte[] content = Files.readAllBytes(Paths.get(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + byte[] updated_content = + Files.readAllBytes(Paths.get(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE))); + + com.google.bigtable.admin.v2.SchemaBundle existingSchemaBundle = + com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + .setName( + NameUtil.formatSchemaBundleName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, SCHEMA_BUNDLE_ID)) + .setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(content)) + .build()) + .build(); + + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.of(SchemaBundle.fromProto(existingSchemaBundle)) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE)); + + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest requestProto = + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder() + .setSchemaBundle( + existingSchemaBundle.toBuilder() + .setProtoSchema( + ProtoSchema.newBuilder() + .setProtoDescriptors(ByteString.copyFrom(updated_content)))) + .setUpdateMask(FieldMask.newBuilder().addPaths("proto_schema")) + .build(); + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testEquality() throws IOException, URISyntaxException { + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + assertThat(request) + .isEqualTo( + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE))); + + assertThat(request) + .isNotEqualTo( + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE))); + } + + @Test + public void testHashCode() throws IOException, URISyntaxException { + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)); + + assertThat(request.hashCode()) + .isEqualTo( + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_PROTO_SCHEMA_BUNDLE)) + .hashCode()); + + assertThat(request.hashCode()) + .isNotEqualTo( + UpdateSchemaBundleRequest.of(TABLE_ID, SCHEMA_BUNDLE_ID) + .setProtoSchemaFile(getResourceFilePath(TEST_UPDATED_PROTO_SCHEMA_BUNDLE)) + .hashCode()); + } + + private String getResourceFilePath(String filePath) throws URISyntaxException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL protoSchema = cl.getResource(filePath); + return Paths.get(protoSchema.toURI()).toAbsolutePath().toString(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequestTest.java index fabebdccbf..059999210d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/UpdateTableRequestTest.java @@ -81,4 +81,122 @@ public void testNoChangeChangeStreamToProto() { .build(); assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); } + + @Test + public void testEnableDeletionProtection() { + UpdateTableRequest request = UpdateTableRequest.of(TABLE_ID).setDeletionProtection(true); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setDeletionProtection(true)) + .setUpdateMask(FieldMask.newBuilder().addPaths("deletion_protection").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testDisableDeletionProtection() { + UpdateTableRequest request = UpdateTableRequest.of(TABLE_ID).setDeletionProtection(false); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setDeletionProtection(false)) + .setUpdateMask(FieldMask.newBuilder().addPaths("deletion_protection").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testDisableAutomatedBackup() { + UpdateTableRequest request = UpdateTableRequest.of(TABLE_ID).disableAutomatedBackup(); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .build())) + .setUpdateMask(FieldMask.newBuilder().addPaths("automated_backup_policy").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testSetAutomatedBackup() { + UpdateTableRequest request = + UpdateTableRequest.of(TABLE_ID) + .setAutomatedBackup(Duration.ofHours(24), Duration.ofHours(24)); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder().setSeconds(86400)) + .setFrequency( + com.google.protobuf.Duration.newBuilder().setSeconds(86400)) + .build())) + .setUpdateMask(FieldMask.newBuilder().addPaths("automated_backup_policy").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testSetAutomatedBackupRetentionPeriod() { + UpdateTableRequest request = + UpdateTableRequest.of(TABLE_ID).setAutomatedBackupRetentionPeriod(Duration.ofHours(24)); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setRetentionPeriod( + com.google.protobuf.Duration.newBuilder().setSeconds(86400)) + .build())) + .setUpdateMask( + FieldMask.newBuilder().addPaths("automated_backup_policy.retention_period").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + + @Test + public void testSetAutomatedBackupFrequency() { + UpdateTableRequest request = + UpdateTableRequest.of(TABLE_ID).setAutomatedBackupFrequency(Duration.ofHours(24)); + + com.google.bigtable.admin.v2.UpdateTableRequest requestProto = + com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + .setTable( + Table.newBuilder() + .setName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAutomatedBackupPolicy( + com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.newBuilder() + .setFrequency( + com.google.protobuf.Duration.newBuilder().setSeconds(86400)) + .build())) + .setUpdateMask( + FieldMask.newBuilder().addPaths("automated_backup_policy.frequency").build()) + .build(); + + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java similarity index 56% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallableTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java index ac9941b2fc..52e8956a0d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitReplicationCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java @@ -31,7 +31,10 @@ import com.google.bigtable.admin.v2.CheckConsistencyResponse; import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest; import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse; +import com.google.bigtable.admin.v2.StandardReadRemoteWrites; import com.google.bigtable.admin.v2.TableName; +import com.google.cloud.bigtable.admin.v2.models.ConsistencyRequest; +import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.junit.Before; @@ -39,6 +42,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; +import org.mockito.ArgumentMatchers; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnit; @@ -47,11 +51,17 @@ import org.threeten.bp.Duration; @RunWith(JUnit4.class) -public class AwaitReplicationCallableTest { +@Deprecated +public class AwaitConsistencyCallableTest { @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN); - private static final TableName TABLE_NAME = TableName.of("my-project", "my-instance", "my-table"); + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + private static final TableName TABLE_NAME = TableName.of(PROJECT_ID, INSTANCE_ID, TABLE_ID); private static final ApiCallContext CALL_CONTEXT = FakeCallContext.createDefault(); + private static final TableAdminRequestContext REQUEST_CONTEXT = + TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID); @Mock private UnaryCallable @@ -61,7 +71,9 @@ public class AwaitReplicationCallableTest { private UnaryCallable mockCheckConsistencyCallable; - private AwaitReplicationCallable callable; + private AwaitReplicationCallable awaitReplicationCallable; + + private AwaitConsistencyCallable awaitConsistencyCallable; @Before public void setUp() { @@ -81,12 +93,14 @@ public void setUp() { .setRpcTimeoutMultiplier(1.0) .build(); - callable = - AwaitReplicationCallable.create( + awaitConsistencyCallable = + AwaitConsistencyCallable.create( mockGenerateConsistencyTokenCallable, mockCheckConsistencyCallable, clientContext, - retrySettings); + retrySettings, + REQUEST_CONTEXT); + awaitReplicationCallable = AwaitReplicationCallable.create(awaitConsistencyCallable); } @Test @@ -98,7 +112,8 @@ public void testGenerateFailure() throws Exception { Mockito.when(mockGenerateConsistencyTokenCallable.futureCall(expectedRequest, CALL_CONTEXT)) .thenReturn(ApiFutures.immediateFailedFuture(fakeError)); - ApiFuture future = callable.futureCall(TABLE_NAME, CALL_CONTEXT); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + ApiFuture future = awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); Throwable actualError = null; @@ -125,6 +140,7 @@ public void testCheckFailure() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); FakeApiException expectedError = new FakeApiException("fake", null, Code.INTERNAL, false); @@ -132,7 +148,8 @@ public void testCheckFailure() throws Exception { Mockito.when(mockCheckConsistencyCallable.futureCall(expectedRequest2, CALL_CONTEXT)) .thenReturn(ApiFutures.immediateFailedFuture(expectedError)); - ApiFuture future = callable.futureCall(TABLE_NAME, CALL_CONTEXT); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + ApiFuture future = awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); Throwable actualError = null; @@ -160,6 +177,7 @@ public void testImmediatelyConsistent() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); CheckConsistencyResponse expectedResponse2 = CheckConsistencyResponse.newBuilder().setConsistent(true).build(); @@ -167,7 +185,9 @@ public void testImmediatelyConsistent() throws Exception { Mockito.when(mockCheckConsistencyCallable.futureCall(expectedRequest2, CALL_CONTEXT)) .thenReturn(ApiFutures.immediateFuture(expectedResponse2)); - ApiFuture consistentFuture = callable.futureCall(TABLE_NAME, CALL_CONTEXT); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + ApiFuture consistentFuture = + awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); consistentFuture.get(1, TimeUnit.MILLISECONDS); } @@ -187,6 +207,7 @@ public void testPolling() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); CheckConsistencyResponse expectedResponse2 = @@ -199,7 +220,9 @@ public void testPolling() throws Exception { .thenReturn(ApiFutures.immediateFuture(expectedResponse2)) .thenReturn(ApiFutures.immediateFuture(expectedResponse3)); - ApiFuture consistentFuture = callable.futureCall(TABLE_NAME, CALL_CONTEXT); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + ApiFuture consistentFuture = + awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); consistentFuture.get(1, TimeUnit.SECONDS); } @@ -219,6 +242,7 @@ public void testPollingTimeout() throws Exception { CheckConsistencyRequest.newBuilder() .setName(TABLE_NAME.toString()) .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) .build(); CheckConsistencyResponse expectedResponse2 = @@ -227,7 +251,9 @@ public void testPollingTimeout() throws Exception { Mockito.when(mockCheckConsistencyCallable.futureCall(expectedRequest2, CALL_CONTEXT)) .thenReturn(ApiFutures.immediateFuture(expectedResponse2)); - ApiFuture consistentFuture = callable.futureCall(TABLE_NAME, CALL_CONTEXT); + ConsistencyRequest consistencyRequest = ConsistencyRequest.forReplication(TABLE_ID); + ApiFuture consistentFuture = + awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); Throwable actualError = null; try { @@ -238,4 +264,100 @@ public void testPollingTimeout() throws Exception { assertThat(actualError).isInstanceOf(PollException.class); } + + @Test + public void testAwaitReplicationCallableImmediatelyConsistent() throws Exception { + GenerateConsistencyTokenRequest expectedRequest = + GenerateConsistencyTokenRequest.newBuilder().setName(TABLE_NAME.toString()).build(); + + GenerateConsistencyTokenResponse expectedResponse = + GenerateConsistencyTokenResponse.newBuilder().setConsistencyToken("fake-token").build(); + + Mockito.when(mockGenerateConsistencyTokenCallable.futureCall(expectedRequest, CALL_CONTEXT)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + CheckConsistencyRequest expectedRequest2 = + CheckConsistencyRequest.newBuilder() + .setName(TABLE_NAME.toString()) + .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) + .build(); + CheckConsistencyResponse expectedResponse2 = + CheckConsistencyResponse.newBuilder().setConsistent(true).build(); + + Mockito.when(mockCheckConsistencyCallable.futureCall(expectedRequest2, CALL_CONTEXT)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse2)); + + ApiFuture consistentFuture = + awaitReplicationCallable.futureCall(TABLE_NAME, CALL_CONTEXT); + + consistentFuture.get(1, TimeUnit.MILLISECONDS); + } + + @Test + public void testAwaitReplicationCallablePolling() throws Exception { + GenerateConsistencyTokenRequest expectedRequest = + GenerateConsistencyTokenRequest.newBuilder().setName(TABLE_NAME.toString()).build(); + + GenerateConsistencyTokenResponse expectedResponse = + GenerateConsistencyTokenResponse.newBuilder().setConsistencyToken("fake-token").build(); + + Mockito.when(mockGenerateConsistencyTokenCallable.futureCall(expectedRequest, CALL_CONTEXT)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + CheckConsistencyRequest expectedRequest2 = + CheckConsistencyRequest.newBuilder() + .setName(TABLE_NAME.toString()) + .setConsistencyToken("fake-token") + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) + .build(); + + CheckConsistencyResponse expectedResponse2 = + CheckConsistencyResponse.newBuilder().setConsistent(false).build(); + + CheckConsistencyResponse expectedResponse3 = + CheckConsistencyResponse.newBuilder().setConsistent(true).build(); + + Mockito.when(mockCheckConsistencyCallable.futureCall(expectedRequest2, CALL_CONTEXT)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse2)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse3)); + + ApiFuture consistentFuture = + awaitReplicationCallable.futureCall(TABLE_NAME, CALL_CONTEXT); + + consistentFuture.get(1, TimeUnit.SECONDS); + } + + @Test + public void testWithProvidedToken() throws Exception { + // 1. Setup: Request with a pre-existing token + String existingToken = "existing-token"; + ConsistencyRequest consistencyRequest = + ConsistencyRequest.forReplication(TABLE_ID, existingToken); + + // 2. Setup: Mock the check operation to succeed immediately + CheckConsistencyRequest expectedCheckRequest = + CheckConsistencyRequest.newBuilder() + .setName(TABLE_NAME.toString()) + .setConsistencyToken(existingToken) + .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build()) + .build(); + CheckConsistencyResponse expectedResponse = + CheckConsistencyResponse.newBuilder().setConsistent(true).build(); + + Mockito.when(mockCheckConsistencyCallable.futureCall(expectedCheckRequest, CALL_CONTEXT)) + .thenReturn(ApiFutures.immediateFuture(expectedResponse)); + + // 3. Execute + ApiFuture future = awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT); + future.get(1, TimeUnit.SECONDS); + + // 4. Verify: Generate was NEVER called, Check WAS called + Mockito.verify(mockGenerateConsistencyTokenCallable, Mockito.never()) + .futureCall( + ArgumentMatchers.any(GenerateConsistencyTokenRequest.class), + ArgumentMatchers.any(ApiCallContext.class)); + Mockito.verify(mockCheckConsistencyCallable, Mockito.times(1)) + .futureCall(expectedCheckRequest, CALL_CONTEXT); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/common/TypeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/common/TypeTest.java index aba13bfa12..543a085008 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/common/TypeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/common/TypeTest.java @@ -26,10 +26,16 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; +import com.google.cloud.bigtable.common.Type.SchemalessEnum; +import com.google.cloud.bigtable.common.Type.SchemalessProto; import com.google.cloud.bigtable.common.Type.SchemalessStruct; import com.google.cloud.bigtable.common.Type.StructWithSchema; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.models.sql.Struct; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Album; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Format; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; import com.google.common.testing.EqualsTester; import com.google.protobuf.ByteString; import java.util.List; @@ -51,9 +57,14 @@ public void simpleTypes_TypeToString() { assertThat(Type.Timestamp.create().toString()).isEqualTo("TIMESTAMP"); assertThat(Type.Date.create().toString()).isEqualTo("DATE"); assertThat(Type.SchemalessStruct.create().toString()).isEqualTo("STRUCT"); + assertThat(Type.SchemalessProto.create("MyMessage", "my_bundle").toString()) + .isEqualTo("PROTO{messageName=MyMessage, schemaBundleId=my_bundle}"); + assertThat(Type.SchemalessEnum.create("MyEnum", "other_bundle").toString()) + .isEqualTo("ENUM{enumName=MyEnum, schemaBundleId=other_bundle}"); } @Test + @SuppressWarnings("TruthIncompatibleType") public void simpleTypes_equals() { assertThat(Type.String.create()).isEqualTo(Type.String.create()); assertThat(Type.Bytes.create()).isEqualTo(Type.Bytes.create()); @@ -77,6 +88,7 @@ public void simpleTypes_equals() { } @Test + @SuppressWarnings("TruthIncompatibleType") public void array_equals() { assertThat(Type.Array.create(Type.String.create())) .isEqualTo(Type.Array.create(Type.String.create())); @@ -90,6 +102,7 @@ public void array_equals() { } @Test + @SuppressWarnings("TruthIncompatibleType") public void map_equals() { assertThat(Type.Map.create(Type.Bytes.create(), Type.String.create())) .isEqualTo(Type.Map.create(Type.Bytes.create(), Type.String.create())); @@ -112,6 +125,54 @@ public void map_equals() { Type.Bytes.create(), Type.Map.create(Type.String.create(), Type.String.create()))); } + @Test + @SuppressWarnings("TruthIncompatibleType") + public void proto_equals() { + assertThat(Type.SchemalessProto.create("MyMessage", "my_bundle")) + .isEqualTo(Type.SchemalessProto.create("MyMessage", "my_bundle")); + assertThat(Type.Proto.create(Singer.getDefaultInstance())) + .isEqualTo(Type.Proto.create(Singer.getDefaultInstance())); + + assertThat(Type.SchemalessProto.create("MyMessage", "my_bundle")) + .isNotEqualTo(Type.SchemalessProto.create("AnotherMessage", "my_bundle")); + assertThat(Type.SchemalessProto.create("MyMessage", "my_bundle")) + .isNotEqualTo(Type.SchemalessProto.create("MyMessage", "another_bundle")); + assertThat(Type.Proto.create(Singer.getDefaultInstance())) + .isNotEqualTo(Type.Proto.create(Album.getDefaultInstance())); + + assertThat( + Type.SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")) + .isNotEqualTo(Type.Proto.create(Singer.getDefaultInstance())); + assertThat(Type.Proto.create(Singer.getDefaultInstance())) + .isNotEqualTo( + Type.SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")); + } + + @Test + @SuppressWarnings("TruthIncompatibleType") + public void enum_equals() { + assertThat(Type.SchemalessEnum.create("MyEnum", "my_bundle")) + .isEqualTo(Type.SchemalessEnum.create("MyEnum", "my_bundle")); + assertThat(Type.Enum.create(Genre::forNumber)).isEqualTo(Type.Enum.create(Genre::forNumber)); + + assertThat(Type.SchemalessEnum.create("MyEnum", "my_bundle")) + .isNotEqualTo(Type.SchemalessEnum.create("AnotherEnum", "my_bundle")); + assertThat(Type.SchemalessEnum.create("MyEnum", "my_bundle")) + .isNotEqualTo(Type.SchemalessEnum.create("MyEnum", "another_bundle")); + assertThat(Type.Enum.create(Genre::forNumber)) + .isNotEqualTo(Type.Enum.create(Format::forNumber)); + + assertThat( + Type.SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")) + .isNotEqualTo(Type.Enum.create(Genre::forNumber)); + assertThat(Type.Enum.create(Genre::forNumber)) + .isNotEqualTo( + Type.SchemalessEnum.create( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")); + } + @Test public void structWithSchema_equals() { com.google.bigtable.v2.Type structProto = @@ -126,7 +187,8 @@ public void structWithSchema_equals() { StructWithSchema.fromProto(structProto.getStructType())) .addEqualityGroup( StructWithSchema.fromProto(complexStructProto.getStructType()), - StructWithSchema.fromProto(complexStructProto.getStructType())); + StructWithSchema.fromProto(complexStructProto.getStructType())) + .testEquals(); } @Test @@ -183,6 +245,18 @@ public void schemalessStruct_throwsExceptionOnSchemaAccess() { assertThrows(UnsupportedOperationException.class, struct::getFields); } + @Test + public void schemalessProto_throwsExceptionOnGetParser() { + SchemalessProto proto = Type.SchemalessProto.create("MyMessage", "my_bundle"); + assertThrows(UnsupportedOperationException.class, proto::getParserForType); + } + + @Test + public void schemalessEnum_throwsExceptionOnGetForNumber() { + SchemalessEnum myEnum = Type.SchemalessEnum.create("MyEnum", "my_bundle"); + assertThrows(UnsupportedOperationException.class, myEnum::getForNumber); + } + @Test public void array_toString() { Type array = Type.Array.create(Type.String.create()); @@ -204,4 +278,20 @@ public void historicalMap_toString() { assertThat(historicalMap.toString()) .isEqualTo("MAP{keyType=BYTES, valueType=ARRAY{elementType=STRUCT}}"); } + + @Test + public void proto_toString() { + SqlType.Proto proto = Type.Proto.create(Singer.getDefaultInstance()); + + assertThat(proto.toString()) + .isEqualTo("PROTO{message=com.google.cloud.bigtable.data.v2.test.Singer}"); + } + + @Test + public void enum_toString() { + SqlType.Enum myEnum = Type.Enum.create(Genre::forNumber); + + assertThat(myEnum.toString()) + .isEqualTo("ENUM{enum=com.google.cloud.bigtable.data.v2.test.Genre}"); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactoryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactoryTest.java index fea66e82bf..30a4853a61 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactoryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientFactoryTest.java @@ -22,12 +22,12 @@ import com.google.api.gax.batching.BatcherImpl; import com.google.api.gax.core.CredentialsProvider; import com.google.api.gax.core.ExecutorProvider; +import com.google.api.gax.grpc.ChannelPoolSettings; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.WatchdogProvider; import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.FeatureFlags; -import com.google.bigtable.v2.InstanceName; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.PingAndWarmRequest; @@ -36,10 +36,13 @@ import com.google.bigtable.v2.ReadRowsResponse; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.common.base.Preconditions; import com.google.common.io.BaseEncoding; import io.grpc.Attributes; +import io.grpc.Grpc; import io.grpc.Metadata; import io.grpc.Server; import io.grpc.ServerCall; @@ -50,9 +53,10 @@ import io.grpc.stub.StreamObserver; import java.io.IOException; import java.lang.reflect.Method; -import java.util.LinkedList; -import java.util.List; +import java.net.SocketAddress; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import java.util.concurrent.LinkedBlockingDeque; import org.junit.After; import org.junit.Before; @@ -81,12 +85,11 @@ public class BigtableDataClientFactoryTest { private CredentialsProvider credentialsProvider; private ExecutorProvider executorProvider; private WatchdogProvider watchdogProvider; - private ApiClock apiClock; private BigtableDataSettings defaultSettings; - private final BlockingQueue setUpAttributes = new LinkedBlockingDeque<>(); private final BlockingQueue terminateAttributes = new LinkedBlockingDeque<>(); private final BlockingQueue requestMetadata = new LinkedBlockingDeque<>(); + private final ConcurrentMap warmedChannels = new ConcurrentHashMap<>(); @Before public void setUp() throws IOException { @@ -101,17 +104,20 @@ public Listener interceptCall( Metadata headers, ServerCallHandler next) { requestMetadata.add(headers); + + // Check if the call is PingAndWarm and mark the channel address as warmed up. + if (BigtableGrpc.getPingAndWarmMethod().equals(call.getMethodDescriptor())) { + SocketAddress remoteAddr = + call.getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR); + if (remoteAddr != null) { + warmedChannels.put(remoteAddr, true); + } + } return next.startCall(call, headers); } }) .addTransportFilter( new ServerTransportFilter() { - @Override - public Attributes transportReady(Attributes transportAttrs) { - setUpAttributes.add(transportAttrs); - return super.transportReady(transportAttrs); - } - @Override public void transportTerminated(Attributes transportAttrs) { terminateAttributes.add(transportAttrs); @@ -150,13 +156,13 @@ public void transportTerminated(Attributes transportAttrs) { new BuilderAnswer<>( WatchdogProvider.class, builder.stubSettings().getStreamWatchdogProvider())); - apiClock = builder.stubSettings().getClock(); + ApiClock apiClock = builder.stubSettings().getClock(); builder .stubSettings() .setTransportChannelProvider(transportChannelProvider) .setCredentialsProvider(credentialsProvider) - .setExecutorProvider(executorProvider) + .setBackgroundExecutorProvider(executorProvider) .setStreamWatchdogProvider(watchdogProvider) .setClock(apiClock); @@ -173,9 +179,9 @@ public void testNewClientsShareTransportChannel() throws Exception { // Create 3 lightweight clients try (BigtableDataClientFactory factory = BigtableDataClientFactory.create( - defaultSettings - .toBuilder() + defaultSettings.toBuilder() .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build()); BigtableDataClient ignored1 = factory.createForInstance("project1", "instance1"); BigtableDataClient ignored2 = factory.createForInstance("project2", "instance2"); @@ -183,7 +189,9 @@ public void testNewClientsShareTransportChannel() throws Exception { // Make sure that only 1 instance is created by each provider Mockito.verify(transportChannelProvider, Mockito.times(1)).getTransportChannel(); - Mockito.verify(credentialsProvider, Mockito.times(1)).getCredentials(); + // getCredentials was called twice, in patchCredentials and when creating the fixed + // credentials in BigtableClientContext + Mockito.verify(credentialsProvider, Mockito.times(2)).getCredentials(); Mockito.verify(executorProvider, Mockito.times(1)).getExecutor(); Mockito.verify(watchdogProvider, Mockito.times(1)).getWatchdog(); } @@ -194,7 +202,7 @@ public void testCreateDefaultKeepsSettings() throws Exception { try (BigtableDataClientFactory factory = BigtableDataClientFactory.create(defaultSettings); BigtableDataClient client = factory.createDefault()) { - client.mutateRow(RowMutation.create("some-table", "some-key").deleteRow()); + client.mutateRow(RowMutation.create(TableId.of("some-table"), "some-key").deleteRow()); } assertThat(service.lastRequest.getTableName()) @@ -207,7 +215,7 @@ public void testCreateForAppProfileHasCorrectSettings() throws Exception { try (BigtableDataClientFactory factory = BigtableDataClientFactory.create(defaultSettings); BigtableDataClient client = factory.createForAppProfile("other-app-profile")) { - client.mutateRow(RowMutation.create("some-table", "some-key").deleteRow()); + client.mutateRow(RowMutation.create(TableId.of("some-table"), "some-key").deleteRow()); } assertThat(service.lastRequest.getTableName()) @@ -221,7 +229,7 @@ public void testCreateForInstanceHasCorrectSettings() throws Exception { try (BigtableDataClientFactory factory = BigtableDataClientFactory.create(defaultSettings); BigtableDataClient client = factory.createForInstance("other-project", "other-instance")) { - client.mutateRow(RowMutation.create("some-table", "some-key").deleteRow()); + client.mutateRow(RowMutation.create(TableId.of("some-table"), "some-key").deleteRow()); } assertThat(service.lastRequest.getTableName()) @@ -236,7 +244,7 @@ public void testCreateForInstanceWithAppProfileHasCorrectSettings() throws Excep BigtableDataClient client = factory.createForInstance("other-project", "other-instance", "other-app-profile")) { - client.mutateRow(RowMutation.create("some-table", "some-key").deleteRow()); + client.mutateRow(RowMutation.create(TableId.of("some-table"), "some-key").deleteRow()); } assertThat(service.lastRequest.getTableName()) @@ -248,6 +256,8 @@ public void testCreateForInstanceWithAppProfileHasCorrectSettings() throws Excep @Test public void testCreateWithRefreshingChannel() throws Exception { int poolSize = 3; + // TODO: remove the suppression when setRefreshingChannel can be removed + @SuppressWarnings("deprecation") BigtableDataSettings.Builder builder = BigtableDataSettings.newBuilderForEmulator(server.getPort()) .setProjectId(DEFAULT_PROJECT_ID) @@ -258,11 +268,11 @@ public void testCreateWithRefreshingChannel() throws Exception { .stubSettings() .setCredentialsProvider(credentialsProvider) .setStreamWatchdogProvider(watchdogProvider) - .setExecutorProvider(executorProvider); + .setBackgroundExecutorProvider(executorProvider); InstantiatingGrpcChannelProvider channelProvider = (InstantiatingGrpcChannelProvider) builder.stubSettings().getTransportChannelProvider(); InstantiatingGrpcChannelProvider.Builder channelProviderBuilder = channelProvider.toBuilder(); - channelProviderBuilder.setPoolSize(poolSize); + channelProviderBuilder.setChannelPoolSettings(ChannelPoolSettings.staticallySized(poolSize)); builder.stubSettings().setTransportChannelProvider(channelProviderBuilder.build()); BigtableDataClientFactory factory = BigtableDataClientFactory.create(builder.build()); @@ -271,31 +281,112 @@ public void testCreateWithRefreshingChannel() throws Exception { factory.createForInstance("other-project", "other-instance"); // Make sure that only 1 instance is created by each provider - Mockito.verify(credentialsProvider, Mockito.times(1)).getCredentials(); + // getCredentials was called twice, in patchCredentials and when creating the fixed credentials + // in BigtableClientContext + Mockito.verify(credentialsProvider, Mockito.times(2)).getCredentials(); Mockito.verify(executorProvider, Mockito.times(1)).getExecutor(); Mockito.verify(watchdogProvider, Mockito.times(1)).getWatchdog(); + assertThat(warmedChannels).hasSize(poolSize + 1); + assertThat(warmedChannels.values()).doesNotContain(false); - // Make sure that the clients are sharing the same ChannelPool - assertThat(setUpAttributes).hasSize(poolSize); - - // Make sure that prime requests were sent only once per table per connection - assertThat(service.pingAndWarmRequests).hasSize(poolSize); - List expectedRequests = new LinkedList<>(); - for (int i = 0; i < poolSize; i++) { - expectedRequests.add( - PingAndWarmRequest.newBuilder() - .setName(InstanceName.format(DEFAULT_PROJECT_ID, DEFAULT_INSTANCE_ID)) - .setAppProfileId(DEFAULT_APP_PROFILE_ID) - .build()); - } + // Wait for all the connections to close asynchronously + factory.close(); + long sleepTimeMs = 1000; + Thread.sleep(sleepTimeMs); + // Verify that all the channels are closed + assertThat(terminateAttributes).hasSize(poolSize + 1); + } - assertThat(service.pingAndWarmRequests).containsExactly(expectedRequests.toArray()); + @Test + public void testCreateWithRefreshingChannelWithDirectAccessByDefault() throws Exception { + int poolSize = 3; + // TODO: remove the suppression when setRefreshingChannel can be removed + @SuppressWarnings("deprecation") + BigtableDataSettings.Builder builder = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(DEFAULT_PROJECT_ID) + .setInstanceId(DEFAULT_INSTANCE_ID) + .setAppProfileId(DEFAULT_APP_PROFILE_ID) + .setRefreshingChannel(true); + builder + .stubSettings() + .setCredentialsProvider(credentialsProvider) + .setStreamWatchdogProvider(watchdogProvider) + .setBackgroundExecutorProvider(executorProvider) + .setDirectPathConfig(EnhancedBigtableStubSettings.DirectPathConfig.DEFAULT); + InstantiatingGrpcChannelProvider channelProvider = + (InstantiatingGrpcChannelProvider) builder.stubSettings().getTransportChannelProvider(); + InstantiatingGrpcChannelProvider.Builder channelProviderBuilder = channelProvider.toBuilder(); + channelProviderBuilder.setChannelPoolSettings(ChannelPoolSettings.staticallySized(poolSize)); + builder.stubSettings().setTransportChannelProvider(channelProviderBuilder.build()); + + BigtableDataClientFactory factory = BigtableDataClientFactory.create(builder.build()); + factory.createDefault(); + factory.createForAppProfile("other-appprofile"); + factory.createForInstance("other-project", "other-instance"); + + // Make sure that only 1 instance is created by each provider + // getCredentials was called twice, in patchCredentials and when creating the fixed credentials + // in BigtableClientContext + Mockito.verify(credentialsProvider, Mockito.times(2)).getCredentials(); + Mockito.verify(executorProvider, Mockito.times(1)).getExecutor(); + Mockito.verify(watchdogProvider, Mockito.times(1)).getWatchdog(); + assertThat(warmedChannels).hasSize(poolSize + 1); + assertThat(warmedChannels.values()).doesNotContain(false); // Wait for all the connections to close asynchronously factory.close(); long sleepTimeMs = 1000; Thread.sleep(sleepTimeMs); // Verify that all the channels are closed + // If we have DEFAULT, it will add one channel temporily + assertThat(terminateAttributes).hasSize(poolSize + 1); + } + + @Test + public void testCreateWithRefreshingChannelDisableDirectAccess() throws Exception { + int poolSize = 3; + // TODO: remove the suppression when setRefreshingChannel can be removed + @SuppressWarnings("deprecation") + BigtableDataSettings.Builder builder = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(DEFAULT_PROJECT_ID) + .setInstanceId(DEFAULT_INSTANCE_ID) + .setAppProfileId(DEFAULT_APP_PROFILE_ID) + .setRefreshingChannel(true); + + builder + .stubSettings() + .setCredentialsProvider(credentialsProvider) + .setStreamWatchdogProvider(watchdogProvider) + .setBackgroundExecutorProvider(executorProvider) + .setDirectPathConfig(EnhancedBigtableStubSettings.DirectPathConfig.FORCED_OFF); + InstantiatingGrpcChannelProvider channelProvider = + (InstantiatingGrpcChannelProvider) builder.stubSettings().getTransportChannelProvider(); + InstantiatingGrpcChannelProvider.Builder channelProviderBuilder = channelProvider.toBuilder(); + channelProviderBuilder.setChannelPoolSettings(ChannelPoolSettings.staticallySized(poolSize)); + builder.stubSettings().setTransportChannelProvider(channelProviderBuilder.build()); + + BigtableDataClientFactory factory = BigtableDataClientFactory.create(builder.build()); + factory.createDefault(); + factory.createForAppProfile("other-appprofile"); + factory.createForInstance("other-project", "other-instance"); + + // Make sure that only 1 instance is created by each provider + // getCredentials was called twice, in patchCredentials and when creating the fixed credentials + // in BigtableClientContext + Mockito.verify(credentialsProvider, Mockito.times(2)).getCredentials(); + Mockito.verify(executorProvider, Mockito.times(1)).getExecutor(); + Mockito.verify(watchdogProvider, Mockito.times(1)).getWatchdog(); + assertThat(warmedChannels).hasSize(poolSize); + assertThat(warmedChannels.values()).doesNotContain(false); + + // Wait for all the connections to close asynchronously + factory.close(); + long sleepTimeMs = 1000; + Thread.sleep(sleepTimeMs); + // Verify that all the channels are closed + // If we have DEFAULT, it will add one channel temporily assertThat(terminateAttributes).hasSize(poolSize); } @@ -305,12 +396,13 @@ public void testFeatureFlags() throws Exception { BigtableDataClient client = factory.createDefault()) { requestMetadata.clear(); - client.mutateRow(RowMutation.create("some-table", "some-key").deleteRow()); + client.mutateRow(RowMutation.create(TableId.of("some-table"), "some-key").deleteRow()); } Metadata metadata = requestMetadata.take(); String encodedValue = metadata.get(Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(encodedValue).isNotNull(); FeatureFlags featureFlags = FeatureFlags.parseFrom(BaseEncoding.base64Url().decode(encodedValue)); @@ -330,13 +422,17 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { BigtableDataClient client1 = factory.createDefault(); BigtableDataClient client2 = factory.createForAppProfile("app-profile"); - try (BatcherImpl batcher1 = (BatcherImpl) client1.newBulkMutationBatcher("my-table"); - BatcherImpl batcher2 = (BatcherImpl) client1.newBulkMutationBatcher("my-table")) { + try (BatcherImpl batcher1 = + (BatcherImpl) client1.newBulkMutationBatcher(TableId.of("my-table")); + BatcherImpl batcher2 = + (BatcherImpl) client1.newBulkMutationBatcher(TableId.of("my-table"))) { assertThat(batcher1.getFlowController()).isSameInstanceAs(batcher2.getFlowController()); } - try (BatcherImpl batcher1 = (BatcherImpl) client1.newBulkMutationBatcher("my-table"); - BatcherImpl batcher2 = (BatcherImpl) client2.newBulkMutationBatcher("my-table")) { + try (BatcherImpl batcher1 = + (BatcherImpl) client1.newBulkMutationBatcher(TableId.of("my-table")); + BatcherImpl batcher2 = + (BatcherImpl) client2.newBulkMutationBatcher(TableId.of("my-table"))) { assertThat(batcher1.getFlowController()).isNotSameInstanceAs(batcher2.getFlowController()); } } @@ -345,30 +441,17 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { private static class FakeBigtableService extends BigtableGrpc.BigtableImplBase { volatile MutateRowRequest lastRequest; - BlockingQueue readRowsRequests = new LinkedBlockingDeque<>(); - BlockingQueue pingAndWarmRequests = new LinkedBlockingDeque<>(); - - private ApiFunction readRowsCallback = - new ApiFunction() { - @Override - public ReadRowsResponse apply(ReadRowsRequest readRowsRequest) { - return ReadRowsResponse.getDefaultInstance(); - } - }; - - private ApiFunction pingAndWarmCallback = - new ApiFunction() { - @Override - public PingAndWarmResponse apply(PingAndWarmRequest pingAndWarmRequest) { - return PingAndWarmResponse.getDefaultInstance(); - } - }; + + private final ApiFunction readRowsCallback = + readRowsRequest -> ReadRowsResponse.getDefaultInstance(); + + private final ApiFunction pingAndWarmCallback = + pingAndWarmRequest -> PingAndWarmResponse.getDefaultInstance(); @Override public void readRows( ReadRowsRequest request, StreamObserver responseObserver) { try { - readRowsRequests.add(request); responseObserver.onNext(readRowsCallback.apply(request)); responseObserver.onCompleted(); } catch (RuntimeException e) { @@ -387,13 +470,12 @@ public void mutateRow( @Override public void pingAndWarm( PingAndWarmRequest request, StreamObserver responseObserver) { - pingAndWarmRequests.add(request); responseObserver.onNext(pingAndWarmCallback.apply(request)); responseObserver.onCompleted(); } } - private static class BuilderAnswer implements Answer { + private static class BuilderAnswer implements Answer { private final Class targetClass; private T targetInstance; @@ -403,8 +485,9 @@ private BuilderAnswer(Class targetClass, T targetInstance) { this.targetInstance = targetInstance; } + @SuppressWarnings("unchecked") @Override - public Object answer(InvocationOnMock invocation) throws Throwable { + public T answer(InvocationOnMock invocation) throws Throwable { Method method = invocation.getMethod(); Object r = invocation.getMethod().invoke(targetInstance, invocation.getArguments()); @@ -413,7 +496,7 @@ public Object answer(InvocationOnMock invocation) throws Throwable { this.targetInstance = castToTarget(r); r = invocation.getMock(); } - return r; + return (T) r; } @SuppressWarnings("unchecked") diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java index 880744bc18..ec82f1c12c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java @@ -24,6 +24,8 @@ import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; @@ -42,12 +44,15 @@ import com.google.cloud.bigtable.data.v2.models.SampleRowKeysRequest; import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.models.TargetId; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -62,12 +67,12 @@ import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; -@RunWith(JUnit4.class) /** * Tests for {@link BigtableDataClient}. This test class uses Mockito so it has been explicitly * excluded from Native Image testing by not following the naming convention of (IT* and * *ClientTest). */ +@RunWith(JUnit4.class) public class BigtableDataClientTests { @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN); @@ -89,6 +94,7 @@ public class BigtableDataClientTests { @Mock private UnaryCallable mockBulkMutateRowsCallable; @Mock private Batcher mockBulkMutationBatcher; @Mock private Batcher mockBulkReadRowsBatcher; + @Mock private UnaryCallable mockPrepareQueryCallable; @Mock(answer = Answers.RETURNS_DEEP_STUBS) private ServerStreamingCallable @@ -116,7 +122,7 @@ public void existsTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); Query expectedQuery = - Query.create("fake-table") + Query.create(TableId.of("fake-table")) .rowKey("fake-row-key") .filter( FILTERS @@ -128,9 +134,10 @@ public void existsTest() { .thenReturn(ApiFutures.immediateFuture(row)) .thenReturn(ApiFutures.immediateFuture(null)); - boolean result = bigtableDataClient.exists("fake-table", "fake-row-key"); + boolean result = bigtableDataClient.exists(TableId.of("fake-table"), "fake-row-key"); boolean anotherResult = - bigtableDataClient.exists("fake-table", ByteString.copyFromUtf8("fake-row-key")); + bigtableDataClient.exists( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key")); assertThat(result).isTrue(); assertThat(anotherResult).isFalse(); @@ -174,7 +181,7 @@ public void existsAsyncTest() throws Exception { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); Query expectedQuery = - Query.create("fake-table") + Query.create(TableId.of("fake-table")) .rowKey("fake-row-key") .filter( FILTERS @@ -188,10 +195,12 @@ public void existsAsyncTest() throws Exception { .thenReturn(ApiFutures.immediateFuture(null)); ApiFuture result = - bigtableDataClient.existsAsync("fake-table", ByteString.copyFromUtf8("fake-row-key")); + bigtableDataClient.existsAsync( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key")); assertThat(result.get()).isTrue(); - ApiFuture anotherResult = bigtableDataClient.existsAsync("fake-table", "fake-row-key"); + ApiFuture anotherResult = + bigtableDataClient.existsAsync(TableId.of("fake-table"), "fake-row-key"); assertThat(anotherResult.get()).isFalse(); Mockito.verify(mockReadRowCallable, Mockito.times(2)).futureCall(expectedQuery); @@ -254,18 +263,23 @@ public void proxyReadChangeStreamCallableTest() { public void proxyReadRowAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); - bigtableDataClient.readRowAsync("fake-table", ByteString.copyFromUtf8("fake-row-key")); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key")); Mockito.verify(mockReadRowCallable) - .futureCall(Query.create("fake-table").rowKey("fake-row-key")); + .futureCall(Query.create(TableId.of("fake-table")).rowKey("fake-row-key")); } @Test public void proxyReadRowOnAuthorizedViewAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); - bigtableDataClient.readRowAsync( - AuthorizedViewId.of("fake-table", "fake-authorized-view"), - ByteString.copyFromUtf8("fake-row-key")); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + AuthorizedViewId.of("fake-table", "fake-authorized-view"), + ByteString.copyFromUtf8("fake-row-key")); Mockito.verify(mockReadRowCallable) .futureCall( Query.create(AuthorizedViewId.of("fake-table", "fake-authorized-view")) @@ -276,17 +290,21 @@ public void proxyReadRowOnAuthorizedViewAsyncTest() { public void proxyReadRowStrAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); - bigtableDataClient.readRowAsync("fake-table", "fake-row-key"); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync(TableId.of("fake-table"), "fake-row-key"); Mockito.verify(mockReadRowCallable) - .futureCall(Query.create("fake-table").rowKey("fake-row-key")); + .futureCall(Query.create(TableId.of("fake-table")).rowKey("fake-row-key")); } @Test public void proxyReadRowOnAuthorizedViewStrAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); - bigtableDataClient.readRowAsync( - AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-row-key"); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-row-key"); Mockito.verify(mockReadRowCallable) .futureCall( Query.create(AuthorizedViewId.of("fake-table", "fake-authorized-view")) @@ -303,10 +321,14 @@ public void readRowFilterAsyncTest() { .chain() .filter(FILTERS.qualifier().regex("prefix.*")) .filter(FILTERS.limit().cellsPerRow(10)); - bigtableDataClient.readRowAsync("fake-table", ByteString.copyFromUtf8("fake-row-key"), filter); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key"), filter); Mockito.verify(mockReadRowCallable) - .futureCall(Query.create("fake-table").rowKey("fake-row-key").filter(filter)); + .futureCall(Query.create(TableId.of("fake-table")).rowKey("fake-row-key").filter(filter)); } @Test @@ -319,10 +341,13 @@ public void readRowOnAuthorizedViewFilterAsyncTest() { .chain() .filter(FILTERS.qualifier().regex("prefix.*")) .filter(FILTERS.limit().cellsPerRow(10)); - bigtableDataClient.readRowAsync( - AuthorizedViewId.of("fake-table", "fake-authorized-view"), - ByteString.copyFromUtf8("fake-row-key"), - filter); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + AuthorizedViewId.of("fake-table", "fake-authorized-view"), + ByteString.copyFromUtf8("fake-row-key"), + filter); Mockito.verify(mockReadRowCallable) .futureCall( @@ -341,10 +366,13 @@ public void readRowFilterStrAsyncTest() { .chain() .filter(FILTERS.qualifier().regex("prefix.*")) .filter(FILTERS.limit().cellsPerRow(10)); - bigtableDataClient.readRowAsync("fake-table", "fake-row-key", filter); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync(TableId.of("fake-table"), "fake-row-key", filter); Mockito.verify(mockReadRowCallable) - .futureCall(Query.create("fake-table").rowKey("fake-row-key").filter(filter)); + .futureCall(Query.create(TableId.of("fake-table")).rowKey("fake-row-key").filter(filter)); } @Test @@ -357,8 +385,11 @@ public void readRowOnAuthorizedViewFilterStrAsyncTest() { .chain() .filter(FILTERS.qualifier().regex("prefix.*")) .filter(FILTERS.limit().cellsPerRow(10)); - bigtableDataClient.readRowAsync( - AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-row-key", filter); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.readRowAsync( + AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-row-key", filter); Mockito.verify(mockReadRowCallable) .futureCall( @@ -373,11 +404,14 @@ public void readRowTest() { Row expectedRow = Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of()); - Mockito.when(mockReadRowCallable.futureCall(Query.create("fake-table").rowKey("fake-row-key"))) + Mockito.when( + mockReadRowCallable.futureCall( + Query.create(TableId.of("fake-table")).rowKey("fake-row-key"))) .thenReturn(ApiFutures.immediateFuture(expectedRow)); Row actualRow = - bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key")); + bigtableDataClient.readRow( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key")); assertThat(actualRow).isEqualTo(expectedRow); } @@ -408,10 +442,12 @@ public void readRowStrTest() { Row expectedRow = Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of()); - Mockito.when(mockReadRowCallable.futureCall(Query.create("fake-table").rowKey("fake-row-key"))) + Mockito.when( + mockReadRowCallable.futureCall( + Query.create(TableId.of("fake-table")).rowKey("fake-row-key"))) .thenReturn(ApiFutures.immediateFuture(expectedRow)); - Row actualRow = bigtableDataClient.readRow("fake-table", "fake-row-key"); + Row actualRow = bigtableDataClient.readRow(TableId.of("fake-table"), "fake-row-key"); assertThat(actualRow).isEqualTo(expectedRow); } @@ -450,11 +486,12 @@ public void readRowFilterTest() { Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of()); Mockito.when( mockReadRowCallable.futureCall( - Query.create("fake-table").rowKey("fake-row-key").filter(filter))) + Query.create(TableId.of("fake-table")).rowKey("fake-row-key").filter(filter))) .thenReturn(ApiFutures.immediateFuture(expectedRow)); Row actualRow = - bigtableDataClient.readRow("fake-table", ByteString.copyFromUtf8("fake-row-key"), filter); + bigtableDataClient.readRow( + TableId.of("fake-table"), ByteString.copyFromUtf8("fake-row-key"), filter); assertThat(actualRow).isEqualTo(expectedRow); } @@ -502,10 +539,10 @@ public void readRowStrFilterTest() { Row.create(ByteString.copyFromUtf8("fake-row-key"), ImmutableList.of()); Mockito.when( mockReadRowCallable.futureCall( - Query.create("fake-table").rowKey("fake-row-key").filter(filter))) + Query.create(TableId.of("fake-table")).rowKey("fake-row-key").filter(filter))) .thenReturn(ApiFutures.immediateFuture(expectedRow)); - Row actualRow = bigtableDataClient.readRow("fake-table", "fake-row-key", filter); + Row actualRow = bigtableDataClient.readRow(TableId.of("fake-table"), "fake-row-key", filter); assertThat(actualRow).isEqualTo(expectedRow); } @@ -540,7 +577,7 @@ public void readRowOnAuthorizedViewStrFilterTest() { public void proxyReadRowsSyncTest() { Mockito.when(mockStub.readRowsCallable()).thenReturn(mockReadRowsCallable); - Query query = Query.create("fake-table"); + Query query = Query.create(TableId.of("fake-table")); bigtableDataClient.readRows(query); Mockito.verify(mockReadRowsCallable).call(query); @@ -560,7 +597,7 @@ public void proxyReadRowsOnAuthorizedViewSyncTest() { public void proxyReadRowsAsyncTest() { Mockito.when(mockStub.readRowsCallable()).thenReturn(mockReadRowsCallable); - Query query = Query.create("fake-table"); + Query query = Query.create(TableId.of("fake-table")); @SuppressWarnings("unchecked") ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); bigtableDataClient.readRowsAsync(query, mockObserver); @@ -625,6 +662,7 @@ public void proxyReadChangeStreamAsyncTest() { Mockito.verify(mockReadChangeStreamCallable).call(query, mockObserver); } + @SuppressWarnings("deprecation") @Test public void proxySampleRowKeysCallableTest() { Mockito.when(mockStub.sampleRowKeysCallable()).thenReturn(mockSampleRowKeysCallable); @@ -634,27 +672,35 @@ public void proxySampleRowKeysCallableTest() { } @Test + @SuppressWarnings({"deprecation"}) public void proxySampleRowKeysTest() { Mockito.when(mockStub.sampleRowKeysCallableWithRequest()) .thenReturn(mockSampleRowKeysCallableWithRequest); - bigtableDataClient.sampleRowKeysAsync("fake-table"); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.sampleRowKeysAsync("fake-table"); + Mockito.verify(mockSampleRowKeysCallableWithRequest) .futureCall(SampleRowKeysRequest.create(TableId.of("fake-table"))); } @Test + @SuppressWarnings({"deprecation"}) public void proxySampleRowKeysOnAuthorizedViewTest() { Mockito.when(mockStub.sampleRowKeysCallableWithRequest()) .thenReturn(mockSampleRowKeysCallableWithRequest); - bigtableDataClient.sampleRowKeysAsync( - AuthorizedViewId.of("fake-table", "fake-authorized-view")); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + bigtableDataClient.sampleRowKeysAsync( + AuthorizedViewId.of("fake-table", "fake-authorized-view")); + Mockito.verify(mockSampleRowKeysCallableWithRequest) .futureCall( SampleRowKeysRequest.create(AuthorizedViewId.of("fake-table", "fake-authorized-view"))); } + @SuppressWarnings("deprecation") @Test public void sampleRowKeysTest() { Mockito.when(mockStub.sampleRowKeysCallableWithRequest()) @@ -692,14 +738,17 @@ public void proxyMutateRowCallableTest() { } @Test + @SuppressWarnings({"deprecation"}) public void proxyMutateRowTest() { Mockito.when(mockStub.mutateRowCallable()).thenReturn(mockMutateRowCallable); RowMutation request = - RowMutation.create("fake-table", "some-key") + RowMutation.create(TableId.of("fake-table"), "some-key") .setCell("some-family", "fake-qualifier", "fake-value"); - bigtableDataClient.mutateRowAsync(request); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.mutateRowAsync(request); + Mockito.verify(mockMutateRowCallable).futureCall(request); } @@ -711,7 +760,9 @@ public void proxyMutateRowOnAuthorizedViewTest() { RowMutation.create(AuthorizedViewId.of("fake-table", "fake-authorized-view"), "some-key") .setCell("some-family", "fake-qualifier", "fake-value"); - bigtableDataClient.mutateRowAsync(request); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.mutateRowAsync(request); + Mockito.verify(mockMutateRowCallable).futureCall(request); } @@ -720,10 +771,11 @@ public void mutateRowTest() { Mockito.when(mockStub.mutateRowCallable()).thenReturn(mockMutateRowCallable); Mockito.when(mockMutateRowCallable.futureCall(ArgumentMatchers.any(RowMutation.class))) .thenAnswer( - (Answer) invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); + (Answer>) + invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); RowMutation request = - RowMutation.create("fake-table", "some-key") + RowMutation.create(TableId.of("fake-table"), "some-key") .setCell("some-family", "fake-qualifier", "fake-value"); bigtableDataClient.mutateRow(request); @@ -735,7 +787,8 @@ public void mutateRowOnAuthorizedViewTest() { Mockito.when(mockStub.mutateRowCallable()).thenReturn(mockMutateRowCallable); Mockito.when(mockMutateRowCallable.futureCall(ArgumentMatchers.any(RowMutation.class))) .thenAnswer( - (Answer) invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); + (Answer>) + invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); RowMutation request = RowMutation.create(AuthorizedViewId.of("fake-table", "fake-authorized-view"), "some-key") @@ -750,12 +803,14 @@ public void proxyBulkMutatesRowTest() { Mockito.when(mockStub.bulkMutateRowsCallable()).thenReturn(mockBulkMutateRowsCallable); BulkMutation request = - BulkMutation.create("fake-table") + BulkMutation.create(TableId.of("fake-table")) .add( "fake-key", Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); - bigtableDataClient.bulkMutateRowsAsync(request); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.bulkMutateRowsAsync(request); + Mockito.verify(mockBulkMutateRowsCallable).futureCall(request); } @@ -769,7 +824,9 @@ public void proxyBulkMutatesRowOnAuthorizedViewTest() { "fake-key", Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); - bigtableDataClient.bulkMutateRowsAsync(request); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.bulkMutateRowsAsync(request); + Mockito.verify(mockBulkMutateRowsCallable).futureCall(request); } @@ -779,10 +836,11 @@ public void bulkMutatesRowTest() { Mockito.when(mockBulkMutateRowsCallable.futureCall(ArgumentMatchers.any(BulkMutation.class))) .thenAnswer( - (Answer) invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); + (Answer>) + invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); BulkMutation request = - BulkMutation.create("fake-table") + BulkMutation.create(TableId.of("fake-table")) .add( "fake-key", Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); @@ -797,7 +855,8 @@ public void bulkMutatesRowOnAuthorizedViewTest() { Mockito.when(mockBulkMutateRowsCallable.futureCall(ArgumentMatchers.any(BulkMutation.class))) .thenAnswer( - (Answer) invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); + (Answer>) + invocationOnMock -> ApiFutures.immediateFuture(Empty.getDefaultInstance())); BulkMutation request = BulkMutation.create(AuthorizedViewId.of("fake-table", "fake-authorized-view")) @@ -811,12 +870,12 @@ public void bulkMutatesRowOnAuthorizedViewTest() { @Test public void proxyNewBulkMutationBatcherTest() { - Mockito.when(mockStub.newMutateRowsBatcher(Mockito.any(String.class), Mockito.any())) + Mockito.when(mockStub.newMutateRowsBatcher(Mockito.any(TableId.class), Mockito.any())) .thenReturn(mockBulkMutationBatcher); ApiFuture expectedResponse = ApiFutures.immediateFuture(null); Batcher batcher = - bigtableDataClient.newBulkMutationBatcher("fake-table"); + bigtableDataClient.newBulkMutationBatcher(TableId.of("fake-table")); RowMutationEntry request = RowMutationEntry.create("some-key").setCell("some-family", "fake-qualifier", "fake-value"); Mockito.when(mockBulkMutationBatcher.add(request)).thenReturn(expectedResponse); @@ -824,7 +883,7 @@ public void proxyNewBulkMutationBatcherTest() { ApiFuture actualRes = batcher.add(request); assertThat(actualRes).isSameInstanceAs(expectedResponse); - Mockito.verify(mockStub).newMutateRowsBatcher(Mockito.any(String.class), Mockito.any()); + Mockito.verify(mockStub).newMutateRowsBatcher(Mockito.any(TableId.class), Mockito.any()); } @Test @@ -856,7 +915,8 @@ public void proxyNewBulkReadRowsTest() { Row.create(ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList())); ByteString request = ByteString.copyFromUtf8("fake-row-key"); - Batcher batcher = bigtableDataClient.newBulkReadRowsBatcher("fake-table"); + Batcher batcher = + bigtableDataClient.newBulkReadRowsBatcher(TableId.of("fake-table")); Mockito.when(mockBulkReadRowsBatcher.add(request)).thenReturn(expectedResponse); ApiFuture actualResponse = batcher.add(request); @@ -897,7 +957,8 @@ public void proxyNewBulkReadRowsWithFilterTest() { ByteString request = ByteString.copyFromUtf8("fake-row-key"); Batcher batcher = - bigtableDataClient.newBulkReadRowsBatcher("fake-table", FILTERS.key().regex("fake-row")); + bigtableDataClient.newBulkReadRowsBatcher( + TableId.of("fake-table"), FILTERS.key().regex("fake-row")); Mockito.when(mockBulkReadRowsBatcher.add(request)).thenReturn(expectedResponse); ApiFuture actualResponse = batcher.add(request); @@ -939,9 +1000,11 @@ public void proxyCheckAndMutateRowTest() { Mockito.when(mockStub.checkAndMutateRowCallable()).thenReturn(mockCheckAndMutateRowCallable); ConditionalRowMutation mutation = - ConditionalRowMutation.create("fake-table", "fake-key") + ConditionalRowMutation.create(TableId.of("fake-table"), "fake-key") .then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); - bigtableDataClient.checkAndMutateRowAsync(mutation); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.checkAndMutateRowAsync(mutation); Mockito.verify(mockCheckAndMutateRowCallable).futureCall(mutation); } @@ -954,7 +1017,9 @@ public void proxyCheckAndMutateRowOnAuthorizedViewTest() { ConditionalRowMutation.create( AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-key") .then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); - bigtableDataClient.checkAndMutateRowAsync(mutation); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.checkAndMutateRowAsync(mutation); Mockito.verify(mockCheckAndMutateRowCallable).futureCall(mutation); } @@ -968,7 +1033,7 @@ public void checkAndMutateRowTest() { ArgumentMatchers.any(ConditionalRowMutation.class))) .thenReturn(ApiFutures.immediateFuture(Boolean.TRUE)); ConditionalRowMutation mutation = - ConditionalRowMutation.create("fake-table", "fake-key") + ConditionalRowMutation.create(TableId.of("fake-table"), "fake-key") .then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); bigtableDataClient.checkAndMutateRow(mutation); @@ -987,6 +1052,7 @@ public void checkAndMutateRowOnAuthorizedViewTest() { ConditionalRowMutation.create( AuthorizedViewId.of("fake-table", "fake-authorized-view"), "fake-key") .then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value")); + bigtableDataClient.checkAndMutateRow(mutation); Mockito.verify(mockCheckAndMutateRowCallable).futureCall(mutation); @@ -997,9 +1063,12 @@ public void proxyReadModifyWriteRowTest() { Mockito.when(mockStub.readModifyWriteRowCallable()).thenReturn(mockReadModifyWriteRowCallable); ReadModifyWriteRow request = - ReadModifyWriteRow.create("fake-table", "some-key") + ReadModifyWriteRow.create(TableId.of("fake-table"), "some-key") .append("fake-family", "fake-qualifier", "suffix"); - bigtableDataClient.readModifyWriteRowAsync(request); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.readModifyWriteRowAsync(request); + Mockito.verify(mockReadModifyWriteRowCallable).futureCall(request); } @@ -1011,7 +1080,10 @@ public void proxyReadModifyWriteRowOnAuthorizedViewTest() { ReadModifyWriteRow.create( AuthorizedViewId.of("fake-table", "fake-authorized-view"), "some-key") .append("fake-family", "fake-qualifier", "suffix"); - bigtableDataClient.readModifyWriteRowAsync(request); + + @SuppressWarnings("VariableUnused") + ApiFuture ignored = bigtableDataClient.readModifyWriteRowAsync(request); + Mockito.verify(mockReadModifyWriteRowCallable).futureCall(request); } @@ -1027,7 +1099,7 @@ public void readModifyWriteRowTest() { Row.create( ByteString.copyFromUtf8("fake-row-key"), Collections.emptyList()))); ReadModifyWriteRow request = - ReadModifyWriteRow.create("fake-table", "some-key") + ReadModifyWriteRow.create(TableId.of("fake-table"), "some-key") .append("fake-family", "fake-qualifier", "suffix"); bigtableDataClient.readModifyWriteRow(request); Mockito.verify(mockReadModifyWriteRowCallable).futureCall(request); @@ -1059,4 +1131,24 @@ public void proxyReadModifyWriterRowCallableTest() { assertThat(bigtableDataClient.readModifyWriteRowCallable()) .isSameInstanceAs(mockReadModifyWriteRowCallable); } + + @Test + public void prepareQueryTest() { + Mockito.when(mockStub.prepareQueryCallable()).thenReturn(mockPrepareQueryCallable); + + String query = "SELECT * FROM table"; + Map> paramTypes = new HashMap<>(); + bigtableDataClient.prepareStatement(query, paramTypes); + Mockito.verify(mockPrepareQueryCallable).call(PrepareQueryRequest.create(query, paramTypes)); + } + + @Test + public void executeQueryMustUseSameClientAsPrepare() { + Mockito.when(mockStub.prepareQueryCallable()).thenReturn(mockPrepareQueryCallable); + + String query = "SELECT * FROM table"; + Map> paramTypes = new HashMap<>(); + bigtableDataClient.prepareStatement(query, paramTypes); + Mockito.verify(mockPrepareQueryCallable).call(PrepareQueryRequest.create(query, paramTypes)); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java index 6b8d3f9c51..cb5ca95c5c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java @@ -27,6 +27,8 @@ public class BigtableDataSettingsTest { @Test public void testToString() { + // TODO: figure out how avoid using setRefreshingChannel + @SuppressWarnings("deprecation") BigtableDataSettings settings = BigtableDataSettings.newBuilder() .setProjectId("our-project-2-12") diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/FakeServiceBuilder.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/FakeServiceBuilder.java index 5edcca2f07..c2b4edf763 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/FakeServiceBuilder.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/FakeServiceBuilder.java @@ -64,9 +64,13 @@ public Server start() throws IOException { return startWithoutRetries(); } catch (IOException e) { lastError = e; - if (!(e.getCause() instanceof BindException)) { - break; + if (e.getCause() instanceof BindException) { + continue; } + if (e.getMessage().contains("Failed to bind to address")) { + continue; + } + break; } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/HiddenGapicApiTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/HiddenGapicApiTest.java deleted file mode 100644 index 7c302b7cbd..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/HiddenGapicApiTest.java +++ /dev/null @@ -1,58 +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.bigtable.data.v2; - -import static com.google.common.truth.Truth.assertWithMessage; - -import com.google.api.core.InternalApi; -import com.google.cloud.bigtable.data.v2.stub.BigtableStub; -import com.google.cloud.bigtable.data.v2.stub.BigtableStubSettings; -import com.google.cloud.bigtable.data.v2.stub.GrpcBigtableCallableFactory; -import com.google.cloud.bigtable.data.v2.stub.GrpcBigtableStub; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -/** - * Tests that the underlying GAPIC api is marked as {@code @InternalApi}. This transformation - * happens in synth.py. - */ -@RunWith(Parameterized.class) -public class HiddenGapicApiTest { - private Class testClass; - - @Parameters - public static Object[] data() { - return new Object[] { - BigtableStub.class, - BigtableStubSettings.class, - GrpcBigtableStub.class, - GrpcBigtableCallableFactory.class - }; - } - - public HiddenGapicApiTest(Class testClass) { - this.testClass = testClass; - } - - @Test - public void test() { - assertWithMessage("%s should be annotated with @InternaOnly", testClass.getName()) - .that(testClass.getAnnotation(InternalApi.class)) - .isNotNull(); - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/JwtCredentialsWithAudienceTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/JwtCredentialsWithAudienceTests.java new file mode 100644 index 0000000000..780f40db77 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/JwtCredentialsWithAudienceTests.java @@ -0,0 +1,76 @@ +/* + * 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 + * + * 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.bigtable.data.v2; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.auth.oauth2.OAuth2Utils; +import com.google.auth.oauth2.ServiceAccountJwtAccessCredentials; +import com.google.cloud.bigtable.data.v2.internal.JwtCredentialsWithAudience; +import java.io.IOException; +import java.net.URI; +import java.security.PrivateKey; +import org.junit.Test; + +public class JwtCredentialsWithAudienceTests { + + private static final String SA_CLIENT_EMAIL = + "36680232662-vrd7ji19qe3nelgchd0ah2csanun6bnr@developer.gserviceaccount.com"; + private static final String SA_CLIENT_ID = + "36680232662-vrd7ji19qe3nelgchd0ah2csanun6bnr.apps.googleusercontent.com"; + private static final String SA_PRIVATE_KEY_ID = "d84a4fefcf50791d4a90f2d7af17469d6282df9d"; + private static final String SA_PRIVATE_KEY_PKCS8 = + "-----BEGIN PRIVATE KEY-----\n" + + "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALX0PQoe1igW12ikv1bN/r9lN749y2ijmbc/mFHPyS3hNTyOCjDvBbXYbDhQJzWVUikh4mvGBA07qTj79Xc3yBDfKP2IeyYQIFe0t0zkd7R9Zdn98Y2rIQC47aAbDfubtkU1U72t4zL11kHvoa0/RuFZjncvlr42X7be7lYh4p3NAgMBAAECgYASk5wDw4Az2ZkmeuN6Fk/y9H+Lcb2pskJIXjrL533vrDWGOC48LrsThMQPv8cxBky8HFSEklPpkfTF95tpD43iVwJRB/GrCtGTw65IfJ4/tI09h6zGc4yqvIo1cHX/LQ+SxKLGyir/dQM925rGt/VojxY5ryJR7GLbCzxPnJm/oQJBANwOCO6D2hy1LQYJhXh7O+RLtA/tSnT1xyMQsGT+uUCMiKS2bSKx2wxo9k7h3OegNJIu1q6nZ6AbxDK8H3+d0dUCQQDTrPSXagBxzp8PecbaCHjzNRSQE2in81qYnrAFNB4o3DpHyMMY6s5ALLeHKscEWnqP8Ur6X4PvzZecCWU9BKAZAkAutLPknAuxSCsUOvUfS1i87ex77Ot+w6POp34pEX+UWb+u5iFn2cQacDTHLV1LtE80L8jVLSbrbrlH43H0DjU5AkEAgidhycxS86dxpEljnOMCw8CKoUBd5I880IUahEiUltk7OLJYS/Ts1wbn3kPOVX3wyJs8WBDtBkFrDHW2ezth2QJADj3e1YhMVdjJW5jqwlD/VNddGjgzyunmiZg0uOXsHXbytYmsA545S8KRQFaJKFXYYFo2kOjqOiC1T2cAzMDjCQ==\n" + + "-----END PRIVATE KEY-----\n"; + private static final String QUOTA_PROJECT = "sample-quota-project-id"; + + @Test + public void getUniverseDomain_default() throws IOException { + PrivateKey privateKey = OAuth2Utils.privateKeyFromPkcs8(SA_PRIVATE_KEY_PKCS8); + ServiceAccountJwtAccessCredentials serviceAccountJwtAccessCredentials = + ServiceAccountJwtAccessCredentials.newBuilder() + .setClientId(SA_CLIENT_ID) + .setClientEmail(SA_CLIENT_EMAIL) + .setPrivateKey(privateKey) + .setPrivateKeyId(SA_PRIVATE_KEY_ID) + .setQuotaProjectId(QUOTA_PROJECT) + .build(); + JwtCredentialsWithAudience jwtWithAudience = + new JwtCredentialsWithAudience( + serviceAccountJwtAccessCredentials, URI.create("default-aud")); + assertThat(jwtWithAudience.getUniverseDomain()).isEqualTo("googleapis.com"); + } + + @Test + public void getUniverseDomain_custom() throws IOException { + PrivateKey privateKey = OAuth2Utils.privateKeyFromPkcs8(SA_PRIVATE_KEY_PKCS8); + ServiceAccountJwtAccessCredentials serviceAccountJwtAccessCredentials = + ServiceAccountJwtAccessCredentials.newBuilder() + .setClientId(SA_CLIENT_ID) + .setClientEmail(SA_CLIENT_EMAIL) + .setPrivateKey(privateKey) + .setPrivateKeyId(SA_PRIVATE_KEY_ID) + .setQuotaProjectId(QUOTA_PROJECT) + .setUniverseDomain("example.com") + .build(); + JwtCredentialsWithAudience jwtWithAudience = + new JwtCredentialsWithAudience( + serviceAccountJwtAccessCredentials, URI.create("default-aud")); + assertThat(jwtWithAudience.getUniverseDomain()).isEqualTo("example.com"); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/functional/ReadRowsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/functional/ReadRowsTest.java index 1a74eb5aa8..15f3792b81 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/functional/ReadRowsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/functional/ReadRowsTest.java @@ -24,6 +24,7 @@ import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.protobuf.ByteString; import com.google.protobuf.BytesValue; import com.google.protobuf.StringValue; @@ -89,13 +90,13 @@ public void rowMergingErrorsUseInternalStatus() throws Exception { Assert.assertThrows( InternalException.class, () -> { - for (Row ignored : client.readRows(Query.create("fake-table"))) {} + for (Row ignored : client.readRows(Query.create(TableId.of("fake-table")))) {} }); } } static class FakeService extends BigtableGrpc.BigtableImplBase { - private List readRowsResponses = + private final List readRowsResponses = Collections.synchronizedList(new ArrayList<>()); @Override diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java index 95955bab94..127a704784 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/AbstractProtoStructReaderTest.java @@ -24,6 +24,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.enumType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.floatValue; @@ -34,6 +35,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.nullValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.protoType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structField; @@ -52,11 +54,17 @@ import com.google.bigtable.v2.Type.KindCase; import com.google.bigtable.v2.Value; import com.google.cloud.Date; +import com.google.cloud.bigtable.common.Type.SchemalessEnum; +import com.google.cloud.bigtable.common.Type.SchemalessProto; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.models.sql.Struct; import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Album; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; import com.google.protobuf.ByteString; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -71,8 +79,8 @@ import org.junit.runners.JUnit4; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; -import org.threeten.bp.Instant; +@SuppressWarnings("DoubleBraceInitialization") @RunWith(Enclosed.class) public class AbstractProtoStructReaderTest { @@ -107,8 +115,7 @@ public void simpleMapField_validatesType() { TestProtoStruct structWithMap = TestProtoStruct.create( ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("testField", mapType(bytesType(), stringType()))) - .getMetadata()), + metadata(columnMetadata("testField", mapType(bytesType(), stringType())))), Collections.singletonList( mapValue( mapElement(bytesValue("foo"), stringValue("bar")), @@ -143,15 +150,14 @@ public void nestedMapField_validatesType() { TestProtoStruct.create( ProtoResultSetMetadata.fromProto( metadata( - columnMetadata( - "testField", - mapType( - bytesType(), - arrayType( - structType( - structField("timestamp", timestampType()), - structField("value", bytesType())))))) - .getMetadata()), + columnMetadata( + "testField", + mapType( + bytesType(), + arrayType( + structType( + structField("timestamp", timestampType()), + structField("value", bytesType()))))))), Collections.singletonList( mapValue( mapElement( @@ -205,7 +211,7 @@ public void arrayField_validatesType() { TestProtoStruct structWithList = TestProtoStruct.create( ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("testField", arrayType(stringType()))).getMetadata()), + metadata(columnMetadata("testField", arrayType(stringType())))), Collections.singletonList(arrayValue(stringValue("foo"), stringValue("bar")))); List expectedList = Arrays.asList("foo", "bar"); @@ -229,7 +235,7 @@ public void arrayField_accessingFloat() { TestProtoStruct structWithList = TestProtoStruct.create( ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("testField", arrayType(float32Type()))).getMetadata()), + metadata(columnMetadata("testField", arrayType(float32Type())))), Collections.singletonList(arrayValue(floatValue(1.1f), floatValue(1.2f)))); List floatList = @@ -237,6 +243,143 @@ public void arrayField_accessingFloat() { assertThat(floatList.get(0)).isEqualTo(1.1f); assertThat(floatList.get(1)).isEqualTo(1.2f); } + + // Test this independently since it verifies that parsing fails when data is deserialized into + // an incompatible Protobuf message, which is highly proto-specific. + @Test + public void mapField_accessingProto() { + Singer singer = Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build(); + TestProtoStruct structWithMap = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata( + columnMetadata( + "testField", + mapType( + bytesType(), + protoType( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle"))))), + Collections.singletonList( + mapValue(mapElement(bytesValue("key"), bytesValue(singer.toByteArray()))))); + HashMap expectedMap = new HashMap<>(); + expectedMap.put(ByteString.copyFromUtf8("key"), singer); + + assertThat( + structWithMap.getMap( + "testField", + SqlType.mapOf(SqlType.bytes(), SqlType.protoOf(Singer.getDefaultInstance())))) + .isEqualTo(expectedMap); + assertThat( + structWithMap.getMap( + 0, SqlType.mapOf(SqlType.bytes(), SqlType.protoOf(Singer.getDefaultInstance())))) + .isEqualTo(expectedMap); + + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + "testField", + SqlType.mapOf( + SqlType.bytes(), + SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")))); + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + 0, + SqlType.mapOf( + SqlType.bytes(), + SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")))); + assertThrows( + IllegalStateException.class, + () -> + structWithMap.getMap( + "testField", + SqlType.mapOf(SqlType.bytes(), SqlType.protoOf(Album.getDefaultInstance())))); + assertThrows( + IllegalStateException.class, + () -> + structWithMap.getMap( + 0, SqlType.mapOf(SqlType.bytes(), SqlType.protoOf(Album.getDefaultInstance())))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + } + + // Test this independently since it performs enum-specific verifications. + @Test + public void mapField_accessingEnum() { + TestProtoStruct structWithMap = + TestProtoStruct.create( + ProtoResultSetMetadata.fromProto( + metadata( + columnMetadata( + "testField", + mapType( + bytesType(), + enumType( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle"))))), + Collections.singletonList(mapValue(mapElement(bytesValue("key"), int64Value(0))))); + HashMap expectedMap = new HashMap<>(); + expectedMap.put(ByteString.copyFromUtf8("key"), Genre.POP); + + assertThat( + structWithMap.getMap( + "testField", SqlType.mapOf(SqlType.bytes(), SqlType.enumOf(Genre::forNumber)))) + .isEqualTo(expectedMap); + assertThat( + structWithMap.getMap( + 0, SqlType.mapOf(SqlType.bytes(), SqlType.enumOf(Genre::forNumber)))) + .isEqualTo(expectedMap); + + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + "testField", + SqlType.mapOf( + SqlType.bytes(), + SchemalessEnum.create( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))); + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + 0, + SqlType.mapOf( + SqlType.bytes(), + SchemalessEnum.create( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))); + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + "testField", + SqlType.mapOf( + SqlType.bytes(), + SchemalessEnum.create( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))); + assertThrows( + UnsupportedOperationException.class, + () -> + structWithMap.getMap( + 0, + SqlType.mapOf( + SqlType.bytes(), + SchemalessEnum.create( + "com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap("testField", SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + assertThrows( + IllegalStateException.class, + () -> structWithMap.getMap(0, SqlType.mapOf(SqlType.bytes(), SqlType.bytes()))); + } } @RunWith(Parameterized.class) @@ -345,12 +488,16 @@ public static List parameters() { structType( structField("stringField", stringType()), structField("intField", int64Type()), - structField("listField", arrayType(stringType()))))), + structField("listField", arrayType(stringType())), + structField("protoField", protoType("MyMessage", "my_bundle")), + structField("enumField", enumType("MyEnum", "other_bundle"))))), Collections.singletonList( arrayValue( stringValue("test"), int64Value(100), - arrayValue(stringValue("nested"), stringValue("nested2")))), + arrayValue(stringValue("nested"), stringValue("nested2")), + bytesValue("proto"), + int64Value(1))), 0, "testField", (BiFunction) TestProtoStruct::getStruct, @@ -361,11 +508,15 @@ public static List parameters() { structType( structField("stringField", stringType()), structField("intField", int64Type()), - structField("listField", arrayType(stringType())))), + structField("listField", arrayType(stringType())), + structField("protoField", protoType("MyMessage", "my_bundle")), + structField("enumField", enumType("MyEnum", "other_bundle")))), arrayValue( stringValue("test"), int64Value(100), - arrayValue(stringValue("nested"), stringValue("nested2"))) + arrayValue(stringValue("nested"), stringValue("nested2")), + bytesValue("proto"), + int64Value(1)) .getArrayValue()) }, // Simple List @@ -538,6 +689,177 @@ public static List parameters() { .getArrayValue()))); } }, + }, + // Proto + { + Collections.singletonList( + columnMetadata( + "testField", + protoType("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle"))), + Collections.singletonList( + bytesValue( + Singer.newBuilder() + .setName("Foo") + .setGenre(Genre.POP) + .build() + .toByteArray())), + 0, + "testField", + (BiFunction) + (row, field) -> row.getProtoMessage(field, Singer.getDefaultInstance()), + (BiFunction) + (row, index) -> row.getProtoMessage(index, Singer.getDefaultInstance()), + Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build() + }, + // Proto List + { + Collections.singletonList( + columnMetadata( + "testField", + arrayType( + protoType( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")))), + Collections.singletonList( + arrayValue( + bytesValue( + Singer.newBuilder() + .setName("Foo") + .setGenre(Genre.POP) + .build() + .toByteArray()), + bytesValue( + Singer.newBuilder() + .setName("Bar") + .setGenre(Genre.JAZZ) + .build() + .toByteArray()))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getList( + field, SqlType.arrayOf(SqlType.protoOf(Singer.getDefaultInstance()))), + (BiFunction>) + (row, index) -> + row.getList( + index, SqlType.arrayOf(SqlType.protoOf(Singer.getDefaultInstance()))), + Arrays.asList( + Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build(), + Singer.newBuilder().setName("Bar").setGenre(Genre.JAZZ).build()) + }, + // Proto Map + { + Collections.singletonList( + columnMetadata( + "testField", + mapType( + bytesType(), + protoType( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")))), + Collections.singletonList( + mapValue( + mapElement( + bytesValue("foo"), + bytesValue( + Singer.newBuilder() + .setName("Foo") + .setGenre(Genre.POP) + .build() + .toByteArray())), + mapElement( + bytesValue("key"), + bytesValue( + Singer.newBuilder() + .setName("Bar") + .setGenre(Genre.JAZZ) + .build() + .toByteArray())))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getMap( + field, + SqlType.mapOf( + SqlType.bytes(), SqlType.protoOf(Singer.getDefaultInstance()))), + (BiFunction>) + (row, index) -> + row.getMap( + index, + SqlType.mapOf( + SqlType.bytes(), SqlType.protoOf(Singer.getDefaultInstance()))), + new HashMap() { + { + put( + ByteString.copyFromUtf8("foo"), + Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build()); + put( + ByteString.copyFromUtf8("key"), + Singer.newBuilder().setName("Bar").setGenre(Genre.JAZZ).build()); + } + } + }, + // Enum + { + Collections.singletonList( + columnMetadata( + "testField", + enumType("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle"))), + Collections.singletonList(int64Value(1)), + 0, + "testField", + (BiFunction) + (row, field) -> row.getProtoEnum(field, Genre::forNumber), + (BiFunction) + (row, index) -> row.getProtoEnum(index, Genre::forNumber), + Genre.JAZZ + }, + // Enum List + { + Collections.singletonList( + columnMetadata( + "testField", + arrayType( + enumType("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))), + Collections.singletonList(arrayValue(nullValue(), int64Value(2), int64Value(100))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getList(field, SqlType.arrayOf(SqlType.enumOf(Genre::forNumber))), + (BiFunction>) + (row, index) -> + row.getList(index, SqlType.arrayOf(SqlType.enumOf(Genre::forNumber))), + Arrays.asList(null, Genre.FOLK, null) + }, + // Enum Map + { + Collections.singletonList( + columnMetadata( + "testField", + mapType( + bytesType(), + enumType("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle")))), + Collections.singletonList( + mapValue( + mapElement(bytesValue("foo"), int64Value(1)), + mapElement(bytesValue("key"), int64Value(2)))), + 0, + "testField", + (BiFunction>) + (row, field) -> + row.getMap( + field, SqlType.mapOf(SqlType.bytes(), SqlType.enumOf(Genre::forNumber))), + (BiFunction>) + (row, index) -> + row.getMap( + index, SqlType.mapOf(SqlType.bytes(), SqlType.enumOf(Genre::forNumber))), + new HashMap() { + { + put(ByteString.copyFromUtf8("foo"), Genre.JAZZ); + put(ByteString.copyFromUtf8("key"), Genre.FOLK); + } + } } }); } @@ -565,8 +887,7 @@ public static List parameters() { private TestProtoStruct getTestRow() { return TestProtoStruct.create( - ProtoResultSetMetadata.fromProto( - metadata(schema.toArray(new ColumnMetadata[] {})).getMetadata()), + ProtoResultSetMetadata.fromProto(metadata(schema.toArray(new ColumnMetadata[] {}))), values); } @@ -632,7 +953,7 @@ public void getByColumnIndex_throwsExceptionOnWrongType() { TestProtoStruct row = TestProtoStruct.create( ProtoResultSetMetadata.fromProto( - metadata(updatedSchema.toArray(new ColumnMetadata[] {})).getMetadata()), + metadata(updatedSchema.toArray(new ColumnMetadata[] {}))), updatedValues); assertThrows(IllegalStateException.class, () -> getByIndex.apply(row, index)); @@ -654,7 +975,7 @@ public void getByColumnName_throwsExceptionOnWrongType() { TestProtoStruct row = TestProtoStruct.create( ProtoResultSetMetadata.fromProto( - metadata(updatedSchema.toArray(new ColumnMetadata[] {})).getMetadata()), + metadata(updatedSchema.toArray(new ColumnMetadata[] {}))), updatedValues); assertThrows(IllegalStateException.class, () -> getByColumn.apply(row, columnName)); @@ -693,7 +1014,7 @@ public void getByColumnName_throwsExceptionForDuplicateColumnName() { duplicatedSchema.addAll(schema); ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( - metadata(duplicatedSchema.toArray(new ColumnMetadata[] {})).getMetadata()); + metadata(duplicatedSchema.toArray(new ColumnMetadata[] {}))); List duplicatedValues = new ArrayList<>(values); duplicatedValues.addAll(values); TestProtoStruct row = TestProtoStruct.create(metadata, duplicatedValues); @@ -708,12 +1029,12 @@ public void getByIndex_worksWithDuplicateColumnName() { duplicatedSchema.addAll(schema); ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( - metadata(duplicatedSchema.toArray(new ColumnMetadata[] {})).getMetadata()); + metadata(duplicatedSchema.toArray(new ColumnMetadata[] {}))); List duplicatedValues = new ArrayList<>(values); duplicatedValues.addAll(values); TestProtoStruct row = TestProtoStruct.create(metadata, duplicatedValues); - assertThat(expectedJavaValue).isEqualTo(getByIndex.apply(row, index)); + assertThat(getByIndex.apply(row, index)).isEqualTo(expectedJavaValue); } } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequestTest.java new file mode 100644 index 0000000000..983bc8521c --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PrepareQueryRequestTest.java @@ -0,0 +1,88 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.boolType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampType; +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.Type; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import java.util.HashMap; +import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class PrepareQueryRequestTest { + + @Test + public void testProtoConversion() { + Map> paramTypes = new HashMap<>(); + paramTypes.put("strParam", SqlType.string()); + paramTypes.put("bytesParam", SqlType.bytes()); + paramTypes.put("intParam", SqlType.int64()); + paramTypes.put("float64Param", SqlType.float64()); + paramTypes.put("float32Param", SqlType.float32()); + paramTypes.put("boolParam", SqlType.bool()); + paramTypes.put("timestampParam", SqlType.timestamp()); + paramTypes.put("dateParam", SqlType.date()); + paramTypes.put("strArrayParam", SqlType.arrayOf(SqlType.string())); + paramTypes.put("byteArrayParam", SqlType.arrayOf(SqlType.bytes())); + paramTypes.put("intArrayParam", SqlType.arrayOf(SqlType.int64())); + paramTypes.put("float32ArrayParam", SqlType.arrayOf(SqlType.float32())); + paramTypes.put("float64ArrayParam", SqlType.arrayOf(SqlType.float64())); + paramTypes.put("boolArrayParam", SqlType.arrayOf(SqlType.bool())); + paramTypes.put("tsArrayParam", SqlType.arrayOf(SqlType.timestamp())); + paramTypes.put("dateArrayParam", SqlType.arrayOf(SqlType.date())); + + PrepareQueryRequest request = PrepareQueryRequest.create("SELECT * FROM table", paramTypes); + RequestContext rc = RequestContext.create("project", "instance", "profile"); + com.google.bigtable.v2.PrepareQueryRequest proto = request.toProto(rc); + + assertThat(proto.getQuery()).isEqualTo("SELECT * FROM table"); + assertThat(proto.getAppProfileId()).isEqualTo("profile"); + assertThat(proto.getInstanceName()) + .isEqualTo(NameUtil.formatInstanceName("project", "instance")); + + Map protoParamTypes = new HashMap<>(); + protoParamTypes.put("strParam", stringType()); + protoParamTypes.put("bytesParam", bytesType()); + protoParamTypes.put("intParam", int64Type()); + protoParamTypes.put("float64Param", float64Type()); + protoParamTypes.put("float32Param", float32Type()); + protoParamTypes.put("boolParam", boolType()); + protoParamTypes.put("timestampParam", timestampType()); + protoParamTypes.put("dateParam", dateType()); + protoParamTypes.put("strArrayParam", arrayType(stringType())); + protoParamTypes.put("byteArrayParam", arrayType(bytesType())); + protoParamTypes.put("intArrayParam", arrayType(int64Type())); + protoParamTypes.put("float32ArrayParam", arrayType(float32Type())); + protoParamTypes.put("float64ArrayParam", arrayType(float64Type())); + protoParamTypes.put("boolArrayParam", arrayType(boolType())); + protoParamTypes.put("tsArrayParam", arrayType(timestampType())); + protoParamTypes.put("dateArrayParam", arrayType(dateType())); + assertThat(proto.getParamTypesMap()).isEqualTo(protoParamTypes); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImplTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImplTest.java new file mode 100644 index 0000000000..44d80cec6b --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/PreparedStatementImplTest.java @@ -0,0 +1,417 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.rpc.ApiExceptions; +import com.google.api.gax.rpc.FixedTransportChannelProvider; +import com.google.bigtable.v2.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PrepareQueryState; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryVersion; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.PrepareRpcExpectation; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.TestBigtableSqlService; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.ByteString; +import io.grpc.Status.Code; +import io.grpc.testing.GrpcServerRule; +import java.io.IOException; +import java.lang.ref.WeakReference; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class PreparedStatementImplTest { + + private static final ResultSetMetadata METADATA_PROTO = + metadata(columnMetadata("_key", bytesType()), columnMetadata("p", stringType())); + + @Rule public GrpcServerRule serverRule = new GrpcServerRule(); + private TestBigtableSqlService service; + private BigtableDataClient client; + private Map> paramTypes; + private int prepareAttempts; + + @Before + public void setUp() throws IOException { + service = new TestBigtableSqlService(); + serverRule.getServiceRegistry().addService(service); + + BigtableDataSettings.Builder settings = + BigtableDataSettings.newBuilder() + .setProjectId(TestBigtableSqlService.DEFAULT_PROJECT_ID) + .setInstanceId(TestBigtableSqlService.DEFAULT_INSTANCE_ID) + .setAppProfileId(TestBigtableSqlService.DEFAULT_APP_PROFILE_ID) + .setCredentialsProvider(NoCredentialsProvider.create()); + settings + .stubSettings() + .setTransportChannelProvider( + FixedTransportChannelProvider.create( + GrpcTransportChannel.create(serverRule.getChannel()))) + .build(); + // Remove log noise from client side metrics + settings.setMetricsProvider(NoopMetricsProvider.INSTANCE).disableInternalMetrics(); + prepareAttempts = + settings.stubSettings().prepareQuerySettings().retrySettings().getMaxAttempts(); + client = BigtableDataClient.create(settings.build()); + paramTypes = ImmutableMap.of("param", SqlType.string()); + } + + private PreparedStatementImpl getDefaultPrepareStatement() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("plan"), + METADATA_PROTO, + // Plan expires right away + Instant.now()))); + return (PreparedStatementImpl) + client.prepareStatement("SELECT _key, @param AS p FROM table", paramTypes); + } + + @After + public void tearDown() { + if (client != null) { + client.close(); + } + } + + @Test + public void testBackgroundRefresh() throws InterruptedException, ExecutionException { + PreparedStatementImpl preparedStatement = getDefaultPrepareStatement(); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse(ByteString.copyFromUtf8("plan2"), METADATA_PROTO, Instant.now()))); + // Refresh won't be triggered until this call + PreparedQueryData initialPlan = preparedStatement.getLatestPrepareResponse(); + PrepareResponse initialResponse = initialPlan.prepareFuture().get(); + // wait for the second call + do { + Thread.sleep(10); + } while (service.prepareCount < 2); + Thread.sleep(50); + PreparedQueryData updatedPlan = preparedStatement.getLatestPrepareResponse(); + PrepareResponse updatedResponse = updatedPlan.prepareFuture().get(); + assertThat(updatedPlan.version()).isNotEqualTo(initialPlan.version()); + assertThat(initialResponse.preparedQuery()).isEqualTo(ByteString.copyFromUtf8("plan")); + assertThat(initialResponse.resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA_PROTO)); + assertThat(updatedResponse.preparedQuery()).isEqualTo(ByteString.copyFromUtf8("plan2")); + assertThat(updatedResponse.resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA_PROTO)); + // We don't expect any additional calls + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void noRefreshBeforeExpiryWindow() throws ExecutionException, InterruptedException { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @other AS o FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("other_plan"), + METADATA_PROTO, + // Don't expire + Instant.now().plus(Duration.ofMinutes(10))))); + PreparedStatementImpl unexpired = + (PreparedStatementImpl) + client.prepareStatement("SELECT _key, @other AS o FROM table", paramTypes); + // Don't expect any refresh + PreparedQueryData initialPlan = unexpired.getLatestPrepareResponse(); + PrepareResponse initialResponse = initialPlan.prepareFuture().get(); + + assertThat(initialResponse.preparedQuery()).isEqualTo(ByteString.copyFromUtf8("other_plan")); + assertThat(service.prepareCount).isEqualTo(1); + } + + @Test + public void testMarkExpiredAndStartRefresh() throws ExecutionException, InterruptedException { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("plan"), + METADATA_PROTO, + // Plan expires right away + Instant.now().plusSeconds(2L)))); + PreparedStatementImpl preparedStatement = + (PreparedStatementImpl) + client.prepareStatement("SELECT _key, @param AS p FROM table", paramTypes); + PreparedQueryData initialPlan = preparedStatement.getLatestPrepareResponse(); + PrepareResponse initialPrepareResponse = initialPlan.prepareFuture().get(); + + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("hardRefreshPlan"), + METADATA_PROTO, + Instant.now().plus(Duration.ofMinutes(10))))); + + PreparedQueryData updatedPlan = + preparedStatement.markExpiredAndStartRefresh(initialPlan.version()); + PrepareResponse updatedPrepareResponse = updatedPlan.prepareFuture().get(); + + assertThat(updatedPlan.version()).isNotEqualTo(initialPlan.version()); + assertThat(initialPrepareResponse.preparedQuery()).isEqualTo(ByteString.copyFromUtf8("plan")); + assertThat(initialPrepareResponse.resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA_PROTO)); + assertThat(updatedPrepareResponse.preparedQuery()) + .isEqualTo(ByteString.copyFromUtf8("hardRefreshPlan")); + assertThat(updatedPrepareResponse.resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA_PROTO)); + // We don't expect any additional calls + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void testConcurrentBackgroundRefreshCalls() + throws InterruptedException, ExecutionException { + PreparedStatementImpl preparedStatement = getDefaultPrepareStatement(); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("plan2"), + METADATA_PROTO, + Instant.now().plus(Duration.ofMinutes(10))))); + ExecutorService executor = Executors.newFixedThreadPool(50); + List> callableList = new ArrayList<>(); + for (int i = 0; i < 50; i++) { + callableList.add(preparedStatement::getLatestPrepareResponse); + } + List> results = executor.invokeAll(callableList); + executor.shutdown(); + boolean done = executor.awaitTermination(1, TimeUnit.MINUTES); + assertThat(done).isTrue(); + assertThat(service.prepareCount).isEqualTo(2); + for (Future prepareFuture : results) { + PreparedQueryData response = prepareFuture.get(); + assertThat(response.prepareFuture().get().preparedQuery()) + .isIn( + // Some will get the first plan, some might get the result of refresh + ImmutableList.of(ByteString.copyFromUtf8("plan"), ByteString.copyFromUtf8("plan2"))); + } + } + + @Test + public void testConcurrentMarkExpiredAndStartRefreshCalls() + throws InterruptedException, ExecutionException { + PreparedStatementImpl preparedStatement = getDefaultPrepareStatement(); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("plan2"), + METADATA_PROTO, + Instant.now().plus(Duration.ofMinutes(10))))); + PreparedQueryData initialData = preparedStatement.getLatestPrepareResponse(); + ExecutorService executor = Executors.newFixedThreadPool(50); + List> callableList = new ArrayList<>(); + for (int i = 0; i < 50; i++) { + callableList.add(() -> preparedStatement.markExpiredAndStartRefresh(initialData.version())); + } + List> results = executor.invokeAll(callableList); + executor.shutdown(); + boolean done = executor.awaitTermination(1, TimeUnit.MINUTES); + assertThat(done).isTrue(); + for (Future refreshFuture : results) { + PreparedQueryData response = refreshFuture.get(); + assertThat(response.version()).isNotEqualTo(initialData.version()); + assertThat(response.prepareFuture().get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA_PROTO)); + } + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void testPrepareFailuresAreRetried() throws ExecutionException, InterruptedException { + PreparedStatementImpl preparedStatement = getDefaultPrepareStatement(); + int failures = 0; + // Exhaust all the retries w unavailables + for (int i = 0; i <= prepareAttempts; i++) { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWithStatus(Code.UNAVAILABLE)); + failures++; + } + // Now exhaust all the retries again w deadline exceeded + for (int i = 0; i <= prepareAttempts; i++) { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .respondWithStatus(Code.DEADLINE_EXCEEDED)); + failures++; + } + // then succeed + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .withDelay(Duration.ofMillis(20)) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("plan2"), + METADATA_PROTO, + Instant.now().plus(Duration.ofMinutes(10))))); + PreparedQueryData initialData = preparedStatement.getLatestPrepareResponse(); + PreparedQueryData nextData = + preparedStatement.markExpiredAndStartRefresh(initialData.version()); + + assertThat(nextData.prepareFuture().get().preparedQuery()) + .isEqualTo(ByteString.copyFromUtf8("plan2")); + // initial request + failures + final success + assertThat(service.prepareCount).isEqualTo(1 + failures + 1); + } + + @Test + public void garbageCollectionWorksWhenRetryIsOngoing() throws InterruptedException { + PreparedStatementImpl preparedStatement = getDefaultPrepareStatement(); + + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT _key, @param AS p FROM table") + .withParamTypes(paramTypes) + .withDelay(Duration.ofSeconds(1)) + // Return a permanent error so the stub doesn't retry + .respondWithStatus(Code.INTERNAL)); + WeakReference weakRef = new WeakReference<>(preparedStatement); + PreparedQueryVersion initialPlanId = preparedStatement.getLatestPrepareResponse().version(); + PreparedQueryData next = preparedStatement.markExpiredAndStartRefresh(initialPlanId); + preparedStatement = null; + for (int i = 0; i < 5; i++) { + // This isn't guaranteed to run GC, so call it a few times. Testing has shown that this + // is enough to prevent any flakes in 1000 runs + System.gc(); + Thread.sleep(10); + } + assertThat(service.prepareCount).isEqualTo(2); + assertThat(weakRef.get()).isNull(); + // The plan refresh stops retrying after the PreparedStatement is garbage collected. + // Because this means it isn't needed anymore, we don't want to keep refreshing. + assertThrows( + RuntimeException.class, + () -> ApiExceptions.callAndTranslateApiException(next.prepareFuture())); + } + + @Test + public void testPrepareQueryStateInitialState() throws ExecutionException, InterruptedException { + ResultSetMetadata md = metadata(columnMetadata("strCol", stringType())); + PrepareQueryState state = + PrepareQueryState.createInitialState( + PrepareResponse.fromProto(prepareResponse(ByteString.copyFromUtf8("plan"), md))); + assertThat(state.current().prepareFuture().isDone()).isTrue(); + assertThat(state.current().prepareFuture().get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(md)); + assertThat(state.maybeBackgroundRefresh()).isEmpty(); + } + + @Test + public void testPrepareQueryStateWithBackgroundPlan() + throws ExecutionException, InterruptedException { + ResultSetMetadata md = metadata(columnMetadata("strCol", stringType())); + PrepareQueryState state = + PrepareQueryState.createInitialState( + PrepareResponse.fromProto(prepareResponse(ByteString.copyFromUtf8("plan"), md))); + + PrepareQueryState withBackgroundPlan = + state.withBackgroundPlan( + ApiFutures.immediateFuture(PrepareResponse.fromProto(prepareResponse(md)))); + assertThat(withBackgroundPlan.current().prepareFuture().isDone()).isTrue(); + assertThat(withBackgroundPlan.current().prepareFuture().get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(md)); + assertThat(withBackgroundPlan.current().version()).isEqualTo(state.current().version()); + assertThat(withBackgroundPlan.maybeBackgroundRefresh()).isPresent(); + assertThat(withBackgroundPlan.maybeBackgroundRefresh().get().version()) + .isNotEqualTo(withBackgroundPlan.current().version()); + assertThat( + withBackgroundPlan + .maybeBackgroundRefresh() + .get() + .prepareFuture() + .get() + .resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(md)); + } + + @Test + public void testPrepareQueryStatePromoteBackgroundPlan() + throws ExecutionException, InterruptedException { + ResultSetMetadata md = metadata(columnMetadata("strCol", stringType())); + PrepareQueryState state = + PrepareQueryState.createInitialState( + PrepareResponse.fromProto(prepareResponse(ByteString.copyFromUtf8("plan"), md))); + PrepareQueryState withBackgroundPlan = + state.withBackgroundPlan( + ApiFutures.immediateFuture(PrepareResponse.fromProto(prepareResponse(md)))); + PrepareQueryState finalState = withBackgroundPlan.promoteBackgroundPlan(); + + assertThat(finalState.current().version()) + .isEqualTo(withBackgroundPlan.maybeBackgroundRefresh().get().version()); + assertThat(finalState.current().prepareFuture().get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(md)); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoStructTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoStructTest.java index 6fa71e7fff..cd8dfc7340 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoStructTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ProtoStructTest.java @@ -23,6 +23,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.enumType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.floatValue; @@ -30,6 +31,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapElement; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.protoType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structField; @@ -45,19 +47,26 @@ import com.google.bigtable.v2.Type.Struct; import com.google.bigtable.v2.Value; import com.google.cloud.Date; +import com.google.cloud.bigtable.common.Type.SchemalessEnum; +import com.google.cloud.bigtable.common.Type.SchemalessProto; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; import com.google.protobuf.ByteString; +import java.time.Instant; import java.util.Arrays; import java.util.HashMap; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; +@SuppressWarnings("DoubleBraceInitialization") @RunWith(JUnit4.class) public class ProtoStructTest { + static Singer singer = Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build(); + static ProtoStruct struct = ProtoStruct.create( (SqlType.Struct) @@ -74,7 +83,14 @@ public class ProtoStructTest { structField( "structField", structType(structField("stringField", stringType()))), structField("listField", arrayType(stringType())), - structField("mapField", mapType(stringType(), stringType())))), + structField("mapField", mapType(stringType(), stringType())), + structField( + "protoField", + protoType("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")), + structField( + "enumField", + enumType( + "com.google.cloud.bigtable.data.v2.test.Genre", "other_bundle")))), arrayValue( bytesValue("testBytes"), stringValue("testString"), @@ -88,7 +104,9 @@ public class ProtoStructTest { arrayValue(stringValue("foo"), stringValue("bar")), arrayValue( mapElement(stringValue("foo"), stringValue("bar")), - mapElement(stringValue("key"), stringValue("val")))) + mapElement(stringValue("key"), stringValue("val"))), + bytesValue(singer.toByteArray()), + int64Value(0)) .getArrayValue()); // These are more extensively tested in AbstractProtoStructReaderTest since that is what @@ -119,6 +137,8 @@ public void getByIndex_supportsAllTypes() { put("key", "val"); } }); + assertThat(struct.getProtoMessage(11, Singer.getDefaultInstance())).isEqualTo(singer); + assertThat(struct.getProtoEnum(12, Genre::forNumber)).isEqualTo(Genre.POP); } @Test @@ -147,6 +167,8 @@ public void getByNameSupportsAllTypes() { put("key", "val"); } }); + assertThat(struct.getProtoMessage("protoField", Singer.getDefaultInstance())).isEqualTo(singer); + assertThat(struct.getProtoEnum("enumField", Genre::forNumber)).isEqualTo(Genre.POP); } @Test @@ -164,6 +186,12 @@ public void getColumnType_byName() { assertThat(struct.getColumnType("listField")).isEqualTo(SqlType.arrayOf(SqlType.string())); assertThat(struct.getColumnType("mapField")) .isEqualTo(SqlType.mapOf(SqlType.string(), SqlType.string())); + assertThat(struct.getColumnType("protoField")) + .isEqualTo( + SchemalessProto.create("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")); + assertThat(struct.getColumnType("enumField")) + .isEqualTo( + SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Genre", "other_bundle")); } @Test @@ -181,6 +209,12 @@ public void getColumnType_byIndex() { assertThat(struct.getColumnType(9)).isEqualTo(SqlType.arrayOf(SqlType.string())); assertThat(struct.getColumnType(10)) .isEqualTo(SqlType.mapOf(SqlType.string(), SqlType.string())); + assertThat(struct.getColumnType(11)) + .isEqualTo( + SchemalessProto.create("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")); + assertThat(struct.getColumnType(12)) + .isEqualTo( + SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Genre", "other_bundle")); } @Test @@ -196,6 +230,8 @@ public void getColumnIndex_worksForExistingColumns() { assertThat(struct.getColumnIndex("structField")).isEqualTo(8); assertThat(struct.getColumnIndex("listField")).isEqualTo(9); assertThat(struct.getColumnIndex("mapField")).isEqualTo(10); + assertThat(struct.getColumnIndex("protoField")).isEqualTo(11); + assertThat(struct.getColumnIndex("enumField")).isEqualTo(12); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtilTest.java new file mode 100644 index 0000000000..b0f1d64a9d --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/QueryParamUtilTest.java @@ -0,0 +1,97 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import static com.google.cloud.bigtable.data.v2.internal.QueryParamUtil.convertToQueryParamProto; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.boolType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampType; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class QueryParamUtilTest { + + @Test + public void convertsSimpleTypes() { + assertThat(convertToQueryParamProto(SqlType.string())).isEqualTo(stringType()); + assertThat(convertToQueryParamProto(SqlType.bytes())).isEqualTo(bytesType()); + assertThat(convertToQueryParamProto(SqlType.int64())).isEqualTo(int64Type()); + assertThat(convertToQueryParamProto(SqlType.float64())).isEqualTo(float64Type()); + assertThat(convertToQueryParamProto(SqlType.float32())).isEqualTo(float32Type()); + assertThat(convertToQueryParamProto(SqlType.bool())).isEqualTo(boolType()); + assertThat(convertToQueryParamProto(SqlType.timestamp())).isEqualTo(timestampType()); + assertThat(convertToQueryParamProto(SqlType.date())).isEqualTo(dateType()); + } + + @Test + public void convertsValidArrayTypes() { + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.string()))) + .isEqualTo(arrayType(stringType())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.bytes()))) + .isEqualTo(arrayType(bytesType())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.int64()))) + .isEqualTo(arrayType(int64Type())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.float64()))) + .isEqualTo(arrayType(float64Type())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.float32()))) + .isEqualTo(arrayType(float32Type())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.bool()))) + .isEqualTo(arrayType(boolType())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.timestamp()))) + .isEqualTo(arrayType(timestampType())); + assertThat(convertToQueryParamProto(SqlType.arrayOf(SqlType.date()))) + .isEqualTo(arrayType(dateType())); + } + + @Test + public void failsForInvalidArrayElementTypes() { + assertThrows( + IllegalArgumentException.class, + () -> convertToQueryParamProto(SqlType.arrayOf(SqlType.struct()))); + assertThrows( + IllegalArgumentException.class, + () -> convertToQueryParamProto(SqlType.arrayOf(SqlType.arrayOf(SqlType.string())))); + assertThrows( + IllegalArgumentException.class, + () -> + convertToQueryParamProto( + SqlType.arrayOf(SqlType.mapOf(SqlType.string(), SqlType.string())))); + } + + @Test + public void failsForMap() { + assertThrows( + IllegalArgumentException.class, + () -> convertToQueryParamProto(SqlType.mapOf(SqlType.string(), SqlType.string()))); + } + + @Test + public void failsForStruct() { + assertThrows(IllegalArgumentException.class, () -> convertToQueryParamProto(SqlType.struct())); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImplTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImplTest.java index a5b823b205..9787723164 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImplTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/ResultSetImplTest.java @@ -21,9 +21,11 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.boolValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.callContext; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.enumType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.floatValue; @@ -33,6 +35,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.protoType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structField; @@ -46,14 +49,19 @@ import com.google.api.core.SettableApiFuture; import com.google.bigtable.v2.ExecuteQueryRequest; import com.google.cloud.Date; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallContext; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory; import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream; import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStreamImpl; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; import com.google.protobuf.ByteString; +import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -62,41 +70,47 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class ResultSetImplTest { - private static ResultSet resultSetWithFakeStream(ResultSetMetadata metadata, SqlRow... rows) { + private static ResultSet resultSetWithFakeStream( + com.google.bigtable.v2.ResultSetMetadata protoMetadata, SqlRow... rows) { ServerStreamingStashCallable stream = new ServerStreamingStashCallable<>(Arrays.asList(rows)); SettableApiFuture future = SettableApiFuture.create(); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); future.set(metadata); - ExecuteQueryCallContext fakeCallContext = - ExecuteQueryCallContext.create(ExecuteQueryRequest.newBuilder().build(), future); + PreparedStatement preparedStatement = SqlProtoFactory.preparedStatement(protoMetadata); + ExecuteQueryCallContext fakeCallContext = callContext(preparedStatement.bind().build(), future); return ResultSetImpl.create(SqlServerStreamImpl.create(future, stream.call(fakeCallContext))); } + @SuppressWarnings("DoubleBraceInitialization") @Test public void testSingleRow() throws ExecutionException, InterruptedException { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata( - columnMetadata("string", stringType()), - columnMetadata("bytes", bytesType()), - columnMetadata("long", int64Type()), - columnMetadata("double", float64Type()), - columnMetadata("float", float32Type()), - columnMetadata("boolean", boolType()), - columnMetadata("timestamp", timestampType()), - columnMetadata("date", dateType()), - columnMetadata("struct", structType(structField("string", stringType()))), - columnMetadata("list", arrayType(stringType())), - columnMetadata("map", mapType(stringType(), stringType()))) - .getMetadata()); + Singer singer = Singer.newBuilder().setName("Foo").setGenre(Genre.POP).build(); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata( + columnMetadata("string", stringType()), + columnMetadata("bytes", bytesType()), + columnMetadata("long", int64Type()), + columnMetadata("double", float64Type()), + columnMetadata("float", float32Type()), + columnMetadata("boolean", boolType()), + columnMetadata("timestamp", timestampType()), + columnMetadata("date", dateType()), + columnMetadata("struct", structType(structField("string", stringType()))), + columnMetadata("list", arrayType(stringType())), + columnMetadata("map", mapType(stringType(), stringType())), + columnMetadata( + "proto", protoType("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle")), + columnMetadata( + "enum", enumType("com.google.cloud.bigtable.data.v2.test.Genre", "other_bundle"))); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); ResultSet resultSet = resultSetWithFakeStream( - metadata, + protoMetadata, ProtoSqlRow.create( metadata, Arrays.asList( @@ -110,7 +124,9 @@ public void testSingleRow() throws ExecutionException, InterruptedException { dateValue(2024, 6, 5), structValue(stringValue("foo")), arrayValue(stringValue("foo"), stringValue("bar")), - mapValue(mapElement(stringValue("key"), stringValue("val")))))); + mapValue(mapElement(stringValue("key"), stringValue("val"))), + bytesValue(singer.toByteArray()), + int64Value(0)))); int rows = 0; while (resultSet.next()) { rows++; @@ -161,7 +177,12 @@ public void testSingleRow() throws ExecutionException, InterruptedException { put("key", "val"); } }); + assertThat(resultSet.getProtoMessage(11, Singer.getDefaultInstance())).isEqualTo(singer); + assertThat(resultSet.getProtoMessage("proto", Singer.getDefaultInstance())).isEqualTo(singer); + assertThat(resultSet.getProtoEnum(12, Genre::forNumber)).isEqualTo(Genre.POP); + assertThat(resultSet.getProtoEnum("enum", Genre::forNumber)).isEqualTo(Genre.POP); } + assertThat(rows).isEqualTo(1); assertThat(resultSet.next()).isFalse(); assertThat(resultSet.getMetadata()).isEqualTo(metadata); @@ -170,12 +191,12 @@ public void testSingleRow() throws ExecutionException, InterruptedException { @Test public void testIteration() { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); try (ResultSet resultSet = resultSetWithFakeStream( - metadata, + protoMetadata, ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))), ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("bar"))), ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("baz"))), @@ -197,11 +218,11 @@ public void testIteration() { } @Test - public void testEmptyResultSet() throws ExecutionException, InterruptedException { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); - try (ResultSet resultSet = resultSetWithFakeStream(metadata)) { + public void testEmptyResultSet() { + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); + try (ResultSet resultSet = resultSetWithFakeStream(protoMetadata)) { assertThat(resultSet.next()).isFalse(); assertThat(resultSet.getMetadata()).isEqualTo(metadata); } @@ -209,13 +230,13 @@ public void testEmptyResultSet() throws ExecutionException, InterruptedException @Test public void getCallsPrevented_afterNextReturnsFalse() { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); ResultSet resultSet = resultSetWithFakeStream( - metadata, + protoMetadata, ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))), ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("bar")))); @@ -233,12 +254,13 @@ public void getCallsPrevented_afterNextReturnsFalse() { @Test public void close_preventsGetCalls() { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); ResultSet resultSet = resultSetWithFakeStream( - metadata, ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo")))); + protoMetadata, + ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo")))); assertThat(resultSet.next()).isTrue(); resultSet.close(); @@ -248,8 +270,7 @@ public void close_preventsGetCalls() { @Test public void close_cancelsStreamWhenResultsNotConsumed() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("string", stringType()))); ServerStreamingStashCallable stream = new ServerStreamingStashCallable<>( Collections.singletonList( @@ -267,8 +288,7 @@ public void close_cancelsStreamWhenResultsNotConsumed() { @Test public void close_doesNotCancelStreamWhenResultsConsumed() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("string", stringType()))); ServerStreamingStashCallable stream = new ServerStreamingStashCallable<>( Collections.singletonList( @@ -287,12 +307,12 @@ public void close_doesNotCancelStreamWhenResultsConsumed() { @Test public void getBeforeNext_throwsException() { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("string", stringType())).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); try (ResultSet resultSet = resultSetWithFakeStream( - metadata, + protoMetadata, ProtoSqlRow.create(metadata, Collections.singletonList(stringValue("foo"))))) { assertThrows(IllegalStateException.class, () -> resultSet.getString(0)); } @@ -300,13 +320,12 @@ public void getBeforeNext_throwsException() { @Test public void getOnColumnWithDuplicateName_throwsException() { - ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("name", stringType()), columnMetadata("name", stringType())) - .getMetadata()); + com.google.bigtable.v2.ResultSetMetadata protoMetadata = + metadata(columnMetadata("string", stringType())); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(protoMetadata); try (ResultSet resultSet = resultSetWithFakeStream( - metadata, + protoMetadata, ProtoSqlRow.create(metadata, Arrays.asList(stringValue("foo"), stringValue("bar"))))) { assertThat(resultSet.next()).isTrue(); @@ -319,8 +338,10 @@ public void getMetadata_unwrapsExecutionExceptions() { SettableApiFuture metadataFuture = SettableApiFuture.create(); ServerStreamingStashCallable stream = new ServerStreamingStashCallable<>(Collections.emptyList()); + PreparedStatement preparedStatement = + SqlProtoFactory.preparedStatement(metadata(columnMetadata("foo", stringType()))); ExecuteQueryCallContext fakeCallContext = - ExecuteQueryCallContext.create(ExecuteQueryRequest.newBuilder().build(), metadataFuture); + callContext(preparedStatement.bind().build(), metadataFuture); ResultSet rs = ResultSetImpl.create( SqlServerStreamImpl.create(metadataFuture, stream.call(fakeCallContext))); @@ -334,8 +355,10 @@ public void getMetadata_returnsNonRuntimeExecutionExceptionsWrapped() { SettableApiFuture metadataFuture = SettableApiFuture.create(); ServerStreamingStashCallable stream = new ServerStreamingStashCallable<>(Collections.emptyList()); + PreparedStatement preparedStatement = + SqlProtoFactory.preparedStatement(metadata(columnMetadata("foo", stringType()))); ExecuteQueryCallContext fakeCallContext = - ExecuteQueryCallContext.create(ExecuteQueryRequest.newBuilder().build(), metadataFuture); + callContext(preparedStatement.bind().build(), metadataFuture); ResultSet rs = ResultSetImpl.create( SqlServerStreamImpl.create(metadataFuture, stream.call(fakeCallContext))); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java index a734ea068a..c1bb915e81 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java @@ -26,14 +26,13 @@ import com.google.protobuf.BytesValue; import com.google.protobuf.StringValue; import java.util.List; -import junit.framework.TestCase; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class RowMergerUtilTest extends TestCase { +public class RowMergerUtilTest { @Test public void testEmpty() { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java index 39d3c62c22..26609216e6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowSetUtilTest.java @@ -21,9 +21,9 @@ import com.google.bigtable.v2.RowSet; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.common.base.Preconditions; +import com.google.common.base.Splitter; import com.google.protobuf.ByteString; import java.util.Arrays; -import java.util.List; import java.util.SortedSet; import java.util.TreeSet; import java.util.stream.Collectors; @@ -170,7 +170,7 @@ private static SortedSet splitPoints(String... s) { private static RowSet parse(String encodedRowSet) { RowSet.Builder builder = RowSet.newBuilder(); - for (String s : encodedRowSet.split(",")) { + for (String s : Splitter.on(",").split(encodedRowSet)) { if (s.contains("-")) { builder.addRowRanges(parseRange(s)); } else { @@ -331,9 +331,17 @@ public void multipleRangeBoundTest() { assertThat(actual).isEqualTo(ByteStringRange.create("a", "z")); } - // Helpers - private static void verifyShard(RowSet input, SortedSet splits, RowSet... expected) { - List actualWithNull = RowSetUtil.shard(input, splits); - assertThat(actualWithNull).containsExactlyElementsIn(Arrays.asList(expected)).inOrder(); + @Test + public void eraseLargeRowEmptyRangeTest() { + ByteString key = ByteString.copyFromUtf8("a"); + ByteString keyTrailer = key.concat(ByteString.copyFrom(new byte[] {0})); + + RowSet rowSet = + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder().setStartKeyClosed(key).setEndKeyOpen(keyTrailer).build()) + .build(); + RowSet actual = RowSetUtil.eraseLargeRow(rowSet, key); + assertThat(actual).isNull(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtilTest.java index 6ed96ec517..3de9821147 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowMergerUtilTest.java @@ -26,6 +26,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSets; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.common.truth.Truth.assertThat; @@ -46,40 +47,27 @@ public class SqlRowMergerUtilTest { @Test public void close_succeedsWhenEmpty() { - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) {} + com.google.bigtable.v2.ResultSetMetadata md = metadata(columnMetadata("a", stringType())); + try (SqlRowMergerUtil util = new SqlRowMergerUtil(md)) {} - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) { + try (SqlRowMergerUtil util = new SqlRowMergerUtil(md)) { // Metadata with no rows - List unused = - util.parseExecuteQueryResponses( - ImmutableList.of(metadata(columnMetadata("a", stringType())))); - } - } - - @Test - public void parseExecuteQueryResponses_failsWithoutMetadata_serializedProtoRows() { - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) { - // users must pass metadata, as it should always be returned by the server. - assertThrows( - IllegalStateException.class, - () -> - util.parseExecuteQueryResponses( - ImmutableList.of(partialResultSetWithToken(stringValue("val"))))); + List unused = util.parseExecuteQueryResponses(ImmutableList.of()); } } @Test public void parseExecuteQueryResponses_handlesSingleValue_serializedProtoRows() { - ExecuteQueryResponse metadata = metadata(columnMetadata("str", stringType())); + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType())); ImmutableList responses = - ImmutableList.of(metadata, partialResultSetWithToken(stringValue("val"))); - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) { + ImmutableList.of(partialResultSetWithToken(stringValue("val"))); + try (SqlRowMergerUtil util = new SqlRowMergerUtil(metadata)) { List rows = util.parseExecuteQueryResponses(responses); assertThat(rows) .containsExactly( ProtoSqlRow.create( - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("str", stringType())).getMetadata()), + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("str", stringType()))), ImmutableList.of(stringValue("val")))); ; } @@ -87,33 +75,31 @@ public void parseExecuteQueryResponses_handlesSingleValue_serializedProtoRows() @Test public void - parseExecuteQueryResponses_handlesMultipleValuesAccrossMultipleRows_serializedProtoRows() { + parseExecuteQueryResponses_handlesMultipleValuesAcrossMultipleRows_serializedProtoRows() { ColumnMetadata[] columns = { columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()), columnMetadata("strArr", arrayType(stringType())), columnMetadata("map", mapType(stringType(), bytesType())) }; - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadata(columns).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata metadataProto = metadata(columns); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); ImmutableList responses = - ImmutableList.of( - metadata(columns), - partialResultSetWithoutToken( - stringValue("str1"), - bytesValue("bytes1"), - arrayValue(stringValue("arr1")), - mapValue(mapElement(stringValue("key1"), bytesValue("val1"))), - stringValue("str2")), - partialResultSetWithoutToken( - bytesValue("bytes2"), - arrayValue(stringValue("arr2")), - mapValue(mapElement(stringValue("key2"), bytesValue("val2")))), - partialResultSetWithToken( - stringValue("str3"), - bytesValue("bytes3"), - arrayValue(stringValue("arr3")), - mapValue(mapElement(stringValue("key3"), bytesValue("val3"))))); - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) { + partialResultSets( + 3, + stringValue("str1"), + bytesValue("bytes1"), + arrayValue(stringValue("arr1")), + mapValue(mapElement(stringValue("key1"), bytesValue("val1"))), + stringValue("str2"), + bytesValue("bytes2"), + arrayValue(stringValue("arr2")), + mapValue(mapElement(stringValue("key2"), bytesValue("val2"))), + stringValue("str3"), + bytesValue("bytes3"), + arrayValue(stringValue("arr3")), + mapValue(mapElement(stringValue("key3"), bytesValue("val3")))); + try (SqlRowMergerUtil util = new SqlRowMergerUtil(metadataProto)) { List rows = util.parseExecuteQueryResponses(responses); assertThat(rows) .containsExactly( @@ -143,12 +129,12 @@ public void parseExecuteQueryResponses_handlesSingleValue_serializedProtoRows() @Test public void parseExecuteQueryResponses_throwsOnCloseWithPartialBatch_serializedProtoRows() { + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType())); ImmutableList responses = - ImmutableList.of( - metadata(columnMetadata("str", stringType())), - partialResultSetWithoutToken(stringValue("str1"))); + ImmutableList.of(partialResultSetWithoutToken(stringValue("str1"))); - SqlRowMergerUtil util = new SqlRowMergerUtil(); + SqlRowMergerUtil util = new SqlRowMergerUtil(metadata); List unused = util.parseExecuteQueryResponses(responses); assertThrows(IllegalStateException.class, util::close); } @@ -156,13 +142,14 @@ public void parseExecuteQueryResponses_throwsOnCloseWithPartialBatch_serializedP @Test public void parseExecuteQueryResponses_throwsOnParseWithPartialRowsInCompleteBatch_serializedProtoRows() { + com.google.bigtable.v2.ResultSetMetadata metadata = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); ImmutableList responses = ImmutableList.of( - metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())), partialResultSetWithToken( stringValue("str1"), bytesValue("bytes1"), stringValue("str2"))); - SqlRowMergerUtil util = new SqlRowMergerUtil(); + SqlRowMergerUtil util = new SqlRowMergerUtil(metadata); assertThrows(IllegalStateException.class, () -> util.parseExecuteQueryResponses(responses)); } @@ -174,31 +161,28 @@ public void parseExecuteQueryResponses_worksWithIncrementalSetsOfResponses_seria columnMetadata("strArr", arrayType(stringType())), columnMetadata("map", mapType(stringType(), bytesType())) }; - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadata(columns).getMetadata()); + com.google.bigtable.v2.ResultSetMetadata metadataProto = metadata(columns); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); ImmutableList responses = - ImmutableList.of( - metadata(columns), - partialResultSetWithoutToken( - stringValue("str1"), - bytesValue("bytes1"), - arrayValue(stringValue("arr1")), - mapValue(mapElement(stringValue("key1"), bytesValue("val1"))), - stringValue("str2")), - partialResultSetWithoutToken( - bytesValue("bytes2"), - arrayValue(stringValue("arr2")), - mapValue(mapElement(stringValue("key2"), bytesValue("val2")))), - partialResultSetWithToken( - stringValue("str3"), - bytesValue("bytes3"), - arrayValue(stringValue("arr3")), - mapValue(mapElement(stringValue("key3"), bytesValue("val3"))))); - try (SqlRowMergerUtil util = new SqlRowMergerUtil()) { + partialResultSets( + 3, + stringValue("str1"), + bytesValue("bytes1"), + arrayValue(stringValue("arr1")), + mapValue(mapElement(stringValue("key1"), bytesValue("val1"))), + stringValue("str2"), + bytesValue("bytes2"), + arrayValue(stringValue("arr2")), + mapValue(mapElement(stringValue("key2"), bytesValue("val2"))), + stringValue("str3"), + bytesValue("bytes3"), + arrayValue(stringValue("arr3")), + mapValue(mapElement(stringValue("key3"), bytesValue("val3")))); + try (SqlRowMergerUtil util = new SqlRowMergerUtil(metadataProto)) { List rows = new ArrayList<>(); rows.addAll(util.parseExecuteQueryResponses(responses.subList(0, 1))); rows.addAll(util.parseExecuteQueryResponses(responses.subList(1, 2))); rows.addAll(util.parseExecuteQueryResponses(responses.subList(2, 3))); - rows.addAll(util.parseExecuteQueryResponses(responses.subList(3, 4))); assertThat(rows) .containsExactly( diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowSubject.java index 4e64c75cac..de88a9c8f4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowSubject.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/SqlRowSubject.java @@ -24,11 +24,8 @@ /** Truth subject for {@link ProtoSqlRow}. Intended for ease-of-use in testing. */ public final class SqlRowSubject extends Subject { - private final @Nullable SqlRow actual; - private SqlRowSubject(FailureMetadata metadata, @Nullable SqlRow actual) { super(metadata, actual); - this.actual = actual; } public static Factory sqlRow() { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtilTest.java new file mode 100644 index 0000000000..5c6dac7632 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/TimestampUtilTest.java @@ -0,0 +1,41 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.protobuf.Timestamp; +import java.time.Instant; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class TimestampUtilTest { + + @Test + public void testToInstant() { + assertThat(TimestampUtil.toInstant(Timestamp.getDefaultInstance())) + .isEqualTo(Instant.ofEpochSecond(0)); + assertThat(TimestampUtil.toInstant(Timestamp.newBuilder().setSeconds(1000).build())) + .isEqualTo(Instant.ofEpochSecond(1000)); + assertThat( + TimestampUtil.toInstant(Timestamp.newBuilder().setSeconds(2000).setNanos(3000).build())) + .isEqualTo(Instant.ofEpochSecond(2000, 3000)); + assertThat(TimestampUtil.toInstant(Timestamp.newBuilder().setNanos(3000).build())) + .isEqualTo(Instant.ofEpochSecond(0, 3000)); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewNameTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewNameTest.java new file mode 100644 index 0000000000..4d706ef290 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/AuthorizedViewNameTest.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class AuthorizedViewNameTest { + + @Test + public void testParseOk() { + String name = "projects/fake-p/instances/fake-i/tables/fake-t/authorizedViews/fake-v"; + AuthorizedViewName parsed = AuthorizedViewName.parse(name); + + assertThat(parsed) + .isEqualTo( + AuthorizedViewName.builder() + .setProjectId("fake-p") + .setInstanceId("fake-i") + .setTableId("fake-t") + .setAuthorizedViewId("fake-v") + .build()); + } + + @Test + public void testParseFail() { + assertThrows(IllegalArgumentException.class, () -> AuthorizedViewName.parse("")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "project/fake-p/instances/fake-i/tables/fake-t/authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instance/fake-i/tables/fake-t/authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/table/fake-t/authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/tables/fake-t/authorizedView/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects//instances/fake-i/tables/fake-t/authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances//tables/fake-t/authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/tables//authorizedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/tables/fake-t/authorizedViews")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/tables/fake-t/authorizedViews/fake-v/extra")); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/ClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/ClientTest.java new file mode 100644 index 0000000000..7a92e5eb60 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/ClientTest.java @@ -0,0 +1,352 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.ClientConfiguration; +import com.google.bigtable.v2.GetClientConfigurationRequest; +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.OpenAuthorizedViewRequest; +import com.google.bigtable.v2.OpenMaterializedViewRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.OpenTableRequest; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.session.fake.PeerInfoInterceptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.protobuf.ByteString; +import com.google.protobuf.util.Durations; +import io.grpc.Context; +import io.grpc.Deadline; +import io.grpc.Server; +import io.grpc.stub.StreamObserver; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class ClientTest { + private ClientConfiguration defaultConfig; + + private ScheduledExecutorService executor; + private FakeBigtableService service; + private Server server; + private Client client; + private InstanceName instanceName = + InstanceName.parse("projects/fake-project/instances/fake-instance"); + + @BeforeEach + void setUp() throws IOException { + ClientConfiguration.Builder builder = ClientConfigurationManager.loadDefault().toBuilder(); + builder.setSessionConfiguration( + SessionClientConfiguration.newBuilder() + .setSessionLoad(1) + .setSessionPoolConfiguration( + SessionClientConfiguration.SessionPoolConfiguration.newBuilder() + .setNewSessionCreationBudget(10) + .setNewSessionCreationPenalty(Durations.fromMinutes(1)) + .setHeadroom(0.5f) + .setMinSessionCount(5) + .setMaxSessionCount(20) + .setNewSessionQueueLength(10) + .setConsecutiveSessionFailureThreshold(10))); + defaultConfig = builder.build(); + + executor = Executors.newScheduledThreadPool(4); + service = new FakeBigtableService(); + server = FakeServiceBuilder.create(service).intercept(new PeerInfoInterceptor()).start(); + + ClientSettings settings = + ClientSettings.builder() + .setChannelProvider( + new ChannelProviders.EmulatorChannelProvider("localhost", server.getPort())) + .setInstanceName(instanceName) + .setAppProfileId("default") + .build(); + + client = Client.create(settings); + } + + @AfterEach + void tearDown() { + client.close(); + server.shutdownNow(); + executor.shutdownNow(); + } + + @Test + public void testRequestFails() { + TableAsync table = + client.openTableAsync("fake-table", OpenTableRequest.Permission.PERMISSION_READ); + CompletableFuture future = + table.readRow( + SessionReadRowRequest.newBuilder().setKey(ByteString.copyFromUtf8("key")).build(), + Deadline.after(1, TimeUnit.MINUTES)); + + ExecutionException exception = assertThrows(ExecutionException.class, future::get); + assertThat(exception).hasCauseThat().isInstanceOf(VRpcException.class); + VRpcException vRpcException = (VRpcException) exception.getCause(); + assertThat(vRpcException).hasMessageThat().contains("Session failed with consecutive failures"); + + table.close(); + } + + @Test + public void testDeadlineRespected() { + TableAsync table = + client.openTableAsync("fake-table", OpenTableRequest.Permission.PERMISSION_READ); + CompletableFuture future = + table.readRow( + SessionReadRowRequest.newBuilder().setKey(ByteString.copyFromUtf8("key")).build(), + Deadline.after(10, TimeUnit.MILLISECONDS)); + + ExecutionException exception = assertThrows(ExecutionException.class, future::get); + assertThat(exception).hasCauseThat().isInstanceOf(VRpcException.class); + VRpcException vRpcException = (VRpcException) exception.getCause(); + assertThat(vRpcException).hasMessageThat().contains("DEADLINE_EXCEEDED"); + + table.close(); + } + + @Test + public void testGrpcContextDeadlineRespected() { + TableAsync table = + client.openTableAsync("fake-table", OpenTableRequest.Permission.PERMISSION_READ); + + Context.current() + .withDeadline(Deadline.after(10, TimeUnit.MILLISECONDS), executor) + .run( + () -> { + CompletableFuture future = + table.readRow( + SessionReadRowRequest.newBuilder() + .setKey(ByteString.copyFromUtf8("key")) + .build(), + Deadline.after(1, TimeUnit.MINUTES)); + ExecutionException exception = assertThrows(ExecutionException.class, future::get); + assertThat(exception).hasCauseThat().isInstanceOf(VRpcException.class); + VRpcException vRpcException = (VRpcException) exception.getCause(); + assertThat(vRpcException).hasMessageThat().contains("DEADLINE_EXCEEDED"); + }); + + table.close(); + } + + @Test + public void testOpenAuthorizedViewRequestSent() throws Exception { + AuthorizedViewAsync view = + client.openAuthorizedViewAsync( + "fake-table", "fake-view", OpenAuthorizedViewRequest.Permission.PERMISSION_READ); + + // wait for session to start + Thread.sleep(500); + + OpenAuthorizedViewRequest expectedPayload = + OpenAuthorizedViewRequest.newBuilder() + .setAuthorizedViewName( + AuthorizedViewName.builder() + .setProjectId(instanceName.getProjectId()) + .setInstanceId(instanceName.getInstanceId()) + .setTableId("fake-table") + .setAuthorizedViewId("fake-view") + .build() + .toString()) + .setAppProfileId("default") + .setPermission(OpenAuthorizedViewRequest.Permission.PERMISSION_READ) + .build(); + + assertThat(service.openSessionRequests.get(0).getOpenSession().getPayload()) + .isEqualTo(expectedPayload.toByteString()); + + SessionReadRowRequest read = + SessionReadRowRequest.newBuilder().setKey(ByteString.copyFromUtf8("key")).build(); + + CompletableFuture future1 = + view.readRow(read, Deadline.after(1, TimeUnit.MINUTES)); + + future1.get(); + + ByteString payload = service.vrpcRequests.get(0).getVirtualRpc().getPayload(); + assertThat(payload).isEqualTo(VRpcDescriptor.READ_ROW_AUTH_VIEW.encode(read)); + + SessionMutateRowRequest mutate = + SessionMutateRowRequest.newBuilder() + .setKey(ByteString.copyFromUtf8("key")) + .addMutations( + Mutation.newBuilder().setDeleteFromRow(Mutation.DeleteFromRow.getDefaultInstance())) + .build(); + CompletableFuture future2 = + view.mutateRow(mutate, Deadline.after(1, TimeUnit.MINUTES)); + + future2.get(); + + payload = service.vrpcRequests.get(1).getVirtualRpc().getPayload(); + assertThat(payload).isEqualTo(VRpcDescriptor.MUTATE_ROW_AUTH_VIEW.encode(mutate)); + + view.close(); + } + + @Test + public void testMaterializedViewRequestSent() throws Exception { + MaterializedViewAsync view = + client.openMaterializedViewAsync( + "fake-view", OpenMaterializedViewRequest.Permission.PERMISSION_READ); + + // Wait for session to start + Thread.sleep(500); + + OpenMaterializedViewRequest expected = + OpenMaterializedViewRequest.newBuilder() + .setMaterializedViewName( + MaterializedViewName.builder() + .setProjectId(instanceName.getProjectId()) + .setInstanceId(instanceName.getInstanceId()) + .setMaterializedViewId("fake-view") + .build() + .toString()) + .setPermission(OpenMaterializedViewRequest.Permission.PERMISSION_READ) + .setAppProfileId("default") + .build(); + + assertThat(service.openSessionRequests.get(0).getOpenSession().getPayload()) + .isEqualTo(expected.toByteString()); + + SessionReadRowRequest read = + SessionReadRowRequest.newBuilder().setKey(ByteString.copyFromUtf8("key")).build(); + + CompletableFuture future = + view.readRow(read, Deadline.after(1, TimeUnit.MINUTES)); + + future.get(); + + assertThat(service.vrpcRequests.get(0).getVirtualRpc().getPayload()) + .isEqualTo(VRpcDescriptor.READ_ROW_MAT_VIEW.encode(read)); + + view.close(); + } + + class FakeBigtableService extends BigtableGrpc.BigtableImplBase { + private final List openSessionRequests = new ArrayList<>(); + private final List vrpcRequests = new ArrayList<>(); + + @Override + public void getClientConfiguration( + GetClientConfigurationRequest request, + StreamObserver responseObserver) { + responseObserver.onNext(defaultConfig); + responseObserver.onCompleted(); + } + + @Override + public StreamObserver openTable( + StreamObserver responseObserver) { + // Make openTable take a long time and return a noop which will cause the session creation to + // fail. + try { + Thread.sleep(10); + } catch (Exception e) { + // dont care + } + return super.openTable(responseObserver); + } + + @Override + public StreamObserver openAuthorizedView( + StreamObserver responseObserver) { + return new StreamObserver() { + @Override + public void onNext(SessionRequest sessionRequest) { + if (sessionRequest.hasOpenSession()) { + openSessionRequests.add(sessionRequest); + responseObserver.onNext( + SessionResponse.newBuilder() + .setOpenSession(OpenSessionResponse.getDefaultInstance()) + .build()); + } else if (sessionRequest.hasVirtualRpc()) { + vrpcRequests.add(sessionRequest); + responseObserver.onNext( + SessionResponse.newBuilder() + .setVirtualRpc( + VirtualRpcResponse.newBuilder() + .setRpcId(sessionRequest.getVirtualRpc().getRpcId()) + .build()) + .build()); + } + } + + @Override + public void onError(Throwable throwable) {} + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + } + + @Override + public StreamObserver openMaterializedView( + StreamObserver responseObserver) { + return new StreamObserver() { + @Override + public void onNext(SessionRequest sessionRequest) { + if (sessionRequest.hasOpenSession()) { + openSessionRequests.add(sessionRequest); + responseObserver.onNext( + SessionResponse.newBuilder() + .setOpenSession(OpenSessionResponse.getDefaultInstance()) + .build()); + } else if (sessionRequest.hasVirtualRpc()) { + vrpcRequests.add(sessionRequest); + responseObserver.onNext( + SessionResponse.newBuilder() + .setVirtualRpc( + VirtualRpcResponse.newBuilder() + .setRpcId(sessionRequest.getVirtualRpc().getRpcId()) + .build()) + .build()); + } + } + + @Override + public void onError(Throwable throwable) {} + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceNameTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceNameTest.java new file mode 100644 index 0000000000..4a93ff7004 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/InstanceNameTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class InstanceNameTest { + + @Test + void testParseOk() { + assertThat(InstanceName.parse("projects/my-project/instances/my-instance")) + .isEqualTo( + InstanceName.builder().setProjectId("my-project").setInstanceId("my-instance").build()); + } + + @Test + void testParseFail() { + assertThrows(IllegalArgumentException.class, () -> InstanceName.parse("")); + assertThrows(IllegalArgumentException.class, () -> InstanceName.parse("projects/my-project")); + assertThrows( + IllegalArgumentException.class, () -> TableName.parse("projects/my-project/instances")); + assertThrows( + IllegalArgumentException.class, + () -> InstanceName.parse("projects/my-project/instances/my-instance/extra")); + assertThrows( + IllegalArgumentException.class, + () -> InstanceName.parse("projects//instances/my-instance")); + assertThrows( + IllegalArgumentException.class, () -> InstanceName.parse("projects/my-project/instances/")); + assertThrows( + IllegalArgumentException.class, + () -> InstanceName.parse("projects/my-project/instances//")); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewNameTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewNameTest.java new file mode 100644 index 0000000000..4d46042c16 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/MaterializedViewNameTest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class MaterializedViewNameTest { + + @Test + public void testParseOk() { + String name = "projects/fake-p/instances/fake-i/materializedViews/fake-v"; + + assertThat(MaterializedViewName.parse(name)) + .isEqualTo( + MaterializedViewName.builder() + .setProjectId("fake-p") + .setInstanceId("fake-i") + .setMaterializedViewId("fake-v") + .build()); + } + + @Test + public void testParseError() { + assertThrows(IllegalArgumentException.class, () -> AuthorizedViewName.parse("")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("project/fake-p/instances/fake-i/materializedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("projects/fake-p/instance/fake-i/materializedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("projects/fake-p/instances/fake-i/materializedView/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("projects//instances/fake-i/materializedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("projects/fake-p/instances//materializedViews/fake-v")); + assertThrows( + IllegalArgumentException.class, + () -> AuthorizedViewName.parse("projects/fake-p/instances/fake-i/materializedViews/")); + assertThrows( + IllegalArgumentException.class, + () -> + AuthorizedViewName.parse( + "projects/fake-p/instances/fake-i/materializedViews/fake-v/extra")); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableBaseTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableBaseTest.java new file mode 100644 index 0000000000..54406abe51 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableBaseTest.java @@ -0,0 +1,213 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.cloud.bigtable.data.v2.internal.test_helpers.VRpcCallContextSubject.assertThat; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.OpenTableRequest; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionMutateRowResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPool; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.protobuf.Message; +import io.grpc.Deadline; +import io.grpc.Metadata; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class TableBaseTest { + + private TableBase table; + private final FakeSessionPool fakeSessionPool = new FakeSessionPool(); + private final Metrics noopMetrics = new NoopMetrics(); + private final ScheduledExecutorService mockExecutor = + Mockito.mock(ScheduledExecutorService.class); + private static final ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName( + InstanceName.builder() + .setProjectId("fake-project") + .setInstanceId("fake-instance") + .build()) + .setAppProfileId("default") + .build(); + private Deadline deadline; + private UnaryResponseFuture f; + + @BeforeEach + public void setup() { + table = + new TableBase( + fakeSessionPool, + VRpcDescriptor.READ_ROW, + VRpcDescriptor.MUTATE_ROW, + noopMetrics, + mockExecutor); + deadline = Deadline.after(1, TimeUnit.MINUTES); + f = new UnaryResponseFuture<>(); + } + + @Test + public void testAddToCellNotIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder().setAddToCell(Mutation.AddToCell.getDefaultInstance()).build()) + .build(), + f, + deadline); + + assertThat(fakeSessionPool.lastVRpc.ctx).isNotIdempotent(); + } + + @Test + public void testMergeToCellNotIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder().setMergeToCell(Mutation.MergeToCell.getDefaultInstance())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isNotIdempotent(); + } + + @Test + public void testSetCellSystemTimestampNotIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder() + .setSetCell(Mutation.SetCell.newBuilder().setTimestampMicros(-1).build())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isNotIdempotent(); + } + + @Test + public void testDeleteFromRowIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder().setDeleteFromRow(Mutation.DeleteFromRow.getDefaultInstance())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isIdempotent(); + } + + @Test + public void testDeleteFromColumnIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder() + .setDeleteFromColumn(Mutation.DeleteFromColumn.getDefaultInstance())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isIdempotent(); + } + + @Test + public void testDeleteFromCfIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations( + Mutation.newBuilder() + .setDeleteFromFamily(Mutation.DeleteFromFamily.getDefaultInstance())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isIdempotent(); + } + + @Test + public void testSetCellIdempotent() { + table.mutateRow( + SessionMutateRowRequest.newBuilder() + .addMutations(Mutation.newBuilder().setSetCell(Mutation.SetCell.getDefaultInstance())) + .build(), + f, + deadline); + assertThat(fakeSessionPool.lastVRpc.ctx).isIdempotent(); + } + + static class FakeSessionPool implements SessionPool { + + private FakeVRpc lastVRpc = null; + + @Override + public void start(OpenTableRequest openReq, Metadata md) {} + + @Override + public void close(CloseSessionRequest req) {} + + @Override + public SessionPoolInfo getInfo() { + return SessionPoolInfo.create(clientInfo, VRpcDescriptor.TABLE_SESSION, "fake-pool"); + } + + @Override + public VRpc newCall( + VRpcDescriptor desc) { + FakeVRpc localVRpc = new FakeVRpc<>(); + this.lastVRpc = localVRpc; + return localVRpc; + } + + @Override + public int getConsecutiveUnimplementedFailures() { + return 0; + } + + @Override + public boolean hasSession() { + return true; + } + } + + static class FakeVRpc implements VRpc { + private VRpcCallContext ctx; + + @Override + public void start(Object req, VRpcCallContext ctx, VRpcListener ignored) { + this.ctx = ctx; + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) {} + + @Override + public void requestNext() {} + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableNameTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableNameTest.java new file mode 100644 index 0000000000..7a09185f3d --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/api/TableNameTest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.api; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class TableNameTest { + + @Test + void testParseOk() { + assertThat(TableName.parse("projects/my-project/instances/my-instance/tables/my-table")) + .isEqualTo( + TableName.builder() + .setProjectId("my-project") + .setInstanceId("my-instance") + .setTableId("my-table") + .build()); + } + + @Test + void testParseFail() { + assertThrows(IllegalArgumentException.class, () -> TableName.parse("")); + assertThrows(IllegalArgumentException.class, () -> TableName.parse("projects/my-project")); + assertThrows( + IllegalArgumentException.class, () -> TableName.parse("projects/my-project/instances")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects/my-project/instances/my-instance")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects/my-project/instances/my-instance/tables")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects/my-project/instances/my-instance/tables/my-table/extra")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects//instances/my-instance/tables")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects/my-project/instances//tables/my-table")); + assertThrows( + IllegalArgumentException.class, + () -> TableName.parse("projects/my-project/instances/my-instance/tables/")); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImplTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImplTest.java new file mode 100644 index 0000000000..978da523ed --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/ChannelPoolDpImplTest.java @@ -0,0 +1,378 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +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.bigtable.v2.FakeSessionGrpc; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream.Listener; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DebugTagTracer; +import io.grpc.Attributes; +import io.grpc.CallOptions; +import io.grpc.ClientCall; +import io.grpc.ManagedChannel; +import io.grpc.Metadata; +import io.grpc.Status; +import java.time.Clock; +import java.time.Instant; +import java.util.Base64; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Supplier; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class ChannelPoolDpImplTest { + @Mock private ScheduledExecutorService bgExecutor; + + @Mock private Supplier channelSupplier; + + @Mock private ClientCall clientCall; + + @Mock private ManagedChannel channel; + + @Captor private ArgumentCaptor> listener; + + private final DebugTagTracer debugTagTracer = NoopMetrics.NoopDebugTracer.INSTANCE; + + private static final ChannelPoolConfiguration defaultConfig = + ChannelPoolConfiguration.newBuilder() + .setMinServerCount(2) + .setMaxServerCount(25) + .setPerServerSessionCount(10) + .build(); + + @Test + void testInitialService() { + when(channelSupplier.get()).thenReturn(channel); + + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + pool.serviceChannels(); + + verify(channelSupplier, times(pool.minGroups)).get(); + + pool.close(); + } + + @Test + void testNewStreamStartsASingleChannel() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + + ChannelPool pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + SessionStream ignored = + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT); + + // Only 1 channel created + verify(channelSupplier, times(1)).get(); + // And that channel was asked to create a new session + verify(channel, times(1)).newCall(any(), any()); + + pool.close(); + } + + @Test + void testSecondChannelCreatedWhenFirstIsFull() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + // Starting channels are half-filled. + for (int i = 0; i < pool.softMaxPerGroup / 2; i++) { + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT); + } + // Only 1 channel created. + verify(channelSupplier, times(1)).get(); + // And that channel was asked to create all the sessions on until max + verify(channel, times(pool.softMaxPerGroup / 2)).newCall(any(), any()); + + // Next call triggers creation of a new channel. + ManagedChannel otherChannel = Mockito.mock(ManagedChannel.class); + doReturn(otherChannel).when(channelSupplier).get(); + when(otherChannel.newCall(any(), any())).thenReturn(clientCall); + + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT); + verify(channelSupplier, times(2)).get(); + verify(otherChannel, times(1)).newCall(any(), any()); + + pool.close(); + } + + @Test + void testClosingASessionFreesASlot() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + doNothing().when(clientCall).start(listener.capture(), any()); + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + // fill up the channel + for (int i = 0; i < pool.softMaxPerGroup / 2; i++) { + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + } + + // release one session + ClientCall.Listener value = listener.getValue(); + value.onClose(Status.OK, new Metadata()); + + // next call should not trigger creation of another channel + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + + // So invocation count should stay at 1 from the first channel + verify(channelSupplier, times(1)).get(); + + pool.close(); + } + + @Test + void testLeastLoadedChannelGetsNext() { + ManagedChannel channel1 = mock(ManagedChannel.class); + when(channel1.newCall(any(), any())).thenReturn(clientCall); + + ManagedChannel channel2 = mock(ManagedChannel.class); + when(channel2.newCall(any(), any())).thenReturn(clientCall); + + when(channelSupplier.get()).thenReturn(channel1, channel2); + doNothing().when(clientCall).start(listener.capture(), any()); + + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + // fill up 2 channels + for (int i = 0; i < pool.softMaxPerGroup; i++) { + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + } + verify(channelSupplier, times(2)).get(); + + List> allListeners = listener.getAllValues(); + + // release one session + allListeners.get(0).onClose(Status.OK, new Metadata()); + + // next call should be created on the first channel + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + + // Now the first channel has an extra call + verify(channel1, times(pool.softMaxPerGroup / 2 + 1)).newCall(any(), any()); + + pool.close(); + } + + @Test + void testDownsize() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + doNothing().when(clientCall).start(listener.capture(), any()); + doReturn(Attributes.EMPTY).when(clientCall).getAttributes(); + + Clock clock = Mockito.mock(Clock.class); + when(clock.instant()).thenReturn(Instant.now()); + + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl( + channelSupplier, defaultConfig, "pool", debugTagTracer, bgExecutor, clock); + + int numChannels = 5; + int numSessions = numChannels * pool.softMaxPerGroup / 2; + + for (int i = 0; i < numSessions; i++) { + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + } + + verify(channelSupplier, times(numChannels)).get(); + + int i = 0; + // Start and finish all sessions. + for (ClientCall.Listener listener : listener.getAllValues()) { + // Afe Id of 0 creates an empty protobuf which does not get picks up in + // onHeaders, this is why we start with 555. + PeerInfo peerInfo = + PeerInfo.newBuilder().setApplicationFrontendId(555 + i / numChannels).build(); + Metadata headers = new Metadata(); + headers.put( + SessionStreamImpl.PEER_INFO_KEY, + Base64.getEncoder().encodeToString(peerInfo.toByteArray())); + listener.onHeaders(headers); + i++; + listener.onClose(Status.OK, new Metadata()); + } + + when(clock.instant()).thenReturn(Instant.now()); + pool.serviceChannels(); + verify(channel, times(numChannels - pool.minGroups)).shutdown(); + + pool.close(); + } + + @Test + void testDownsizeToOptimal() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + doNothing().when(clientCall).start(listener.capture(), any()); + doReturn(Attributes.EMPTY).when(clientCall).getAttributes(); + + Clock clock = Mockito.mock(Clock.class); + when(clock.instant()).thenReturn(Instant.now()); + + ChannelPoolDpImpl pool = + new ChannelPoolDpImpl( + channelSupplier, defaultConfig, "pool", debugTagTracer, bgExecutor, clock); + + int numChannels = 5; + int numSessions = numChannels * pool.softMaxPerGroup / 2; + + for (int i = 0; i < numSessions; i++) { + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + } + + verify(channelSupplier, times(numChannels)).get(); + + int i = 0; + // Start all sessions. + for (ClientCall.Listener listener : listener.getAllValues()) { + // Afe Id of 0 creates an empty protobuf which does not get picks up in + // onHeaders, this is why we start with 555. + PeerInfo peerInfo = + PeerInfo.newBuilder().setApplicationFrontendId(555 + i / numChannels).build(); + Metadata headers = new Metadata(); + headers.put( + SessionStreamImpl.PEER_INFO_KEY, + Base64.getEncoder().encodeToString(peerInfo.toByteArray())); + listener.onHeaders(headers); + i++; + } + + // Now we have 25 sessions on 5 channel groups each of 1 channel. + // Let's close 6 sessions from different channels/AFEs. + i = 0; + for (ClientCall.Listener listener : listener.getAllValues()) { + if (i % 4 == 0 && i != 0) { + listener.onClose(Status.OK, new Metadata()); + } + i++; + } + + // Now we should have 19 sessions on 5 channel groups each of 1 channel. + // I.e. dumpState + // FINE: ChannelPool channelGroups: 5, channels: 5, starting channels: 0, totalStreams: 19, + // AFEs: 5, distribution: [4, 4, 4, 4, 3] + when(clock.instant()).thenReturn(Instant.now()); + pool.serviceChannels(); + + // Should scale down to 4 channels. 19 / 5 round up = 4. + verify(channel, times(numChannels - 4)).shutdown(); + + pool.close(); + } + + @Test + void testRecycleChannelOnUnimplemented() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + doNothing().when(clientCall).start(listener.capture(), any()); + + ChannelPool pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + + // Only 1 channel created initially + verify(channelSupplier, times(1)).get(); + + // Release with UNIMPLEMENTED status + ClientCall.Listener value = listener.getValue(); + value.onClose(Status.UNIMPLEMENTED, new Metadata()); + + // The channel should be shutdown + verify(channel, times(1)).shutdown(); + + // And a new channel should be requested from the supplier + verify(channelSupplier, times(2)).get(); + + pool.close(); + } + + @Test + void testRecycleChannelInGroupOnUnimplemented() { + when(channelSupplier.get()).thenReturn(channel); + when(channel.newCall(any(), any())).thenReturn(clientCall); + doNothing().when(clientCall).start(listener.capture(), any()); + doReturn(Attributes.EMPTY).when(clientCall).getAttributes(); + + ChannelPool pool = + new ChannelPoolDpImpl(channelSupplier, defaultConfig, debugTagTracer, bgExecutor); + + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + + ClientCall.Listener value = listener.getValue(); + + // Assign to a group by providing AFE ID + PeerInfo peerInfo = PeerInfo.newBuilder().setApplicationFrontendId(555).build(); + Metadata headers = new Metadata(); + headers.put( + SessionStreamImpl.PEER_INFO_KEY, + Base64.getEncoder().encodeToString(peerInfo.toByteArray())); + value.onHeaders(headers); + + // This call is successful + value.onClose(Status.OK, new Metadata()); + + // Another call + pool.newStream(FakeSessionGrpc.getOpenSessionMethod(), CallOptions.DEFAULT) + .start(Mockito.mock(Listener.class), new Metadata()); + + value = listener.getValue(); + + // Release with UNIMPLEMENTED status + value.onClose(Status.UNIMPLEMENTED, new Metadata()); + + // The channel should be shutdown + verify(channel, times(1)).shutdown(); + + // And a new channel should be requested from the supplier + verify(channelSupplier, times(2)).get(); + + pool.close(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPoolTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPoolTest.java new file mode 100644 index 0000000000..08aa7b3afe --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/channels/FallbackChannelPoolTest.java @@ -0,0 +1,365 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.channels; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.lenient; +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 com.google.bigtable.v2.FakeSessionGrpc; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import com.google.cloud.bigtable.data.v2.internal.channels.SessionStream.Listener; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import io.grpc.CallOptions; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Status; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class FallbackChannelPoolTest { + @Mock private ChannelPool primary; + @Mock private ChannelPool secondary; + @Mock private ScheduledExecutorService exec; + @Mock private ScheduledFuture future; + @Mock private SessionStream primaryStream; + @Mock private SessionStream secondaryStream; + @Mock private Listener listener; + @Captor ArgumentCaptor listenerCaptor; + private Map invocationCount; + + private static final MethodDescriptor methodDescriptor = + FakeSessionGrpc.getOpenSessionMethod(); + + private FallbackConfiguration config; + private FallbackChannelPool pool; + private Runnable checkTask; + private Metrics metrics; + + @BeforeEach + void setUp() { + invocationCount = new HashMap<>(); + config = + FallbackConfiguration.builder() + .setEnabled(true) + .setErrorRate(0.5) + .setCheckInterval(Duration.ofSeconds(10)) + .setPrimary("Primary", primary) + .setFallback("Fallback", secondary) + .build(); + + // Capture the runnable passed to schedule + when(exec.schedule(any(Runnable.class), anyLong(), any(TimeUnit.class))) + .thenAnswer( + invocation -> { + checkTask = invocation.getArgument(0); + return future; + }); + + lenient().when(primary.newStream(any(), any())).thenReturn(primaryStream); + lenient().when(secondary.newStream(any(), any())).thenReturn(secondaryStream); + + metrics = new NoopMetrics(); + pool = new FallbackChannelPool(config, metrics.getPoolFallbackListener(), exec); + } + + @AfterEach + void tearDown() { + pool.close(); + metrics.close(); + } + + // Makes a call on the fallback channel pool, verifies the `stream` mock got the + // invocation. + private Listener openSessionGetListener(SessionStream stream) { + Integer count = invocationCount.getOrDefault(stream, 0); + count++; + invocationCount.put(stream, count); + + SessionStream s = pool.newStream(methodDescriptor, CallOptions.DEFAULT); + s.start(listener, new Metadata()); + verify(stream, times(count)).start(listenerCaptor.capture(), any()); + return listenerCaptor.getValue(); + } + + // Makes a call on the fallback channel pool, verifies the `stream` mock got the + // invocation and + // opens session successfully. + private void openSessionSuccessfully(SessionStream stream) { + openSessionGetListener(stream).onBeforeSessionStart(PeerInfo.getDefaultInstance()); + } + + // Makes a call on the fallback channel pool, verifies the `stream` mock got the + // invocation and + // terminates the call with the `status`. + private void openSessionWithError(SessionStream stream, Status status) { + openSessionGetListener(stream).onClose(status, new Metadata()); + } + + @Test + void testLifecycle() { + pool.start(); + verify(primary).start(); + verify(secondary).start(); + verify(exec) + .schedule( + any(Runnable.class), + eq(config.getCheckInterval().toMillis()), + eq(TimeUnit.MILLISECONDS)); + + pool.close(); + verify(primary).close(); + verify(secondary).close(); + verify(future).cancel(false); + } + + @Test + void testRoutesToPrimaryByDefault() { + pool.start(); + SessionStream stream = pool.newStream(methodDescriptor, CallOptions.DEFAULT); + + verify(primary).newStream(any(), any()); + verify(secondary, never()).newStream(any(), any()); + + // Verify delegation + stream.sendMessage(null); + verify(primaryStream).sendMessage(null); + } + + @Test + void testFallbackTrigger() { + pool.start(); + + // 1. Success + openSessionSuccessfully(primaryStream); + + // 2. Failure + openSessionWithError(primaryStream, Status.UNAVAILABLE); + + // Current stats: 1 success, 1 failure. Total 2. Rate 0.5. + // Config error rate is 0.5. So 0.5 >= 0.5 is true. Should switch. + + checkTask.run(); // Execute check + + // Next stream should go to secondary + SessionStream stream = pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary).newStream(any(), any()); + + // Verify delegation + stream.sendMessage(null); + verify(secondaryStream).sendMessage(null); + } + + @Test + void testForceCloseDoesNotCountAsFailure() { + pool.start(); + + SessionStream stream = pool.newStream(methodDescriptor, CallOptions.DEFAULT); + stream.start(listener, new Metadata()); + + verify(primaryStream).start(listenerCaptor.capture(), any()); + Listener primaryListener = listenerCaptor.getValue(); + primaryListener.onBeforeSessionStart(PeerInfo.getDefaultInstance()); + + stream.forceClose("test", null); + primaryListener.onClose(Status.CANCELLED, new Metadata()); + + // 1 success, 0 failure (ignored). + // Should not fallback. + + checkTask.run(); + + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary, never()).newStream(any(), any()); + } + + @Test + void testPeerInfoIgnoresFailures() { + pool.start(); + + Listener primaryListener = openSessionGetListener(primaryStream); + primaryListener.onBeforeSessionStart(PeerInfo.getDefaultInstance()); + + primaryListener.onClose(Status.UNAVAILABLE, new Metadata()); + + // 1 success, 0 failure (ignored). + // Should not fallback. + + checkTask.run(); + + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary, never()).newStream(any(), any()); + } + + @Test + void testStartExceptionCountsAsFailure() { + doThrow(new RuntimeException("boom")).when(primaryStream).start(any(), any()); + + pool.start(); + SessionStream stream = pool.newStream(methodDescriptor, CallOptions.DEFAULT); + + try { + stream.start(listener, new Metadata()); + } catch (RuntimeException e) { + // expected + } + + // 1 failure. Rate 1.0 > 0.5. + checkTask.run(); + + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary).newStream(any(), any()); + } + + @Test + void testUpdateConfigChangesInterval() { + pool.start(); + verify(exec) + .schedule( + any(Runnable.class), + eq(config.getCheckInterval().toMillis()), + eq(TimeUnit.MILLISECONDS)); + + Duration newInterval = Duration.ofSeconds(20); + FallbackConfiguration newConfig = config.toBuilder().setCheckInterval(newInterval).build(); + pool.updateConfig(newConfig); + + // checkTask.run() should reschedule with the new interval + checkTask.run(); + verify(exec) + .schedule(any(Runnable.class), eq(newInterval.toMillis()), eq(TimeUnit.MILLISECONDS)); + } + + @Test + void testUpdateConfigDisablesFallback() { + pool.start(); + // Trigger fallback + openSessionWithError(primaryStream, Status.UNAVAILABLE); + + checkTask.run(); // Now using secondary + + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary).newStream(any(), any()); + + // Disable fallback + FallbackConfiguration disabledConfig = config.toBuilder().setEnabled(false).build(); + pool.updateConfig(disabledConfig); + + // Should switch back to primary + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(primary, times(2)).newStream(any(), any()); + + // Even with failures, should not switch to secondary anymore + openSessionWithError(primaryStream, Status.UNAVAILABLE); + + checkTask.run(); + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary, times(1)).newStream(any(), any()); // Still 1 from before + } + + @Test + void testUpdateConfigChangesErrorRate() { + pool.start(); + // One failure and one success = 50% + openSessionWithError(primaryStream, Status.UNAVAILABLE); + openSessionSuccessfully(primaryStream); + + // Update error rate to be higher + FallbackConfiguration newConfig = config.toBuilder().setErrorRate(0.6).build(); + pool.updateConfig(newConfig); + + checkTask.run(); + // 0.5 < 0.6, so should NOT switch + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary, never()).newStream(any(), any()); + + // Update to a lower error rate + newConfig = config.toBuilder().setErrorRate(0.5).build(); + pool.updateConfig(newConfig); + + // One failure and one success = 50% + openSessionWithError(primaryStream, Status.UNAVAILABLE); + openSessionSuccessfully(primaryStream); + + checkTask.run(); + // 0.5 >= 0.5, so should switch + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary).newStream(any(), any()); + } + + @Test + void testUpdateConfigEnablesFallback() { + FallbackConfiguration disabledConfig = config.toBuilder().setEnabled(false).build(); + pool = new FallbackChannelPool(disabledConfig, metrics.getPoolFallbackListener(), exec); + + pool.start(); + // Primary failure + openSessionWithError(primaryStream, Status.UNAVAILABLE); + // Current error rate 1.0 + + checkTask.run(); + // Fallback is disabled, should NOT switch + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary, never()).newStream(any(), any()); + + // Update config to enable fallback + FallbackConfiguration newConfig = config.toBuilder().setEnabled(true).build(); + pool.updateConfig(newConfig); + + // Primary failure + openSessionWithError(primaryStream, Status.UNAVAILABLE); + // Current error rate 1.0 + + checkTask.run(); + // 1.0 > 0.5, so should switch + pool.newStream(methodDescriptor, CallOptions.DEFAULT); + verify(secondary).newStream(any(), any()); + } + + @Test + void testRescheduleAfterCheck() { + pool.start(); + verify(exec, times(1)).schedule(any(Runnable.class), anyLong(), any(TimeUnit.class)); + + checkTask.run(); + verify(exec, times(2)).schedule(any(Runnable.class), anyLong(), any(TimeUnit.class)); + + checkTask.run(); + verify(exec, times(3)).schedule(any(Runnable.class), anyLong(), any(TimeUnit.class)); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapterTest.java new file mode 100644 index 0000000000..92c43430e0 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/compat/FutureAdapterTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.compat; + +import static com.google.common.truth.Truth.assertWithMessage; + +import io.grpc.Context; +import io.grpc.Context.CancellableContext; +import java.util.concurrent.CompletableFuture; +import org.junit.jupiter.api.Test; + +class FutureAdapterTest { + @Test + void testCancellation() { + CompletableFuture inner = new CompletableFuture<>(); + CancellableContext cancellableContext = Context.current().withCancellation(); + FutureAdapter f = new FutureAdapter<>(inner, cancellableContext); + f.cancel(true); + + assertWithMessage("Inner future should be cancelled").that(inner.isCancelled()).isTrue(); + + assertWithMessage("gRPC context is cancelled").that(cancellableContext.isCancelled()).isTrue(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistryExportTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistryExportTest.java new file mode 100644 index 0000000000..2f157180fa --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricRegistryExportTest.java @@ -0,0 +1,805 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm; + +import static com.google.cloud.bigtable.data.v2.internal.dp.DirectAccessInvestigator.FailureReason.UNKNOWN; +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; +import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat; + +import com.google.api.Distribution; +import com.google.api.MonitoredResource; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.rpc.FixedTransportChannelProvider; +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.exporter.BigtableCloudMonitoringExporter; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientSessionDuration.SessionCloseVRpcState; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings.LoadBalancingStrategy; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.cloud.monitoring.v3.MetricServiceSettings; +import com.google.common.base.Function; +import com.google.common.collect.ImmutableMap; +import com.google.common.truth.Correspondence; +import com.google.common.truth.Truth; +import com.google.monitoring.v3.CreateTimeSeriesRequest; +import com.google.monitoring.v3.MetricServiceGrpc.MetricServiceImplBase; +import com.google.monitoring.v3.Point; +import com.google.monitoring.v3.TimeSeries; +import com.google.monitoring.v3.TypedValue; +import com.google.protobuf.Empty; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Server; +import io.grpc.Status; +import io.grpc.Status.Code; +import io.grpc.stub.StreamObserver; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader; +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.concurrent.BlockingDeque; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class MetricRegistryExportTest { + private static final InstanceName INSTANCE_NAME = InstanceName.of("my-project", "my-instance"); + private static final String appProfileId = "my-app-profile"; + private static final String tableId = "my-table"; + private static final String clusterId = "my-cluster"; + private static final String clusterZone = "us-east1-b"; + + private Server server; + private FakeMetricService metricService; + private ManagedChannel fakeServiceChannel; + + private PeriodicMetricReader metricReader; + private SdkMeterProvider meterProvider; + private MetricRegistry metricRegistry; + private RecorderRegistry registry; + + private EnvInfo envInfo; + private ClientInfo clientInfo = + ClientInfo.builder().setInstanceName(INSTANCE_NAME).setAppProfileId(appProfileId).build(); + private SessionPoolInfo poolInfo; + private MethodInfo methodInfo; + private ClusterInformation clusterInfo; + private PeerInfo peerInfo; + + private MonitoredResource expectedTableMonitoredResource; + private MonitoredResource expectedClientMonitoredResource; + + @BeforeEach + void setUp() throws Exception { + metricService = new FakeMetricService(); + server = FakeServiceBuilder.create(metricService).start(); + + envInfo = + EnvInfo.builder() + .setPlatform("gcp_compute_engine") + .setProject("my-client-project") + .setRegion("us-east1") + .setHostId("123456") + .setHostName("my-vm") + .build(); + + poolInfo = SessionPoolInfo.create(clientInfo, VRpcDescriptor.TABLE_SESSION, tableId); + + fakeServiceChannel = + ManagedChannelBuilder.forAddress("localhost", server.getPort()).usePlaintext().build(); + + metricRegistry = new MetricRegistry(); + + MetricServiceClient metricClient = + MetricServiceClient.create( + MetricServiceSettings.newBuilder() + .setTransportChannelProvider( + FixedTransportChannelProvider.create( + GrpcTransportChannel.create(fakeServiceChannel))) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build()); + BigtableCloudMonitoringExporter exporter = + new BigtableCloudMonitoringExporter( + metricRegistry, () -> envInfo, clientInfo, metricClient); + metricReader = PeriodicMetricReader.create(exporter); + meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader).build(); + + registry = metricRegistry.newInternalRecorderRegistry(meterProvider); + + methodInfo = MethodInfo.builder().setName("Bigtable.ReadRow").setStreaming(false).build(); + + clusterInfo = + ClusterInformation.newBuilder().setZoneId(clusterZone).setClusterId(clusterId).build(); + peerInfo = + PeerInfo.newBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_CLOUD_PATH) + .setGoogleFrontendId(123) + .setApplicationFrontendRegion("us-east1") + .setApplicationFrontendSubzone("ab") + .build(); + + expectedTableMonitoredResource = + MonitoredResource.newBuilder() + .setType("bigtable_client_raw") + .putLabels("project_id", clientInfo.getInstanceName().getProjectId()) + .putLabels("instance", clientInfo.getInstanceName().getInstanceId()) + .putLabels("cluster", clusterInfo.getClusterId()) + .putLabels("table", tableId) + .putLabels("zone", clusterInfo.getZoneId()) + .build(); + + expectedClientMonitoredResource = + MonitoredResource.newBuilder() + .setType("bigtable_client") + .putLabels("project_id", clientInfo.getInstanceName().getProjectId()) + .putLabels("instance", clientInfo.getInstanceName().getInstanceId()) + .putLabels("app_profile", appProfileId) + .putLabels("client_project", envInfo.getProject()) + .putLabels("region", envInfo.getRegion()) + .putLabels("cloud_platform", envInfo.getPlatform()) + .putLabels("host_id", envInfo.getHostId()) + .putLabels("host_name", envInfo.getHostName()) + .putLabels("client_name", clientInfo.getClientName()) + .putLabels("uuid", envInfo.getUid()) + .build(); + } + + @AfterEach + void tearDown() { + meterProvider.close(); + fakeServiceChannel.shutdown(); + server.shutdownNow(); + } + + @Test + void testOpLatency() { + registry.operationLatency.record( + clientInfo, + tableId, + methodInfo, + clusterInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/operation_latencies"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName(), + "streaming", Boolean.toString(methodInfo.getStreaming())); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testAttemptLatency() { + registry.attemptLatency.record( + clientInfo, + tableId, + clusterInfo, + methodInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/attempt_latencies"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName(), + "streaming", Boolean.toString(methodInfo.getStreaming())); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testAttemptLatency2() { + registry.attemptLatency2.record( + clientInfo, + tableId, + peerInfo, + clusterInfo, + methodInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/attempt_latencies2"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "transport_type", "session_cloudpath", + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "transport_region", Util.formatTransportRegion(peerInfo), + "transport_zone", "", + "transport_subzone", peerInfo.getApplicationFrontendSubzone(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName(), + "streaming", Boolean.toString(methodInfo.getStreaming())); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testRetryCount() { + registry.retryCount.record( + clientInfo, tableId, methodInfo, clusterInfo, Status.UNAVAILABLE.getCode(), 1); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/retry_count"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName()); + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder().setValue(TypedValue.newBuilder().setInt64Value(1)).build()); + } + + @Test + void testFirstByteLatency() { + registry.firstResponseLantency.record( + clientInfo, + tableId, + methodInfo, + clusterInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/first_response_latencies"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName()); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testServerLatencies() { + registry.serverLatency.record( + clientInfo, + tableId, + methodInfo, + clusterInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/server_latencies"); + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName(), + "streaming", Boolean.toString(methodInfo.getStreaming())); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testChannelPoolOutstandingRpcs() { + registry.channelPoolOutstandingRpcs.record( + clientInfo, + peerInfo.getTransportType(), + LoadBalancingStrategy.POWER_OF_TWO_LEAST_IN_FLIGHT, + true, + 1); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/connection_pool/outstanding_rpcs"); + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "transport_type", "session_cloudpath", + "lb_policy", "POWER_OF_TWO_LEAST_IN_FLIGHT", + "streaming", "true"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(1))) + .build()); + } + + @Test + void testConnectivityErrors() { + registry.connectivityErrorCount.record( + clientInfo, tableId, methodInfo, clusterInfo, Status.UNAVAILABLE.getCode(), 1); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/connectivity_error_count"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName()); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder().setValue(TypedValue.newBuilder().setInt64Value(1)).build()); + } + + @Test + void testDpCompatGuage() { + registry.dpCompatGuage.recordFailure(clientInfo, UNKNOWN); + registry.dpCompatGuage.recordSuccess(clientInfo, "ipv4"); + + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + List timeSeriesList = + metricService.findTimeSeriesByName( + "bigtable.googleapis.com/internal/client/direct_access/compatible"); + + assertThat(timeSeriesList).hasSize(2); + for (TimeSeries timeSeries : timeSeriesList) { + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + } + assertThat(timeSeriesList) + .comparingElementsUsing( + Correspondence.transforming( + (Function>) + input -> input.getMetric().getLabelsMap(), + "metric labels")) + .containsExactly( + ImmutableMap.of( + "reason", "", + "ip_preference", "ipv4"), + ImmutableMap.of("reason", UNKNOWN.getValue(), "ip_preference", "")); + } + + @Test + void testApplicationErrors() { + registry.applicationBlockingLatency.record( + clientInfo, tableId, methodInfo, clusterInfo, Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/application_latencies"); + + assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName()); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123))) + .build()); + } + + @Test + void testClientBlocking() { + registry.clientBlockingLatency.record( + clientInfo, tableId, methodInfo, clusterInfo, Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/throttling_latencies"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName()); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testRemainingDeadline() { + registry.remainingDeadline.record( + clientInfo, + tableId, + methodInfo, + clusterInfo, + Status.UNAVAILABLE.getCode(), + Duration.ofMillis(123)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/remaining_deadline"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedTableMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "UNAVAILABLE", + "client_uid", envInfo.getUid(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId(), + "method", methodInfo.getName(), + "streaming", Boolean.toString(methodInfo.getStreaming())); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(123.0))) + .build()); + } + + @Test + void testPerConnectionErrors() { + registry.perConnectionErrorCount.record(clientInfo, 1); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/per_connection_error_count"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "project_id", clientInfo.getInstanceName().getProjectId(), + "client_uid", envInfo.getUid(), + "instance", clientInfo.getInstanceName().getInstanceId(), + "client_name", clientInfo.getClientName(), + "app_profile", clientInfo.getAppProfileId()); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(1))) + .build()); + } + + @Test + void testBatchWriteFactor() { + registry.batchWriteFlowControlFactor.record( + clientInfo, Code.DEADLINE_EXCEEDED, true, MethodInfo.of("Bigtable.MutateRows", false), 0.5); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/batch_write_flow_control_factor"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "status", "DEADLINE_EXCEEDED", + "applied", "true", + "method", "Bigtable.MutateRows"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue(TypedValue.newBuilder().setDoubleValue(0.5).build()) + .build()); + } + + @Test + void testBatchWriteQps() { + registry.batchWriteFlowControlTargetQps.record( + clientInfo, MethodInfo.of("Bigtable.MutateRows", false), 123); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/batch_write_flow_control_target_qps"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly("method", "Bigtable.MutateRows"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue(TypedValue.newBuilder().setDoubleValue(123.0).build()) + .build()); + } + + @Test + void testSessionDuration() { + registry.sessionDuration.record( + poolInfo, + peerInfo, + Status.Code.DATA_LOSS, + CloseSessionReason.CLOSE_SESSION_REASON_USER, + SessionCloseVRpcState.SomeOk, + true, + Duration.ofMinutes(5)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/session/durations"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "session_type", "table", // derived from SessionType + "session_name", poolInfo.getName(), + "afe_location", peerInfo.getApplicationFrontendSubzone(), + "transport_type", "session_cloudpath", + "closing_reason", "CLOSE_SESSION_REASON_USER", + "vrpcs", "some_ok", + "ready", "true", + "status", "DATA_LOSS"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue( + Distribution.newBuilder() + .setCount(1) + .setMean((double) Duration.ofMinutes(5).toMillis()))) + .build()); + } + + @Test + void testSessionOpenLatency() { + registry.sessionOpenLatency.record( + poolInfo, peerInfo, Status.Code.DATA_LOSS, Duration.ofMillis(10)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/session/open_latencies"); + + Truth.assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "session_type", "table", // derived from SessionType + "session_name", poolInfo.getName(), + "afe_location", peerInfo.getApplicationFrontendSubzone(), + "transport_type", "session_cloudpath", + "status", "DATA_LOSS"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue(Distribution.newBuilder().setCount(1).setMean(10))) + .build()); + } + + @Test + void testSessionUptime() { + registry.sessionUptime.record(poolInfo, peerInfo, true, Duration.ofMinutes(10)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/session/uptime"); + + assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsExactly( + "session_type", "table", // derived from SessionType + "session_name", poolInfo.getName(), + "afe_location", peerInfo.getApplicationFrontendSubzone(), + "transport_type", "session_cloudpath", + "ready", "true"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue( + Distribution.newBuilder() + .setCount(1) + .setMean((double) Duration.ofMinutes(10).toMillis()))) + .build()); + } + + @Test + void testPacemaker() { + registry.pacemakerDelay.record(clientInfo, "background", Duration.ofMillis(1)); + metricReader.forceFlush().join(1, TimeUnit.MINUTES); + + TimeSeries timeSeries = + metricService.getSingleTimeSeriesByName( + "bigtable.googleapis.com/internal/client/pacemaker_delays"); + + assertThat(timeSeries.getResource()).isEqualTo(expectedClientMonitoredResource); + + assertThat(timeSeries.getMetric().getLabelsMap()).containsExactly("executor", "background"); + + assertThat(timeSeries.getPointsList()) + .comparingExpectedFieldsOnly() + .containsExactly( + Point.newBuilder() + .setValue( + TypedValue.newBuilder() + .setDistributionValue( + Distribution.newBuilder().setCount(1).setMean(1000.0))) + .build()); + } + + private static class FakeMetricService extends MetricServiceImplBase { + final BlockingDeque requests = new LinkedBlockingDeque<>(); + + @Override + public void createServiceTimeSeries( + CreateTimeSeriesRequest request, StreamObserver responseObserver) { + requests.add(request); + responseObserver.onNext(Empty.getDefaultInstance()); + responseObserver.onCompleted(); + } + + List findTimeSeriesByName(String name) { + return requests.stream() + .flatMap(r -> r.getTimeSeriesList().stream()) + .filter(ts -> name.equals(ts.getMetric().getType())) + .collect(Collectors.toList()); + } + + TimeSeries getSingleTimeSeriesByName(String name) { + List timeSeriesList = findTimeSeriesByName(name); + assertWithMessage("Expected to have a single TimeSeries with the name %s", name) + .that(timeSeriesList) + .hasSize(1); + + return timeSeriesList.get(0); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsIsolationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsIsolationTest.java new file mode 100644 index 0000000000..bc4b3a8eb2 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/MetricsIsolationTest.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientTransportLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableApplicationBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency2; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableClientBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableConnectivityErrorCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableFirstResponseLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableOperationLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRemainingDeadline; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRetryCount; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.common.truth.Correspondence; +import io.grpc.Deadline; +import io.opencensus.stats.StatsRecorder; +import io.opencensus.tags.Tagger; +import io.opentelemetry.api.OpenTelemetry; +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 java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +class MetricsIsolationTest { + private ScheduledExecutorService executor; + private InMemoryMetricReader internalReader; + private InMemoryMetricReader userReader; + private MetricsImpl metrics; + private ClientInfo clientInfo; + + private static final Correspondence METRIC_DATA_NAME = + Correspondence.transforming(MetricData::getName, "metric data name"); + + private static final List PUBLIC_METRICS = + ImmutableList.of( + TableAttemptLatency.NAME, + TableOperationLatency.NAME, + TableFirstResponseLatency.NAME, + TableRetryCount.NAME, + TableConnectivityErrorCount.NAME, + TableApplicationBlockingLatency.NAME, + TableClientBlockingLatency.NAME); + + private static final List INTERNAL_METRICS = + ImmutableList.of( + TableAttemptLatency2.NAME, ClientTransportLatency.NAME, TableRemainingDeadline.NAME); + + @BeforeEach + void setUp() { + executor = Executors.newSingleThreadScheduledExecutor(); + internalReader = InMemoryMetricReader.create(); + userReader = InMemoryMetricReader.create(); + + clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of("project", "instance")) + .setAppProfileId("profile") + .build(); + + SdkMeterProvider internalMeterProvider = + SdkMeterProvider.builder().registerMetricReader(internalReader).build(); + OpenTelemetrySdk internalOtel = + OpenTelemetrySdk.builder().setMeterProvider(internalMeterProvider).build(); + + SdkMeterProvider userMeterProvider = + SdkMeterProvider.builder().registerMetricReader(userReader).build(); + OpenTelemetry userOtel = OpenTelemetrySdk.builder().setMeterProvider(userMeterProvider).build(); + + MetricRegistry registry = new MetricRegistry(); + + metrics = + new MetricsImpl( + registry, + clientInfo, + Mockito.mock(ApiTracerFactory.class), + internalOtel, + userOtel, + Mockito.mock(Tagger.class), + Mockito.mock(StatsRecorder.class), + executor); + } + + @AfterEach + void tearDown() { + metrics.close(); + executor.shutdown(); + } + + @Test + void testMetricsIsolation() { + metrics.start(); + + SessionPoolInfo poolInfo = + SessionPoolInfo.create( + ClientInfo.builder() + .setClientName("fake-client") + .setInstanceName(InstanceName.of("fake-project", "fake-instance")) + .setAppProfileId("default") + .build(), + VRpcDescriptor.TABLE_SESSION, + "fake-session"); + + // 1. Trigger shared and attemptLatency2 metrics (VRpcTracer) + VRpcTracer tracer = + metrics.newTableTracer( + poolInfo, VRpcDescriptor.READ_ROW, Deadline.after(1, TimeUnit.MINUTES)); + + tracer.onAttemptStart(null); + tracer.onRequestSent(PeerInfo.getDefaultInstance()); + tracer.onAttemptFinish(VRpcResult.createServerOk(VirtualRpcResponse.getDefaultInstance())); + tracer.onOperationFinish(VRpcResult.createServerOk(VirtualRpcResponse.getDefaultInstance())); + + // user metric should have exactly PUBLIC_METRICS + assertThat(userReader.collectAllMetrics()) + .comparingElementsUsing(METRIC_DATA_NAME) + .containsAtLeastElementsIn(PUBLIC_METRICS); + assertThat(userReader.collectAllMetrics()) + .comparingElementsUsing(METRIC_DATA_NAME) + .containsNoneIn(INTERNAL_METRICS); + + // internal metric should have exactly PUBLIC_METRICS + INTERNAL_METRICS + assertThat(internalReader.collectAllMetrics()) + .comparingElementsUsing(METRIC_DATA_NAME) + .containsAtLeastElementsIn(Iterables.concat(PUBLIC_METRICS, INTERNAL_METRICS)); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfoTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfoTest.java new file mode 100644 index 0000000000..f92f375bdb --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/ClientInfoTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.attributes; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import org.junit.jupiter.api.Test; + +class ClientInfoTest { + @Test + void testName() { + ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of("fake-project", "fake-instance")) + .setAppProfileId("fake-app-profile") + .build(); + assertThat(clientInfo.getClientName()).containsMatch("java-bigtable/\\d+\\.\\d+\\.\\d+.*"); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfoTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfoTest.java new file mode 100644 index 0000000000..55df4aee7f --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/EnvInfoTest.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 + * + * 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.bigtable.data.v2.internal.csm.attributes; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.Mockito.when; + +import com.google.cloud.opentelemetry.detection.DetectedPlatform; +import com.google.cloud.opentelemetry.detection.GCPPlatformDetector.SupportedPlatform; +import com.google.common.base.Function; +import com.google.common.base.Supplier; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableMap; +import java.util.Map; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class EnvInfoTest { + private static final Supplier NULL_HOST = Suppliers.ofInstance(null); + + @SuppressWarnings("UnnecessaryLambda") + private static final Function NULL_ENV = (ignored) -> null; + + @Mock private DetectedPlatform detectedPlatform; + + @Test + void testUid() { + when(detectedPlatform.getSupportedPlatform()).thenReturn(SupportedPlatform.UNKNOWN_PLATFORM); + + EnvInfo info1 = EnvInfo.detect(detectedPlatform, NULL_ENV, NULL_HOST); + EnvInfo info2 = EnvInfo.detect(detectedPlatform, NULL_ENV, NULL_HOST); + + assertThat(info1.getUid()).isNotEmpty(); + assertThat(info2.getUid()).isNotEmpty(); + assertThat(info1.getUid()).isNotEqualTo(info2.getUid()); + } + + @Test + void testUnknown() { + when(detectedPlatform.getSupportedPlatform()).thenReturn(SupportedPlatform.UNKNOWN_PLATFORM); + EnvInfo envInfo = EnvInfo.detect(detectedPlatform, NULL_ENV, NULL_HOST); + assertThat(envInfo.getHostName()).isEmpty(); + assertThat(envInfo.getHostId()).isEmpty(); + assertThat(envInfo.getPlatform()).isEqualTo("unknown"); + assertThat(envInfo.getRegion()).isEqualTo("global"); + } + + @Test + void testGce() { + when(detectedPlatform.getSupportedPlatform()) + .thenReturn(SupportedPlatform.GOOGLE_COMPUTE_ENGINE); + when(detectedPlatform.getProjectId()).thenReturn("my-project"); + when(detectedPlatform.getAttributes()) + .thenReturn( + ImmutableMap.of( + "machine_type", "n2-standard-8", + "availability_zone", "us-central1-c", + "instance_id", "1234567890", + "instance_name", "my-vm-name", + "cloud_region", "us-central1", + "instance_hostname", "my-vm-name.us-central1-c.c.my-project.google.com.internal")); + EnvInfo envInfo = EnvInfo.detect(detectedPlatform, NULL_ENV, NULL_HOST); + assertThat(envInfo.getPlatform()).isEqualTo("gcp_compute_engine"); + assertThat(envInfo.getProject()).isEqualTo("my-project"); + assertThat(envInfo.getRegion()).isEqualTo("us-central1"); + assertThat(envInfo.getHostId()).isEqualTo("1234567890"); + assertThat(envInfo.getHostName()).isEqualTo("my-vm-name"); + } + + @Test + void testGke() { + when(detectedPlatform.getSupportedPlatform()) + .thenReturn(SupportedPlatform.GOOGLE_KUBERNETES_ENGINE); + when(detectedPlatform.getProjectId()).thenReturn("my-project"); + when(detectedPlatform.getAttributes()) + .thenReturn( + ImmutableMap.of( + "gke_cluster_name", "my-cluster", + "gke_cluster_location", "us-central1", + "gke_cluster_location_type", "country-region", + "instance_id", "1234567890")); + Map env = ImmutableMap.of("HOSTNAME", "my-hostname"); + + EnvInfo envInfo = EnvInfo.detect(detectedPlatform, env::get, NULL_HOST); + assertThat(envInfo.getPlatform()).isEqualTo("gcp_kubernetes_engine"); + assertThat(envInfo.getProject()).isEqualTo("my-project"); + assertThat(envInfo.getRegion()).isEqualTo("us-central1"); + assertThat(envInfo.getHostId()).isEqualTo("1234567890"); + assertThat(envInfo.getHostName()).isEqualTo("my-hostname"); + } + + @Test + void testGkeHostanmeFallback() { + when(detectedPlatform.getSupportedPlatform()) + .thenReturn(SupportedPlatform.GOOGLE_KUBERNETES_ENGINE); + when(detectedPlatform.getProjectId()).thenReturn("my-project"); + when(detectedPlatform.getAttributes()) + .thenReturn( + ImmutableMap.of( + "gke_cluster_name", "my-cluster", + "gke_cluster_location", "us-central1", + "gke_cluster_location_type", "country-region", + "instance_id", "1234567890")); + EnvInfo envInfo = EnvInfo.detect(detectedPlatform, NULL_ENV, () -> "my-hostname"); + assertThat(envInfo.getPlatform()).isEqualTo("gcp_kubernetes_engine"); + assertThat(envInfo.getProject()).isEqualTo("my-project"); + assertThat(envInfo.getRegion()).isEqualTo("us-central1"); + assertThat(envInfo.getHostId()).isEqualTo("1234567890"); + assertThat(envInfo.getHostName()).isEqualTo("my-hostname"); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/UtilTest.java similarity index 52% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/UtilTest.java index 3c0fb4e617..5e981f1f4b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/UtilTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/attributes/UtilTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,30 +13,32 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; + +package com.google.cloud.bigtable.data.v2.internal.csm.attributes; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.rpc.DeadlineExceededException; -import com.google.common.util.concurrent.Futures; +import com.google.bigtable.v2.PeerInfo.TransportType; import io.grpc.Status; import io.opencensus.tags.TagValue; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; +import org.junit.jupiter.api.Test; -@RunWith(JUnit4.class) -public class UtilTest { +class UtilTest { @Test - public void testOk() { - TagValue tagValue = TagValue.create(Util.extractStatus((Throwable) null)); - assertThat(tagValue.asString()).isEqualTo("OK"); + void ensureAllTransportTypeHaveExpectedPrefix() { + for (TransportType type : TransportType.values()) { + assertWithMessage("%s should have a mapping", type) + .that(Util.transportTypeToStringWithoutFallback(type)) + .isNotNull(); + } } @Test - public void testOkFuture() { - TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateFuture(null)); + public void testOk() { + TagValue tagValue = TagValue.create(Util.extractStatus(null).name()); assertThat(tagValue.asString()).isEqualTo("OK"); } @@ -45,22 +47,7 @@ public void testError() { DeadlineExceededException error = new DeadlineExceededException( "Deadline exceeded", null, GrpcStatusCode.of(Status.Code.DEADLINE_EXCEEDED), true); - TagValue tagValue = TagValue.create(Util.extractStatus(error)); - assertThat(tagValue.asString()).isEqualTo("DEADLINE_EXCEEDED"); - } - - @Test - public void testErrorFuture() { - DeadlineExceededException error = - new DeadlineExceededException( - "Deadline exceeded", null, GrpcStatusCode.of(Status.Code.DEADLINE_EXCEEDED), true); - TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateFailedFuture(error)); + TagValue tagValue = TagValue.create(Util.extractStatus(error).name()); assertThat(tagValue.asString()).isEqualTo("DEADLINE_EXCEEDED"); } - - @Test - public void testCancelledFuture() { - TagValue tagValue = Util.extractStatusFromFuture(Futures.immediateCancelledFuture()); - assertThat(tagValue.asString()).isEqualTo("CANCELLED"); - } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter2Test.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter2Test.java new file mode 100644 index 0000000000..dfd4132596 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporter2Test.java @@ -0,0 +1,553 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.exporter; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.Distribution; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.api.TableName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.cloud.monitoring.v3.stub.MetricServiceStub; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.monitoring.v3.CreateTimeSeriesRequest; +import com.google.monitoring.v3.TimeSeries; +import com.google.protobuf.Empty; +import com.google.protobuf.util.Timestamps; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.common.InstrumentationScopeInfo; +import io.opentelemetry.sdk.metrics.data.AggregationTemporality; +import io.opentelemetry.sdk.metrics.data.HistogramPointData; +import io.opentelemetry.sdk.metrics.data.LongPointData; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.metrics.internal.data.ImmutableHistogramData; +import io.opentelemetry.sdk.metrics.internal.data.ImmutableHistogramPointData; +import io.opentelemetry.sdk.metrics.internal.data.ImmutableLongPointData; +import io.opentelemetry.sdk.metrics.internal.data.ImmutableMetricData; +import io.opentelemetry.sdk.metrics.internal.data.ImmutableSumData; +import io.opentelemetry.sdk.resources.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.BlockingDeque; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class BigtableCloudMonitoringExporter2Test { + private static final TableName tableName = + TableName.of("fake-project", "fake-instance", "fake-table"); + private static final String appProfileId = "default"; + private static final String zone = "us-east-1"; + private static final String cluster = "cluster-1"; + + private ClientInfo clientInfo; + private EnvInfo envInfo; + + private FakeMetricServiceStub mockMetricServiceStub; + private MetricServiceClient fakeMetricServiceClient; + private BigtableCloudMonitoringExporter exporter; + + private Attributes attributes; + private Resource resource; + private InstrumentationScopeInfo scope; + + @BeforeEach + public void setUp() { + mockMetricServiceStub = new FakeMetricServiceStub(); + fakeMetricServiceClient = new FakeMetricServiceClient(mockMetricServiceStub); + + envInfo = + EnvInfo.builder() + .setProject("client-project") + .setPlatform("gce_instance") + .setRegion("cleint-region") + .setHostName("harold") + .setHostId("1234567890") + .build(); + + clientInfo = + ClientInfo.builder() + .setInstanceName(tableName.getInstanceName()) + .setAppProfileId(appProfileId) + .build(); + + MetricRegistry metricRegistry = new MetricRegistry(); + exporter = + new BigtableCloudMonitoringExporter( + metricRegistry, () -> envInfo, clientInfo, fakeMetricServiceClient); + + attributes = + Attributes.builder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, tableName.getProjectId()) + .put(TableSchema.INSTANCE_ID_KEY, tableName.getInstanceId()) + .put(TableSchema.TABLE_ID_KEY, tableName.getTableId()) + .put(TableSchema.CLUSTER_ID_KEY, cluster) + .put(TableSchema.ZONE_ID_KEY, zone) + .put(MetricLabels.APP_PROFILE_KEY, appProfileId) + .build(); + + resource = Resource.create(Attributes.empty()); + + scope = InstrumentationScopeInfo.create(MetricRegistry.METER_NAME); + } + + @AfterEach + public void tearDown() {} + + @Test + public void testExportingSumData() throws InterruptedException { + long fakeValue = 11L; + + long startEpoch = 10; + long endEpoch = 15; + LongPointData longPointData = + ImmutableLongPointData.create(startEpoch, endEpoch, attributes, fakeValue); + + MetricData longData = + ImmutableMetricData.createLongSum( + resource, + scope, + "bigtable.googleapis.com/internal/client/retry_count", + "description", + "1", + ImmutableSumData.create( + true, AggregationTemporality.CUMULATIVE, ImmutableList.of(longPointData))); + + exporter.export(Collections.singletonList(longData)); + + CreateTimeSeriesRequest request = mockMetricServiceStub.requests.poll(1, TimeUnit.MINUTES); + + assertThat(request.getTimeSeriesList()).hasSize(1); + + TimeSeries timeSeries = request.getTimeSeriesList().get(0); + + assertThat(timeSeries.getResource().getLabelsMap()) + .containsExactly( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), tableName.getProjectId(), + TableSchema.INSTANCE_ID_KEY.getKey(), tableName.getInstanceId(), + TableSchema.TABLE_ID_KEY.getKey(), tableName.getTableId(), + TableSchema.CLUSTER_ID_KEY.getKey(), cluster, + TableSchema.ZONE_ID_KEY.getKey(), zone); + + assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + envInfo.getUid()); + assertThat(timeSeries.getPoints(0).getValue().getInt64Value()).isEqualTo(fakeValue); + assertThat(timeSeries.getPoints(0).getInterval().getStartTime()) + .isEqualTo(Timestamps.fromNanos(startEpoch)); + assertThat(timeSeries.getPoints(0).getInterval().getEndTime()) + .isEqualTo(Timestamps.fromNanos(endEpoch)); + } + + @Test + public void testExportingHistogramData() throws InterruptedException { + long startEpoch = 10; + long endEpoch = 15; + HistogramPointData histogramPointData = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + attributes, + 3d, + true, + 1d, // min + true, + 2d, // max + Collections.singletonList(1.0), + Arrays.asList(1L, 2L)); + + MetricData histogramData = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/operation_latencies", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData))); + + exporter.export(Arrays.asList(histogramData)); + + CreateTimeSeriesRequest request = mockMetricServiceStub.requests.poll(1, TimeUnit.MINUTES); + + assertThat(request.getTimeSeriesList()).hasSize(1); + + TimeSeries timeSeries = request.getTimeSeriesList().get(0); + + assertThat(timeSeries.getResource().getLabelsMap()) + .containsExactly( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), tableName.getProjectId(), + TableSchema.INSTANCE_ID_KEY.getKey(), tableName.getInstanceId(), + TableSchema.TABLE_ID_KEY.getKey(), tableName.getTableId(), + TableSchema.CLUSTER_ID_KEY.getKey(), cluster, + TableSchema.ZONE_ID_KEY.getKey(), zone); + + assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + this.envInfo.getUid()); + Distribution distribution = timeSeries.getPoints(0).getValue().getDistributionValue(); + assertThat(distribution.getCount()).isEqualTo(3); + assertThat(timeSeries.getPoints(0).getInterval().getStartTime()) + .isEqualTo(Timestamps.fromNanos(startEpoch)); + assertThat(timeSeries.getPoints(0).getInterval().getEndTime()) + .isEqualTo(Timestamps.fromNanos(endEpoch)); + } + + @Test + public void testExportingSumDataInBatches() { + long startEpoch = 10; + long endEpoch = 15; + + Collection toExport = new ArrayList<>(); + for (int i = 0; i < 250; i++) { + Attributes testAttributes = + Attributes.builder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, tableName.getProjectId()) + .put(TableSchema.INSTANCE_ID_KEY, tableName.getInstanceId()) + .put(TableSchema.TABLE_ID_KEY, tableName.getTableId() + i) + .put(TableSchema.CLUSTER_ID_KEY, cluster) + .put(TableSchema.ZONE_ID_KEY, zone) + .put(MetricLabels.APP_PROFILE_KEY, appProfileId) + .build(); + LongPointData longPointData = + ImmutableLongPointData.create(startEpoch, endEpoch, testAttributes, i); + + MetricData longData = + ImmutableMetricData.createLongSum( + resource, + scope, + "bigtable.googleapis.com/internal/client/retry_count", + "description", + "1", + ImmutableSumData.create( + true, AggregationTemporality.CUMULATIVE, ImmutableList.of(longPointData))); + toExport.add(longData); + } + + exporter.export(toExport); + + assertThat(mockMetricServiceStub.requests).hasSize(2); + CreateTimeSeriesRequest firstRequest = mockMetricServiceStub.requests.poll(); + CreateTimeSeriesRequest secondRequest = mockMetricServiceStub.requests.poll(); + + assertThat(firstRequest.getTimeSeriesList()).hasSize(200); + assertThat(secondRequest.getTimeSeriesList()).hasSize(50); + + for (int i = 0; i < 250; i++) { + TimeSeries timeSeries; + if (i < 200) { + timeSeries = firstRequest.getTimeSeriesList().get(i); + } else { + timeSeries = secondRequest.getTimeSeriesList().get(i - 200); + } + + assertThat(timeSeries.getResource().getLabelsMap()) + .containsExactly( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), + tableName.getProjectId(), + TableSchema.INSTANCE_ID_KEY.getKey(), + tableName.getInstanceId(), + TableSchema.TABLE_ID_KEY.getKey(), + tableName.getTableId() + i, + TableSchema.CLUSTER_ID_KEY.getKey(), + cluster, + TableSchema.ZONE_ID_KEY.getKey(), + zone); + + assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + envInfo.getUid()); + assertThat(timeSeries.getPoints(0).getValue().getInt64Value()).isEqualTo(i); + assertThat(timeSeries.getPoints(0).getInterval().getStartTime()) + .isEqualTo(Timestamps.fromNanos(startEpoch)); + assertThat(timeSeries.getPoints(0).getInterval().getEndTime()) + .isEqualTo(Timestamps.fromNanos(endEpoch)); + } + } + + @Test + public void testTimeSeriesForMetricWithGceOrGkeResource() throws InterruptedException { + String gceProjectId = "fake-gce-project"; + EnvInfo envInfo = + EnvInfo.builder() + .setPlatform("gce_instance") + .setProject(gceProjectId) + .setRegion("cleint-region") + .setHostId("1234567890") + .setHostName("harold") + .build(); + + ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(tableName.getInstanceName()) + .setAppProfileId(appProfileId) + .build(); + + MetricRegistry metricRegistry = new MetricRegistry(); + BigtableCloudMonitoringExporter exporter = + new BigtableCloudMonitoringExporter( + metricRegistry, Suppliers.ofInstance(envInfo), clientInfo, fakeMetricServiceClient); + + long startEpoch = 10; + long endEpoch = 15; + HistogramPointData histogramPointData = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + Attributes.of( + ClientSchema.BIGTABLE_PROJECT_ID_KEY, + tableName.getProjectId(), + ClientSchema.INSTANCE_ID_KEY, + tableName.getInstanceId(), + ClientSchema.APP_PROFILE_KEY, + appProfileId, + ClientSchema.CLIENT_NAME, + clientInfo.getClientName()), + 3d, + true, + 1d, // min + true, + 2d, // max + Arrays.asList(1.0), + Arrays.asList(1L, 2L)); + + MetricData histogramData = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/per_connection_error_count", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData))); + + exporter.export(Collections.singletonList(histogramData)); + + CreateTimeSeriesRequest request = mockMetricServiceStub.requests.poll(1, TimeUnit.MINUTES); + + assertThat(request.getName()).isEqualTo("projects/" + tableName.getProjectId()); + assertThat(request.getTimeSeriesList()).hasSize(1); + + TimeSeries timeSeries = request.getTimeSeriesList().get(0); + + assertThat(timeSeries.getResource().getLabelsMap()) + .isEqualTo( + ImmutableMap.builder() + .put("project_id", tableName.getProjectId()) + .put("instance", tableName.getInstanceId()) + .put("app_profile", appProfileId) + .put("client_project", gceProjectId) + .put("region", "cleint-region") + .put("cloud_platform", "gce_instance") + .put("host_id", "1234567890") + .put("host_name", "harold") + .put("client_name", clientInfo.getClientName()) + .put("uuid", envInfo.getUid()) + .build()); + + assertThat(timeSeries.getMetric().getLabelsMap()) + .isEqualTo( + ImmutableMap.builder() + .put(ClientSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), tableName.getProjectId()) + .put(ClientSchema.INSTANCE_ID_KEY.getKey(), tableName.getInstanceId()) + .put(ClientSchema.APP_PROFILE_KEY.getKey(), appProfileId) + .put(ClientSchema.CLIENT_NAME.getKey(), clientInfo.getClientName()) + .put(MetricLabels.CLIENT_UID.getKey(), envInfo.getUid()) + .build()); + } + + @Test + public void testExportingToMultipleProjects() throws InterruptedException { + long startEpoch = 10; + long endEpoch = 15; + HistogramPointData histogramPointData1 = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + attributes, + 3d, + true, + 1d, // min + true, + 2d, // max + Arrays.asList(1.0), + Arrays.asList(1L, 2L)); + + MetricData histogramData1 = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/operation_latencies", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData1))); + + HistogramPointData histogramPointData2 = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + attributes.toBuilder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, "another-project") + .build(), + 50d, + true, + 5d, // min + true, + 30d, // max + Arrays.asList(1.0), + Arrays.asList(5L, 10L)); + + MetricData histogramData2 = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/operation_latencies", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData2))); + + exporter.export(Arrays.asList(histogramData1, histogramData2)); + + List allValues = + Arrays.asList( + mockMetricServiceStub.requests.poll(1, TimeUnit.MINUTES), + mockMetricServiceStub.requests.poll(1, TimeUnit.MINUTES)); + + assertThat(allValues).hasSize(2); + + List> labelsMap = new ArrayList<>(); + List counts = new ArrayList<>(); + allValues.forEach( + value -> { + labelsMap.add(value.getTimeSeriesList().get(0).getResource().getLabelsMap()); + counts.add( + value + .getTimeSeriesList() + .get(0) + .getPoints(0) + .getValue() + .getDistributionValue() + .getCount()); + }); + + assertThat(labelsMap) + .containsExactly( + ImmutableMap.of( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), + tableName.getProjectId(), + TableSchema.INSTANCE_ID_KEY.getKey(), + tableName.getInstanceId(), + TableSchema.TABLE_ID_KEY.getKey(), + tableName.getTableId(), + TableSchema.CLUSTER_ID_KEY.getKey(), + cluster, + TableSchema.ZONE_ID_KEY.getKey(), + zone), + ImmutableMap.of( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), + "another-project", + TableSchema.INSTANCE_ID_KEY.getKey(), + tableName.getInstanceId(), + TableSchema.TABLE_ID_KEY.getKey(), + tableName.getTableId(), + TableSchema.CLUSTER_ID_KEY.getKey(), + cluster, + TableSchema.ZONE_ID_KEY.getKey(), + zone)); + assertThat(counts).containsExactly(3l, 15l); + } + + private static class FakeMetricServiceClient extends MetricServiceClient { + protected FakeMetricServiceClient(MetricServiceStub stub) { + super(stub); + } + } + + private static class FakeMetricServiceStub extends MetricServiceStub { + private final BlockingDeque requests = new LinkedBlockingDeque<>(); + + @Override + public UnaryCallable createServiceTimeSeriesCallable() { + return new UnaryCallable() { + @Override + public ApiFuture futureCall( + CreateTimeSeriesRequest createTimeSeriesRequest, ApiCallContext apiCallContext) { + requests.add(createTimeSeriesRequest); + return ApiFutures.immediateFuture(Empty.getDefaultInstance()); + } + }; + } + + @Override + public void close() {} + + @Override + public void shutdown() {} + + @Override + public boolean isShutdown() { + return false; + } + + @Override + public boolean isTerminated() { + return false; + } + + @Override + public void shutdownNow() {} + + @Override + public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException { + return false; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporterTest.java similarity index 54% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporterTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporterTest.java index 81629e2d9d..2e04d7c566 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableCloudMonitoringExporterTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/exporter/BigtableCloudMonitoringExporterTest.java @@ -13,31 +13,35 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; - -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.APP_PROFILE_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.BIGTABLE_PROJECT_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_NAME_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_UID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLUSTER_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.INSTANCE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TABLE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; +package com.google.cloud.bigtable.data.v2.internal.csm.exporter; + import static com.google.common.truth.Truth.assertThat; +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.api.Distribution; -import com.google.api.MonitoredResource; import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.EnvInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; import com.google.cloud.monitoring.v3.MetricServiceClient; import com.google.cloud.monitoring.v3.stub.MetricServiceStub; +import com.google.common.base.Suppliers; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.CreateTimeSeriesRequest; import com.google.monitoring.v3.TimeSeries; import com.google.protobuf.Empty; +import com.google.protobuf.util.Timestamps; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; import io.opentelemetry.sdk.metrics.data.AggregationTemporality; @@ -53,6 +57,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.List; +import java.util.Map; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -83,31 +89,53 @@ public class BigtableCloudMonitoringExporterTest { private Resource resource; private InstrumentationScopeInfo scope; + private EnvInfo envInfo = + EnvInfo.builder() + .setProject("client-project") + .setPlatform("gce_instance") + .setRegion("cleint-region") + .setHostName("harold") + .setHostId("1234567890") + .setUid(taskId) + .build(); + private ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of(projectId, instanceId)) + .setAppProfileId(appProfileId) + .setClientName(clientName) + .build(); + @Before public void setUp() { fakeMetricServiceClient = new FakeMetricServiceClient(mockMetricServiceStub); exporter = new BigtableCloudMonitoringExporter( - projectId, fakeMetricServiceClient, /* applicationResource= */ null, taskId); + new MetricRegistry(), + Suppliers.ofInstance(envInfo), + clientInfo, + fakeMetricServiceClient); attributes = Attributes.builder() - .put(BIGTABLE_PROJECT_ID_KEY, projectId) - .put(INSTANCE_ID_KEY, instanceId) - .put(TABLE_ID_KEY, tableId) - .put(CLUSTER_ID_KEY, cluster) - .put(ZONE_ID_KEY, zone) - .put(APP_PROFILE_KEY, appProfileId) + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, projectId) + .put(TableSchema.INSTANCE_ID_KEY, instanceId) + .put(TableSchema.TABLE_ID_KEY, tableId) + .put(TableSchema.CLUSTER_ID_KEY, cluster) + .put(TableSchema.ZONE_ID_KEY, zone) + .put(MetricLabels.APP_PROFILE_KEY, appProfileId) .build(); resource = Resource.create(Attributes.empty()); - scope = InstrumentationScopeInfo.create(BuiltinMetricsConstants.METER_NAME); + scope = InstrumentationScopeInfo.create(MetricRegistry.METER_NAME); } @After - public void tearDown() {} + public void tearDown() { + exporter.close(); + fakeMetricServiceClient.close(); + } @Test public void testExportingSumData() { @@ -146,19 +174,24 @@ public void testExportingSumData() { assertThat(timeSeries.getResource().getLabelsMap()) .containsExactly( - BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, - INSTANCE_ID_KEY.getKey(), instanceId, - TABLE_ID_KEY.getKey(), tableId, - CLUSTER_ID_KEY.getKey(), cluster, - ZONE_ID_KEY.getKey(), zone); + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, + TableSchema.INSTANCE_ID_KEY.getKey(), instanceId, + TableSchema.TABLE_ID_KEY.getKey(), tableId, + TableSchema.CLUSTER_ID_KEY.getKey(), cluster, + TableSchema.ZONE_ID_KEY.getKey(), zone); assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); assertThat(timeSeries.getMetric().getLabelsMap()) - .containsAtLeast(APP_PROFILE_KEY.getKey(), appProfileId, CLIENT_UID_KEY.getKey(), taskId); + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + taskId); assertThat(timeSeries.getPoints(0).getValue().getInt64Value()).isEqualTo(fakeValue); - assertThat(timeSeries.getPoints(0).getInterval().getStartTime().getNanos()) + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getStartTime())) .isEqualTo(startEpoch); - assertThat(timeSeries.getPoints(0).getInterval().getEndTime().getNanos()).isEqualTo(endEpoch); + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getEndTime())) + .isEqualTo(endEpoch); } @Test @@ -206,20 +239,25 @@ public void testExportingHistogramData() { assertThat(timeSeries.getResource().getLabelsMap()) .containsExactly( - BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, - INSTANCE_ID_KEY.getKey(), instanceId, - TABLE_ID_KEY.getKey(), tableId, - CLUSTER_ID_KEY.getKey(), cluster, - ZONE_ID_KEY.getKey(), zone); + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, + TableSchema.INSTANCE_ID_KEY.getKey(), instanceId, + TableSchema.TABLE_ID_KEY.getKey(), tableId, + TableSchema.CLUSTER_ID_KEY.getKey(), cluster, + TableSchema.ZONE_ID_KEY.getKey(), zone); assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); assertThat(timeSeries.getMetric().getLabelsMap()) - .containsAtLeast(APP_PROFILE_KEY.getKey(), appProfileId, CLIENT_UID_KEY.getKey(), taskId); + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + taskId); Distribution distribution = timeSeries.getPoints(0).getValue().getDistributionValue(); assertThat(distribution.getCount()).isEqualTo(3); - assertThat(timeSeries.getPoints(0).getInterval().getStartTime().getNanos()) + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getStartTime())) .isEqualTo(startEpoch); - assertThat(timeSeries.getPoints(0).getInterval().getEndTime().getNanos()).isEqualTo(endEpoch); + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getEndTime())) + .isEqualTo(endEpoch); } @Test @@ -239,12 +277,12 @@ public void testExportingSumDataInBatches() { for (int i = 0; i < 250; i++) { Attributes testAttributes = Attributes.builder() - .put(BIGTABLE_PROJECT_ID_KEY, projectId) - .put(INSTANCE_ID_KEY, instanceId) - .put(TABLE_ID_KEY, tableId + i) - .put(CLUSTER_ID_KEY, cluster) - .put(ZONE_ID_KEY, zone) - .put(APP_PROFILE_KEY, appProfileId) + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, projectId) + .put(TableSchema.INSTANCE_ID_KEY, instanceId) + .put(TableSchema.TABLE_ID_KEY, tableId + i) + .put(TableSchema.CLUSTER_ID_KEY, cluster) + .put(TableSchema.ZONE_ID_KEY, zone) + .put(MetricLabels.APP_PROFILE_KEY, appProfileId) .build(); LongPointData longPointData = ImmutableLongPointData.create(startEpoch, endEpoch, testAttributes, i); @@ -280,35 +318,35 @@ public void testExportingSumDataInBatches() { assertThat(timeSeries.getResource().getLabelsMap()) .containsExactly( - BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, - INSTANCE_ID_KEY.getKey(), instanceId, - TABLE_ID_KEY.getKey(), tableId + i, - CLUSTER_ID_KEY.getKey(), cluster, - ZONE_ID_KEY.getKey(), zone); + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), projectId, + TableSchema.INSTANCE_ID_KEY.getKey(), instanceId, + TableSchema.TABLE_ID_KEY.getKey(), tableId + i, + TableSchema.CLUSTER_ID_KEY.getKey(), cluster, + TableSchema.ZONE_ID_KEY.getKey(), zone); assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); assertThat(timeSeries.getMetric().getLabelsMap()) - .containsAtLeast(APP_PROFILE_KEY.getKey(), appProfileId, CLIENT_UID_KEY.getKey(), taskId); + .containsAtLeast( + MetricLabels.APP_PROFILE_KEY.getKey(), + appProfileId, + MetricLabels.CLIENT_UID.getKey(), + taskId); assertThat(timeSeries.getPoints(0).getValue().getInt64Value()).isEqualTo(i); - assertThat(timeSeries.getPoints(0).getInterval().getStartTime().getNanos()) + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getStartTime())) .isEqualTo(startEpoch); - assertThat(timeSeries.getPoints(0).getInterval().getEndTime().getNanos()).isEqualTo(endEpoch); + assertThat(Timestamps.toNanos(timeSeries.getPoints(0).getInterval().getEndTime())) + .isEqualTo(endEpoch); } } @Test public void testTimeSeriesForMetricWithGceOrGkeResource() { - String gceProjectId = "fake-gce-project"; BigtableCloudMonitoringExporter exporter = new BigtableCloudMonitoringExporter( - projectId, - fakeMetricServiceClient, - MonitoredResource.newBuilder() - .setType("gce-instance") - .putLabels("some-gce-key", "some-gce-value") - .putLabels("project_id", gceProjectId) - .build(), - taskId); + new MetricRegistry(), + Suppliers.ofInstance(envInfo), + clientInfo, + fakeMetricServiceClient); ArgumentCaptor argumentCaptor = ArgumentCaptor.forClass(CreateTimeSeriesRequest.class); @@ -324,13 +362,13 @@ public void testTimeSeriesForMetricWithGceOrGkeResource() { startEpoch, endEpoch, Attributes.of( - BIGTABLE_PROJECT_ID_KEY, + ClientSchema.BIGTABLE_PROJECT_ID_KEY, projectId, - INSTANCE_ID_KEY, + ClientSchema.INSTANCE_ID_KEY, instanceId, - APP_PROFILE_KEY, + ClientSchema.APP_PROFILE_KEY, appProfileId, - CLIENT_NAME_KEY, + ClientSchema.CLIENT_NAME, clientName), 3d, true, @@ -354,27 +392,145 @@ public void testTimeSeriesForMetricWithGceOrGkeResource() { CreateTimeSeriesRequest request = argumentCaptor.getValue(); - assertThat(request.getName()).isEqualTo("projects/" + gceProjectId); + assertThat(request.getName()).isEqualTo("projects/" + projectId); assertThat(request.getTimeSeriesList()).hasSize(1); com.google.monitoring.v3.TimeSeries timeSeries = request.getTimeSeriesList().get(0); assertThat(timeSeries.getResource().getLabelsMap()) - .containsExactly("some-gce-key", "some-gce-value", "project_id", gceProjectId); + .isEqualTo( + ImmutableMap.builder() + .put("project_id", projectId) + .put("instance", instanceId) + .put("app_profile", appProfileId) + .put("client_project", "client-project") + .put("region", "cleint-region") + .put("cloud_platform", "gce_instance") + .put("host_id", "1234567890") + .put("host_name", "harold") + .put("client_name", clientName) + .put("uuid", taskId) + .build()); - assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(5); assertThat(timeSeries.getMetric().getLabelsMap()) - .containsAtLeast( - BIGTABLE_PROJECT_ID_KEY.getKey(), - projectId, - INSTANCE_ID_KEY.getKey(), - instanceId, - APP_PROFILE_KEY.getKey(), - appProfileId, - CLIENT_NAME_KEY.getKey(), - clientName, - CLIENT_UID_KEY.getKey(), - taskId); + .isEqualTo( + ImmutableMap.builder() + .put(ClientSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), projectId) + .put(ClientSchema.INSTANCE_ID_KEY.getKey(), instanceId) + .put(ClientSchema.APP_PROFILE_KEY.getKey(), appProfileId) + .put(ClientSchema.CLIENT_NAME.getKey(), clientName) + .put(MetricLabels.CLIENT_UID.getKey(), taskId) + .build()); + } + + @Test + public void testExportingToMultipleProjects() { + ArgumentCaptor argumentCaptor = + ArgumentCaptor.forClass(CreateTimeSeriesRequest.class); + + UnaryCallable mockCallable = mock(UnaryCallable.class); + when(mockMetricServiceStub.createServiceTimeSeriesCallable()).thenReturn(mockCallable); + ApiFuture future = ApiFutures.immediateFuture(Empty.getDefaultInstance()); + when(mockCallable.futureCall(any())).thenReturn(future); + + long startEpoch = 10; + long endEpoch = 15; + HistogramPointData histogramPointData1 = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + attributes, + 3d, + true, + 1d, // min + true, + 2d, // max + Arrays.asList(1.0), + Arrays.asList(1L, 2L)); + + MetricData histogramData1 = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/operation_latencies", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData1))); + + HistogramPointData histogramPointData2 = + ImmutableHistogramPointData.create( + startEpoch, + endEpoch, + attributes.toBuilder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, "another-project") + .build(), + 50d, + true, + 5d, // min + true, + 30d, // max + Arrays.asList(1.0), + Arrays.asList(5L, 10L)); + + MetricData histogramData2 = + ImmutableMetricData.createDoubleHistogram( + resource, + scope, + "bigtable.googleapis.com/internal/client/operation_latencies", + "description", + "ms", + ImmutableHistogramData.create( + AggregationTemporality.CUMULATIVE, ImmutableList.of(histogramPointData2))); + + exporter.export(Arrays.asList(histogramData1, histogramData2)); + + verify(mockCallable, times(2)).futureCall(argumentCaptor.capture()); + + List allValues = argumentCaptor.getAllValues(); + + assertThat(allValues).hasSize(2); + + List> labelsMap = new ArrayList<>(); + List counts = new ArrayList<>(); + allValues.forEach( + value -> { + labelsMap.add(value.getTimeSeriesList().get(0).getResource().getLabelsMap()); + counts.add( + value + .getTimeSeriesList() + .get(0) + .getPoints(0) + .getValue() + .getDistributionValue() + .getCount()); + }); + + assertThat(labelsMap) + .containsExactly( + ImmutableMap.of( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), + projectId, + TableSchema.INSTANCE_ID_KEY.getKey(), + instanceId, + TableSchema.TABLE_ID_KEY.getKey(), + tableId, + TableSchema.CLUSTER_ID_KEY.getKey(), + cluster, + TableSchema.ZONE_ID_KEY.getKey(), + zone), + ImmutableMap.of( + TableSchema.BIGTABLE_PROJECT_ID_KEY.getKey(), + "another-project", + TableSchema.INSTANCE_ID_KEY.getKey(), + instanceId, + TableSchema.TABLE_ID_KEY.getKey(), + tableId, + TableSchema.CLUSTER_ID_KEY.getKey(), + cluster, + TableSchema.ZONE_ID_KEY.getKey(), + zone)); + assertThat(counts).containsExactly(3l, 15l); } private static class FakeMetricServiceClient extends MetricServiceClient { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/BigtableTracerCallableTest.java similarity index 91% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/BigtableTracerCallableTest.java index a12dd3cfbd..0a19733b6c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/BigtableTracerCallableTest.java @@ -13,12 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.fail; -import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.UnavailableException; import com.google.bigtable.v2.BigtableGrpc.BigtableImplBase; @@ -44,7 +43,9 @@ import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.SampleRowKeysRequest; import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.BigtableClientContext; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.common.collect.ImmutableMap; import io.grpc.ForwardingServerCall.SimpleForwardingServerCall; import io.grpc.Metadata; @@ -72,7 +73,7 @@ public class BigtableTracerCallableTest { private Server server; private Server serverNoHeader; - private FakeService fakeService = new FakeService(); + private final FakeService fakeService = new FakeService(); private final StatsComponent localStats = new SimpleStatsComponent(); private EnhancedBigtableStub stub; @@ -82,7 +83,7 @@ public class BigtableTracerCallableTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; private static final String APP_PROFILE_ID = "default"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final long WAIT_FOR_METRICS_TIME_MS = 1_000; @@ -90,7 +91,7 @@ public class BigtableTracerCallableTest { @Before public void setUp() throws Exception { - RpcViews.registerBigtableClientGfeViews(localStats.getViewManager()); + setupRpcViews(); // Create a server that'll inject a server-timing header with a random number and a stub that // connects to this server. @@ -124,22 +125,17 @@ public void sendHeaders(Metadata headers) { .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) + // only testing opencensus + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build(); - ClientContext clientContext = - EnhancedBigtableStub.createClientContext(settings.getStubSettings()); - clientContext = - clientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), - Tags.getTagger(), - localStats.getStatsRecorder(), - null)) - .build(); attempts = settings.getStubSettings().readRowsSettings().getRetrySettings().getMaxAttempts(); - stub = new EnhancedBigtableStub(settings.getStubSettings(), clientContext); + stub = + new EnhancedBigtableStub( + settings.getStubSettings().getPerOpSettings(), + BigtableClientContext.create( + settings.getStubSettings(), Tags.getTagger(), localStats.getStatsRecorder())); // Create another server without injecting the server-timing header and another stub that // connects to it. @@ -150,22 +146,23 @@ public void sendHeaders(Metadata headers) { .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build(); - ClientContext noHeaderClientContext = - EnhancedBigtableStub.createClientContext(noHeaderSettings.getStubSettings()); - noHeaderClientContext = - noHeaderClientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - noHeaderSettings.getStubSettings(), - Tags.getTagger(), - localStats.getStatsRecorder(), - null)) - .build(); noHeaderStub = - new EnhancedBigtableStub(noHeaderSettings.getStubSettings(), noHeaderClientContext); + new EnhancedBigtableStub( + noHeaderSettings.getStubSettings().getPerOpSettings(), + BigtableClientContext.create( + noHeaderSettings.getStubSettings(), + Tags.getTagger(), + localStats.getStatsRecorder())); + } + + @SuppressWarnings("deprecation") + private void setupRpcViews() { + com.google.cloud.bigtable.data.v2.stub.metrics.RpcViews.registerBigtableClientGfeViews( + localStats.getViewManager()); } @After @@ -240,7 +237,7 @@ public void testGFELatencyMetricMutateRows() throws InterruptedException { @Test public void testGFELatencySampleRowKeys() throws InterruptedException { - stub.sampleRowKeysCallable().call(TABLE_ID); + stub.sampleRowKeysCallableWithRequest().call(SampleRowKeysRequest.create(TABLE_ID)); Thread.sleep(WAIT_FOR_METRICS_TIME_MS); long latency = @@ -258,7 +255,7 @@ public void testGFELatencySampleRowKeys() throws InterruptedException { @Test public void testGFELatencySampleRowKeysWithRequest() throws InterruptedException { - stub.sampleRowKeysCallableWithRequest().call(SampleRowKeysRequest.create(TableId.of(TABLE_ID))); + stub.sampleRowKeysCallableWithRequest().call(SampleRowKeysRequest.create(TABLE_ID)); Thread.sleep(WAIT_FOR_METRICS_TIME_MS); long latency = @@ -397,7 +394,7 @@ public void testGFEMissingHeaderMetric() throws InterruptedException { @Test public void testMetricsWithErrorResponse() throws InterruptedException { try { - stub.readRowsCallable().call(Query.create("random-table-id")).iterator().next(); + stub.readRowsCallable().call(Query.create(TableId.of("random-table-id"))).iterator().next(); fail("readrows should throw exception"); } catch (Exception e) { assertThat(e).isInstanceOf(UnavailableException.class); @@ -419,9 +416,9 @@ public void testMetricsWithErrorResponse() throws InterruptedException { assertThat(missingCount).isEqualTo(attempts); } - private class FakeService extends BigtableImplBase { + private static class FakeService extends BigtableImplBase { private final String defaultTableName = - NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID); + NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID.getTableId()); @Override public void readRows(ReadRowsRequest request, StreamObserver observer) { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerTest.java similarity index 72% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerTest.java index d72eac4056..4472c433f7 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/MetricsTracerTest.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.when; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.batching.BatcherImpl; import com.google.api.gax.batching.FlowController; import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ClientContext; import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; @@ -38,7 +38,10 @@ import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.BigtableClientContext; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor; import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableMap; @@ -56,6 +59,7 @@ import io.opencensus.tags.TagKey; import io.opencensus.tags.TagValue; import io.opencensus.tags.Tags; +import java.util.ArrayList; import java.util.Iterator; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -71,17 +75,17 @@ import org.mockito.Answers; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import org.mockito.stubbing.Answer; @RunWith(JUnit4.class) +@Deprecated public class MetricsTracerTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; private static final String APP_PROFILE_ID = "default"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final long SLEEP_VARIABILITY = 15; private static final ReadRowsResponse DEFAULT_READ_ROWS_RESPONSES = @@ -111,28 +115,25 @@ public class MetricsTracerTest { public void setUp() throws Exception { server = FakeServiceBuilder.create(mockService).start(); - RpcViews.registerBigtableClientViews(localStats.getViewManager()); + com.google.cloud.bigtable.data.v2.stub.metrics.RpcViews.registerBigtableClientViews( + localStats.getViewManager()); settings = BigtableDataSettings.newBuilderForEmulator(server.getPort()) .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build(); - ClientContext clientContext = - EnhancedBigtableStub.createClientContext(settings.getStubSettings()); - clientContext = - clientContext - .toBuilder() - .setTracerFactory( - EnhancedBigtableStub.createBigtableTracerFactory( - settings.getStubSettings(), - Tags.getTagger(), - localStats.getStatsRecorder(), - null)) - .build(); - stub = new EnhancedBigtableStub(settings.getStubSettings(), clientContext); + BigtableClientContext bigtableClientContext = + BigtableClientContext.create( + settings.getStubSettings(), Tags.getTagger(), localStats.getStatsRecorder()); + + stub = + new EnhancedBigtableStub( + settings.getStubSettings().getPerOpSettings(), bigtableClientContext); } @After @@ -146,23 +147,23 @@ public void testReadRowsLatency() throws InterruptedException { final long sleepTime = 50; doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - Thread.sleep(sleepTime); - observer.onNext(DEFAULT_READ_ROWS_RESPONSES); - observer.onCompleted(); - return null; - } - }) + (Answer) + invocation -> { + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; + Thread.sleep(sleepTime); + observer.onNext(DEFAULT_READ_ROWS_RESPONSES); + observer.onCompleted(); + return null; + }) .when(mockService) .readRows(any(ReadRowsRequest.class), any()); Stopwatch stopwatch = Stopwatch.createStarted(); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); long opLatency = @@ -181,22 +182,27 @@ public Object answer(InvocationOnMock invocation) throws Throwable { @Test public void testReadRowsOpCount() throws InterruptedException { doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) { - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - observer.onNext(DEFAULT_READ_ROWS_RESPONSES); - observer.onCompleted(); - return null; - } + invocation -> { + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; + observer.onNext(DEFAULT_READ_ROWS_RESPONSES); + observer.onCompleted(); + return null; }) .when(mockService) .readRows(any(ReadRowsRequest.class), any()); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings({"UnusedVariable", "MismatchedQueryAndUpdateOfCollection"}) + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings({ + "UnusedVariable", + "MismatchedQueryAndUpdateOfCollection", + "ModifiedButNotUsed" + }) + ArrayList ignored2 = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); long opLatency = StatsTestUtils.getAggregationValueAsLong( @@ -212,6 +218,7 @@ public Object answer(InvocationOnMock invocation) { } @Test + @SuppressWarnings("FutureReturnValueIgnored") public void testReadRowsFirstRow() throws InterruptedException { final long beforeSleep = 50; final long afterSleep = 50; @@ -271,29 +278,28 @@ public void testReadRowsAttemptsPerOp() throws InterruptedException { final AtomicInteger callCount = new AtomicInteger(0); doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) { - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - - // First call will trigger a transient error - if (callCount.getAndIncrement() == 0) { - observer.onError(new StatusRuntimeException(Status.UNAVAILABLE)); - return null; - } + invocation -> { + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; - // Next attempt will return a row - observer.onNext(DEFAULT_READ_ROWS_RESPONSES); - observer.onCompleted(); + // First call will trigger a transient error + if (callCount.getAndIncrement() == 0) { + observer.onError(new StatusRuntimeException(Status.UNAVAILABLE)); return null; } + + // Next attempt will return a row + observer.onNext(DEFAULT_READ_ROWS_RESPONSES); + observer.onCompleted(); + return null; }) .when(mockService) .readRows(any(ReadRowsRequest.class), any()); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); long opLatency = StatsTestUtils.getAggregationValueAsLong( @@ -314,31 +320,30 @@ public void testReadRowsAttemptLatency() throws InterruptedException { final AtomicInteger callCount = new AtomicInteger(0); doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) throws Throwable { - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - - Thread.sleep(sleepTime); - - // First attempt will return a transient error - if (callCount.getAndIncrement() == 0) { - observer.onError(new StatusRuntimeException(Status.UNAVAILABLE)); - return null; - } - // Next attempt will be ok - observer.onNext(DEFAULT_READ_ROWS_RESPONSES); - observer.onCompleted(); + invocation -> { + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; + + Thread.sleep(sleepTime); + + // First attempt will return a transient error + if (callCount.getAndIncrement() == 0) { + observer.onError(new StatusRuntimeException(Status.UNAVAILABLE)); return null; } + // Next attempt will be ok + observer.onNext(DEFAULT_READ_ROWS_RESPONSES); + observer.onCompleted(); + return null; }) .when(mockService) .readRows(any(ReadRowsRequest.class), any()); Stopwatch stopwatch = Stopwatch.createStarted(); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); long attemptLatency = @@ -380,23 +385,20 @@ public void testInvalidRequest() { @Test public void testBatchReadRowsThrottledTime() throws Exception { doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) { - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - observer.onNext(DEFAULT_READ_ROWS_RESPONSES); - observer.onCompleted(); - return null; - } + invocation -> { + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; + observer.onNext(DEFAULT_READ_ROWS_RESPONSES); + observer.onCompleted(); + return null; }) .when(mockService) .readRows(any(ReadRowsRequest.class), any()); try (Batcher batcher = stub.newBulkReadRowsBatcher(Query.create(TABLE_ID), GrpcCallContext.createDefault())) { - batcher.add(ByteString.copyFromUtf8("row1")); + ApiFuture ignored = batcher.add(ByteString.copyFromUtf8("row1")); } long throttledTimeMetric = @@ -428,21 +430,18 @@ public void testBatchMutateRowsThrottledTime() throws Exception { when(flowController.getMaxRequestBytesLimit()).thenReturn(null); doAnswer( - new Answer() { - @Override - public Object answer(InvocationOnMock invocation) { - MutateRowsRequest request = (MutateRowsRequest) invocation.getArguments()[0]; - @SuppressWarnings("unchecked") - StreamObserver observer = - (StreamObserver) invocation.getArguments()[1]; - MutateRowsResponse.Builder builder = MutateRowsResponse.newBuilder(); - for (int i = 0; i < request.getEntriesCount(); i++) { - builder.addEntriesBuilder().setIndex(i); - } - observer.onNext(builder.build()); - observer.onCompleted(); - return null; + invocation -> { + MutateRowsRequest request = (MutateRowsRequest) invocation.getArguments()[0]; + @SuppressWarnings("unchecked") + StreamObserver observer = + (StreamObserver) invocation.getArguments()[1]; + MutateRowsResponse.Builder builder = MutateRowsResponse.newBuilder(); + for (int i = 0; i < request.getEntriesCount(); i++) { + builder.addEntriesBuilder().setIndex(i); } + observer.onNext(builder.build()); + observer.onCompleted(); + return null; }) .when(mockService) .mutateRows(any(MutateRowsRequest.class), any()); @@ -459,7 +458,7 @@ public Object answer(InvocationOnMock invocation) { flowController, defaultContext)) { - batcher.add(RowMutationEntry.create("key").deleteRow()); + ApiFuture ignored = batcher.add(RowMutationEntry.create("key").deleteRow()); } long throttledTimeMetric = @@ -473,9 +472,4 @@ public Object answer(InvocationOnMock invocation) { APP_PROFILE_ID); assertThat(throttledTimeMetric).isAtLeast(throttled); } - - @SuppressWarnings("unchecked") - private static StreamObserver anyObserver(Class returnType) { - return (StreamObserver) any(returnType); - } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/SimpleStatsComponent.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/SimpleStatsComponent.java similarity index 93% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/SimpleStatsComponent.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/SimpleStatsComponent.java index 99aed9c3b4..bf867989d1 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/SimpleStatsComponent.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/SimpleStatsComponent.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import io.opencensus.implcore.common.MillisClock; import io.opencensus.implcore.internal.SimpleEventQueue; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsTestUtils.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/StatsTestUtils.java similarity index 99% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsTestUtils.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/StatsTestUtils.java index e808af8a84..db86a027fc 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsTestUtils.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/opencensus/StatsTestUtils.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.opencensus; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerTest.java new file mode 100644 index 0000000000..548a53600c --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/BuiltinMetricsTracerTest.java @@ -0,0 +1,1245 @@ +/* + * Copyright 2022 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.bigtable.data.v2.internal.csm.tracers; + +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.getAggregatedDoubleValue; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.getAggregatedValue; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.getMetricData; +import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.verifyAttributes; +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; +import static org.junit.Assert.assertThrows; + +import com.google.api.client.util.Lists; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.batching.Batcher; +import com.google.api.gax.batching.BatchingException; +import com.google.api.gax.batching.BatchingSettings; +import com.google.api.gax.batching.FlowControlSettings; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.NotFoundException; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.StreamController; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowResponse; +import com.google.bigtable.v2.MutateRowsRequest; +import com.google.bigtable.v2.MutateRowsResponse; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.ReadRowsResponse; +import com.google.bigtable.v2.ResponseParams; +import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientBatchWriteFlowControlFactor; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientBatchWriteFlowControlTargetQps; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableApplicationBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableClientBlockingLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableConnectivityErrorCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableFirstResponseLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableOperationLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRemainingDeadline; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableRetryCount; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableServerLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.ClientSchema; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; +import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.common.base.Stopwatch; +import com.google.common.collect.Comparators; +import com.google.common.collect.Range; +import com.google.protobuf.ByteString; +import com.google.protobuf.BytesValue; +import com.google.protobuf.StringValue; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ForwardingClientCall; +import io.grpc.ForwardingClientCallListener; +import io.grpc.ForwardingServerCall; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.ProxiedSocketAddress; +import io.grpc.ProxyDetector; +import io.grpc.Server; +import io.grpc.ServerCall; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import io.grpc.stub.ServerCallStreamObserver; +import io.grpc.stub.StreamObserver; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; +import io.opentelemetry.sdk.metrics.data.HistogramPointData; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; +import java.io.IOException; +import java.net.SocketAddress; +import java.nio.charset.Charset; +import java.time.Duration; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class BuiltinMetricsTracerTest { + private static final Metadata.Key LOCATION_METADATA_KEY = + Metadata.Key.of("x-goog-ext-425905942-bin", Metadata.BINARY_BYTE_MARSHALLER); + + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String APP_PROFILE_ID = "default"; + private static final TableId TABLE = TableId.of("fake-table"); + + private static final String BAD_TABLE_ID = "non-exist-table"; + private static final String FIRST_RESPONSE_TABLE_ID = "first-response"; + private static final String ZONE = "us-west-1"; + private static final String CLUSTER = "cluster-0"; + private static final long FAKE_SERVER_TIMING = 50; + private static final long SERVER_LATENCY = 100; + private static final long APPLICATION_LATENCY = 200; + private static final long SLEEP_VARIABILITY = 15; + private static final String CLIENT_NAME = "java-bigtable/" + Version.VERSION; + private static final Duration CHANNEL_BLOCKING_LATENCY = Duration.ofMillis(200); + + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + private final FakeService fakeService = new FakeService(); + private Server server; + + private OpenTelemetrySdk otel; + private EnhancedBigtableStub stub; + + private static final int batchElementCount = 2; + + private final ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .build(); + private final Attributes expectedBaseAttributes = + Attributes.builder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, PROJECT_ID) + .put(TableSchema.INSTANCE_ID_KEY, INSTANCE_ID) + .put(MetricLabels.APP_PROFILE_KEY, APP_PROFILE_ID) + .build(); + + private final Attributes expectedClientSchemaBaseAttributes = + Attributes.builder() + .put(TableSchema.BIGTABLE_PROJECT_ID_KEY, PROJECT_ID) + .put(TableSchema.INSTANCE_ID_KEY, INSTANCE_ID) + .put(MetricLabels.APP_PROFILE_KEY, APP_PROFILE_ID) + .put(MetricLabels.CLIENT_NAME, "java-bigtable/" + Version.VERSION) + .build(); + + private InMemoryMetricReader metricReader; + + private DelayProxyDetector delayProxyDetector; + + private final OutstandingRpcCounter outstandingRpcCounter = new OutstandingRpcCounter(); + + @Before + public void setUp() throws Exception { + metricReader = InMemoryMetricReader.create(); + + SdkMeterProviderBuilder meterProvider = + SdkMeterProvider.builder().registerMetricReader(metricReader); + + otel = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); + MetricRegistry mr = new MetricRegistry(); + + BuiltinMetricsTracerFactory facotry = + new BuiltinMetricsTracerFactory( + mr.newInternalRecorderRegistry(otel.getMeterProvider()), clientInfo); + + // Add an interceptor to add server-timing in headers + ServerInterceptor trailersInterceptor = + new ServerInterceptor() { + @Override + public ServerCall.Listener interceptCall( + ServerCall serverCall, + Metadata metadata, + ServerCallHandler serverCallHandler) { + return serverCallHandler.startCall( + new ForwardingServerCall.SimpleForwardingServerCall(serverCall) { + @Override + public void sendHeaders(Metadata headers) { + headers.put( + Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER), + String.format("gfet4t7; dur=%d", FAKE_SERVER_TIMING)); + + ResponseParams params = + ResponseParams.newBuilder().setZoneId(ZONE).setClusterId(CLUSTER).build(); + byte[] byteArray = params.toByteArray(); + headers.put(LOCATION_METADATA_KEY, byteArray); + + super.sendHeaders(headers); + } + }, + metadata); + } + }; + + server = FakeServiceBuilder.create(fakeService).intercept(trailersInterceptor).start(); + + BigtableDataSettings settings = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) + .setAppProfileId(APP_PROFILE_ID) + .build(); + EnhancedBigtableStubSettings.Builder stubSettingsBuilder = + settings.getStubSettings().toBuilder(); + stubSettingsBuilder + .mutateRowSettings() + .retrySettings() + .setInitialRetryDelayDuration(java.time.Duration.ofMillis(200)); + + stubSettingsBuilder + .readRowsSettings() + .retrySettings() + .setTotalTimeoutDuration(Duration.ofMillis(9000)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(9000)) + .setRpcTimeoutMultiplier(1) + .setInitialRpcTimeoutDuration(Duration.ofMillis(6000)) + .setInitialRetryDelayDuration(Duration.ofMillis(10)) + .setRetryDelayMultiplier(1) + .setMaxRetryDelayDuration(Duration.ofMillis(10)); + + stubSettingsBuilder + .bulkMutateRowsSettings() + .setServerInitiatedFlowControl(true) + .setBatchingSettings( + // Each batch has 2 mutations, batch has 1 in-flight request, disable auto flush by + // setting the delay to 1 hour. + BatchingSettings.newBuilder() + .setElementCountThreshold((long) batchElementCount) + .setRequestByteThreshold(1000L) + .setDelayThresholdDuration(java.time.Duration.ofHours(1)) + .setFlowControlSettings( + FlowControlSettings.newBuilder() + .setMaxOutstandingElementCount((long) batchElementCount + 1) + .setMaxOutstandingRequestBytes(1001L) + .build()) + .build()); + + stubSettingsBuilder.setTracerFactory(facotry); + + InstantiatingGrpcChannelProvider.Builder channelProvider = + ((InstantiatingGrpcChannelProvider) stubSettingsBuilder.getTransportChannelProvider()) + .toBuilder(); + + @SuppressWarnings("rawtypes") + final ApiFunction oldConfigurator = + channelProvider.getChannelConfigurator(); + + delayProxyDetector = new DelayProxyDetector(); + + channelProvider.setChannelConfigurator( + (builder) -> { + if (oldConfigurator != null) { + builder = oldConfigurator.apply(builder); + } + return builder.proxyDetector(delayProxyDetector).intercept(outstandingRpcCounter); + }); + stubSettingsBuilder.setTransportChannelProvider(channelProvider.build()); + stub = EnhancedBigtableStub.create(stubSettingsBuilder.build()); + } + + @After + public void tearDown() { + stub.close(); + server.shutdown(); + otel.close(); + } + + @Test + public void testReadRowsOperationLatencies() { + Stopwatch stopwatch = Stopwatch.createStarted(); + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE)).iterator()); + long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.STREAMING_KEY, true) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + MetricData metricData = getMetricData(metricReader, TableOperationLatency.NAME); + + long value = getAggregatedValue(metricData, expectedAttributes); + assertThat(value).isIn(Range.closed(SERVER_LATENCY, elapsed)); + } + + @Test + public void testReadRowsOperationLatenciesOnAuthorizedView() { + String authorizedViewId = "test-authorized-view-id"; + Stopwatch stopwatch = Stopwatch.createStarted(); + Lists.newArrayList( + stub.readRowsCallable().call(Query.create(AuthorizedViewId.of(TABLE, authorizedViewId)))); + long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.STREAMING_KEY, true) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + MetricData metricData = getMetricData(metricReader, TableOperationLatency.NAME); + long value = getAggregatedValue(metricData, expectedAttributes); + assertThat(value).isIn(Range.closed(SERVER_LATENCY, elapsed)); + } + + @Test + public void testFirstResponseLatencies() { + Stopwatch firstResponseTimer = Stopwatch.createStarted(); + stub.readRowsCallable() + .call( + Query.create(TableId.of(FIRST_RESPONSE_TABLE_ID)), + new ResponseObserver() { + @Override + public void onStart(StreamController controller) {} + + @Override + public void onResponse(Row response) { + // Server sends back 2 responses for this test + if (firstResponseTimer.isRunning()) { + firstResponseTimer.stop(); + } + try { + Thread.sleep(100); + } catch (InterruptedException ignored) { + // dont really care + } + } + + @Override + public void onError(Throwable t) {} + + @Override + public void onComplete() {} + }); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, FIRST_RESPONSE_TABLE_ID) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + MetricData metricData = getMetricData(metricReader, TableFirstResponseLatency.NAME); + + long value = getAggregatedValue(metricData, expectedAttributes); + assertThat(value).isAtMost(firstResponseTimer.elapsed(TimeUnit.MILLISECONDS)); + } + + @Test + public void testGfeMetrics() { + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE))); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.STREAMING_KEY, true) + .build(); + + MetricData serverLatenciesMetricData = getMetricData(metricReader, TableServerLatency.NAME); + + long serverLatencies = getAggregatedValue(serverLatenciesMetricData, expectedAttributes); + assertThat(serverLatencies).isEqualTo(FAKE_SERVER_TIMING); + + MetricData connectivityErrorCountMetricData = + getMetricData(metricReader, TableConnectivityErrorCount.NAME); + Attributes expected1 = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "UNAVAILABLE") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, "global") + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + Attributes expected2 = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + verifyAttributes(connectivityErrorCountMetricData, expected1); + verifyAttributes(connectivityErrorCountMetricData, expected2); + + assertThat(getAggregatedValue(connectivityErrorCountMetricData, expected1)).isEqualTo(1); + assertThat(getAggregatedValue(connectivityErrorCountMetricData, expected2)).isEqualTo(0); + } + + @Test + public void testReadRowsApplicationLatencyWithAutoFlowControl() throws Exception { + final SettableApiFuture future = SettableApiFuture.create(); + final AtomicInteger counter = new AtomicInteger(0); + // For auto flow control, application latency is the time application spent in onResponse. + stub.readRowsCallable() + .call( + Query.create(TABLE), + new ResponseObserver() { + @Override + public void onStart(StreamController streamController) {} + + @Override + public void onResponse(Row row) { + counter.getAndIncrement(); + try { + Thread.sleep(APPLICATION_LATENCY); + } catch (InterruptedException ignored) { + // dont really care + } + } + + @Override + public void onError(Throwable throwable) { + future.setException(throwable); + } + + @Override + public void onComplete() { + future.set(null); + } + }); + future.get(); + + assertThat(counter.get()).isEqualTo(fakeService.getResponseCounter().get()); + + MetricData applicationLatency = + getMetricData(metricReader, TableApplicationBlockingLatency.NAME); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .build(); + long value = getAggregatedValue(applicationLatency, expectedAttributes); + + assertThat(value).isAtLeast((APPLICATION_LATENCY - SLEEP_VARIABILITY) * counter.get()); + + MetricData operationLatency = getMetricData(metricReader, TableOperationLatency.NAME); + long operationLatencyValue = + getAggregatedValue( + operationLatency, + expectedAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(MetricLabels.STREAMING_KEY, true) + .build()); + assertThat(value).isAtMost(operationLatencyValue - SERVER_LATENCY); + } + + @Test + public void testReadRowsApplicationLatencyWithManualFlowControl() throws Exception { + int counter = 0; + + Iterator rows = stub.readRowsCallable().call(Query.create(TABLE)).iterator(); + while (rows.hasNext()) { + counter++; + Thread.sleep(APPLICATION_LATENCY); + rows.next(); + } + + MetricData applicationLatency = + getMetricData(metricReader, TableApplicationBlockingLatency.NAME); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .build(); + + long value = getAggregatedValue(applicationLatency, expectedAttributes); + // For manual flow control, the last application latency shouldn't count, because at that + // point the server already sent back all the responses. + assertThat(counter).isEqualTo(fakeService.getResponseCounter().get()); + assertThat(value).isAtLeast(APPLICATION_LATENCY * (counter - 1) - SERVER_LATENCY); + + MetricData operationLatency = getMetricData(metricReader, TableOperationLatency.NAME); + long operationLatencyValue = + getAggregatedValue( + operationLatency, + expectedAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(MetricLabels.STREAMING_KEY, true) + .build()); + assertThat(value).isAtMost(operationLatencyValue - SERVER_LATENCY); + } + + @Test + public void testRetryCount() throws InterruptedException { + stub.mutateRowCallable() + .call(RowMutation.create(TABLE, "random-row").setCell("cf", "q", "value")); + + MetricData metricData = getMetricData(metricReader, TableRetryCount.NAME); + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRow") + .put(MetricLabels.STATUS_KEY, "OK") + .build(); + + long value = getAggregatedValue(metricData, expectedAttributes); + assertThat(value).isEqualTo(fakeService.getAttemptCounter().get() - 1); + } + + @Test + public void testMutateRowAttemptsTagValues() throws InterruptedException { + stub.mutateRowCallable() + .call(RowMutation.create(TABLE, "random-row").setCell("cf", "q", "value")); + + outstandingRpcCounter.waitUntilRpcsDone(); + MetricData metricData = getMetricData(metricReader, TableAttemptLatency.NAME); + + Attributes expected1 = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "UNAVAILABLE") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, "global") + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRow") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, false) + .build(); + + Attributes expected2 = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRow") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, false) + .build(); + + verifyAttributes(metricData, expected1); + verifyAttributes(metricData, expected2); + } + + @Test + public void testMutateRowsPartialError() throws InterruptedException { + Batcher batcher = stub.newMutateRowsBatcher(TABLE, null); + int numMutations = 6; + for (int i = 0; i < numMutations; i++) { + String key = i % 2 == 0 ? "key" : "fail-key"; + ApiFuture ignored = batcher.add(RowMutationEntry.create(key).setCell("f", "q", "v")); + } + + assertThrows(BatchingException.class, batcher::close); + + MetricData metricData = getMetricData(metricReader, TableAttemptLatency.NAME); + + Attributes expected = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, false) + .build(); + + verifyAttributes(metricData, expected); + } + + @Test + public void testMutateRowsRpcError() { + Batcher batcher = + stub.newMutateRowsBatcher(TableId.of(BAD_TABLE_ID), null); + int numMutations = 6; + for (int i = 0; i < numMutations; i++) { + String key = i % 2 == 0 ? "key" : "fail-key"; + ApiFuture ignored = batcher.add(RowMutationEntry.create(key).setCell("f", "q", "v")); + } + + assertThrows(BatchingException.class, batcher::close); + + MetricData metricData = getMetricData(metricReader, TableAttemptLatency.NAME); + + Attributes expected = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "NOT_FOUND") + .put(TableSchema.TABLE_ID_KEY, BAD_TABLE_ID) + .put(TableSchema.ZONE_ID_KEY, "global") + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, false) + .build(); + + verifyAttributes(metricData, expected); + } + + @Test + public void testReadRowsAttemptsTagValues() { + Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE)).iterator()); + + MetricData metricData = getMetricData(metricReader, TableAttemptLatency.NAME); + + Attributes expected1 = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "UNAVAILABLE") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, "global") + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, true) + .build(); + + Attributes expected2 = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .put(MetricLabels.STREAMING_KEY, true) + .build(); + + verifyAttributes(metricData, expected1); + verifyAttributes(metricData, expected2); + } + + @Test + public void testBatchBlockingLatencies() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + for (int i = 0; i < 6; i++) { + ApiFuture ignored = + batcher.add(RowMutationEntry.create("key").setCell("f", "q", "v")); + } + + // closing the batcher to trigger the third flush + batcher.close(); + + int expectedNumRequests = 6 / batchElementCount; + + MetricData applicationLatency = getMetricData(metricReader, TableClientBlockingLatency.NAME); + + Attributes expectedAttributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + long value = getAggregatedValue(applicationLatency, expectedAttributes); + // After the first request is sent, batcher will block on add because of the server latency. + // Blocking latency should be around server latency. So each data point would be at least + // (SERVER_LATENCY - 10). + long expected = (SERVER_LATENCY - 10) * (expectedNumRequests - 1) / expectedNumRequests; + assertThat(value).isAtLeast(expected); + } + } + + @Test + public void testQueuedOnChannelServerStreamLatencies() throws Exception { + ApiFuture> f = stub.readRowsCallable().all().futureCall(Query.create(TABLE)); + Duration proxyDelayPriorTest = delayProxyDetector.getCurrentDelayUsed(); + f.get(); + + MetricData clientLatency = getMetricData(metricReader, TableClientBlockingLatency.NAME); + + Attributes attributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + assertThat(Duration.ofMillis(getAggregatedValue(clientLatency, attributes))) + .isAtLeast( + // Offset the expected latency to deal with asynchrony and jitter + CHANNEL_BLOCKING_LATENCY.minus( + Comparators.max(proxyDelayPriorTest, Duration.ofMillis(1)))); + } + + @Test + public void testQueuedOnChannelUnaryLatencies() throws Exception { + ApiFuture f = + stub.mutateRowCallable() + .futureCall(RowMutation.create(TABLE, "a-key").setCell("f", "q", "v")); + Duration proxyDelayPriorTest = delayProxyDetector.getCurrentDelayUsed(); + f.get(); + + outstandingRpcCounter.waitUntilRpcsDone(); + MetricData clientLatency = getMetricData(metricReader, TableClientBlockingLatency.NAME); + + Attributes attributes = + expectedBaseAttributes.toBuilder() + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRow") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + assertThat(Duration.ofMillis(getAggregatedValue(clientLatency, attributes))) + .isAtLeast( + // Offset the expected latency to deal with asynchrony and jitter + CHANNEL_BLOCKING_LATENCY.minus( + Comparators.max(proxyDelayPriorTest, Duration.ofMillis(1)))); + } + + @Test + public void testPermanentFailure() { + assertThrows( + NotFoundException.class, + () -> + Lists.newArrayList( + stub.readRowsCallable().call(Query.create(TableId.of(BAD_TABLE_ID))).iterator())); + + MetricData attemptLatency = getMetricData(metricReader, TableAttemptLatency.NAME); + + Attributes expected = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "NOT_FOUND") + .put(TableSchema.TABLE_ID_KEY, BAD_TABLE_ID) + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(TableSchema.ZONE_ID_KEY, "global") + .put(MetricLabels.STREAMING_KEY, true) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + + verifyAttributes(attemptLatency, expected); + + MetricData opLatency = getMetricData(metricReader, TableOperationLatency.NAME); + verifyAttributes(opLatency, expected); + } + + @Test + public void testRemainingDeadline() { + stub.readRowsCallable().all().call(Query.create(TABLE)); + MetricData deadlineMetric = getMetricData(metricReader, TableRemainingDeadline.NAME); + + Attributes retryAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "UNAVAILABLE") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(TableSchema.ZONE_ID_KEY, "global") + .put(TableSchema.CLUSTER_ID_KEY, "") + .put(MetricLabels.STREAMING_KEY, true) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + HistogramPointData retryHistogramPointData = + deadlineMetric.getHistogramData().getPoints().stream() + .filter(pd -> pd.getAttributes().equals(retryAttributes)) + .collect(Collectors.toList()) + .get(0); + + double retryRemainingDeadline = retryHistogramPointData.getSum(); + // The retry remaining deadline should be equivalent to the original timeout. + assertThat(retryRemainingDeadline).isEqualTo(9000); + + Attributes okAttributes = + expectedBaseAttributes.toBuilder() + .put(MetricLabels.STATUS_KEY, "OK") + .put(TableSchema.TABLE_ID_KEY, TABLE.getTableId()) + .put(TableSchema.ZONE_ID_KEY, ZONE) + .put(TableSchema.CLUSTER_ID_KEY, CLUSTER) + .put(MetricLabels.METHOD_KEY, "Bigtable.ReadRows") + .put(MetricLabels.STREAMING_KEY, true) + .put(MetricLabels.CLIENT_NAME, CLIENT_NAME) + .build(); + HistogramPointData okHistogramPointData = + deadlineMetric.getHistogramData().getPoints().stream() + .filter(pd -> pd.getAttributes().equals(okAttributes)) + .collect(Collectors.toList()) + .get(0); + + double okRemainingDeadline = okHistogramPointData.getSum(); + // first attempt latency + retry delay + double expected = 9000 - SERVER_LATENCY - CHANNEL_BLOCKING_LATENCY.toMillis() - 10; + assertThat(okRemainingDeadline).isIn(Range.closed(expected - 500, expected + 10)); + } + + @Test + public void testBatchWriteFlowControlTargetQpsIncreased() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("batch-write-flow-control-success-12") + .setCell("f", "q", "v")); + + // closing the batcher to trigger the flush + batcher.close(); + + MetricData targetQpsMetric = + getMetricData(metricReader, ClientBatchWriteFlowControlTargetQps.NAME); + Attributes targetQpsAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .build(); + double actual_qps = getAggregatedDoubleValue(targetQpsMetric, targetQpsAttributes); + double expected_qps = 12; + assertThat(actual_qps).isEqualTo(expected_qps); + + MetricData factorMetric = getMetricData(metricReader, ClientBatchWriteFlowControlFactor.NAME); + Attributes factorAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(ClientSchema.CLIENT_NAME, "java-bigtable/" + Version.VERSION) + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.APPLIED_KEY, true) + .put(MetricLabels.STATUS_KEY, "OK") + .build(); + double actual_factor_mean = getAggregatedDoubleValue(factorMetric, factorAttributes); + double expected_factor_mean = 1.2; + assertThat(actual_factor_mean).isEqualTo(expected_factor_mean); + } + } + + @Test + public void testBatchWriteFlowControlTargetQpsDecreased() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("batch-write-flow-control-success-08") + .setCell("f", "q", "v")); + + // closing the batcher to trigger the flush + batcher.close(); + + MetricData targetQpsMetric = + getMetricData(metricReader, ClientBatchWriteFlowControlTargetQps.NAME); + Attributes targetQpsAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .build(); + double actual_qps = getAggregatedDoubleValue(targetQpsMetric, targetQpsAttributes); + double expected_qps = 8.0; + assertThat(actual_qps).isEqualTo(expected_qps); + + MetricData factorMetric = getMetricData(metricReader, ClientBatchWriteFlowControlFactor.NAME); + Attributes factorAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.APPLIED_KEY, true) + .put(MetricLabels.STATUS_KEY, "OK") + .build(); + double actual_factor_mean = getAggregatedDoubleValue(factorMetric, factorAttributes); + double expected_factor_mean = 0.8; + assertThat(actual_factor_mean).isEqualTo(expected_factor_mean); + } + } + + @Test + public void testBatchWriteFlowControlTargetQpsCappedOnMaxFactor() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("batch-write-flow-control-success-18") + .setCell("f", "q", "v")); + + // closing the batcher to trigger the flush + batcher.close(); + + MetricData targetQpsMetric = + getMetricData(metricReader, ClientBatchWriteFlowControlTargetQps.NAME); + Attributes targetQpsAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .build(); + double actual_qps = getAggregatedDoubleValue(targetQpsMetric, targetQpsAttributes); + // Factor is 1.8 but capped at 1.3 so updated QPS is 13. + double expected_qps = 13; + assertThat(actual_qps).isEqualTo(expected_qps); + + MetricData factorMetric = getMetricData(metricReader, ClientBatchWriteFlowControlFactor.NAME); + Attributes factorAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.APPLIED_KEY, true) + .put(MetricLabels.STATUS_KEY, "OK") + .build(); + double actual_factor_mean = getAggregatedDoubleValue(factorMetric, factorAttributes); + // Factor is 1.8 but capped at 1.3 + double expected_factor_mean = 1.3; + assertThat(actual_factor_mean).isEqualTo(expected_factor_mean); + } + } + + @Test + public void testBatchWriteFlowControlTargetQpsCappedOnMinFactor() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("batch-write-flow-control-success-05") + .setCell("f", "q", "v")); + + // closing the batcher to trigger the flush + batcher.close(); + + MetricData targetQpsMetric = + getMetricData(metricReader, ClientBatchWriteFlowControlTargetQps.NAME); + Attributes targetQpsAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .build(); + double actual_qps = getAggregatedDoubleValue(targetQpsMetric, targetQpsAttributes); + // Factor is 0.5 but capped at 0.7 so updated QPS is 7. + double expected_qps = 7; + assertThat(actual_qps).isEqualTo(expected_qps); + + MetricData factorMetric = getMetricData(metricReader, ClientBatchWriteFlowControlFactor.NAME); + Attributes factorAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.APPLIED_KEY, true) + .put(MetricLabels.STATUS_KEY, "OK") + .build(); + double actual_factor_mean = getAggregatedDoubleValue(factorMetric, factorAttributes); + // Factor is 0.5 but capped at 0.7 + double expected_factor_mean = 0.7; + assertThat(actual_factor_mean).isEqualTo(expected_factor_mean); + } + } + + @Test + public void testBatchWriteFlowControlTargetQpsDecreasedForError() throws InterruptedException { + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { + ApiFuture ignored = + batcher.add( + RowMutationEntry.create("batch-write-flow-control-fail-unavailable") + .setCell("f", "q", "v")); + + // closing the batcher to trigger the flush + batcher.close(); + + MetricData targetQpsMetric = + getMetricData(metricReader, ClientBatchWriteFlowControlTargetQps.NAME); + Attributes targetQpsAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .build(); + double actual_qps = getAggregatedDoubleValue(targetQpsMetric, targetQpsAttributes); + // On error, min factor is applied. + double expected_qps = 7; + assertThat(actual_qps).isEqualTo(expected_qps); + + MetricData factorMetric = getMetricData(metricReader, ClientBatchWriteFlowControlFactor.NAME); + Attributes factorAttributes = + expectedClientSchemaBaseAttributes.toBuilder() + .put(MetricLabels.METHOD_KEY, "Bigtable.MutateRows") + .put(MetricLabels.APPLIED_KEY, true) + .put(MetricLabels.STATUS_KEY, "UNAVAILABLE") + .build(); + double actual_factor_mean = getAggregatedDoubleValue(factorMetric, factorAttributes); + // On error, min factor is applied. + double expected_factor_mean = 0.7; + assertThat(actual_factor_mean).isEqualTo(expected_factor_mean); + } + } + + private static class FakeService extends BigtableGrpc.BigtableImplBase { + + static List createFakeResponse() { + List responses = new ArrayList<>(); + for (int i = 0; i < 4; i++) { + responses.add( + ReadRowsResponse.newBuilder() + .addChunks( + ReadRowsResponse.CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("fake-key-" + i)) + .setFamilyName(StringValue.of("cf")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("q"))) + .setTimestampMicros(1_000) + .setValue( + ByteString.copyFromUtf8( + String.join("", Collections.nCopies(1024 * 1024, "A")))) + .setCommitRow(true)) + .build()); + } + return responses; + } + + private final AtomicInteger attemptCounter = new AtomicInteger(0); + private final AtomicInteger responseCounter = new AtomicInteger(0); + private final Iterator source = createFakeResponse().listIterator(); + + @Override + public void readRows( + ReadRowsRequest request, StreamObserver responseObserver) { + if (request.getTableName().contains(FIRST_RESPONSE_TABLE_ID)) { + responseObserver.onNext(source.next()); + responseObserver.onNext(source.next()); + responseObserver.onCompleted(); + return; + } + if (request.getTableName().contains(BAD_TABLE_ID)) { + responseObserver.onError(new StatusRuntimeException(Status.NOT_FOUND)); + return; + } + final AtomicBoolean done = new AtomicBoolean(); + final ServerCallStreamObserver target = + (ServerCallStreamObserver) responseObserver; + try { + Thread.sleep(SERVER_LATENCY); + } catch (InterruptedException ignored) { + // dont care + } + if (attemptCounter.getAndIncrement() == 0) { + target.onError(new StatusRuntimeException(Status.UNAVAILABLE)); + return; + } + + // Only return the next response when the buffer is emptied for testing manual flow control. + // The fake service won't keep calling onNext unless it received an onRequest event from + // the application thread + target.setOnReadyHandler( + () -> { + while (target.isReady() && source.hasNext()) { + responseCounter.getAndIncrement(); + target.onNext(source.next()); + } + if (!source.hasNext() && done.compareAndSet(false, true)) { + target.onCompleted(); + } + }); + } + + @Override + public void mutateRow( + MutateRowRequest request, StreamObserver responseObserver) { + if (attemptCounter.getAndIncrement() < 2) { + responseObserver.onError(new StatusRuntimeException(Status.UNAVAILABLE)); + return; + } + responseObserver.onNext(MutateRowResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + @Override + public void mutateRows( + MutateRowsRequest request, StreamObserver responseObserver) { + if (request.getTableName().contains(BAD_TABLE_ID)) { + responseObserver.onError(new StatusRuntimeException(Status.NOT_FOUND)); + return; + } + try { + Thread.sleep(SERVER_LATENCY); + } catch (InterruptedException ignored) { + // dont care + } + MutateRowsResponse.Builder builder = MutateRowsResponse.newBuilder(); + String receivedRowkey = ""; + for (int i = 0; i < request.getEntriesCount(); i++) { + receivedRowkey = + request.getEntries(i).getRowKey().toString(Charset.availableCharsets().get("UTF-8")); + if (request + .getEntries(i) + .getRowKey() + .toString(Charset.availableCharsets().get("UTF-8")) + .startsWith("fail")) { + builder + .addEntriesBuilder() + .setIndex(i) + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(com.google.rpc.Code.PERMISSION_DENIED_VALUE) + .build()); + continue; + } + builder.addEntriesBuilder().setIndex(i); + } + + // Add RateLimitInfo for Batch Write Flow Control + com.google.protobuf.Duration duration = + builder.getRateLimitInfoBuilder().getPeriodBuilder().setSeconds(10).build(); + if (receivedRowkey.equals("batch-write-flow-control-success-18")) { + builder.setRateLimitInfo( + builder.getRateLimitInfoBuilder().setFactor(1.8).setPeriod(duration).build()); + } else if (receivedRowkey.equals("batch-write-flow-control-success-12")) { + builder.setRateLimitInfo( + builder.getRateLimitInfoBuilder().setFactor(1.2).setPeriod(duration).build()); + } else if (receivedRowkey.equals("batch-write-flow-control-success-08")) { + builder.setRateLimitInfo( + builder.getRateLimitInfoBuilder().setFactor(0.8).setPeriod(duration).build()); + } else if (receivedRowkey.equals("batch-write-flow-control-success-05")) { + builder.setRateLimitInfo( + builder.getRateLimitInfoBuilder().setFactor(0.5).setPeriod(duration).build()); + } else if (receivedRowkey.equals("batch-write-flow-control-fail-unavailable")) { + if (getAttemptCounter().get() > 0) { + responseObserver.onNext(builder.build()); + responseObserver.onCompleted(); + return; + } + getAttemptCounter().incrementAndGet(); + responseObserver.onError(new StatusRuntimeException(Status.UNAVAILABLE)); + return; + } + + responseObserver.onNext(builder.build()); + responseObserver.onCompleted(); + } + + public AtomicInteger getAttemptCounter() { + return attemptCounter; + } + + public AtomicInteger getResponseCounter() { + return responseCounter; + } + } + + static class OutstandingRpcCounter implements ClientInterceptor { + private int numOutstandingRpcs = 0; + private final Object lock = new Object(); + + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + synchronized (lock) { + numOutstandingRpcs++; + } + return new ForwardingClientCall.SimpleForwardingClientCall( + channel.newCall(methodDescriptor, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + super.start( + new ForwardingClientCallListener.SimpleForwardingClientCallListener( + responseListener) { + @Override + public void onClose(Status status, Metadata trailers) { + super.onClose(status, trailers); + synchronized (lock) { + numOutstandingRpcs--; + lock.notify(); + } + } + }, + headers); + } + }; + } + + void waitUntilRpcsDone() throws InterruptedException { + synchronized (lock) { + while (numOutstandingRpcs > 0) { + lock.wait(); + } + } + } + } + + static class DelayProxyDetector implements ProxyDetector { + private volatile Instant lastProxyDelay = null; + + @Nullable + @Override + public ProxiedSocketAddress proxyFor(SocketAddress socketAddress) throws IOException { + lastProxyDelay = Instant.now(); + try { + Thread.sleep(CHANNEL_BLOCKING_LATENCY.toMillis()); + } catch (InterruptedException ignored) { + // dont care + } + return null; + } + + Duration getCurrentDelayUsed() { + Instant local = lastProxyDelay; + // If the delay was never injected - add 1 ms for channel establishment + if (local == null) { + return Duration.ofMillis(1); + } + Duration duration = + Duration.between(local, Instant.now()).plus(Duration.of(10, ChronoUnit.MICROS)); + + assertWithMessage("test burned through all channel blocking latency during setup") + .that(duration) + .isLessThan(CHANNEL_BLOCKING_LATENCY); + + return duration; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracerTest.java new file mode 100644 index 0000000000..8f835db87d --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/ChannelPoolMetricsTracerTest.java @@ -0,0 +1,362 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.Mockito.when; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientChannelPoolOutstandingRpcs; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.ClientPerConnectionErrorCount; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelObserver; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolObserver; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPoolSettings.LoadBalancingStrategy; +import com.google.common.collect.ImmutableList; +import io.opentelemetry.api.OpenTelemetry; +import io.opentelemetry.api.common.AttributeKey; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.data.HistogramPointData; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import org.junit.Before; +import org.junit.Rule; +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.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.mockito.stubbing.Answer; + +@RunWith(JUnit4.class) +public class ChannelPoolMetricsTracerTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String APP_PROFILE_ID = "fake-profile"; + + @Rule public final MockitoRule mockito = MockitoJUnit.rule(); + + private InMemoryMetricReader metricReader; + @Mock private ScheduledExecutorService mockScheduler; + private ArgumentCaptor runnableCaptor; + + private ChannelPoolMetricsTracer tracker; + + @Mock private BigtableChannelPoolObserver mockInsightsProvider; + @Mock private BigtableChannelObserver mockInsight1; + @Mock private BigtableChannelObserver mockInsight2; + + @Before + public void setUp() { + metricReader = InMemoryMetricReader.create(); + ClientInfo clientInfo = + ClientInfo.builder() + .setInstanceName(InstanceName.of(PROJECT_ID, INSTANCE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .build(); + SdkMeterProvider meterProvider = + SdkMeterProvider.builder().registerMetricReader(metricReader).build(); + OpenTelemetry openTelemetry = + OpenTelemetrySdk.builder().setMeterProvider(meterProvider).build(); + + MetricRegistry mr = new MetricRegistry(); + + tracker = + new ChannelPoolMetricsTracer( + mr.newInternalRecorderRegistry(openTelemetry.getMeterProvider()), clientInfo); + + runnableCaptor = ArgumentCaptor.forClass(Runnable.class); + // Configure mockScheduler to capture the runnable when tracker.start() is called + when(mockScheduler.scheduleAtFixedRate(runnableCaptor.capture(), anyLong(), anyLong(), any())) + .then((Answer>) invocation -> Mockito.mock(ScheduledFuture.class)); + + // Default stubbing for insights provider + List defaultInsights = ImmutableList.of(mockInsight1, mockInsight2); + when(mockInsightsProvider.getChannelInfos()).thenAnswer(invocation -> defaultInsights); + // Default stubbing for observer methods + when(mockInsight1.getOutstandingUnaryRpcs()).thenReturn(0); + when(mockInsight1.getOutstandingStreamingRpcs()).thenReturn(0); + when(mockInsight1.getAndResetErrorCount()).thenReturn(0L); + when(mockInsight1.getAndResetSuccessCount()).thenReturn(0L); + when(mockInsight2.getOutstandingUnaryRpcs()).thenReturn(0); + when(mockInsight2.getOutstandingStreamingRpcs()).thenReturn(0); + when(mockInsight2.getAndResetErrorCount()).thenReturn(0L); + when(mockInsight2.getAndResetSuccessCount()).thenReturn(0L); + when(mockInsight1.getTransportType()) + .thenReturn(PeerInfo.TransportType.TRANSPORT_TYPE_CLOUD_PATH); + when(mockInsight2.getTransportType()) + .thenReturn(PeerInfo.TransportType.TRANSPORT_TYPE_CLOUD_PATH); + } + + /** Helper to run the captured ChannelPoolMetricsTracer task. */ + void runTrackerTask() { + List capturedRunnables = runnableCaptor.getAllValues(); + assertThat(capturedRunnables).hasSize(1); // Expect only one task scheduled + Runnable trackerRunnable = capturedRunnables.get(0); + assertThat(trackerRunnable).isInstanceOf(ChannelPoolMetricsTracer.class); + trackerRunnable.run(); + } + + private Attributes getExpectedErrorAttributes() { + return Attributes.builder() + .put(AttributeKey.stringKey("project_id"), PROJECT_ID) + .put(AttributeKey.stringKey("instance"), INSTANCE_ID) + .put(AttributeKey.stringKey("app_profile"), APP_PROFILE_ID) + .put( + AttributeKey.stringKey("client_name"), + "java-bigtable/" + com.google.cloud.bigtable.Version.VERSION) + .build(); + } + + private static Attributes getExpectedRpcAttributes(String lbPolicy, boolean streaming) { + return Attributes.builder() + .put(AttributeKey.stringKey("project_id"), PROJECT_ID) + .put(AttributeKey.stringKey("instance"), INSTANCE_ID) + .put(AttributeKey.stringKey("app_profile"), APP_PROFILE_ID) + .put( + AttributeKey.stringKey("client_name"), + "java-bigtable/" + com.google.cloud.bigtable.Version.VERSION) + .put(AttributeKey.stringKey("transport_type"), "cloudpath") + .put(AttributeKey.stringKey("lb_policy"), lbPolicy) + .put(AttributeKey.booleanKey("streaming"), streaming) + .build(); + } + + private static Optional getMetricData( + Collection metrics, String metricName) { + return metrics.stream().filter(m -> m.getName().equals(metricName)).findFirst(); + } + + private static HistogramPointData getPointForStreaming( + Collection points, boolean streaming) { + return points.stream() + .filter( + p -> + Boolean.TRUE.equals(p.getAttributes().get(AttributeKey.booleanKey("streaming"))) + == streaming) + .findFirst() + .orElseThrow( + () -> new AssertionError("Missing HistogramPointData for streaming=" + streaming)); + } + + @Test + public void testSingleRun() { + // Arrange + tracker.registerChannelInsightsProvider(mockInsightsProvider); + tracker.registerLoadBalancingStrategy(LoadBalancingStrategy.LEAST_IN_FLIGHT); + ScheduledFuture ignored = tracker.start(mockScheduler); + + // Outstanding RPCs + when(mockInsight1.getOutstandingUnaryRpcs()).thenReturn(5); + when(mockInsight1.getOutstandingStreamingRpcs()).thenReturn(2); + when(mockInsight2.getOutstandingUnaryRpcs()).thenReturn(10); + when(mockInsight2.getOutstandingStreamingRpcs()).thenReturn(8); + // Error Counts + when(mockInsight1.getAndResetErrorCount()).thenReturn(1L); + when(mockInsight1.getAndResetSuccessCount()).thenReturn(9L); + when(mockInsight2.getAndResetErrorCount()).thenReturn(3L); + when(mockInsight2.getAndResetSuccessCount()).thenReturn(7L); + + runTrackerTask(); + + // Assert + Collection metrics = metricReader.collectAllMetrics(); + assertThat(metrics).hasSize(2); + + // Assert Outstanding RPCs metric + Optional rpcMetricDataOpt = + getMetricData(metrics, ClientChannelPoolOutstandingRpcs.NAME); + assertThat(rpcMetricDataOpt.isPresent()).isTrue(); + MetricData rpcMetricData = rpcMetricDataOpt.get(); + Collection rpcPoints = rpcMetricData.getHistogramData().getPoints(); + assertThat(rpcPoints).hasSize(2); // One for streaming=false, one for streaming=true + + HistogramPointData unaryPoint = getPointForStreaming(rpcPoints, false); + assertThat(unaryPoint.getAttributes()) + .isEqualTo(getExpectedRpcAttributes("LEAST_IN_FLIGHT", false)); + assertThat(unaryPoint.getCount()).isEqualTo(2); + assertThat(unaryPoint.getSum()).isWithin(1e-9).of(15.0); // 5 + 10 + + HistogramPointData streamingPoint = getPointForStreaming(rpcPoints, true); + assertThat(streamingPoint.getAttributes()) + .isEqualTo(getExpectedRpcAttributes("LEAST_IN_FLIGHT", true)); + assertThat(streamingPoint.getCount()).isEqualTo(2); + assertThat(streamingPoint.getSum()).isWithin(1e-9).of(10.0); // 2 + 8 + + // Assert Error Count metric + Optional errorMetricDataOpt = + getMetricData(metrics, ClientPerConnectionErrorCount.NAME); + assertThat(errorMetricDataOpt.isPresent()).isTrue(); + MetricData errorMetricData = errorMetricDataOpt.get(); + Collection errorPoints = errorMetricData.getHistogramData().getPoints(); + assertThat(errorPoints).hasSize(1); + + HistogramPointData errorPoint = errorPoints.iterator().next(); + assertThat(errorPoint.getAttributes()).isEqualTo(getExpectedErrorAttributes()); + assertThat(errorPoint.getCount()).isEqualTo(2); // Two insights + assertThat(errorPoint.getSum()).isWithin(1e-9).of(4.0); // 1 + 3 + } + + @Test + public void testMultipleRuns() { + // Arrange + tracker.registerChannelInsightsProvider(mockInsightsProvider); + tracker.registerLoadBalancingStrategy(LoadBalancingStrategy.ROUND_ROBIN); + ScheduledFuture ignored = tracker.start(mockScheduler); + + // First run + when(mockInsight1.getOutstandingUnaryRpcs()).thenReturn(1); + when(mockInsight1.getOutstandingStreamingRpcs()).thenReturn(2); + when(mockInsight2.getOutstandingUnaryRpcs()).thenReturn(3); + when(mockInsight2.getOutstandingStreamingRpcs()).thenReturn(4); + when(mockInsight1.getAndResetErrorCount()).thenReturn(1L); + when(mockInsight1.getAndResetSuccessCount()).thenReturn(1L); + when(mockInsight2.getAndResetErrorCount()).thenReturn(0L); + when(mockInsight2.getAndResetSuccessCount()).thenReturn(2L); + runTrackerTask(); + + // Second run - values change + when(mockInsight1.getOutstandingUnaryRpcs()).thenReturn(10); + when(mockInsight1.getOutstandingStreamingRpcs()).thenReturn(20); + when(mockInsight2.getOutstandingUnaryRpcs()).thenReturn(30); + when(mockInsight2.getOutstandingStreamingRpcs()).thenReturn(40); + when(mockInsight1.getAndResetErrorCount()).thenReturn(5L); + when(mockInsight1.getAndResetSuccessCount()).thenReturn(5L); + when(mockInsight2.getAndResetErrorCount()).thenReturn(2L); + when(mockInsight2.getAndResetSuccessCount()).thenReturn(8L); + runTrackerTask(); + + // Assert cumulative metrics + Collection metrics = metricReader.collectAllMetrics(); + assertThat(metrics).hasSize(2); + + // Assert Outstanding RPCs + Optional rpcMetricDataOpt = + getMetricData(metrics, ClientChannelPoolOutstandingRpcs.NAME); + assertThat(rpcMetricDataOpt.isPresent()).isTrue(); + Collection rpcPoints = + rpcMetricDataOpt.get().getHistogramData().getPoints(); + assertThat(rpcPoints).hasSize(2); + + HistogramPointData unaryPoint = getPointForStreaming(rpcPoints, false); + assertThat(unaryPoint.getCount()).isEqualTo(4); // 2 insights * 2 runs + assertThat(unaryPoint.getSum()).isWithin(1e-9).of(44.0); // (1 + 3) + (10 + 30) + + HistogramPointData streamingPoint = getPointForStreaming(rpcPoints, true); + assertThat(streamingPoint.getCount()).isEqualTo(4); // 2 insights * 2 runs + assertThat(streamingPoint.getSum()).isWithin(1e-9).of(66.0); // (2 + 4) + (20 + 40) + + // Assert Error Counts + Optional errorMetricDataOpt = + getMetricData(metrics, ClientPerConnectionErrorCount.NAME); + assertThat(errorMetricDataOpt.isPresent()).isTrue(); + Collection errorPoints = + errorMetricDataOpt.get().getHistogramData().getPoints(); + assertThat(errorPoints).hasSize(1); + + HistogramPointData errorPoint = errorPoints.iterator().next(); + assertThat(errorPoint.getAttributes()).isEqualTo(getExpectedErrorAttributes()); + assertThat(errorPoint.getCount()).isEqualTo(4); // 2 insights * 2 runs + assertThat(errorPoint.getSum()).isWithin(1e-9).of(8.0); // (1 + 0) + (5 + 2) + } + + @Test + public void testErrorMetricsOnlyRecordedForAllChannels() { + // Arrange + tracker.registerChannelInsightsProvider(mockInsightsProvider); + ScheduledFuture ignored = tracker.start(mockScheduler); + + // Insight 1: Active (has successes) + when(mockInsight1.getAndResetErrorCount()).thenReturn(0L); + when(mockInsight1.getAndResetSuccessCount()).thenReturn(5L); + // Insight 2: Inactive + when(mockInsight2.getAndResetErrorCount()).thenReturn(0L); + when(mockInsight2.getAndResetSuccessCount()).thenReturn(0L); + + runTrackerTask(); + + Collection metrics = metricReader.collectAllMetrics(); + Optional errorMetricDataOpt = + getMetricData(metrics, ClientPerConnectionErrorCount.NAME); + assertThat(errorMetricDataOpt.isPresent()).isTrue(); + Collection errorPoints = + errorMetricDataOpt.get().getHistogramData().getPoints(); + assertThat(errorPoints).hasSize(1); + + HistogramPointData errorPoint = errorPoints.iterator().next(); + assertThat(errorPoint.getAttributes()).isEqualTo(getExpectedErrorAttributes()); + assertThat(errorPoint.getCount()).isEqualTo(2); // both channel recorded + assertThat(errorPoint.getSum()).isWithin(1e-9).of(0.0); // Recorded 0 errors + } + + @Test + public void testDefaultLbPolicy() { + // Arrange: Only register insights provider, not LB strategy + tracker.registerChannelInsightsProvider(mockInsightsProvider); + ScheduledFuture ignored = tracker.start(mockScheduler); + runTrackerTask(); + + Collection metrics = metricReader.collectAllMetrics(); + Optional rpcMetricDataOpt = + getMetricData(metrics, ClientChannelPoolOutstandingRpcs.NAME); + assertThat(rpcMetricDataOpt.isPresent()).isTrue(); + Collection points = rpcMetricDataOpt.get().getHistogramData().getPoints(); + + points.forEach( + point -> + assertThat(point.getAttributes().asMap()) + .containsEntry(AttributeKey.stringKey("lb_policy"), "ROUND_ROBIN")); + } + + @Test + public void testNoMetricsIfChannelInsightsProviderInactive() { + ScheduledFuture ignored = tracker.start(mockScheduler); + runTrackerTask(); + assertThat(metricReader.collectAllMetrics()).isEmpty(); + } + + @Test + public void testNoMetricsIfChannelInsightsEmpty() { + tracker.registerChannelInsightsProvider(mockInsightsProvider); + when(mockInsightsProvider.getChannelInfos()).thenReturn(ImmutableList.of()); + ScheduledFuture ignored = tracker.start(mockScheduler); + runTrackerTask(); + assertThat(metricReader.collectAllMetrics()).isEmpty(); + } + + @Test + public void testNoMetricsIfChannelInsightsNull() { + tracker.registerChannelInsightsProvider(mockInsightsProvider); + when(mockInsightsProvider.getChannelInfos()).thenReturn(null); + ScheduledFuture ignored = tracker.start(mockScheduler); + runTrackerTask(); + assertThat(metricReader.collectAllMetrics()).isEmpty(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerTest.java similarity index 81% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerTest.java index 11dd0b5095..c77f3e1e50 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeTracerTest.java @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.metrics; +package com.google.cloud.bigtable.data.v2.internal.csm.tracers; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenDuration; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -24,10 +25,10 @@ import com.google.api.gax.tracing.ApiTracer; import com.google.api.gax.tracing.ApiTracer.Scope; import com.google.bigtable.v2.ReadRowsRequest; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; import com.google.cloud.bigtable.misc_utilities.MethodComparator; import com.google.common.collect.ImmutableList; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; import java.lang.reflect.Method; import java.util.Arrays; import org.junit.Assert; @@ -39,7 +40,6 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class CompositeTracerTest { @@ -148,12 +148,24 @@ public void testAttemptCancelled() { @Test public void testAttemptFailed() { RuntimeException error = new RuntimeException(); - Duration delay = Duration.ofMillis(10); - compositeTracer.attemptFailed(error, delay); - verify(child1, times(1)).attemptFailed(error, delay); - verify(child2, times(1)).attemptFailed(error, delay); - verify(child3, times(1)).attemptFailed(error, delay); - verify(child4, times(1)).attemptFailed(error, delay); + java.time.Duration delay = java.time.Duration.ofMillis(10); + compositeTracer.attemptFailed(error, toThreetenDuration(delay)); + // the implementation of CompositeTracer.attemptFailed delegates to attemptFailedDuration. + verify(child1, times(1)).attemptFailedDuration(error, delay); + verify(child2, times(1)).attemptFailedDuration(error, delay); + verify(child3, times(1)).attemptFailedDuration(error, delay); + verify(child4, times(1)).attemptFailedDuration(error, delay); + } + + @Test + public void testAttemptFailedDuration() { + RuntimeException error = new RuntimeException(); + java.time.Duration delay = java.time.Duration.ofMillis(10); + compositeTracer.attemptFailedDuration(error, delay); + verify(child1, times(1)).attemptFailedDuration(error, delay); + verify(child2, times(1)).attemptFailedDuration(error, delay); + verify(child3, times(1)).attemptFailedDuration(error, delay); + verify(child4, times(1)).attemptFailedDuration(error, delay); } @Test @@ -229,11 +241,12 @@ public void testGetAttempt() { } @Test - public void testRecordGfeLatency() { - Throwable t = new StatusRuntimeException(Status.UNAVAILABLE); - compositeTracer.recordGfeMetadata(20L, t); - verify(child3, times(1)).recordGfeMetadata(20L, t); - verify(child4, times(1)).recordGfeMetadata(20L, t); + public void testSidebandData() { + MetadataExtractorInterceptor.SidebandData sidebandData = + new MetadataExtractorInterceptor.SidebandData(); + compositeTracer.setSidebandData(sidebandData); + verify(child3, times(1)).setSidebandData(sidebandData); + verify(child4, times(1)).setSidebandData(sidebandData); } @Test @@ -253,9 +266,9 @@ public void testMethodsOverride() { } @Test - public void testRequestBlockedOnChannel() { - compositeTracer.grpcChannelQueuedLatencies(5L); - verify(child3, times(1)).grpcChannelQueuedLatencies(5L); - verify(child4, times(1)).grpcChannelQueuedLatencies(5L); + public void testGrpcMessageSent() { + compositeTracer.grpcMessageSent(); + verify(child3, times(1)).grpcMessageSent(); + verify(child4, times(1)).grpcMessageSent(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracerTest.java new file mode 100644 index 0000000000..12f041fa85 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/CompositeVRpcTracerTest.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.common.collect.ImmutableList; +import io.grpc.Status; +import java.time.Duration; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class CompositeVRpcTracerTest { + + @Mock VRpcTracer child1; + @Mock VRpcTracer child2; + private CompositeVRpcTracer compositeVRpcTracer; + + @BeforeEach + void setup() { + compositeVRpcTracer = new CompositeVRpcTracer(ImmutableList.of(child1, child2)); + } + + @Test + void onOperationStartTest() { + compositeVRpcTracer.onOperationStart(); + verify(child1, times(1)).onOperationStart(); + verify(child2, times(1)).onOperationStart(); + } + + @Test + void onAttemptStartTest() { + SessionReadRowRequest request = SessionReadRowRequest.getDefaultInstance(); + compositeVRpcTracer.onAttemptStart(request); + verify(child1, times(1)).onAttemptStart(request); + verify(child2, times(1)).onAttemptStart(request); + } + + @Test + void onRequestSentTest() { + PeerInfo fakePeerInfo = PeerInfo.getDefaultInstance(); + compositeVRpcTracer.onRequestSent(fakePeerInfo); + verify(child1, times(1)).onRequestSent(fakePeerInfo); + verify(child2, times(1)).onRequestSent(fakePeerInfo); + } + + @Test + void onApplicationBlockingLatenciesTest() { + Duration elapsed = Duration.ofMillis(5); + compositeVRpcTracer.recordApplicationBlockingLatencies(elapsed); + verify(child1, times(1)).recordApplicationBlockingLatencies(elapsed); + verify(child2, times(1)).recordApplicationBlockingLatencies(elapsed); + } + + @Test + void onAttemptFinishTest() { + VRpc.VRpcResult result = VRpc.VRpcResult.createLocalTransportError(Status.UNAVAILABLE); + compositeVRpcTracer.onAttemptFinish(result); + verify(child1, times(1)).onAttemptFinish(result); + verify(child2, times(1)).onAttemptFinish(result); + } + + @Test + void onOperationFinishTest() { + VRpc.VRpcResult result = VRpc.VRpcResult.createLocalTransportError(Status.UNAVAILABLE); + compositeVRpcTracer.onOperationFinish(result); + verify(child1, times(1)).onOperationFinish(result); + verify(child2, times(1)).onOperationFinish(result); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerTest.java new file mode 100644 index 0000000000..62a802dfeb --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/csm/tracers/VRpcTracerTest.java @@ -0,0 +1,515 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.csm.tracers; + +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; +import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat; + +import com.google.api.gax.tracing.BaseApiTracerFactory; +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.ErrorResponse; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.OpenFakeSessionRequest.Action; +import com.google.bigtable.v2.OpenFakeSessionRequest.ActionList; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.SessionFakeScriptedRequest; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.bigtable.v2.SessionRequestStats; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.api.UnaryResponseFuture; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SingleChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricRegistry.RecorderRegistry; +import com.google.cloud.bigtable.data.v2.internal.csm.MetricsImpl; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.middleware.RetryingVRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.session.FakeDescriptor; +import com.google.cloud.bigtable.data.v2.internal.session.Session; +import com.google.cloud.bigtable.data.v2.internal.session.SessionFactory; +import com.google.cloud.bigtable.data.v2.internal.session.SessionImpl; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionListener; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionService; +import com.google.cloud.bigtable.data.v2.internal.session.fake.PeerInfoInterceptor; +import com.google.common.base.Stopwatch; +import com.google.common.base.Suppliers; +import com.google.common.collect.Range; +import com.google.common.truth.Correspondence; +import com.google.protobuf.ByteString; +import com.google.protobuf.util.Durations; +import com.google.rpc.Code; +import com.google.rpc.RetryInfo; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import io.grpc.Grpc; +import io.grpc.InsecureChannelCredentials; +import io.grpc.Metadata; +import io.grpc.Server; +import io.opencensus.stats.Stats; +import io.opencensus.tags.Tags; +import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.OpenTelemetrySdk; +import io.opentelemetry.sdk.metrics.SdkMeterProvider; +import io.opentelemetry.sdk.metrics.data.HistogramPointData; +import io.opentelemetry.sdk.metrics.data.LongPointData; +import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; +import java.io.IOException; +import java.time.Duration; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Supplier; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class VRpcTracerTest { + private static final Correspondence METRIC_DATA_BY_NAME = + Correspondence.transforming(MetricData::getName, "MetricData name"); + + private ScheduledExecutorService executor; + + private Server server; + private ChannelPool channelPool; + private SessionPoolInfo poolInfo; + + private MetricRegistry metricRegistry; + private RecorderRegistry recorderRegistry; + private InMemoryMetricReader metricReader; + private MetricsImpl metrics; + private Session session; + private final FakeSessionListener sessionListener = new FakeSessionListener(); + + private final String clusterId = "fake-cluster"; + private final String zoneId = "us-east1-a"; + + @BeforeEach + void setUp() throws IOException { + executor = Executors.newScheduledThreadPool(4); + server = + FakeServiceBuilder.create(new FakeSessionService(executor)) + .intercept(new PeerInfoInterceptor()) + .start(); + channelPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .build())); + channelPool.start(); + ClientInfo clientInfo = + ClientInfo.builder() + .setAppProfileId("default") + .setInstanceName(InstanceName.parse("projects/fake-project/instances/fake-instance")) + .build(); + poolInfo = SessionPoolInfo.create(clientInfo, FakeDescriptor.FAKE_SESSION, "fake-pool"); + + metricReader = InMemoryMetricReader.create(); + OpenTelemetrySdk otel = + OpenTelemetrySdk.builder() + .setMeterProvider(SdkMeterProvider.builder().registerMetricReader(metricReader).build()) + .build(); + + metricRegistry = new MetricRegistry(); + recorderRegistry = metricRegistry.newInternalRecorderRegistry(otel.getMeterProvider()); + + metrics = + new MetricsImpl( + metricRegistry, + clientInfo, + BaseApiTracerFactory.getInstance(), + otel, + null, + Tags.getTagger(), + Stats.getStatsRecorder(), + executor); + + // TODO: extract this out to a SimpleSessionPoolImpl that simply wraps a single Session + SessionFactory sessionFactory = + new SessionFactory( + channelPool, FakeDescriptor.FAKE_SESSION.getMethodDescriptor(), CallOptions.DEFAULT); + session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + } + + @AfterEach + void tearDown() { + if (session != null) { + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + } + channelPool.close(); + metrics.close(); + server.shutdownNow(); + executor.shutdownNow(); + } + + @Test + public void operationLatencyTest() throws Exception { + // Set up a session to return 1 error response with a retry delay and 1 vrpc response. + com.google.protobuf.Duration retryDelay = Durations.fromMillis(50); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + ActionList.newBuilder() + .addActions(createErrorResponse(Code.UNAVAILABLE_VALUE, retryDelay, 1)) + .addActions(createResponse(2, clusterId, zoneId)) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + sessionListener.popUntil(OpenSessionResponse.class); + + // Test + CompletableFuture opFinished = new CompletableFuture<>(); + Stopwatch stopwatch = Stopwatch.createStarted(); + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture userFuture = new UnaryResponseFuture<>(); + MethodInfo methodInfo = + MethodInfo.builder().setName("Bigtable.ReadRow").setStreaming(false).build(); + VRpcTracer tracer = + new VRpcTracerImpl( + recorderRegistry, poolInfo, methodInfo, Deadline.after(1, TimeUnit.MINUTES)) { + @Override + public void onOperationFinish(VRpc.VRpcResult result) { + super.onOperationFinish(result); + // operation finished is called after listener.close() which means that userFuture gets + // resolved before tracer.onOperationFinish is called. Set a opFinished future here so + // the elapsed time includes everything. + opFinished.complete(null); + } + }; + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + userFuture); + SessionFakeScriptedResponse response = userFuture.get(); + assertThat(response).isEqualToDefaultInstance(); + opFinished.get(); + long maxOpLatency = stopwatch.elapsed(TimeUnit.MILLISECONDS); + + long operationLatencies = + getMetricValue( + metricReader, + "bigtable.googleapis.com/internal/client/operation_latencies", + Attributes.empty()); + + assertThat(operationLatencies).isIn(Range.closed(Durations.toMillis(retryDelay), maxOpLatency)); + } + + @Test + public void attemptLatencyTest() throws Exception { + // Set up a session that returns an error response with a retry delay and a vrpc response. + com.google.protobuf.Duration retryDelay = Durations.fromMillis(50); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + ActionList.newBuilder() + .addActions(createErrorResponse(Code.UNAVAILABLE_VALUE, retryDelay, 1)) + .addActions(createResponse(2, clusterId, zoneId)) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + sessionListener.popUntil(OpenSessionResponse.class); + + // Test + Stopwatch stopwatch = Stopwatch.createStarted(); + AtomicLong maxAttemptLatency = new AtomicLong(); + DelayedVRpc delayedVRpc = + new DelayedVRpc<>( + () -> new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor)); + UnaryResponseFuture userFuture = new UnaryResponseFuture<>(); + MethodInfo methodInfo = + MethodInfo.builder().setName("Bigtable.ReadRow").setStreaming(false).build(); + VRpcTracer tracer = + new VRpcTracerImpl( + recorderRegistry, poolInfo, methodInfo, Deadline.after(1, TimeUnit.MINUTES)) { + @Override + public void onAttemptFinish(VRpc.VRpcResult result) { + super.onAttemptFinish(result); + if (!result.getStatus().isOk()) { + maxAttemptLatency.set(stopwatch.elapsed(TimeUnit.MILLISECONDS)); + } + } + }; + delayedVRpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + userFuture); + + long sessionDelay = 5L; + Thread.sleep(sessionDelay); + delayedVRpc.execute(); + + SessionFakeScriptedResponse response = userFuture.get(); + assertThat(response).isEqualToDefaultInstance(); + + long firstAttemptLatency = + getMetricValue( + metricReader, + "bigtable.googleapis.com/internal/client/attempt_latencies", + Attributes.builder().put("status", Code.UNAVAILABLE.name()).build()); + assertThat(firstAttemptLatency).isIn(Range.closed(sessionDelay, maxAttemptLatency.get())); + } + + @Test + public void retryCountTest() throws Exception { + // Set up a session to return 2 error responses and a VRpc response. + com.google.protobuf.Duration retryDelay = Durations.fromMillis(0); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + ActionList.newBuilder() + .addActions(createErrorResponse(Code.UNAVAILABLE_VALUE, retryDelay, 1)) + .addActions(createErrorResponse(Code.UNAVAILABLE_VALUE, retryDelay, 2)) + .addActions(createResponse(3, clusterId, zoneId)) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + sessionListener.popUntil(OpenSessionResponse.class); + + // Test + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + CompletableFuture opFinished = new CompletableFuture<>(); + MethodInfo methodInfo = + MethodInfo.builder().setName("Bigtable.ReadRow").setStreaming(false).build(); + VRpcTracer tracer = + new VRpcTracerImpl( + recorderRegistry, poolInfo, methodInfo, Deadline.after(1, TimeUnit.MINUTES)) { + @Override + public void onOperationFinish(VRpc.VRpcResult result) { + super.onOperationFinish(result); + opFinished.complete(null); + } + }; + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + SessionFakeScriptedResponse response = f.get(); + assertThat(response).isEqualToDefaultInstance(); + opFinished.get(); + + long retryCount = + getMetricValue( + metricReader, + "bigtable.googleapis.com/internal/client/retry_count", + Attributes.empty()); + assertThat(retryCount).isEqualTo(2); + } + + @Test + public void clientBlockingLatencySessionDelayTest() throws Exception { + // Set up a session that returns a VRpc response after a fake delay + FakeSessionListener sessionListener = new FakeSessionListener(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + ActionList.newBuilder() + .addActions(createResponse(1, clusterId, zoneId)) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + + // Test + DelayedVRpc delayedVRpc = + new DelayedVRpc<>( + () -> new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor)); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + CompletableFuture attemptFinished = new CompletableFuture<>(); + MethodInfo methodInfo = + MethodInfo.builder().setName("Bigtable.ReadRow").setStreaming(false).build(); + VRpcTracer tracer = + new VRpcTracerImpl( + recorderRegistry, poolInfo, methodInfo, Deadline.after(1, TimeUnit.MINUTES)) { + @Override + public void onAttemptFinish(VRpc.VRpcResult result) { + super.onAttemptFinish(result); + attemptFinished.complete(null); + } + }; + assertThat(sessionListener.popNext(Duration.ofSeconds(2))) + .isInstanceOf(OpenSessionResponse.class); + + delayedVRpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + long sessionDelay = 200; + Thread.sleep(sessionDelay); + delayedVRpc.execute(); + + SessionFakeScriptedResponse response = f.get(); + assertThat(response).isEqualToDefaultInstance(); + attemptFinished.get(); + + long clientBlockingLatency = + getMetricValue( + metricReader, + "bigtable.googleapis.com/internal/client/throttling_latencies", + Attributes.empty()); + + assertThat(clientBlockingLatency).isAtLeast(sessionDelay); + } + + private Action createErrorResponse( + int errorCode, com.google.protobuf.Duration retryDelay, long rpcId) { + com.google.rpc.Status status = + com.google.rpc.Status.newBuilder().setCode(errorCode).setMessage("fake error").build(); + ErrorResponse errorResponse = + ErrorResponse.newBuilder() + .setRpcId(rpcId) + .setStatus(status) + .setRetryInfo(RetryInfo.newBuilder().setRetryDelay(retryDelay).build()) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + return Action.newBuilder().setErrorResponse(errorResponse).build(); + } + + private Action createResponse(long rpcId, String clusterId, String zoneId) { + VirtualRpcResponse response = + VirtualRpcResponse.newBuilder() + .setRpcId(rpcId) + .setClusterInfo( + ClusterInformation.newBuilder().setClusterId(clusterId).setZoneId(zoneId).build()) + .setStats(SessionRequestStats.getDefaultInstance()) + .setPayload(ByteString.EMPTY) + .build(); + + return Action.newBuilder().setResponse(response).build(); + } + + // Get the metric value that matches any of the attributes in the attribute map + private static long getMetricValue( + InMemoryMetricReader reader, String metricName, Attributes attributes) { + Collection allMetricData = reader.collectAllMetrics(); + List matchingMetadata = + allMetricData.stream() + .filter(md -> METRIC_DATA_BY_NAME.compare(md, metricName)) + .collect(Collectors.toList()); + assertWithMessage( + "Found multiple MetricData with the same name: %s, in: %s", + metricName, matchingMetadata) + .that(matchingMetadata.size()) + .isAtMost(1); + + if (!matchingMetadata.isEmpty()) { + MetricData metricData = matchingMetadata.get(0); + + Collection points = + metricData.getData().getPoints().stream() + .filter( + pd -> + pd.getAttributes() + .asMap() + .entrySet() + .containsAll(attributes.asMap().entrySet())) + .collect(Collectors.toList()); + + assertWithMessage("ambiguous labels matched too many points").that(points).hasSize(1); + + switch (metricData.getType()) { + case HISTOGRAM: + HistogramPointData hd = (HistogramPointData) points.iterator().next(); + return (long) hd.getSum() / hd.getCount(); + case LONG_SUM: + LongPointData ld = (LongPointData) points.iterator().next(); + return ld.getValue(); + default: + return 0; + } + } + + // MetricData was not found, assert on original collection to get a descriptive error message + assertThat(allMetricData).comparingElementsUsing(METRIC_DATA_BY_NAME).contains(metricName); + throw new IllegalStateException( + "MetricData was missing then appeared, this should never happen"); + } + + static class DelayedVRpc implements VRpc { + + private final Supplier> supplier; + + private ReqT req; + private VRpcCallContext ctx; + private VRpcListener listener; + + DelayedVRpc(Supplier> supplier) { + this.supplier = supplier; + } + + @Override + public void start(ReqT req, VRpcCallContext ctx, VRpcListener listener) { + this.req = req; + this.ctx = ctx; + this.listener = listener; + } + + @Override + public void cancel(@Nullable String message, @Nullable Throwable cause) { + throw new UnsupportedOperationException(); + } + + @Override + public void requestNext() { + throw new UnsupportedOperationException(); + } + + public void execute() { + supplier.get().start(req, ctx, listener); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessCheckerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessCheckerTest.java new file mode 100644 index 0000000000..5ce624cf44 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/dp/ClassicDirectAccessCheckerTest.java @@ -0,0 +1,154 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.dp; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; +import static org.mockito.Mockito.when; + +import com.google.bigtable.v2.PeerInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.Util; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.DirectPathCompatibleTracer; +import com.google.cloud.bigtable.data.v2.stub.MetadataExtractorInterceptor; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPrimer; +import io.grpc.Channel; +import io.grpc.ManagedChannel; +import java.util.concurrent.ScheduledExecutorService; +import org.junit.Before; +import org.junit.Rule; +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.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class ClassicDirectAccessCheckerTest { + + @Rule public final MockitoRule mockito = MockitoJUnit.rule(); + + @Mock private ChannelPrimer mockChannelPrimer; + @Mock private ManagedChannel mockChannel; + @Mock private DirectPathCompatibleTracer mockTracer; + @Mock private MetadataExtractorInterceptor mockInterceptor; + @Mock private MetadataExtractorInterceptor.SidebandData mockSidebandData; + @Mock private ScheduledExecutorService mockExecutor; + + private ClassicDirectAccessChecker checker; + + @Before + public void setUp() throws Exception { + // Pass null for the executor by default so background investigations aren't triggered + checker = spy(new ClassicDirectAccessChecker(mockTracer, mockChannelPrimer, mockExecutor)); + doReturn(mockInterceptor).when(checker).createInterceptor(); + when(mockInterceptor.getSidebandData()).thenReturn(mockSidebandData); + } + + @Test + public void testEligibleForDirectAccess() { + PeerInfo peerInfo = + PeerInfo.newBuilder() + .setTransportType(PeerInfo.TransportType.TRANSPORT_TYPE_DIRECT_ACCESS) + .build(); + when(mockSidebandData.getPeerInfo()).thenReturn(peerInfo); + when(mockSidebandData.getIpProtocol()).thenReturn(Util.IpProtocol.IPV6); + + boolean isEligible = checker.check(mockChannel); + + assertThat(isEligible).isTrue(); + verify(mockChannelPrimer).primeChannel(any(Channel.class)); + verify(mockTracer).recordSuccess(Util.IpProtocol.IPV6); + verify(mockChannel).shutdownNow(); + } + + @Test + public void testNotEligibleCFE() { + PeerInfo peerInfo = + PeerInfo.newBuilder() + .setTransportType(PeerInfo.TransportType.TRANSPORT_TYPE_CLOUD_PATH) + .build(); + when(mockSidebandData.getPeerInfo()).thenReturn(peerInfo); + + boolean isEligible = checker.check(mockChannel); + + assertThat(isEligible).isFalse(); + verifyNoInteractions(mockTracer); // No interactions because executor is null + verify(mockChannel).shutdownNow(); + } + + @Test + public void testMissingSidebandData() { + // Override the Before setup to return null for this specific test + when(mockInterceptor.getSidebandData()).thenReturn(null); + + boolean isEligible = checker.check(mockChannel); + + assertThat(isEligible).isFalse(); + verifyNoInteractions(mockTracer); + verify(mockChannel).shutdownNow(); + } + + @Test + public void testExceptionSafetyAndCleanup() { + doThrow(new RuntimeException("Simulated primer failure")) + .when(mockChannelPrimer) + .primeChannel(any(Channel.class)); + + boolean isEligible = checker.check(mockChannel); + + assertThat(isEligible).isFalse(); + verifyNoInteractions(mockTracer); + verify(mockChannel).shutdownNow(); + } + + @Test + public void testNullPeerInfoIsHandledSafely() { + when(mockInterceptor.getSidebandData()).thenReturn(mockSidebandData); + + when(mockSidebandData.getPeerInfo()).thenReturn(null); + boolean isEligible = checker.check(mockChannel); + assertThat(isEligible).isFalse(); + verifyNoInteractions(mockTracer); + verify(mockChannel).shutdownNow(); + } + + @Test + public void testInvestigationTriggeredOnFailure() { + // Re-instantiate the checker with a mock executor to verify investigation is scheduled + checker = spy(new ClassicDirectAccessChecker(mockTracer, mockChannelPrimer, mockExecutor)); + doReturn(mockInterceptor).when(checker).createInterceptor(); + when(mockInterceptor.getSidebandData()).thenReturn(null); // Force a failure + + boolean isEligible = checker.check(mockChannel); + + assertThat(isEligible).isFalse(); + + // Verify the checker submitted a Runnable task to the background executor + ArgumentCaptor runnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mockExecutor).execute(runnableCaptor.capture()); + + // Execute the captured runnable to ensure it safely calls the tracer + runnableCaptor.getValue().run(); + verify(mockTracer).recordFailure(DirectAccessInvestigator.FailureReason.UNKNOWN); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpcTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpcTest.java new file mode 100644 index 0000000000..d26eecd5d3 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/ForwardingVRpcTest.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcCallContext; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcListener; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import io.grpc.Deadline; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class ForwardingVRpcTest { + @Mock private VRpc innerVRpc; + + @Mock private VRpcListener outerListener; + + @Captor private ArgumentCaptor> innerListenerCaptor; + + private final VRpcTracer tracer = NoopMetrics.NoopVrpcTracer.INSTANCE; + + @Test + void proxyOkTest() { + ForwardingVRpc outerVRpc = new ForwardingVRpc<>(innerVRpc); + VRpcCallContext ctx = + VRpcCallContext.create(Deadline.after(10, TimeUnit.SECONDS), false, tracer); + // Start + outerVRpc.start("req", ctx, outerListener); + verify(innerVRpc).start(Mockito.eq("req"), Mockito.same(ctx), innerListenerCaptor.capture()); + + // Listener + VRpcListener innerListener = innerListenerCaptor.getValue(); + + // Listener.onMessage + innerListener.onMessage("response"); + verify(outerListener).onMessage("response"); + + // Listener.onClose + VRpcResult result = + VRpcResult.createServerOk(VirtualRpcResponse.newBuilder().setRpcId(1).build()); + innerListener.onClose(result); + verify(outerListener).onClose(result); + } + + @Test + void proxyCancelTest() { + ForwardingVRpc outerVRpc = new ForwardingVRpc<>(innerVRpc); + VRpcCallContext ctx = + VRpcCallContext.create(Deadline.after(10, TimeUnit.SECONDS), false, tracer); + // Start + outerVRpc.start("req", ctx, outerListener); + Throwable t = new RuntimeException(); + outerVRpc.cancel("reason", t); + + verify(innerVRpc).cancel("reason", t); + } + + @Test + void proxyRequestNextTest() { + ForwardingVRpc outerVRpc = new ForwardingVRpc<>(innerVRpc); + VRpcCallContext ctx = + VRpcCallContext.create(Deadline.after(10, TimeUnit.SECONDS), false, tracer); + outerVRpc.start("req", ctx, outerListener); + verify(innerVRpc).start(Mockito.anyString(), Mockito.any(), innerListenerCaptor.capture()); + VRpcListener innerListener = innerListenerCaptor.getValue(); + innerListener.onMessage("s"); + + outerVRpc.requestNext(); + verify(innerVRpc, times(1)).requestNext(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpcTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpcTest.java new file mode 100644 index 0000000000..b9af925d48 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/RetryingVRpcTest.java @@ -0,0 +1,412 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.ErrorResponse; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.SessionFakeScriptedRequest; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.api.UnaryResponseFuture; +import com.google.cloud.bigtable.data.v2.internal.api.VRpcException; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SingleChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.session.FakeDescriptor; +import com.google.cloud.bigtable.data.v2.internal.session.SessionFactory; +import com.google.cloud.bigtable.data.v2.internal.session.SessionImpl; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolInfo; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionListener; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionService; +import com.google.cloud.bigtable.data.v2.internal.session.fake.PeerInfoInterceptor; +import com.google.common.base.Suppliers; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.util.Durations; +import com.google.rpc.Code; +import com.google.rpc.RetryInfo; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import io.grpc.Grpc; +import io.grpc.InsecureChannelCredentials; +import io.grpc.Metadata; +import io.grpc.Server; +import io.grpc.Status; +import java.io.IOException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class RetryingVRpcTest { + private ScheduledExecutorService executor; + + private Server server; + private ChannelPool channelPool; + private final VRpcTracer tracer = NoopMetrics.NoopVrpcTracer.INSTANCE; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private Metrics metrics; + + private SessionPoolInfo poolInfo; + private SessionFactory sessionFactory; + + @BeforeEach + void setUp() throws IOException { + executor = Executors.newScheduledThreadPool(4); + server = + FakeServiceBuilder.create(new FakeSessionService(executor)) + .intercept(new PeerInfoInterceptor()) + .start(); + channelPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .build())); + channelPool.start(); + ClientInfo clientInfo = + ClientInfo.builder() + .setAppProfileId("default") + .setInstanceName(InstanceName.parse("projects/fake-project/instances/fake-instance")) + .build(); + + // TODO: extract this out to a SimpleSessionPoolImpl that simply wraps a single Session + poolInfo = SessionPoolInfo.create(clientInfo, FakeDescriptor.FAKE_SESSION, "fake-pool"); + sessionFactory = + new SessionFactory( + channelPool, FakeDescriptor.FAKE_SESSION.getMethodDescriptor(), CallOptions.DEFAULT); + } + + @AfterEach + void tearDown() { + channelPool.close(); + server.shutdownNow(); + executor.shutdownNow(); + } + + @Test + void noRetryTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload(OpenFakeSessionRequest.getDefaultInstance().toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + assertThat(f.get()).isEqualTo(SessionFakeScriptedResponse.getDefaultInstance()); + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isEqualTo(Status.OK); + } + + @Test + public void retryServerError() throws Exception { + int requestTag = 1; + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + + // expected responses: 1 deadline exceeded error followed by a response. + com.google.rpc.Status status = + com.google.rpc.Status.newBuilder() + .setCode(Code.DEADLINE_EXCEEDED_VALUE) + .setMessage("fake deadline exceeded error") + .build(); + ErrorResponse error = + ErrorResponse.newBuilder() + .setRpcId(1) + .setStatus(status) + .setRetryInfo(RetryInfo.newBuilder().setRetryDelay(Durations.fromMillis(10)).build()) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + requestTag, + OpenFakeSessionRequest.ActionList.newBuilder() + .setRepeat(false) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setErrorResponse(error) + .build()) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setResponse( + VirtualRpcResponse.newBuilder() + .setRpcId(2) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .setPayload(ByteString.EMPTY) + .build())) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + // Verify that session has started + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(requestTag).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + assertThat(f.get()).isEqualTo(SessionFakeScriptedResponse.getDefaultInstance()); + + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isEqualTo(Status.OK); + } + + @Test + public void retryDeadlineRespectedTest() throws Exception { + int requestTag = 1; + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + + // Deadline is < retryDelay + responseDealy, we should not schedule retry and fail with the + // server + // returned error + Duration retryDelay = Durations.fromSeconds(1); + Duration responseDelay = Durations.fromMillis(500); + Duration deadline = Durations.fromSeconds(1); + + String errorMessage = "fake unavailable error"; + // server responses: 1 unavailable error followed by an OK response + com.google.rpc.Status status = + com.google.rpc.Status.newBuilder() + .setCode(Code.UNAVAILABLE.getNumber()) + .setMessage(errorMessage) + .build(); + ErrorResponse error = + ErrorResponse.newBuilder() + .setRpcId(1) + .setStatus(status) + .setRetryInfo(RetryInfo.newBuilder().setRetryDelay(retryDelay).build()) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + requestTag, + OpenFakeSessionRequest.ActionList.newBuilder() + .setRepeat(false) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setErrorResponse(error) + .setDelay(responseDelay) + .build()) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setResponse( + VirtualRpcResponse.newBuilder() + .setRpcId(2) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .setPayload(ByteString.EMPTY) + .build())) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + // Verify that session has started + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(requestTag).build(), + VRpc.VRpcCallContext.create( + Deadline.after(Durations.toMillis(deadline), TimeUnit.MILLISECONDS), true, tracer), + f); + ExecutionException exception = assertThrows(ExecutionException.class, f::get); + assertThat(exception).hasMessageThat().contains(errorMessage); + + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isEqualTo(Status.OK); + } + + @Test + public void vRpcFailureTest() throws Exception { + // vrpc error on the session should not close the stream + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + + // expected responses: 1 deadline exceeded error followed by a response. + com.google.rpc.Status status = + com.google.rpc.Status.newBuilder() + .setCode(Code.DEADLINE_EXCEEDED_VALUE) + .setMessage("fake deadline exceeded error") + .build(); + ErrorResponse error = + ErrorResponse.newBuilder() + .setRpcId(1) + .setStatus(status) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + OpenFakeSessionRequest.ActionList.newBuilder() + .setRepeat(false) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setErrorResponse(error) + .build()) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + // Verify that session has started + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + VRpcException cause = + (VRpcException) assertThrows(ExecutionException.class, () -> f.get()).getCause(); + assertThat(cause).hasMessageThat().isEqualTo("DEADLINE_EXCEEDED: fake deadline exceeded error"); + + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isEqualTo(Status.OK); + } + + @Test + void cancelInScheduledState() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + + // expected responses: 1 deadline exceeded error followed by a response. + com.google.rpc.Status status = + com.google.rpc.Status.newBuilder() + .setCode(Code.DEADLINE_EXCEEDED_VALUE) + .setMessage("fake deadline exceeded error") + .build(); + ErrorResponse error = + ErrorResponse.newBuilder() + .setRpcId(1) + .setStatus(status) + .setRetryInfo(RetryInfo.newBuilder().setRetryDelay(Durations.fromSeconds(1)).build()) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 1, + OpenFakeSessionRequest.ActionList.newBuilder() + .setRepeat(false) + .addActions( + OpenFakeSessionRequest.Action.newBuilder() + .setErrorResponse(error) + .build()) + .build()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + // Verify that session has started + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + RetryingVRpc retrying = + new RetryingVRpc<>(() -> session.newCall(FakeDescriptor.SCRIPTED), executor); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + retrying.start( + SessionFakeScriptedRequest.newBuilder().setTag(1).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + // Wait for the first attempt to fail and get scheduled for retry + Thread.sleep(50); + + retrying.cancel("test cancel", null); + + ExecutionException executionException = assertThrows(ExecutionException.class, f::get); + assertThat(executionException.getCause()).isInstanceOf(VRpcException.class); + VRpcException vRpcException = (VRpcException) executionException.getCause(); + assertThat(vRpcException.getStatus().getCode()).isEqualTo(Status.Code.CANCELLED); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpcCallContextTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpcCallContextTest.java new file mode 100644 index 0000000000..f9312e6149 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/middleware/VRpcCallContextTest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.middleware; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.common.base.Ticker; +import com.google.common.collect.Range; +import java.time.Duration; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class VRpcCallContextTest { + + @Test + public void testDeadline() { + FakeTicker fakeTicker = new FakeTicker(System.nanoTime()); + VRpc.OperationInfo operationInfo = + VRpc.OperationInfo.create(fakeTicker, Duration.ofMinutes(1), true); + assertThat(operationInfo.getDeadline().timeRemaining(TimeUnit.SECONDS)) + .isIn(Range.closed(58L, 60L)); + + fakeTicker.increment(Duration.ofSeconds(10)); + assertThat(operationInfo.getDeadline().timeRemaining(TimeUnit.SECONDS)) + .isIn(Range.closed(48L, 50L)); + + fakeTicker.increment(Duration.ofSeconds(10)); + VRpc.OperationInfo nextAttempt = operationInfo.createForNextAttempt(); + assertThat(nextAttempt.getDeadline().timeRemaining(TimeUnit.SECONDS)) + .isIn(Range.closed(38L, 40L)); + + fakeTicker.increment(Duration.ofSeconds(50)); + assertThat(nextAttempt.getDeadline().isExpired()).isTrue(); + } + + private static class FakeTicker extends Ticker { + private long nanoTime; + + FakeTicker(long time) { + this.nanoTime = time; + } + + void increment(Duration duration) { + this.nanoTime += duration.toNanos(); + } + + @Override + public long read() { + return nanoTime; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/FakeDescriptor.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/FakeDescriptor.java new file mode 100644 index 0000000000..f7cee4eb0d --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/FakeDescriptor.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import com.google.bigtable.v2.FakeSessionGrpc; +import com.google.bigtable.v2.FakeSessionOpRequest; +import com.google.bigtable.v2.FakeSessionOpResponse; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.SessionFakeScriptedRequest; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.MethodInfo; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor.Decoder; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor.Encoder; +import com.google.cloud.bigtable.data.v2.internal.session.VRpcDescriptor.SessionDescriptor; +import com.google.common.collect.ImmutableMap; +import java.util.function.BiConsumer; +import java.util.function.Function; + +public class FakeDescriptor { + public static final SessionDescriptor FAKE_SESSION = + new SessionDescriptor<>( + FakeSessionGrpc.getOpenSessionMethod(), r -> "FAKE_SESSION", r -> ImmutableMap.of()); + public static VRpcDescriptor< + OpenFakeSessionRequest, SessionFakeScriptedRequest, SessionFakeScriptedResponse> + SCRIPTED = + new VRpcDescriptor<>( + FAKE_SESSION, + MethodInfo.of("Bigtable.FakeMethod", false), + createFakeEncoder(FakeSessionOpRequest.Builder::setScriptedRequest), + createFakeDecoder(FakeSessionOpResponse::getScripted), + (name, appProfileId, req) -> { + throw new UnsupportedOperationException(); + }); + + private static Encoder createFakeEncoder( + BiConsumer subEncoder) { + return req -> { + FakeSessionOpRequest.Builder builder = FakeSessionOpRequest.newBuilder(); + subEncoder.accept(builder, req); + return builder.build().toByteString(); + }; + } + + private static Decoder createFakeDecoder( + Function subDecoder) { + return (bytes) -> subDecoder.apply(FakeSessionOpResponse.parseFrom(bytes)); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizerTest.java new file mode 100644 index 0000000000..136195dc33 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/PoolSizerTest.java @@ -0,0 +1,216 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.cloud.bigtable.data.v2.internal.session.PoolSizer.Sized; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.PoolStats; +import com.google.common.base.Preconditions; +import com.google.rpc.Status; +import java.util.concurrent.atomic.AtomicInteger; +import org.junit.jupiter.api.Test; + +class PoolSizerTest { + + private static final float IDLE_SESSION_HEADROOM_RATIO = 0.5f; + private static final int MIN_IDLE_SESSIONS = 5; + private static final int MAX_IDLE_SESSIONS = 400; + private static final int PENDING_RPCS_PER_SESSION = 10; + + private static final SessionClientConfiguration.SessionPoolConfiguration DEFAULT_CONFIG = + SessionClientConfiguration.SessionPoolConfiguration.newBuilder() + .setHeadroom(IDLE_SESSION_HEADROOM_RATIO) + .setMinSessionCount(MIN_IDLE_SESSIONS) + .setMaxSessionCount(MAX_IDLE_SESSIONS) + .setNewSessionQueueLength(PENDING_RPCS_PER_SESSION) + .build(); + + @Test + void testInitial() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 0; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + assertThat(sizer.getScaleDelta()).isEqualTo(MIN_IDLE_SESSIONS); + assertThat(sizer.handleNewCall()).isTrue(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testTestEquilibrium() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 0; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + stats.getTestHelper().setReadyCount(MIN_IDLE_SESSIONS); + stats.getTestHelper().setExpectedCapacity(MIN_IDLE_SESSIONS); + + assertThat(sizer.getScaleDelta()).isEqualTo(0); + assertThat(sizer.handleNewCall()).isFalse(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testPendingRpcs() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 9; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + Preconditions.checkState( + pendingRpcsCount.getSize() > MIN_IDLE_SESSIONS, + "Test requires the pendingCount to be larger than ready count"); + + int numReadySessions = MIN_IDLE_SESSIONS; + + stats.getTestHelper().setReadyCount(numReadySessions); + stats.getTestHelper().setInUseCount(0); + stats.getTestHelper().setExpectedCapacity(numReadySessions); + assertThat(sizer.getScaleDelta()) + .isEqualTo( + (int) Math.ceil((float) pendingRpcsCount.getSize() / PENDING_RPCS_PER_SESSION) + - numReadySessions + + MIN_IDLE_SESSIONS); + assertThat(sizer.handleNewCall()).isTrue(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testInUseWithNewCall() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 0; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + stats.getTestHelper().setReadyCount(0); + stats.getTestHelper().setInUseCount(1); + stats.getTestHelper().setExpectedCapacity(1); + + // Ensure that we always have at least MIN_IDLE_SESSIONS sessions available + // Separately we want to have IDLE_SESSION_HEADROOM_RATIO available sessions, but in this case + // MIN_IDLE_SESSIONS is the primary indicator + assertThat(sizer.getScaleDelta()).isEqualTo(MIN_IDLE_SESSIONS); + // Remain steady in band + assertThat(sizer.handleNewCall()).isTrue(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testInUseWithNewCall2() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 0; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + stats.getTestHelper().setReadyCount(0); + stats.getTestHelper().setInUseCount(20); + stats.getTestHelper().setExpectedCapacity(20); + + // Separately we want to have IDLE_SESSION_HEADROOM_RATIO available sessions + // Separately we want to ensure that we always have at least MIN_IDLE_SESSIONS sessions + // but in this case the ratio is the primary indicator available + assertThat(sizer.getScaleDelta()).isEqualTo(10); + // Remain steady in band + assertThat(sizer.handleNewCall()).isTrue(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testEquilibriumWhenStarting() { + PoolStats stats = new PoolStats(); + Sized pendingRpcsCount = () -> 0; + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + stats.getTestHelper().setStartingCount(MIN_IDLE_SESSIONS); + stats.getTestHelper().setExpectedCapacity(MIN_IDLE_SESSIONS); + + assertThat(sizer.getScaleDelta()).isEqualTo(0); + // Remain steady in band + assertThat(sizer.handleNewCall()).isFalse(); + assertThat(sizer.handleGoAway(GoAwayResponse.getDefaultInstance())).isTrue(); + assertThat(sizer.handleSessionClose(Status.getDefaultInstance())).isTrue(); + } + + @Test + void testEquilibriumWhenStartingWithLoad() { + PoolStats stats = new PoolStats(); + final AtomicInteger pendingCount = new AtomicInteger(0); + Sized pendingRpcsCount = () -> pendingCount.get(); + PoolSizer sizer = new PoolSizer(stats, pendingRpcsCount, DEFAULT_CONFIG); + + assertThat(sizer.getScaleDelta()).isEqualTo(MIN_IDLE_SESSIONS); + + // Started 5 sessions on startup to satisfy PoolSizer.MIN_IDLE_SESSIONS. + stats.getTestHelper().setStartingCount(MIN_IDLE_SESSIONS); + stats.getTestHelper().setExpectedCapacity(MIN_IDLE_SESSIONS); + + // Requests start to pile up while we still have our first 5 sessions starting. + int incomingRequests = 100; + for (int i = 0; i < incomingRequests; i++) { + // When we start a pending vRPC we add it to the list... + pendingCount.incrementAndGet(); + // ... and call handleNewCall() on the sizer. + boolean newCallVerdict = sizer.handleNewCall(); + if (i % PENDING_RPCS_PER_SESSION == 0) { + // For 1st, 11th, 21st, 31st etc. pending call we should demand a new session to be started. + assertThat(newCallVerdict).isTrue(); + } else { + assertThat(newCallVerdict).isFalse(); + } + + int forPending = (int) Math.ceil((float) pendingCount.get() / PENDING_RPCS_PER_SESSION); + int sessionsNeeded = forPending + stats.getInUseCount(); + int desiredIdleSessions = (int) Math.ceil(sessionsNeeded * IDLE_SESSION_HEADROOM_RATIO); + desiredIdleSessions = + Math.max(Math.min(desiredIdleSessions, MAX_IDLE_SESSIONS), MIN_IDLE_SESSIONS); + int desiredCapacity = sessionsNeeded + desiredIdleSessions; + + assertThat(sizer.getScaleDelta()) + .isEqualTo(Math.max(0, desiredCapacity - stats.getExpectedCapacity())); + + if (newCallVerdict) { + // Starting new session as instructed by handleNewCall(). + stats.getTestHelper().setStartingCount(stats.getStartingCount() + 1); + stats.getTestHelper().setExpectedCapacity(stats.getExpectedCapacity() + 1); + } + } + + // After 100 pending RPCs we have 15 sessions starting (10 + 5 for idle headroom). + assertThat(stats.getExpectedCapacity()).isEqualTo(15); + assertThat(sizer.getScaleDelta()).isEqualTo(0); + assertThat(sizer.handleNewCall()).isFalse(); + + // Simulate one session has started. + stats.getTestHelper().setStartingCount(stats.getStartingCount() - 1); + stats.getTestHelper().setReadyCount(stats.getReadyCount() + 1); + // One pending would be immediately taken. + pendingCount.decrementAndGet(); + stats.getTestHelper().setReadyCount(stats.getReadyCount() - 1); + stats.getTestHelper().setInUseCount(stats.getInUseCount() + 1); + // And two more sessions would be requested. + // We still have pending calls for 10 sessions. + // + 1 in-use session now + // + 6 for idle headroom (50% of 11) + // = 17 sessions needed, but we only have 15 + assertThat(sizer.getScaleDelta()).isEqualTo(2); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudgetTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudgetTest.java new file mode 100644 index 0000000000..1eb9bbd467 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionCreationBudgetTest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeClock; +import java.time.Duration; +import java.time.Instant; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class SessionCreationBudgetTest { + + private FakeClock clock; + private Duration penalty; + + @BeforeEach + public void setup() { + clock = new FakeClock(Instant.now()); + penalty = Duration.ofMinutes(1); + } + + @Test + public void test() { + SessionCreationBudget budget = new SessionCreationBudget(1, penalty, clock); + // Try reserve 2 sessions, the second one should return false + assertThat(budget.tryReserveSession()).isTrue(); + assertThat(budget.tryReserveSession()).isFalse(); + + // Release the session, try reserve again should return true + budget.onSessionCreationSuccess(); + assertThat(budget.tryReserveSession()).isTrue(); + + // Release the session as failure, try reserve again should false because of penalty + budget.onSessionCreationFailure(); + assertThat(budget.tryReserveSession()).isFalse(); + + // increment the clock, try reserver again should return true + clock.increment(penalty.plus(Duration.ofNanos(1))); + assertThat(budget.tryReserveSession()).isTrue(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImplTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImplTest.java new file mode 100644 index 0000000000..e3f292a8dd --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionImplTest.java @@ -0,0 +1,533 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.cloud.bigtable.data.v2.internal.test_helpers.StatusSubject.assertThat; +import static com.google.cloud.bigtable.data.v2.internal.test_helpers.VRpcResultSubject.assertThat; +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.ErrorResponse; +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.OpenFakeSessionRequest.Action; +import com.google.bigtable.v2.OpenFakeSessionRequest.ActionList; +import com.google.bigtable.v2.OpenFakeSessionRequest.StreamError; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.SessionFakeScriptedRequest; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.bigtable.v2.SessionParametersResponse; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.api.UnaryResponseFuture; +import com.google.cloud.bigtable.data.v2.internal.api.VRpcException; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SingleChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcCallContext; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult.State; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeClock; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionListener; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionService; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeVRpcListener; +import com.google.cloud.bigtable.data.v2.internal.session.fake.PeerInfoInterceptor; +import com.google.common.base.Stopwatch; +import com.google.common.base.Suppliers; +import com.google.protobuf.util.Durations; +import com.google.rpc.Code; +import io.grpc.CallOptions; +import io.grpc.Deadline; +import io.grpc.Grpc; +import io.grpc.InsecureChannelCredentials; +import io.grpc.Metadata; +import io.grpc.Server; +import io.grpc.Status; +import java.io.IOException; +import java.time.Duration; +import java.time.Instant; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class SessionImplTest { + private ScheduledExecutorService executor; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private Metrics metrics; + + private Server server; + private ChannelPool channelPool; + private SessionFactory sessionFactory; + private final VRpcTracer tracer = NoopMetrics.NoopVrpcTracer.INSTANCE; + private SessionPoolInfo poolInfo; + + @BeforeEach + void setUp() throws IOException { + executor = Executors.newScheduledThreadPool(4); + server = + FakeServiceBuilder.create(new FakeSessionService(executor)) + .intercept(new PeerInfoInterceptor()) + .start(); + + ClientInfo clientInfo = + ClientInfo.builder() + .setAppProfileId("default") + .setInstanceName(InstanceName.parse("projects/fake-project/instances/fake-instance")) + .build(); + + channelPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .build())); + channelPool.start(); + + // TODO: extract this out to a SimpleSessionPoolImpl that simply wraps a single Session + poolInfo = SessionPoolInfo.create(clientInfo, FakeDescriptor.FAKE_SESSION, "fake-pool"); + sessionFactory = + new SessionFactory( + channelPool, FakeDescriptor.FAKE_SESSION.getMethodDescriptor(), CallOptions.DEFAULT); + } + + @AfterEach + void tearDown() { + channelPool.close(); + server.shutdownNow(); + executor.shutdownNow(); + } + + @Test + void sessionSendAndCloseTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload(OpenFakeSessionRequest.getDefaultInstance().toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + assertThat(f.get()).isEqualTo(SessionFakeScriptedResponse.getDefaultInstance()); + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isOk(); + } + + @Test + void sessionCloseBeforeInit() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload(OpenFakeSessionRequest.getDefaultInstance().toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_USER) + .build()); + assertThat(sessionListener.popUntil(Status.class)).isOk(); + } + + @Test + void sessionGoAwayTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + Duration goAwayDelay = Duration.ofMillis(100); + FakeSessionListener sessionListener = new FakeSessionListener(); + session.start( + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .setGoAwayDelay(Durations.fromMillis(goAwayDelay.toMillis())) + .putVrpcActions(0, ActionList.getDefaultInstance()) + .putVrpcActions(1, ActionList.getDefaultInstance()) + .putVrpcActions(2, ActionList.getDefaultInstance()) + .build() + .toByteString()) + .build(), + new Metadata(), + sessionListener); + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + // Send vRPCs until after a goaway time + Stopwatch stopwatch = Stopwatch.createStarted(); + int numUncommittedErrors = 0; + int numOk = 0; + while (stopwatch.elapsed(TimeUnit.MILLISECONDS) < goAwayDelay.toMillis()) { + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + try { + f.get(); + numOk++; + } catch (VRpcException e) { + if (e.getResult().getState() == State.UNCOMMITED) { + numUncommittedErrors++; + } + } + } + + assertWithMessage("Ensure that some vRpcs succeeded prior to the goaway") + .that(numOk) + .isGreaterThan(0); + assertWithMessage("Ensure that only the last vRpc could be rejected with an uncommited error") + .that(numUncommittedErrors) + .isAtMost(1); + + assertThat(sessionListener.popUntil(GoAwayResponse.class)).isInstanceOf(GoAwayResponse.class); + + // Make sure we can't send vrpc after receiving goaway + UnaryResponseFuture f = new UnaryResponseFuture<>(); + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(1).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + assertThrows(ExecutionException.class, f::get); + + assertThat(sessionListener.popUntil(Status.class)).isOk(); + } + + @Test + void streamErrorDuringRpcTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + Status.Code actualCode = Status.Code.INTERNAL; + com.google.rpc.Status actualSessionStatusProto = + com.google.rpc.Status.newBuilder() + .setCode(actualCode.value()) + .setMessage("fake internal error") + .build(); + + session.start( + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .setStreamError( + StreamError.newBuilder() + .setDelay(Durations.fromMillis(200)) + .setStatus(actualSessionStatusProto)) + .putVrpcActions( + 0, + ActionList.newBuilder() + .addActions( + Action.newBuilder() + .setResponse(VirtualRpcResponse.getDefaultInstance()) + .setDelay( + com.google.protobuf.Duration.newBuilder() + .setNanos(300000000)) + .build()) + .build()) + .build() + .toByteString()) + .build(), + new Metadata(), + sessionListener); + + sessionListener.popUntil(OpenSessionResponse.class); + + UnaryResponseFuture f = new UnaryResponseFuture<>(); + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + VRpcException error = (VRpcException) assertThrows(ExecutionException.class, f::get).getCause(); + assertThat(error) + .hasMessageThat() + .isEqualTo( + "UNAVAILABLE: vRPC failed due to transport error\n" + + "Transport error: INTERNAL: fake internal error. PeerInfo:" + + " application_frontend_subzone: \"ll\" transport_type:" + + " TRANSPORT_TYPE_SESSION_DIRECT_ACCESS application_frontend_region: \"local\""); + assertThat(error.getResult()).state().isEqualTo(State.TRANSPORT_FAILURE); + // TODO: fix server Latency definition - need to split node latency from transport latency + assertThat(error.getResult()).backendLatency().isEqualTo(Duration.ZERO); + + Status status = sessionListener.popUntil(Status.class); + assertThat(status).code().isEqualTo(actualCode); + assertThat(status) + .description() + .isEqualTo( + actualSessionStatusProto.getMessage() + + ". PeerInfo: application_frontend_subzone: \"ll\" transport_type:" + + " TRANSPORT_TYPE_SESSION_DIRECT_ACCESS application_frontend_region: \"local\""); + } + + @Test + void rpcErrorDuringRpcTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + com.google.rpc.Status expectedRpcStatus = + com.google.rpc.Status.newBuilder() + .setCode(Code.DEADLINE_EXCEEDED_VALUE) + .setMessage("fake deadline exceeded") + .build(); + + ErrorResponse errorResponse = + ErrorResponse.newBuilder() + .setRpcId(1) + .setStatus(expectedRpcStatus) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .build(); + + ActionList errorActionList = + ActionList.newBuilder() + .addActions(Action.newBuilder().setErrorResponse(errorResponse).build()) + .build(); + FakeSessionListener sessionListener = new FakeSessionListener(); + session.start( + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions(0, errorActionList) + .putVrpcActions(1, ActionList.getDefaultInstance()) + .build() + .toByteString()) + .build(), + new Metadata(), + sessionListener); + + sessionListener.popUntil(OpenSessionResponse.class); + + UnaryResponseFuture f = new UnaryResponseFuture<>(); + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + // error response + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + VRpcException error = (VRpcException) assertThrows(ExecutionException.class, f::get).getCause(); + assertThat(error).hasMessageThat().isEqualTo("DEADLINE_EXCEEDED: fake deadline exceeded"); + assertThat(error.getResult()).state().isEqualTo(State.SERVER_RESULT); + // TODO: fix server Latency definition - need to split node latency from transport latency + assertThat(error.getResult()).backendLatency().isEqualTo(Duration.ZERO); + + // Sending another vRPC after a failed vRPC is ok + f = new UnaryResponseFuture<>(); + rpc = session.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(1).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + // shouldn't throw an error + assertThat(f.get()).isEqualTo(SessionFakeScriptedResponse.getDefaultInstance()); + + session.close(CloseSessionRequest.getDefaultInstance()); + + assertThat(sessionListener.popUntil(Status.class)).isOk(); + } + + @Test + void localErrorTest() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + FakeSessionListener sessionListener = new FakeSessionListener(); + session.start( + OpenSessionRequest.newBuilder() + .setPayload(OpenFakeSessionRequest.getDefaultInstance().toByteString()) + .build(), + new Metadata(), + sessionListener); + + sessionListener.popUntil(OpenSessionResponse.class); + + RuntimeException expectedError = new RuntimeException("my fake onMessageError"); + FakeVRpcListener rpcListener = + new FakeVRpcListener() { + @Override + public void onMessage(SessionFakeScriptedResponse msg) { + throw expectedError; + } + }; + + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + rpcListener); + + VRpcResult result = (VRpcResult) rpcListener.popNext(); + + // TODO: Need a different State to represent local processing failure + assertThat(result).state().isEqualTo(State.USER_FAILURE); + // The status is INTERNAL with a desc explaining the failure was due to local handling + assertThat(result).status().code().isEqualTo(Status.CANCELLED.getCode()); + assertThat(result) + .status() + .description() + .isEqualTo("Cancelling RPC due to exception thrown by user callback"); + assertThat(result).status().cause().isSameInstanceAs(expectedError); + } + + @Test + void testHeartbeat() throws Exception { + FakeClock clock = new FakeClock(Instant.now()); + + Instant time = clock.instant(); + + SessionImpl session = new SessionImpl(metrics, clock, poolInfo, 0, sessionFactory.createNew()); + + int keepAliveDurationMs = 150; + + FakeSessionListener sessionListener = new FakeSessionListener(); + OpenSessionRequest openSessionRequest = + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .setSessionParams( + SessionParametersResponse.newBuilder() + .setKeepAlive(Durations.fromMillis(keepAliveDurationMs)) + .build()) + .putVrpcActions(0, ActionList.getDefaultInstance()) + .build() + .toByteString()) + .build(); + session.start(openSessionRequest, new Metadata(), sessionListener); + assertThat(sessionListener.popUntil(OpenSessionResponse.class)) + .isInstanceOf(OpenSessionResponse.class); + + assertThat(session.getNextHeartbeat()).isEqualTo(time.plus(SessionImpl.FUTURE_TIME)); + + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + f); + + assertThat(session.getNextHeartbeat()) + .isEqualTo(time.plus(Duration.ofMillis(keepAliveDurationMs))); + + assertThat(f.get()).isEqualTo(SessionFakeScriptedResponse.getDefaultInstance()); + + assertThat(session.getNextHeartbeat()).isEqualTo(time.plus(SessionImpl.FUTURE_TIME)); + + session.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("test closed session") + .build()); + assertThat(sessionListener.popUntil(Status.class)).isOk(); + } + + @Test + void testCancel() throws Exception { + SessionImpl session = new SessionImpl(metrics, poolInfo, 0, sessionFactory.createNew()); + + int responseDelayMs = 200; + // Configure the fake service to delay the response, giving us time to cancel it + ActionList actions = + ActionList.newBuilder() + .addActions( + Action.newBuilder() + .setDelay(Durations.fromMillis(responseDelayMs)) + .setResponse(VirtualRpcResponse.getDefaultInstance())) + .build(); + + FakeSessionListener sessionListener = new FakeSessionListener(); + session.start( + OpenSessionRequest.newBuilder() + .setPayload( + OpenFakeSessionRequest.newBuilder() + .putVrpcActions(0, actions) + .build() + .toByteString()) + .build(), + new Metadata(), + sessionListener); + + // Wait for the session to be ready + sessionListener.popUntil(OpenSessionResponse.class); + + // Start the RPC + FakeVRpcListener rpcListener = new FakeVRpcListener<>(); + VRpc rpc = + session.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, tracer), + rpcListener); + + // Cancel it immediately + rpc.cancel("test cancel", null); + + // Verify that the rpc was closed with a CANCELLED status + VRpcResult result = rpcListener.popUntil(VRpcResult.class); + assertThat(result).state().isEqualTo(State.UNCOMMITED); + assertThat(result).status().code().isEqualTo(Status.Code.CANCELLED); + assertThat(result).status().description().isEqualTo("test cancel"); + + // Verify that the response is ignored + Thread.sleep(responseDelayMs + 10); + assertThat(rpcListener.getOnMessageCount()).isEqualTo(0); + + session.close(CloseSessionRequest.getDefaultInstance()); + sessionListener.popUntil(Status.class); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionListTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionListTest.java new file mode 100644 index 0000000000..def4986a95 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionListTest.java @@ -0,0 +1,476 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.ClusterInformation; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.bigtable.v2.SessionRequestStats; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.Session.SessionState; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.PoolStats; +import com.google.cloud.bigtable.data.v2.internal.session.SessionList.SessionHandle; +import com.google.protobuf.Message; +import com.google.protobuf.util.Durations; +import io.grpc.Metadata; +import java.time.Duration; +import java.time.Instant; +import org.junit.jupiter.api.Test; + +class SessionListTest { + private final FakeSession fakeSession = new FakeSession(); + + private static final VRpcResult OK_RESULT = + VRpcResult.createServerOk( + VirtualRpcResponse.newBuilder() + .setRpcId(1) + .setClusterInfo(ClusterInformation.getDefaultInstance()) + .setStats( + SessionRequestStats.newBuilder().setBackendLatency(Durations.fromMicros(500))) + .build()); + private static final Duration FAKE_VRPC_E2E_LATENCY = Duration.ofMillis(1); + + @Test + void testInitialStats() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testInitialToStarting() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + list.newHandle(fakeSession); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).hasSize(1); + + assertThat(stats.getStartingCount()).isEqualTo(1); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(1); + } + + @Test + void testStartingToReady() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + handle.onSessionStarted(); + + assertThat(list.getAfesWithReadySessions()).hasSize(1); + assertThat(list.getAfesWithReadySessions().get(0).sessions).containsExactly(handle); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(1); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(1); + } + + // TODO: StartingToGoAway? or to REMOVED + + @Test + void testReadyToInUse() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(1); + assertThat(stats.getExpectedCapacity()).isEqualTo(1); + } + + @Test + void testReadyInUseToIdle() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + + assertThat(list.getAfesWithReadySessions().get(0).sessions).containsExactly(handle); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(1); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(1); + } + + @Test + void testReadyIdleToSoftClosing() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + // idle session after a goaway skips CLOSING + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onSessionClosing(); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testReadyInUseToSoftClosing() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + + fakeSession.state = SessionState.CLOSING; + handle.onSessionClosing(); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(1); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testClosingInUseToAwaitClose() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + + // idle ready session skips CLOSING + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onSessionClosing(); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testClosingInUseToAwaitCloseWhileRpcIsActive() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + + fakeSession.state = SessionState.CLOSING; + handle.onSessionClosing(); + + // Session will auto transition to WAIT_SERVER_CLOSE from CLOSING when vRpc finishes + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).containsExactly(handle); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testStartingToClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + // server killed the session before it started + fakeSession.state = SessionState.CLOSED; + handle.onSessionClosed(SessionState.STARTING); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testReadyIdleToClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + fakeSession.state = SessionState.CLOSED; + handle.onSessionClosed(SessionState.READY); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testReadyInUseToClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + + fakeSession.state = SessionState.CLOSED; + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + handle.onSessionClosed(SessionState.READY); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testClosingIdleToClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onSessionClosing(); + + fakeSession.state = SessionState.CLOSED; + handle.onSessionClosed(SessionState.WAIT_SERVER_CLOSE); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testClosingInUseToClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + + fakeSession.state = SessionState.CLOSING; + handle.onSessionClosing(); + + // Simulate hard session close when a vRpc is outstanding + fakeSession.state = SessionState.CLOSED; + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + handle.onSessionClosed(SessionState.CLOSING); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + @Test + void testAwaitCloseToSoftClosed() { + SessionList list = new SessionList(); + PoolStats stats = list.getStats(); + + fakeSession.state = SessionState.STARTING; + SessionHandle handle = list.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + handle = list.checkoutSession(list.getAfesWithReadySessions().get(0)).get(); + handle.onVRpcFinish(FAKE_VRPC_E2E_LATENCY, OK_RESULT); + + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onSessionClosing(); + + fakeSession.state = SessionState.CLOSED; + handle.onSessionClosed(SessionState.WAIT_SERVER_CLOSE); + + assertThat(list.getAfesWithReadySessions()).isEmpty(); + assertThat(list.getAllSessions()).isEmpty(); + + assertThat(stats.getStartingCount()).isEqualTo(0); + assertThat(stats.getReadyCount()).isEqualTo(0); + assertThat(stats.getInUseCount()).isEqualTo(0); + assertThat(stats.getExpectedCapacity()).isEqualTo(0); + } + + // Minimal impl of Session that only exposes state to test SessionList + private static class FakeSession implements Session { + private SessionState state = SessionState.NEW; + + @Override + public SessionState getState() { + return state; + } + + @Override + public PeerInfo getPeerInfo() { + return PeerInfo.newBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS) + .setApplicationFrontendId(1234) + .setApplicationFrontendRegion("us-east1") + .setApplicationFrontendSubzone("xx") + .build(); + } + + @Override + public Instant getLastStateChange() { + throw new UnsupportedOperationException(); + } + + @Override + public OpenParams getOpenParams() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isOpenParamsUpdated() { + return false; + } + + @Override + public String getLogName() { + throw new UnsupportedOperationException(); + } + + @Override + public Instant getNextHeartbeat() { + return Instant.now().plus(Duration.ofMinutes(5)); + } + + @Override + public void start(OpenSessionRequest req, Metadata headers, Listener sessionListener) { + throw new UnsupportedOperationException(); + } + + @Override + public void close(CloseSessionRequest req) { + throw new UnsupportedOperationException(); + } + + @Override + public void forceClose(CloseSessionRequest reason) { + throw new UnsupportedOperationException(); + } + + @Override + public + VRpc newCall(VRpcDescriptor descriptor) + throws IllegalStateException { + throw new UnsupportedOperationException(); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImplTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImplTest.java new file mode 100644 index 0000000000..01088143e0 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/SessionPoolImplTest.java @@ -0,0 +1,535 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.cloud.bigtable.data.v2.internal.test_helpers.VRpcResultSubject.assertThat; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.OpenFakeSessionRequest.StreamError; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.SessionFakeScriptedRequest; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.bigtable.v2.SessionRefreshConfig; +import com.google.bigtable.v2.SessionRequest; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.api.UnaryResponseFuture; +import com.google.cloud.bigtable.data.v2.internal.api.VRpcException; +import com.google.cloud.bigtable.data.v2.internal.channels.ChannelPool; +import com.google.cloud.bigtable.data.v2.internal.channels.SingleChannelPool; +import com.google.cloud.bigtable.data.v2.internal.csm.Metrics; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.csm.tracers.VRpcTracer; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcCallContext; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeClock; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeSessionService; +import com.google.cloud.bigtable.data.v2.internal.session.fake.PeerInfoInterceptor; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager; +import com.google.common.base.Suppliers; +import com.google.common.collect.Range; +import com.google.common.truth.Correspondence; +import com.google.protobuf.ByteString; +import com.google.protobuf.util.Durations; +import com.google.rpc.Code; +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.ForwardingClientCall.SimpleForwardingClientCall; +import io.grpc.ForwardingClientCallListener.SimpleForwardingClientCallListener; +import io.grpc.Grpc; +import io.grpc.InsecureChannelCredentials; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Server; +import io.grpc.ServerCall; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; +import java.io.IOException; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +@Nested +@ExtendWith(MockitoExtension.class) +public class SessionPoolImplTest { + private static final ClientInfo CLIENT_INFO = + ClientInfo.builder() + .setAppProfileId("default") + .setInstanceName(InstanceName.parse("projects/fake-project/instances/fake-instance")) + .build(); + + private static Correspondence + OPEN_SESSION_REQUEST_CORRESPONDENCE = + Correspondence.transforming(SessionRequest::getOpenSession, "open session"); + + private ScheduledExecutorService executor; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private Metrics metrics; + + @Mock private ClientConfigurationManager configManager; + + private Server server; + private final VRpcTracer vrpcTracer = NoopMetrics.NoopVrpcTracer.INSTANCE; + private ChannelPool channelPool; + private SessionPoolImpl sessionPool; + private FakeSessionService fakeService; + private HeaderInterceptor headerInterceptor; + + @BeforeEach + void setUp() throws IOException { + executor = Executors.newScheduledThreadPool(4); + fakeService = new FakeSessionService(executor); + headerInterceptor = new HeaderInterceptor(); + server = + FakeServiceBuilder.create(fakeService) + .intercept(new PeerInfoInterceptor()) + .intercept(headerInterceptor) + .start(); + + channelPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .build())); + channelPool.start(); + + ClientConfigurationManager.ListenerHandle listenerHandle = + Mockito.mock(ClientConfigurationManager.ListenerHandle.class); + when(configManager.getClientConfiguration()) + .thenReturn(ClientConfigurationManager.loadDefault()); + when(configManager.addListener(any(), any())).thenReturn(listenerHandle); + doNothing().when(listenerHandle).close(); + + sessionPool = + new SessionPoolImpl<>( + metrics, + FeatureFlags.getDefaultInstance(), + CLIENT_INFO, + configManager, + channelPool, + CallOptions.DEFAULT, + FakeDescriptor.FAKE_SESSION, + "fake-pool", + executor); + } + + @AfterEach + void tearDown() { + sessionPool.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("close session") + .build()); + channelPool.close(); + // channel gets shutdown in channelPool.close() + server.shutdownNow(); + executor.shutdownNow(); + } + + @Test + public void consecutiveFailuresTest() { + com.google.rpc.Status errorStatus = + com.google.rpc.Status.newBuilder() + .setCode(Code.INTERNAL_VALUE) + .setMessage("fake internal error") + .build(); + + OpenFakeSessionRequest request = + OpenFakeSessionRequest.newBuilder() + .setStreamError( + StreamError.newBuilder() + .setStatus(errorStatus) + .setDelay(Durations.fromMillis(0)) + .build()) + .build(); + sessionPool.start(request, new Metadata()); + + UnaryResponseFuture f = new UnaryResponseFuture<>(); + VRpc rpc = + sessionPool.newCall(FakeDescriptor.SCRIPTED); + rpc.start( + SessionFakeScriptedRequest.newBuilder().setTag(0).build(), + VRpc.VRpcCallContext.create(Deadline.after(1, TimeUnit.MINUTES), true, vrpcTracer), + f); + + VRpcException exception = + (VRpcException) assertThrows(ExecutionException.class, f::get).getCause(); + assertThat(exception) + .hasMessageThat() + .contains( + "UNAVAILABLE: Session failed with consecutive failures. Most recent server status:" + + " Status{code=INTERNAL, description=fake internal error. PeerInfo:" + + " transport_type: TRANSPORT_TYPE_SESSION_UNKNOWN, cause=null}"); + } + + @Test + void pendingVRpcDrainTest() throws ExecutionException, InterruptedException, TimeoutException { + // delay all messages to force the first vrpc to be queued + + SessionPool testSessionPool = null; + + // Create a channel that will delay all response messages by 10ms + try (ChannelPool delayedPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .intercept(new DelayedClientInterceptor(Duration.ofMillis(10))) + .build()))) { + + delayedPool.start(); + + // wrap it with a session pool + testSessionPool = + new SessionPoolImpl<>( + metrics, + FeatureFlags.getDefaultInstance(), + CLIENT_INFO, + configManager, + delayedPool, + CallOptions.DEFAULT, + FakeDescriptor.FAKE_SESSION, + "fake-pool", + executor); + + // session ack should be delayed by at least 10ms + testSessionPool.start(OpenFakeSessionRequest.getDefaultInstance(), new Metadata()); + + // Start a vRpc that will be put in the pending queue due to slow session start + VRpc vrpc = + testSessionPool.newCall(FakeDescriptor.SCRIPTED); + CompletableFuture resultFuture = new CompletableFuture<>(); + vrpc.start( + SessionFakeScriptedRequest.getDefaultInstance(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.SECONDS), true, vrpcTracer), + new VRpc.VRpcListener() { + @Override + public void onMessage(SessionFakeScriptedResponse msg) {} + + @Override + public void onClose(VRpcResult result) { + resultFuture.complete(result); + } + }); + + // Ensure that the rpc eventually succeeded + VRpcResult result = resultFuture.get(1, TimeUnit.MINUTES); + assertThat(result).isOk(); + + } finally { + if (testSessionPool != null) { + testSessionPool.close(CloseSessionRequest.getDefaultInstance()); + } + } + } + + @Test + void testCreateSessionDoesntPropagateDeadline() { + DeadlineInterceptor deadlineInterceptor = new DeadlineInterceptor(); + try (ChannelPool capturedDeadlinePool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", server.getPort(), InsecureChannelCredentials.create()) + .intercept(deadlineInterceptor) + .build()))) { + + capturedDeadlinePool.start(); + + SessionPoolImpl testSessionPool = + new SessionPoolImpl<>( + metrics, + FeatureFlags.getDefaultInstance(), + CLIENT_INFO, + configManager, + capturedDeadlinePool, + CallOptions.DEFAULT, + FakeDescriptor.FAKE_SESSION, + "fake-pool", + executor); + + Context.current() + .withDeadlineAfter(1, TimeUnit.MINUTES, executor) + .run( + () -> + testSessionPool.start( + OpenFakeSessionRequest.getDefaultInstance(), new Metadata())); + + assertThat(deadlineInterceptor.getObservedDeadline()).isNull(); + + testSessionPool.close(CloseSessionRequest.getDefaultInstance()); + } + } + + @Nested + class RetrySessionCreation { + + private FakeClock fakeClock; + private ScheduledExecutorService mockExecutor; + private FakeSessionService fakeService; + private ChannelPool channelPool; + private SessionPoolImpl sessionPool; + + private final Duration penalty = Duration.ofMinutes(1); + + @BeforeEach + void setUp() throws Exception { + fakeClock = new FakeClock(Instant.now()); + mockExecutor = mock(ScheduledExecutorService.class, Mockito.RETURNS_DEEP_STUBS); + + Duration penalty = Duration.ofMinutes(1); + SessionCreationBudget budget = new SessionCreationBudget(10, penalty, fakeClock); + + fakeService = new FakeSessionService(executor); + Server rejectRequestServer = + FakeServiceBuilder.create(fakeService).intercept(new PeerInfoInterceptor()).start(); + + channelPool = + new SingleChannelPool( + Suppliers.ofInstance( + Grpc.newChannelBuilderForAddress( + "localhost", + rejectRequestServer.getPort(), + InsecureChannelCredentials.create()) + .build())); + channelPool.start(); + + sessionPool = + new SessionPoolImpl<>( + metrics, + FeatureFlags.getDefaultInstance(), + CLIENT_INFO, + configManager, + channelPool, + CallOptions.DEFAULT, + FakeDescriptor.FAKE_SESSION, + "fake-pool", + mockExecutor, + budget); + } + + @AfterEach + void tearDown() { + sessionPool.close( + CloseSessionRequest.newBuilder() + .setReason(CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_USER) + .setDescription("close session") + .build()); + server.shutdown(); + channelPool.close(); + } + + @Test + public void test() throws Exception { + ArgumentCaptor runnableCaptor = ArgumentCaptor.forClass(Runnable.class); + ArgumentCaptor delayCaptor = ArgumentCaptor.forClass(Long.class); + + // start the pool + sessionPool.start( + OpenFakeSessionRequest.newBuilder() + .setStreamError(StreamError.getDefaultInstance()) + .build(), + new Metadata()); + + // Session creations should fail and a task to retry session creation should be scheduled. + // The delay should be around budget creation failure penalty. It'll take some time for the + // job to exhaust all the creation budget so set a delay before verifying. + int waitForReadyMs = 1000; + verify(mockExecutor, Mockito.timeout(waitForReadyMs)) + .schedule(runnableCaptor.capture(), delayCaptor.capture(), eq(TimeUnit.MILLISECONDS)); + assertThat(delayCaptor.getValue()) + .isIn( + Range.openClosed( + penalty.minus(Duration.ofMillis(waitForReadyMs)).toMillis(), penalty.toMillis())); + + // we should have received some open requests + int requestsBefore = fakeService.getOpenRequestCount().get(); + assertThat(requestsBefore).isGreaterThan(0); + + // vrpc will queue in the PendingVRpcs queue + VRpc vrpc = + sessionPool.newCall(FakeDescriptor.SCRIPTED); + UnaryResponseFuture f = new UnaryResponseFuture<>(); + vrpc.start( + SessionFakeScriptedRequest.getDefaultInstance(), + VRpcCallContext.create(Deadline.after(1, TimeUnit.SECONDS), true, vrpcTracer), + f); + + // Advance the clock so there's more budget to create sessions + fakeClock.increment(penalty.plusMillis(1)); + + // Run the scheduled task, pool sizer will return a positive scale factor because there's a + // pending vrpc + runnableCaptor.getValue().run(); + + // The retry task will try to open new sessions. This will fail and schedule another retry. + verify(mockExecutor, Mockito.timeout(1000).times(2)) + .schedule(any(Runnable.class), anyLong(), eq(TimeUnit.MILLISECONDS)); + + // the retry will exhaust the budget again. we should see double the request compared to + // before + int requestsAfter = fakeService.getOpenRequestCount().get(); + assertThat(requestsAfter).isGreaterThan(requestsBefore); + } + } + + @Test + public void refreshConfigTest() throws Exception { + OpenSessionRequest refreshRequest = + OpenSessionRequest.newBuilder() + .setPayload(OpenFakeSessionRequest.getDefaultInstance().toByteString()) + .build(); + String refreshHeaderKey = "x-refresh-header"; + Metadata.Key metadataKey = Metadata.Key.of(refreshHeaderKey, Metadata.ASCII_STRING_MARSHALLER); + SessionRefreshConfig refreshConfig = + SessionRefreshConfig.newBuilder() + .setOptimizedOpenRequest(refreshRequest) + .addMetadata( + SessionRefreshConfig.Metadata.newBuilder() + .setKey(refreshHeaderKey) + .setValue(ByteString.copyFromUtf8("refresh_value"))) + .build(); + + OpenFakeSessionRequest request = + OpenFakeSessionRequest.newBuilder() + .setRefreshConfig(refreshConfig) + .setRefreshConfigDelay(Durations.fromMillis(100)) + .setGoAwayDelay(Durations.fromMillis(120)) + .build(); + + sessionPool.start(request, new Metadata()); + + Thread.sleep(500); + + List requests = fakeService.getSessionRequests(); + assertThat(requests.size()).isGreaterThan(1); + assertThat(requests) + .comparingElementsUsing(OPEN_SESSION_REQUEST_CORRESPONDENCE) + .contains(refreshRequest); + + // Verify headers + List headers = headerInterceptor.getHeadersList(); + boolean containsHeader = false; + for (Metadata header : headers) { + if (header.containsKey(metadataKey)) { + containsHeader = true; + assertThat(header.get(metadataKey)).isEqualTo("refresh_value"); + } + } + assertThat(containsHeader).isTrue(); + } + + private static class DelayedClientInterceptor implements ClientInterceptor { + private final Duration delay; + + private DelayedClientInterceptor(Duration delay) { + this.delay = delay; + } + + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + return new SimpleForwardingClientCall( + channel.newCall(methodDescriptor, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + super.start( + new SimpleForwardingClientCallListener(responseListener) { + @Override + public void onMessage(RespT message) { + try { + // delay all messages to force the first vrpc to be queued + Thread.sleep(delay.toMillis()); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + super.onMessage(message); + } + }, + headers); + } + }; + } + } + + private static class DeadlineInterceptor implements ClientInterceptor { + private volatile Deadline observedDeadline; + + @Override + public ClientCall interceptCall( + MethodDescriptor method, CallOptions callOptions, Channel next) { + if (method.getBareMethodName().equals("OpenSession")) { + observedDeadline = Context.current().getDeadline(); + } + return next.newCall(method, callOptions); + } + + public Deadline getObservedDeadline() { + return observedDeadline; + } + } + + private static class HeaderInterceptor implements ServerInterceptor { + private final List headersList = new ArrayList<>(); + + @Override + public io.grpc.ServerCall.Listener interceptCall( + ServerCall call, Metadata headers, ServerCallHandler next) { + headersList.add(headers); + return next.startCall(call, headers); + } + + public List getHeadersList() { + return headersList; + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/UtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/UtilTest.java new file mode 100644 index 0000000000..4a42efaf76 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/UtilTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.OpenTableRequest; +import com.google.bigtable.v2.SessionType; +import org.junit.jupiter.api.Test; + +class UtilTest { + @Test + void testTableOpenRpc() { + SessionType sessionType = + SessionUtil.extractSessionTypeFromMethod(BigtableGrpc.getOpenTableMethod()); + assertThat(sessionType).isEqualTo(SessionType.SESSION_TYPE_TABLE); + } + + @Test + void testTableOpenMsg() { + OpenTableRequest msg = OpenTableRequest.getDefaultInstance(); + SessionType sessionType = SessionUtil.extractOpenSessionTypeFromOpenMsg(msg); + assertThat(sessionType).isEqualTo(SessionType.SESSION_TYPE_TABLE); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptorTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptorTest.java new file mode 100644 index 0000000000..4c1e31294a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcDescriptorTest.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.Cell; +import com.google.bigtable.v2.Column; +import com.google.bigtable.v2.Family; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.Row; +import com.google.bigtable.v2.RowFilter; +import com.google.bigtable.v2.SessionMutateRowRequest; +import com.google.bigtable.v2.SessionReadRowRequest; +import com.google.bigtable.v2.SessionReadRowResponse; +import com.google.bigtable.v2.TableRequest; +import com.google.bigtable.v2.TableResponse; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import org.junit.jupiter.api.Test; + +class VRpcDescriptorTest { + + @Test + void testReadRow() throws InvalidProtocolBufferException { + assertThat(VRpcDescriptor.READ_ROW.getSessionDescriptor()) + .isEqualTo(VRpcDescriptor.TABLE_SESSION); + + TableResponse tableResp = + TableResponse.newBuilder() + .setReadRow( + SessionReadRowResponse.newBuilder() + .setRow( + Row.newBuilder() + .setKey(ByteString.copyFromUtf8("rowkey1")) + .addFamilies( + Family.newBuilder() + .setName("f") + .addColumns( + Column.newBuilder() + .addCells( + Cell.newBuilder() + .setTimestampMicros(12345) + .setValue(ByteString.copyFromUtf8("value"))))))) + .build(); + assertThat(VRpcDescriptor.READ_ROW.decode(tableResp.toByteString())) + .isEqualTo(tableResp.getReadRow()); + + SessionReadRowRequest req = + SessionReadRowRequest.newBuilder() + .setKey(ByteString.copyFromUtf8("rowkey1")) + .setFilter(RowFilter.newBuilder().setBlockAllFilter(true)) + .build(); + assertThat(TableRequest.parseFrom(VRpcDescriptor.READ_ROW.encode(req))) + .isEqualTo(TableRequest.newBuilder().setReadRow(req).build()); + } + + @Test + void testToLegacyProtoReadRow() { + SessionReadRowRequest req = + SessionReadRowRequest.newBuilder() + .setKey(ByteString.copyFromUtf8("rowkey1")) + .setFilter(RowFilter.newBuilder().setBlockAllFilter(true)) + .build(); + ReadRowsRequest legacyReq = + (ReadRowsRequest) VRpcDescriptor.READ_ROW.toLegacyProto("table1", "app1", req); + assertThat(legacyReq.getTableName()).isEqualTo("table1"); + assertThat(legacyReq.getAppProfileId()).isEqualTo("app1"); + assertThat(legacyReq.getRows().getRowKeys(0)).isEqualTo(req.getKey()); + assertThat(legacyReq.getFilter()).isEqualTo(req.getFilter()); + assertThat(legacyReq.getRowsLimit()).isEqualTo(1); + } + + @Test + void testToLegacyProtoMutateRow() { + SessionMutateRowRequest req = + SessionMutateRowRequest.newBuilder() + .setKey(ByteString.copyFromUtf8("rowkey1")) + .addMutations( + Mutation.newBuilder() + .setSetCell( + Mutation.SetCell.newBuilder() + .setFamilyName("f") + .setColumnQualifier(ByteString.copyFromUtf8("c")) + .setValue(ByteString.copyFromUtf8("v")))) + .build(); + MutateRowRequest legacyReq = + (MutateRowRequest) VRpcDescriptor.MUTATE_ROW.toLegacyProto("table1", "app1", req); + assertThat(legacyReq.getTableName()).isEqualTo("table1"); + assertThat(legacyReq.getAppProfileId()).isEqualTo("app1"); + assertThat(legacyReq.getRowKey()).isEqualTo(req.getKey()); + assertThat(legacyReq.getMutationsList()).isEqualTo(req.getMutationsList()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/WatchdogTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/WatchdogTest.java new file mode 100644 index 0000000000..94bd6fcc50 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/WatchdogTest.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.OpenSessionRequest; +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc; +import com.google.cloud.bigtable.data.v2.internal.session.Session.SessionState; +import com.google.cloud.bigtable.data.v2.internal.session.SessionPoolImpl.Watchdog; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeClock; +import com.google.protobuf.Message; +import io.grpc.Metadata; +import java.time.Duration; +import java.time.Instant; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class WatchdogTest { + private final Duration interval = Duration.ofMinutes(5); + private ScheduledExecutorService executor; + private SessionPoolImpl.Watchdog watchdog; + private SessionList sessions; + private FakeSession fakeSession = new FakeSession(); + + private Instant now; + private FakeClock fakeClock; + + @BeforeEach + void setUp() { + executor = Executors.newScheduledThreadPool(4); + + now = Instant.now(); + fakeClock = new FakeClock(now); + sessions = new SessionList(); + watchdog = + new Watchdog( + new Object(), + executor, + interval, + sessions, + NoopMetrics.NoopDebugTracer.INSTANCE, + fakeClock); + } + + @AfterEach + void tearDown() { + executor.shutdownNow(); + } + + @Test + public void awaitCloseTest() { + fakeSession.lastStateChange = fakeClock.instant(); + + fakeSession.state = SessionState.STARTING; + SessionList.SessionHandle handle = sessions.newHandle(fakeSession); + + fakeSession.state = SessionState.READY; + handle.onSessionStarted(); + + fakeSession.state = SessionState.WAIT_SERVER_CLOSE; + handle.onSessionClosing(); + + watchdog.run(); + assertThat(fakeSession.forceCloseReason).isNull(); + + fakeClock.increment(interval.plus(Duration.ofNanos(1))); + watchdog.run(); + + assertThat(fakeSession.forceCloseReason).isNotNull(); + assertThat(fakeSession.forceCloseReason.getDescription()) + .contains("awaiting close for too long"); + } + + private static class FakeSession implements Session { + private static final String sessionName = "fake-session"; + private SessionState state = SessionState.NEW; + private Instant lastStateChange = Instant.now(); + private CloseSessionRequest forceCloseReason = null; + + @Override + public PeerInfo getPeerInfo() { + return PeerInfo.newBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS) + .setApplicationFrontendId(1234) + .setApplicationFrontendRegion("us-east1") + .setApplicationFrontendSubzone("xx") + .build(); + } + + @Override + public SessionState getState() { + return state; + } + + @Override + public Instant getLastStateChange() { + return lastStateChange; + } + + @Override + public String getLogName() { + return sessionName; + } + + @Override + public Instant getNextHeartbeat() { + return Instant.now().plus(Duration.ofMinutes(5)); + } + + @Override + public OpenParams getOpenParams() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isOpenParamsUpdated() { + return false; + } + + @Override + public void start(OpenSessionRequest req, Metadata headers, Listener sessionListener) { + throw new UnsupportedOperationException(); + } + + @Override + public void close(CloseSessionRequest req) { + throw new UnsupportedOperationException(); + } + + @Override + public void forceClose(CloseSessionRequest reason) { + forceCloseReason = reason; + } + + @Override + public + VRpc newCall(VRpcDescriptor descriptor) + throws IllegalStateException { + throw new UnsupportedOperationException(); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeClock.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeClock.java new file mode 100644 index 0000000000..6e7b80baf0 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeClock.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session.fake; + +import java.time.Clock; +import java.time.Duration; +import java.time.Instant; +import java.time.ZoneId; + +public class FakeClock extends Clock { + + private Instant time; + + public FakeClock(Instant time) { + this.time = time; + } + + public void increment(Duration delta) { + this.time = time.plus(delta); + } + + @Override + public ZoneId getZone() { + return null; + } + + @Override + public Clock withZone(ZoneId zone) { + return null; + } + + @Override + public Instant instant() { + return time; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeServiceBuilder.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeServiceBuilder.java new file mode 100644 index 0000000000..aef206ffd5 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeServiceBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session.fake; + +import io.grpc.BindableService; +import io.grpc.Server; +import io.grpc.ServerBuilder; +import io.grpc.ServerInterceptor; +import io.grpc.ServerTransportFilter; +import java.io.IOException; +import java.net.BindException; +import java.net.ServerSocket; +import java.util.ArrayList; +import java.util.List; + +public class FakeServiceBuilder { + private final List interceptors = new ArrayList<>(); + private final List services = new ArrayList<>(); + private final List transportFilters = new ArrayList<>(); + + public static FakeServiceBuilder create(BindableService... services) { + return new FakeServiceBuilder(services); + } + + private FakeServiceBuilder(BindableService[] services) { + for (BindableService service : services) { + this.addService(service); + } + } + + public FakeServiceBuilder intercept(ServerInterceptor interceptor) { + interceptors.add(interceptor); + return this; + } + + public FakeServiceBuilder addService(BindableService service) { + services.add(service); + return this; + } + + public FakeServiceBuilder addTransportFilter(ServerTransportFilter transportFilter) { + transportFilters.add(transportFilter); + return this; + } + + public Server start() throws IOException { + IOException lastError = null; + + for (int i = 0; i < 10; i++) { + try { + return startWithoutRetries(); + } catch (IOException e) { + lastError = e; + if (e.getCause() instanceof BindException) { + continue; + } + if (e.getMessage().contains("Failed to bind to address")) { + continue; + } + break; + } + } + + throw lastError; + } + + private Server startWithoutRetries() throws IOException { + int port; + try (ServerSocket ss = new ServerSocket(0)) { + port = ss.getLocalPort(); + } + ServerBuilder builder = ServerBuilder.forPort(port); + interceptors.forEach(builder::intercept); + services.forEach(builder::addService); + transportFilters.forEach(builder::addTransportFilter); + + return builder.build().start(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionListener.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionListener.java new file mode 100644 index 0000000000..d7063edded --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionListener.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 + * + * 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.bigtable.data.v2.internal.session.fake; + +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.cloud.bigtable.data.v2.internal.session.Session; +import com.google.cloud.bigtable.data.v2.internal.session.Session.SessionState; +import io.grpc.Metadata; +import io.grpc.Status; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.BlockingDeque; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class FakeSessionListener implements Session.Listener { + private BlockingDeque msgs = new LinkedBlockingDeque<>(); + + @Override + public void onReady(OpenSessionResponse msg) { + msgs.add(msg); + } + + @Override + public void onGoAway(GoAwayResponse msg) { + msgs.add(msg); + } + + @Override + public void onClose(SessionState prevState, Status status, Metadata trailers) { + msgs.add(status); + } + + @SuppressWarnings("unchecked") + public T popUntil(Class cls) throws InterruptedException, TimeoutException { + List seen = new ArrayList<>(); + + Object msg = null; + while (!cls.isInstance(msg)) { + try { + msg = popNext(); + seen.add(msg); + } catch (TimeoutException e) { + throw new TimeoutException( + "Timed out waiting to popUntil event of: " + cls + ", seen: " + seen); + } + } + return (T) msg; + } + + public Object popNext() throws InterruptedException, TimeoutException { + return popNext(Duration.ofSeconds(1)); + } + + public Object popNext(Duration timeout) throws InterruptedException, TimeoutException { + Object obj = msgs.poll(timeout.toMillis(), TimeUnit.MILLISECONDS); + if (obj == null) { + throw new TimeoutException("Timed out waiting to popNext Session event"); + } + return obj; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionService.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionService.java new file mode 100644 index 0000000000..1b575fd2d2 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeSessionService.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session.fake; + +import com.google.bigtable.v2.FakeSessionGrpc; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionResponse; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.atomic.AtomicInteger; + +public class FakeSessionService extends FakeSessionGrpc.FakeSessionImplBase { + + private final ScheduledExecutorService executor; + private final AtomicInteger openRequestCount = new AtomicInteger(0); + + private final List sessionRequests = new ArrayList<>(); + + public FakeSessionService(ScheduledExecutorService executor) { + this.executor = executor; + } + + @Override + public StreamObserver openSession( + StreamObserver responseObserver) { + openRequestCount.incrementAndGet(); + SessionHandler handler = new SessionHandler(executor, responseObserver); + return new StreamObserver() { + @Override + public void onNext(SessionRequest value) { + sessionRequests.add(value); + handler.onNext(value); + } + + @Override + public void onError(Throwable t) { + handler.onError(t); + } + + @Override + public void onCompleted() { + handler.onCompleted(); + } + }; + } + + public AtomicInteger getOpenRequestCount() { + return openRequestCount; + } + + public java.util.List getSessionRequests() { + return sessionRequests; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeVRpcListener.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeVRpcListener.java new file mode 100644 index 0000000000..524bb2795f --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/FakeVRpcListener.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session.fake; + +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcListener; +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import java.time.Duration; +import java.util.concurrent.BlockingDeque; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +public class FakeVRpcListener implements VRpcListener { + private BlockingDeque msgs = new LinkedBlockingDeque<>(); + private final AtomicInteger onMessageCount = new AtomicInteger(0); + + @Override + public void onMessage(RespT msg) { + onMessageCount.getAndIncrement(); + msgs.add(msg); + } + + @Override + public void onClose(VRpcResult result) { + msgs.add(result); + } + + @SuppressWarnings("unchecked") + public T popUntil(Class cls) throws InterruptedException { + Object obj = null; + while (!cls.isInstance(obj)) { + obj = popNext(); + } + return (T) obj; + } + + public Object popNext() throws InterruptedException { + return popNext(Duration.ofSeconds(1)); + } + + public Object popNext(Duration timeout) throws InterruptedException { + return msgs.poll(timeout.toMillis(), TimeUnit.MILLISECONDS); + } + + public int getOnMessageCount() { + return onMessageCount.get(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/PeerInfoInterceptor.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/PeerInfoInterceptor.java new file mode 100644 index 0000000000..1cbf2651b1 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/PeerInfoInterceptor.java @@ -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 + * + * 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.bigtable.data.v2.internal.session.fake; + +import com.google.bigtable.v2.PeerInfo; +import com.google.bigtable.v2.PeerInfo.TransportType; +import io.grpc.ForwardingServerCall.SimpleForwardingServerCall; +import io.grpc.Metadata; +import io.grpc.ServerCall; +import io.grpc.ServerCall.Listener; +import io.grpc.ServerCallHandler; +import io.grpc.ServerInterceptor; +import java.util.Base64; + +public class PeerInfoInterceptor implements ServerInterceptor { + private static final Metadata.Key PEER_INFO_KEY = + Metadata.Key.of("bigtable-peer-info", Metadata.ASCII_STRING_MARSHALLER); + + @Override + public Listener interceptCall( + ServerCall call, Metadata headers, ServerCallHandler next) { + + return next.startCall( + new SimpleForwardingServerCall(call) { + @Override + public void sendHeaders(Metadata headers) { + PeerInfo peerInfo = + PeerInfo.newBuilder() + .setTransportType(TransportType.TRANSPORT_TYPE_SESSION_DIRECT_ACCESS) + .setApplicationFrontendRegion("local") + .setApplicationFrontendSubzone("ll") + .build(); + String encoded = Base64.getUrlEncoder().encodeToString(peerInfo.toByteArray()); + headers.put(PEER_INFO_KEY, encoded); + super.sendHeaders(headers); + } + }, + headers); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/SessionHandler.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/SessionHandler.java new file mode 100644 index 0000000000..f1e4b40559 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/session/fake/SessionHandler.java @@ -0,0 +1,438 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.session.fake; + +import com.google.bigtable.v2.CloseSessionRequest; +import com.google.bigtable.v2.FakeSessionOpRequest; +import com.google.bigtable.v2.FakeSessionOpResponse; +import com.google.bigtable.v2.GoAwayResponse; +import com.google.bigtable.v2.OpenFakeSessionRequest; +import com.google.bigtable.v2.OpenFakeSessionRequest.Action; +import com.google.bigtable.v2.OpenFakeSessionRequest.ActionList; +import com.google.bigtable.v2.OpenFakeSessionResponse; +import com.google.bigtable.v2.OpenSessionResponse; +import com.google.bigtable.v2.SessionFakeScriptedResponse; +import com.google.bigtable.v2.SessionParametersResponse; +import com.google.bigtable.v2.SessionRequest; +import com.google.bigtable.v2.SessionRequest.PayloadCase; +import com.google.bigtable.v2.SessionResponse; +import com.google.bigtable.v2.VirtualRpcRequest; +import com.google.bigtable.v2.VirtualRpcResponse; +import com.google.common.base.Preconditions; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.util.Durations; +import io.grpc.Status; +import io.grpc.stub.StreamObserver; +import java.time.Duration; +import java.util.ArrayDeque; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; + +public class SessionHandler implements StreamObserver { + public static final long AUTOMATIC_RPC_ID = -1; + + private final ScheduledExecutorService executor; + private final StreamObserver respStream; + private final Set> timers = new HashSet<>(); + private State state; + + public SessionHandler( + ScheduledExecutorService executor, StreamObserver respStream) { + this.executor = executor; + this.respStream = respStream; + + this.state = new NewState(this); + } + + // gRPC event handlers + @Override + public synchronized void onNext(SessionRequest msg) { + state = state.onMessage(msg); + } + + @Override + public synchronized void onError(Throwable t) { + state = state.onClose(Status.fromThrowable(t)); + } + + @Override + public synchronized void onCompleted() {} + + // helpers + ScheduledFuture delay(Duration amount, Supplier f) { + ScheduledFuture timer = + executor.schedule( + () -> { + synchronized (SessionHandler.this) { + state = f.get(); + } + }, + amount.toMillis(), + TimeUnit.MILLISECONDS); + timers.add(timer); + return timer; + } + + void writeResponse(SessionResponse response) { + respStream.onNext(response); + } + + State terminateWithError(Status status) { + respStream.onError(status.asRuntimeException()); + timers.forEach(t -> t.cancel(true)); + timers.clear(); + + return DoneState.INSTANCE; + } + + State terminateSuccess() { + state = DoneState.INSTANCE; + respStream.onCompleted(); + timers.forEach(t -> t.cancel(true)); + timers.clear(); + return state; + } + + interface State { + State onMessage(SessionRequest sReq); + + State onClose(Status status); + } + + static class NewState implements State { + private final SessionHandler handler; + + NewState(SessionHandler handler) { + this.handler = handler; + } + + @Override + public State onMessage(SessionRequest sReq) { + Preconditions.checkState( + sReq.getPayloadCase() == PayloadCase.OPEN_SESSION, + "NewState expected an OpenSession msg, got: %s", + sReq); + + OpenFakeSessionRequest oReq; + try { + oReq = OpenFakeSessionRequest.parseFrom(sReq.getOpenSession().getPayload()); + } catch (InvalidProtocolBufferException e) { + throw new RuntimeException(e); + } + + if (oReq.hasStreamError()) { + Status status = + Status.fromCodeValue(oReq.getStreamError().getStatus().getCode()) + .withDescription(oReq.getStreamError().getStatus().getMessage()); + + if (Durations.ZERO.equals(oReq.getStreamError().getDelay())) { + return handler.terminateWithError(status); + } else { + ScheduledFuture ignored = + handler.delay( + Duration.ofMillis(Durations.toMillis(oReq.getStreamError().getDelay())), + () -> handler.state = handler.terminateWithError(status)); + } + } + + // TODO: populate this + SessionParametersResponse params = + SessionParametersResponse.newBuilder().setKeepAlive(Durations.fromSeconds(1)).build(); + + if (oReq.hasSessionParams()) { + params = oReq.getSessionParams(); + } + handler.writeResponse(SessionResponse.newBuilder().setSessionParameters(params).build()); + + handler.writeResponse( + SessionResponse.newBuilder() + .setOpenSession( + OpenSessionResponse.newBuilder() + .setPayload(OpenFakeSessionResponse.newBuilder().build().toByteString())) + .build()); + + Duration goAwayDelay = + oReq.hasGoAwayDelay() + ? Duration.ofMillis(Durations.toMillis(oReq.getGoAwayDelay())) + : Duration.ofMinutes(1); + + if (oReq.equals(OpenFakeSessionRequest.getDefaultInstance())) { + oReq = + OpenFakeSessionRequest.newBuilder() + .putVrpcActions( + 0, + ActionList.newBuilder() + .setRepeat(true) + .addActions( + Action.newBuilder() + .setResponse(VirtualRpcResponse.getDefaultInstance()) + .build()) + .build()) + .build(); + } + + return new RunningState(handler, goAwayDelay, oReq); + } + + @Override + public State onClose(Status status) { + return DoneState.INSTANCE; + } + } + + static class RunningState implements State { + private static final Duration HALF_CLOSE_WAIT_TIMEOUT = Duration.ofSeconds(1); + + private final SessionHandler helper; + private ScheduledFuture lifecycleTimer; + private boolean vRpcActive = false; + private boolean gotHalfClose = false; + + private final Map actionsMap; + private final Map actionQueues = new HashMap<>(); + + public RunningState( + SessionHandler helper, Duration goAwayDelay, OpenFakeSessionRequest request) { + this.helper = helper; + this.actionsMap = request.getVrpcActionsMap(); + + lifecycleTimer = helper.delay(goAwayDelay, this::handleGoAwayTimer); + + if (request.hasRefreshConfig()) { + Duration refreshDelay = + Duration.ofMillis( + com.google.protobuf.util.Durations.toMillis(request.getRefreshConfigDelay())); + helper.delay(refreshDelay, () -> handleRefreshConfigTimer(request.getRefreshConfig())); + } + } + + @Override + public State onMessage(SessionRequest request) { + switch (request.getPayloadCase()) { + case VIRTUAL_RPC: + State state = dispatchVRpc(request.getVirtualRpc()); + return state; + case CLOSE_SESSION: + return handleCloseMsg(request.getCloseSession()); + default: + return helper.terminateWithError( + Status.INTERNAL.withDescription("Unexpected payload: " + request)); + } + } + + private State dispatchVRpc(VirtualRpcRequest request) { + if (gotHalfClose) { + return helper.terminateWithError( + Status.INTERNAL.withDescription("got vRpc after client sent halfClose")); + } + Preconditions.checkState(!vRpcActive, "only 1 outstanding vRPC is supported"); + + FakeSessionOpRequest innerReq; + try { + innerReq = FakeSessionOpRequest.parseFrom(request.getPayload()); + } catch (InvalidProtocolBufferException e) { + throw new RuntimeException(e); + } + + this.vRpcActive = true; + + switch (innerReq.getPayloadCase()) { + case SCRIPTED_REQUEST: + long tag = innerReq.getScriptedRequest().getTag(); + ActionList actionList = actionsMap.get(tag); + Preconditions.checkNotNull(actionList, "tag not in action map: " + tag); + if (actionQueues.get(tag) == null) { + actionQueues.put(tag, createActionQueue(actionList)); + } + return handleVRpcScripted(request.getRpcId(), actionQueues.get(tag)); + default: + return helper.terminateWithError( + Status.INVALID_ARGUMENT.withDescription("Unexpected vRpc type: " + request)); + } + } + + private State handleVRpcScripted(long rpcId, ActionQueue actionQueue) { + if (helper.state != this) { + return helper.state; + } + + Action action = actionQueue.getNextAction(); + if (action.hasDelay()) { + @SuppressWarnings("UnusedVariable") + ScheduledFuture ignored = + helper.delay( + Duration.ofMillis(Durations.toMillis(action.getDelay())), + () -> handleResponse(action, rpcId)); + } else { + handleResponse(action, rpcId); + } + + return this; + } + + private State handleResponse(Action action, long rpcId) { + if (action.equals(Action.getDefaultInstance())) { + helper.writeResponse( + SessionResponse.newBuilder() + .setVirtualRpc( + VirtualRpcResponse.newBuilder() + .setRpcId(rpcId) + .setPayload( + FakeSessionOpResponse.newBuilder() + .setScripted(SessionFakeScriptedResponse.getDefaultInstance()) + .build() + .toByteString())) + .build()); + } + + if (action.hasResponse()) { + if (action.getResponse().equals(VirtualRpcResponse.getDefaultInstance())) { + helper.writeResponse( + SessionResponse.newBuilder() + .setVirtualRpc( + VirtualRpcResponse.newBuilder() + .setRpcId(rpcId) + .setPayload( + FakeSessionOpResponse.newBuilder() + .setScripted(SessionFakeScriptedResponse.getDefaultInstance()) + .build() + .toByteString())) + .build()); + + } else { + VirtualRpcResponse response = action.getResponse(); + if (response.getRpcId() == AUTOMATIC_RPC_ID) { + response = response.toBuilder().setRpcId(rpcId).build(); + } + helper.writeResponse(SessionResponse.newBuilder().setVirtualRpc(response).build()); + } + } + + if (action.hasErrorResponse()) { + helper.writeResponse( + SessionResponse.newBuilder().setError(action.getErrorResponse()).build()); + } + + vRpcActive = false; + return this; + } + + private State handleGoAwayTimer() { + if (helper.state != this) { + return helper.state; + } + helper.writeResponse( + SessionResponse.newBuilder() + .setGoAway( + GoAwayResponse.newBuilder() + .setReason("session_expiry") + .setDescription("Session needs to be refreshed") + .build()) + .build()); + this.lifecycleTimer = helper.delay(HALF_CLOSE_WAIT_TIMEOUT, this::handleCloseWaitTimeout); + return this; + } + + private State handleRefreshConfigTimer(com.google.bigtable.v2.SessionRefreshConfig config) { + if (helper.state != this) { + return helper.state; + } + helper.writeResponse(SessionResponse.newBuilder().setSessionRefreshConfig(config).build()); + return this; + } + + private ActionQueue createActionQueue(ActionList actionList) { + ActionQueue actionQueue; + if (actionList.equals(ActionList.getDefaultInstance())) { + Queue actions = new ArrayDeque<>(); + actions.add(Action.getDefaultInstance()); + actionQueue = new ActionQueue(true, actions); + } else { + actionQueue = + new ActionQueue(actionList.getRepeat(), new ArrayDeque<>(actionList.getActionsList())); + } + return actionQueue; + } + + // HalfClose + @Override + public State onClose(Status status) { + lifecycleTimer.cancel(true); + gotHalfClose = true; + + if (!vRpcActive) { + return helper.terminateSuccess(); + } + + return this; + } + + private State handleCloseWaitTimeout() { + if (helper.state != this) { + return helper.state; + } + + return helper.terminateWithError( + Status.INTERNAL.withDescription("client did not acknowledge a GO_AWAY response in time")); + } + + private State handleCloseMsg(CloseSessionRequest ignored) { + return helper.terminateSuccess(); + } + } + + static class DoneState implements State { + static final DoneState INSTANCE = new DoneState(); + + private DoneState() {} + + @Override + public State onMessage(SessionRequest request) { + return this; + } + + @Override + public State onClose(Status status) { + return this; + } + } + + static class ActionQueue { + private final boolean isRepeat; + private final Queue actions; + + ActionQueue(boolean repeat, Queue actions) { + this.isRepeat = repeat; + this.actions = actions; + } + + Action getNextAction() { + if (isRepeat) { + return actions.peek(); + } else { + return actions.poll(); + } + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/StatusSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/StatusSubject.java new file mode 100644 index 0000000000..3dd5c4b039 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/StatusSubject.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * 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.bigtable.data.v2.internal.test_helpers; + +import static com.google.common.truth.Truth.assertAbout; + +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.StringSubject; +import com.google.common.truth.Subject; +import com.google.common.truth.ThrowableSubject; +import io.grpc.Status; +import io.grpc.Status.Code; +import javax.annotation.Nullable; + +public class StatusSubject extends Subject { + private final @Nullable Status actual; + + private StatusSubject(FailureMetadata failureMetadata, @Nullable Status subject) { + super(failureMetadata, subject); + this.actual = subject; + } + + public void isOk() { + code().isEqualTo(Code.OK); + } + + public Subject code() { + return check("code").that(actual.getCode()); + } + + public StringSubject description() { + return check("description").that(actual.getDescription()); + } + + public ThrowableSubject cause() { + return check("cause").that(actual.getCause()); + } + + public static StatusSubject assertThat(@Nullable Status status) { + return assertAbout(statuses()).that(status); + } + + public static Factory statuses() { + return StatusSubject::new; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcCallContextSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcCallContextSubject.java new file mode 100644 index 0000000000..29aa3b1393 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcCallContextSubject.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.test_helpers; + +import static com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcCallContext; +import static com.google.common.truth.Truth.assertAbout; + +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.Subject; +import javax.annotation.Nullable; + +public class VRpcCallContextSubject extends Subject { + private final @Nullable VRpcCallContext actual; + + private VRpcCallContextSubject(FailureMetadata metadata, @Nullable VRpcCallContext subject) { + super(metadata, subject); + this.actual = subject; + } + + public void isIdempotent() { + check("operationinfo.isidempotent").that(actual.getOperationInfo().isIdempotent()).isTrue(); + } + + public void isNotIdempotent() { + check("operationinfo.isidempotent").that(actual.getOperationInfo().isIdempotent()).isFalse(); + } + + public static VRpcCallContextSubject assertThat(@Nullable VRpcCallContext context) { + return assertAbout(vRpcCallContexts()).that(context); + } + + public static Factory vRpcCallContexts() { + return VRpcCallContextSubject::new; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcResultSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcResultSubject.java new file mode 100644 index 0000000000..28b741e095 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/test_helpers/VRpcResultSubject.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.test_helpers; + +import static com.google.common.truth.Truth.assertAbout; + +import com.google.cloud.bigtable.data.v2.internal.middleware.VRpc.VRpcResult; +import com.google.common.truth.ComparableSubject; +import com.google.common.truth.FailureMetadata; +import com.google.common.truth.Subject; +import com.google.rpc.RetryInfo; +import java.time.Duration; +import java.util.Optional; +import javax.annotation.Nullable; + +public final class VRpcResultSubject extends Subject { + private final @Nullable VRpcResult actual; + + private VRpcResultSubject(FailureMetadata failureMetadata, @Nullable VRpcResult subject) { + super(failureMetadata, subject); + this.actual = subject; + } + + public Subject state() { + return check("state").that(actual.getState()); + } + + public Subject rejected() { + return check("rejected").that(actual.getRejected()); + } + + public void hasRetryInfo() { + check("retryInfo").that(actual.getRetryInfo()).isNotNull(); + } + + public ComparableSubject retryInfoDelay() { + return check("retryInfo.delay") + .that( + Optional.ofNullable(actual.getRetryInfo()) + .map(RetryInfo::getRetryDelay) + .map(d -> Duration.ofSeconds(d.getSeconds()).plus(Duration.ofNanos(d.getNanos()))) + .orElse(null)); + } + + public ComparableSubject backendLatency() { + return check("retryInfo.backendLatency").that(actual.getBackendLatency()); + } + + public void isOk() { + status().isOk(); + } + + public StatusSubject status() { + return check("status").about(StatusSubject.statuses()).that(actual.getStatus()); + } + + public static VRpcResultSubject assertThat(@Nullable VRpcResult vRpcResult) { + return assertAbout(vrpcResults()).that(vRpcResult); + } + + public static Factory vrpcResults() { + return VRpcResultSubject::new; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManagerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManagerTest.java new file mode 100644 index 0000000000..d069c72ea2 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/util/ClientConfigurationManagerTest.java @@ -0,0 +1,360 @@ +/* + * Copyright 2026 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.bigtable.data.v2.internal.util; + +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.ClientConfiguration; +import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.GetClientConfigurationRequest; +import com.google.bigtable.v2.LoadBalancingOptions; +import com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight; +import com.google.bigtable.v2.LoadBalancingOptions.PeakEwma; +import com.google.bigtable.v2.SessionClientConfiguration; +import com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders; +import com.google.cloud.bigtable.data.v2.internal.api.ChannelProviders.ForwardingChannelProvider; +import com.google.cloud.bigtable.data.v2.internal.api.InstanceName; +import com.google.cloud.bigtable.data.v2.internal.csm.NoopMetrics; +import com.google.cloud.bigtable.data.v2.internal.csm.attributes.ClientInfo; +import com.google.cloud.bigtable.data.v2.internal.util.ClientConfigurationManager.ConfigListener; +import com.google.protobuf.TextFormat; +import com.google.protobuf.util.Durations; +import io.grpc.CallOptions; +import io.grpc.Channel; +import io.grpc.ClientCall; +import io.grpc.ClientInterceptor; +import io.grpc.ForwardingClientCall; +import io.grpc.ForwardingClientCallListener; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Metadata; +import io.grpc.MethodDescriptor; +import io.grpc.Server; +import io.grpc.Status; +import io.grpc.stub.StreamObserver; +import java.io.IOException; +import java.util.Properties; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class ClientConfigurationManagerTest { + private static final FeatureFlags FEATURE_FLAGS = FeatureFlags.getDefaultInstance(); + + private static final ClientInfo CLIENT_INFO = + ClientInfo.builder() + .setClientName("fake-client") + .setInstanceName(InstanceName.of("fake-project", "fake-instance")) + .setAppProfileId("default") + .build(); + + private Server server; + private FakeConfigService service; + private ChannelProviders.ChannelProvider channelProvider; + @Mock private ScheduledExecutorService mockExecutor; + private final OutstandingRpcCounter outstandingRpcCounter = new OutstandingRpcCounter(); + private ClientConfigurationManager manager; + private final NoopMetrics.NoopDebugTracer noopDebugTracer = NoopMetrics.NoopDebugTracer.INSTANCE; + + @BeforeEach + void setUp() throws IOException { + service = new FakeConfigService(); + + server = FakeServiceBuilder.create(service).start(); + + channelProvider = + new ForwardingChannelProvider( + new ChannelProviders.EmulatorChannelProvider("localhost", server.getPort())) { + @Override + public ManagedChannelBuilder newChannelBuilder() { + return super.newChannelBuilder().intercept(outstandingRpcCounter); + } + }; + + manager = + new ClientConfigurationManager( + FEATURE_FLAGS, CLIENT_INFO, channelProvider, noopDebugTracer, mockExecutor); + } + + @AfterEach + void tearDown() { + manager.close(); + server.shutdown(); + } + + @Test + void initialFetchTest() throws ExecutionException, InterruptedException { + // Check the initial config is correct + ClientConfiguration initialConfig = manager.start().get(); + assertThat(initialConfig).isEqualTo(service.config.get()); + + // Make sure that the next poll was scheduled + ArgumentCaptor pollDelayCaptor = ArgumentCaptor.forClass(Long.class); + verify(mockExecutor, times(1)) + .schedule(any(Runnable.class), pollDelayCaptor.capture(), eq(TimeUnit.MILLISECONDS)); + + assertThat(pollDelayCaptor.getValue()) + .isEqualTo( + Durations.toMillis( + service.config.get().getPollingConfiguration().getPollingInterval())); + } + + @Test + void notifyListenerTest() throws Exception { + // Fetch initial config + manager.start().get(); + + ArgumentCaptor runnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mockExecutor, times(1)).schedule(runnableCaptor.capture(), anyLong(), any()); + + // Add a listener + @SuppressWarnings("unchecked") + ConfigListener mockListener = Mockito.mock(ConfigListener.class); + manager.addListener(ClientConfiguration::getSessionConfiguration, mockListener); + + // force a fetch + runnableCaptor.getValue().run(); + outstandingRpcCounter.waitUntilRpcsDone(); + // Config didnt change so listener shouldnt be invoked + verify(mockListener, never()).onChange(any()); + + // Change an unrelated config + ClientConfiguration.Builder builder = service.config.get().toBuilder(); + builder.getPollingConfigurationBuilder().setPollingInterval(Durations.fromMinutes(100)); + service.config.set(builder.build()); + runnableCaptor.getValue().run(); + outstandingRpcCounter.waitUntilRpcsDone(); + // And make sure that the listener isn't invoked + verify(mockListener, never()).onChange(any()); + + // Now modify the relevant config section + builder + .getSessionConfigurationBuilder() + .getSessionPoolConfigurationBuilder() + .setLoadBalancingOptions( + LoadBalancingOptions.newBuilder() + .setLeastInFlight(LeastInFlight.newBuilder().setRandomSubsetSize(10))); + service.config.set(builder.build()); + // force a run + runnableCaptor.getValue().run(); + outstandingRpcCounter.waitUntilRpcsDone(); + verify(mockListener, times(1)).onChange(eq(builder.build().getSessionConfiguration())); + } + + @Test + void testDisabledSessions() throws ExecutionException, InterruptedException { + ClientConfiguration.Builder builder = manager.getDefaultConfig().toBuilder(); + builder.getSessionConfigurationBuilder().setSessionLoad(0); + ClientConfiguration disabledCfg = builder.build(); + + // Default config should have entries for session & channel pools + assertThat(disabledCfg.getSessionConfiguration().getSessionPoolConfiguration()) + .isNotEqualToDefaultInstance(); + assertThat(disabledCfg.getSessionConfiguration().getChannelConfiguration()) + .isNotEqualToDefaultInstance(); + + service.config.set(disabledCfg); + // Fetch initial config + ClientConfiguration resolvedConfig = manager.start().get(); + // But since the load is zero, the session & channel pool configs should be cleared + assertThat(resolvedConfig.getSessionConfiguration().getSessionPoolConfiguration()) + .isEqualToDefaultInstance(); + assertThat(resolvedConfig.getSessionConfiguration().getChannelConfiguration()) + .isEqualToDefaultInstance(); + } + + @Deprecated + @Test + void testMigrateSessionPool() throws ExecutionException, InterruptedException { + ClientConfiguration defaultConfig = manager.getDefaultConfig(); + + // Override LoadBalancingOptions + LoadBalancingOptions loadBalancingOptions = + LoadBalancingOptions.newBuilder() + .setPeakEwma(PeakEwma.newBuilder().setRandomSubsetSize(0)) + .build(); + + ClientConfiguration.Builder legacyBuilder = defaultConfig.toBuilder(); + + // Enable sessions + legacyBuilder.getSessionConfigurationBuilder().setSessionLoad(0.1f); + + // Now patch default config to be a legacy config + // During migration, LoadBalancingOptions are a toplevel config, so clear out the + // SessionPoolConfiguration and set the toplevel option + legacyBuilder + .getSessionConfigurationBuilder() + .setLoadBalancingOptions(loadBalancingOptions) + .clearSessionPoolConfiguration() + .clearChannelConfiguration(); + ClientConfiguration legacyCfg = legacyBuilder.build(); + + service.config.set(legacyCfg); + // Fetch initial config + ClientConfiguration resolvedConfig = manager.start().get(); + + // Make sure that SessionPoolConfiguration got patched with SessionPool & ChannelPool configs + // And ensure that the toplevel LoadBalancingOptions got migrated + ClientConfiguration.Builder expectedConfig = legacyCfg.toBuilder(); + expectedConfig + .getSessionConfigurationBuilder() + .clearLoadBalancingOptions() + .setSessionPoolConfiguration( + defaultConfig.getSessionConfiguration().getSessionPoolConfiguration().toBuilder() + .setLoadBalancingOptions(loadBalancingOptions)) + .setChannelConfiguration(defaultConfig.getSessionConfiguration().getChannelConfiguration()); + + assertThat(resolvedConfig).isEqualTo(expectedConfig.build()); + } + + @Test + void testSysPropOverride() throws Exception { + manager.close(); + + String clientConfigOverrides = + TextFormat.printer() + .printToString( + ClientConfiguration.newBuilder() + .setSessionConfiguration( + SessionClientConfiguration.newBuilder() + .setSessionLoad(0.75f) + .setSessionPoolConfiguration( + SessionPoolConfiguration.newBuilder().setHeadroom(0.7f))) + .build()); + Properties sysProps = new Properties(); + sysProps.setProperty(ClientConfigurationManager.OVERRIDE_SYS_PROP_KEY, clientConfigOverrides); + manager = + new ClientConfigurationManager( + sysProps, FEATURE_FLAGS, CLIENT_INFO, channelProvider, noopDebugTracer, mockExecutor); + + ClientConfiguration initialConfig = manager.start().get(); + + // The effective config should be the server config with the overlayed fields + ClientConfiguration.Builder expectedConfig = service.config.get().toBuilder(); + expectedConfig.getSessionConfigurationBuilder().setSessionLoad(0.75f); + expectedConfig + .getSessionConfigurationBuilder() + .getSessionPoolConfigurationBuilder() + .setHeadroom(0.7f); + + assertThat(initialConfig).isEqualTo(expectedConfig.build()); + assertThat(manager.areSessionsRequired()).isTrue(); + } + + /** Verify that proto merging works when the override the same as the default value */ + @Test + void testSysPropOverrideSessionLoadZero() throws Exception { + manager.close(); + + String clientConfigOverrides = + TextFormat.printer() + .printToString( + ClientConfiguration.newBuilder() + .setSessionConfiguration( + SessionClientConfiguration.newBuilder().setSessionLoad(0)) + .build()); + Properties sysProps = new Properties(); + sysProps.setProperty(ClientConfigurationManager.OVERRIDE_SYS_PROP_KEY, clientConfigOverrides); + manager = + new ClientConfigurationManager( + sysProps, FEATURE_FLAGS, CLIENT_INFO, channelProvider, noopDebugTracer, mockExecutor); + + ClientConfiguration initialConfig = manager.start().get(); + + // The effective config should be the server config with the overlayed fields + ClientConfiguration.Builder expectedConfig = service.config.get().toBuilder(); + expectedConfig.getSessionConfigurationBuilder().setSessionLoad(0); + + assertThat(initialConfig).isEqualTo(service.config.get()); + } + + static class FakeConfigService extends BigtableGrpc.BigtableImplBase { + private final AtomicReference config = new AtomicReference<>(); + + public FakeConfigService() throws IOException { + ClientConfiguration.Builder builder = ClientConfigurationManager.loadDefault().toBuilder(); + builder.getSessionConfigurationBuilder().setSessionLoad(0.25f); + config.set(builder.build()); + } + + @Override + public void getClientConfiguration( + GetClientConfigurationRequest request, + StreamObserver responseObserver) { + responseObserver.onNext(config.get()); + responseObserver.onCompleted(); + } + } + + private static class OutstandingRpcCounter implements ClientInterceptor { + private int numOutstandingRpcs = 0; + private final Object lock = new Object(); + + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + synchronized (lock) { + numOutstandingRpcs++; + } + return new ForwardingClientCall.SimpleForwardingClientCall( + channel.newCall(methodDescriptor, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + super.start( + new ForwardingClientCallListener.SimpleForwardingClientCallListener( + responseListener) { + @Override + public void onClose(Status status, Metadata trailers) { + super.onClose(status, trailers); + synchronized (lock) { + numOutstandingRpcs--; + lock.notify(); + } + } + }, + headers); + } + }; + } + + void waitUntilRpcsDone() throws InterruptedException { + synchronized (lock) { + while (numOutstandingRpcs > 0) { + lock.wait(); + } + } + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java index 4f8ff4e4c9..cb944a2aec 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java @@ -24,21 +24,18 @@ import static com.google.common.truth.TruthJUnit.assume; import com.google.api.client.util.Lists; -import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; -import com.google.cloud.bigtable.admin.v2.models.AppProfile; -import com.google.cloud.bigtable.admin.v2.models.CreateAppProfileRequest; import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.admin.v2.models.Table; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.Constants.MetricLabels; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider; -import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.CloudEnv; import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.cloud.monitoring.v3.MetricServiceClient; @@ -63,6 +60,8 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; import java.io.IOException; +import java.time.Duration; +import java.time.Instant; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -73,14 +72,14 @@ import org.junit.After; import org.junit.Before; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.Timeout; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Duration; -import org.threeten.bp.Instant; +@Ignore("Temporarily disable flaky test") @RunWith(JUnit4.class) public class BuiltinMetricsIT { @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); @@ -94,12 +93,9 @@ public class BuiltinMetricsIT { private BigtableDataClient clientCustomOtel; private BigtableDataClient clientDefault; private BigtableTableAdminClient tableAdminClient; - private BigtableInstanceAdminClient instanceAdminClient; private MetricServiceClient metricClient; private InMemoryMetricReader metricReader; - private String appProfileCustomOtel; - private String appProfileDefault; public static String[] VIEWS = { "operation_latencies", @@ -116,25 +112,22 @@ public void setup() throws IOException { assume() .withMessage("Builtin metrics integration test is not supported by emulator") .that(testEnvRule.env()) - .isNotInstanceOf(EmulatorEnv.class); + .isInstanceOf(CloudEnv.class); + + String appProfileId = testEnvRule.env().getDataClientSettings().getAppProfileId(); + + assume() + .withMessage( + "Builtin metrics integration test needs to be able to use a custom app profile and the" + + " app profile is currently forced to " + + appProfileId) + .that(appProfileId) + .isEmpty(); // Create a cloud monitoring client metricClient = MetricServiceClient.create(); tableAdminClient = testEnvRule.env().getTableAdminClient(); - instanceAdminClient = testEnvRule.env().getInstanceAdminClient(); - appProfileCustomOtel = PrefixGenerator.newPrefix("test1"); - appProfileDefault = PrefixGenerator.newPrefix("test2"); - instanceAdminClient.createAppProfile( - CreateAppProfileRequest.of(testEnvRule.env().getInstanceId(), appProfileCustomOtel) - .setRoutingPolicy( - AppProfile.SingleClusterRoutingPolicy.of(testEnvRule.env().getPrimaryClusterId())) - .setIsolationPolicy(AppProfile.StandardIsolationPolicy.of(AppProfile.Priority.LOW))); - instanceAdminClient.createAppProfile( - CreateAppProfileRequest.of(testEnvRule.env().getInstanceId(), appProfileDefault) - .setRoutingPolicy( - AppProfile.SingleClusterRoutingPolicy.of(testEnvRule.env().getPrimaryClusterId())) - .setIsolationPolicy(AppProfile.StandardIsolationPolicy.of(AppProfile.Priority.LOW))); // When using the custom OTEL instance, we can also register a InMemoryMetricReader on the // SdkMeterProvider to verify the data exported on Cloud Monitoring with the in memory metric @@ -143,7 +136,6 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); @@ -153,9 +145,8 @@ public void setup() throws IOException { BigtableDataClient.create( settings .setMetricsProvider(CustomOpenTelemetryMetricsProvider.create(openTelemetry)) - .setAppProfileId(appProfileCustomOtel) .build()); - clientDefault = BigtableDataClient.create(settings.setAppProfileId(appProfileDefault).build()); + clientDefault = BigtableDataClient.create(settings.build()); } @After @@ -169,12 +160,7 @@ public void tearDown() { if (tableDefault != null) { tableAdminClient.deleteTable(tableDefault.getId()); } - if (instanceAdminClient != null) { - instanceAdminClient.deleteAppProfile( - testEnvRule.env().getInstanceId(), appProfileCustomOtel, true); - instanceAdminClient.deleteAppProfile( - testEnvRule.env().getInstanceId(), appProfileDefault, true); - } + if (clientCustomOtel != null) { clientCustomOtel.close(); } @@ -196,9 +182,11 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception { // Send a MutateRow and ReadRows request and measure the latencies for these requests. clientDefault.mutateRow( - RowMutation.create(tableDefault.getId(), "a-new-key").setCell("cf", "q", "abc")); - ArrayList rows = - Lists.newArrayList(clientDefault.readRows(Query.create(tableDefault.getId()).limit(10))); + RowMutation.create(TableId.of(tableDefault.getId()), "a-new-key") + .setCell("cf", "q", "abc")); + ArrayList ignored = + Lists.newArrayList( + clientDefault.readRows(Query.create(TableId.of(tableDefault.getId())).limit(10))); // This stopwatch is used for to limit fetching of metric data in verifyMetrics Stopwatch metricsPollingStopwatch = Stopwatch.createStarted(); @@ -220,10 +208,10 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception { // Verify that metrics are published for MutateRow request String metricFilter = String.format( - "metric.type=\"bigtable.googleapis.com/client/%s\" " - + "AND resource.labels.instance=\"%s\" AND metric.labels.method=\"Bigtable.MutateRow\"" - + " AND resource.labels.table=\"%s\" AND metric.labels.app_profile=\"%s\"", - view, testEnvRule.env().getInstanceId(), tableDefault.getId(), appProfileDefault); + "metric.type=\"bigtable.googleapis.com/client/%s\" AND" + + " resource.labels.instance=\"%s\" AND" + + " metric.labels.method=\"Bigtable.MutateRow\" AND resource.labels.table=\"%s\"", + view, testEnvRule.env().getInstanceId(), tableDefault.getId()); ListTimeSeriesRequest.Builder requestBuilder = ListTimeSeriesRequest.newBuilder() .setName(name.toString()) @@ -235,10 +223,10 @@ public void testBuiltinMetricsWithDefaultOTEL() throws Exception { // Verify that metrics are published for ReadRows request metricFilter = String.format( - "metric.type=\"bigtable.googleapis.com/client/%s\" " - + "AND resource.labels.instance=\"%s\" AND metric.labels.method=\"Bigtable.ReadRows\"" - + " AND resource.labels.table=\"%s\" AND metric.labels.app_profile=\"%s\"", - view, testEnvRule.env().getInstanceId(), tableDefault.getId(), appProfileDefault); + "metric.type=\"bigtable.googleapis.com/client/%s\" AND" + + " resource.labels.instance=\"%s\" AND" + + " metric.labels.method=\"Bigtable.ReadRows\" AND resource.labels.table=\"%s\"", + view, testEnvRule.env().getInstanceId(), tableDefault.getId()); requestBuilder.setFilter(metricFilter); verifyMetricsArePublished(requestBuilder.build(), metricsPollingStopwatch, view); @@ -257,10 +245,11 @@ public void testBuiltinMetricsWithCustomOTEL() throws Exception { Instant start = Instant.now().minus(Duration.ofSeconds(10)); // Send a MutateRow and ReadRows request and measure the latencies for these requests. clientCustomOtel.mutateRow( - RowMutation.create(tableCustomOtel.getId(), "a-new-key").setCell("cf", "q", "abc")); - ArrayList rows = + RowMutation.create(TableId.of(tableCustomOtel.getId()), "a-new-key") + .setCell("cf", "q", "abc")); + ArrayList ignored = Lists.newArrayList( - clientCustomOtel.readRows(Query.create(tableCustomOtel.getId()).limit(10))); + clientCustomOtel.readRows(Query.create(TableId.of(tableCustomOtel.getId())).limit(10))); // This stopwatch is used for to limit fetching of metric data in verifyMetrics Stopwatch metricsPollingStopwatch = Stopwatch.createStarted(); @@ -288,13 +277,10 @@ public void testBuiltinMetricsWithCustomOTEL() throws Exception { // Verify that metrics are correct for MutateRows request String metricFilter = String.format( - "metric.type=\"bigtable.googleapis.com/client/%s\" " - + "AND resource.labels.instance=\"%s\" AND metric.labels.method=\"Bigtable.MutateRow\"" - + " AND resource.labels.table=\"%s\" AND metric.labels.app_profile=\"%s\"", - view, - testEnvRule.env().getInstanceId(), - tableCustomOtel.getId(), - appProfileCustomOtel); + "metric.type=\"bigtable.googleapis.com/client/%s\" AND" + + " resource.labels.instance=\"%s\" AND" + + " metric.labels.method=\"Bigtable.MutateRow\" AND resource.labels.table=\"%s\"", + view, testEnvRule.env().getInstanceId(), tableCustomOtel.getId()); ListTimeSeriesRequest.Builder requestBuilder = ListTimeSeriesRequest.newBuilder() .setName(name.toString()) @@ -309,13 +295,10 @@ public void testBuiltinMetricsWithCustomOTEL() throws Exception { // Verify that metrics are correct for ReadRows request metricFilter = String.format( - "metric.type=\"bigtable.googleapis.com/client/%s\" " - + "AND resource.labels.instance=\"%s\" AND metric.labels.method=\"Bigtable.ReadRows\"" - + " AND resource.labels.table=\"%s\" AND metric.labels.app_profile=\"%s\"", - view, - testEnvRule.env().getInstanceId(), - tableCustomOtel.getId(), - appProfileCustomOtel); + "metric.type=\"bigtable.googleapis.com/client/%s\" AND" + + " resource.labels.instance=\"%s\" AND" + + " metric.labels.method=\"Bigtable.ReadRows\" AND resource.labels.table=\"%s\"", + view, testEnvRule.env().getInstanceId(), tableCustomOtel.getId()); requestBuilder.setFilter(metricFilter); response = verifyMetricsArePublished(requestBuilder.build(), metricsPollingStopwatch, view); @@ -351,6 +334,7 @@ private ListTimeSeriesResponse verifyMetricsArePublished( private void verifyMetricsWithMetricsReader( ListTimeSeriesResponse response, MetricData dataFromReader) { + for (TimeSeries ts : response.getTimeSeriesList()) { Map attributesMap = ImmutableMap.builder() @@ -358,7 +342,7 @@ private void verifyMetricsWithMetricsReader( .putAll(ts.getMetric().getLabelsMap()) .build(); AttributesBuilder attributesBuilder = Attributes.builder(); - String streamingKey = BuiltinMetricsConstants.STREAMING_KEY.getKey(); + String streamingKey = MetricLabels.STREAMING_KEY.getKey(); attributesMap.forEach( (k, v) -> { if (!k.equals(streamingKey)) { @@ -387,10 +371,11 @@ private void verifyMetricsWithMetricsReader( .build())) < 0) .collect(Collectors.toList()); - if (point.size() > 0) { + if (!point.isEmpty()) { long actualValue = (long) point.get(0).getValue().getDistributionValue().getMean(); assertWithMessage( - "actual value does not match expected value, actual value " + ts.getMetric().getType() + + " actual value does not match expected value, actual value " + actualValue + " expected value " + expectedValue diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutateIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutateIT.java index a284f8b7cb..bd2e8e5352 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutateIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkMutateIT.java @@ -22,6 +22,7 @@ import static com.google.common.truth.TruthJUnit.assume; import static org.junit.Assert.fail; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.batching.BatcherImpl; import com.google.api.gax.batching.BatchingSettings; @@ -74,7 +75,8 @@ public void test() throws IOException, InterruptedException { long initial = batcher.getFlowController().getCurrentElementCountLimit(); for (long i = 0; i < initial * 3; i++) { String key = rowPrefix + "test-key" + i; - batcher.add(RowMutationEntry.create(key).setCell(familyId, "qualifier", i)); + ApiFuture ignored = + batcher.add(RowMutationEntry.create(key).setCell(familyId, "qualifier", i)); } batcher.flush(); assertThat(events.getLastFlowControlEvent()).isNotNull(); @@ -117,9 +119,10 @@ public void testOnAuthorizedView() throws IOException, InterruptedException { String familyId = testEnvRule.env().getFamilyId(); - batcher.add( - RowMutationEntry.create(rowPrefix + "test-key") - .setCell(familyId, AUTHORIZED_VIEW_COLUMN_QUALIFIER, "value")); + ApiFuture ignored = + batcher.add( + RowMutationEntry.create(rowPrefix + "test-key") + .setCell(familyId, AUTHORIZED_VIEW_COLUMN_QUALIFIER, "value")); batcher.flush(); // Query a key to make sure the write succeeded @@ -136,7 +139,8 @@ public void testOnAuthorizedView() throws IOException, InterruptedException { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } @Test @@ -153,8 +157,7 @@ public void testManyMutations() throws IOException, InterruptedException { BatchingSettings batchingSettings = settings.getStubSettings().bulkMutateRowsSettings().getBatchingSettings(); - settings - .toBuilder() + settings.toBuilder() .stubSettings() .bulkMutateRowsSettings() .setBatchingSettings( @@ -172,7 +175,7 @@ public void testManyMutations() throws IOException, InterruptedException { for (long j = 0; j < 50001; j++) { rowMutationEntry.setCell(familyId, "q" + j + i, j); } - batcher.add(rowMutationEntry); + ApiFuture ignored = batcher.add(rowMutationEntry); } batcher.flush(); // Query a key to make sure the write succeeded @@ -202,8 +205,7 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE BatchingSettings batchingSettings = settings.getStubSettings().bulkMutateRowsSettings().getBatchingSettings(); - settings - .toBuilder() + settings.toBuilder() .stubSettings() .bulkMutateRowsSettings() .setBatchingSettings( @@ -220,7 +222,7 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE for (long j = 0; j < 50001; j++) { rowMutationEntry.setCell(familyId, AUTHORIZED_VIEW_COLUMN_QUALIFIER + j + i, j); } - batcher.add(rowMutationEntry); + ApiFuture ignored = batcher.add(rowMutationEntry); } batcher.flush(); // Query a key to make sure the write succeeded @@ -238,12 +240,13 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE Batcher batcherOutsideAuthorizedView = client.newBulkMutationBatcher( AuthorizedViewId.of( - testEnvRule.env().getTableId(), testAuthorizedView.getId()))) { + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()))) { String keyOutsideAuthorizedView = UUID.randomUUID() + "-outside-authorized-view"; RowMutationEntry rowMutationEntry = RowMutationEntry.create(keyOutsideAuthorizedView); rowMutationEntry.setCell( testEnvRule.env().getFamilyId(), AUTHORIZED_VIEW_COLUMN_QUALIFIER, "test-value"); - batcherOutsideAuthorizedView.add(rowMutationEntry); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = batcherOutsideAuthorizedView.add(rowMutationEntry); batcherOutsideAuthorizedView.flush(); } fail("Should not be able to apply bulk mutation on rows outside authorized view"); @@ -254,6 +257,7 @@ public void testManyMutationsOnAuthorizedView() throws IOException, InterruptedE testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkReadIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkReadIT.java index 5b72328240..a14029294f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkReadIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BulkReadIT.java @@ -190,6 +190,7 @@ public void testBulkReadOnAuthorizedView() throws InterruptedException, Executio testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java index 41def01ba6..a3570f5e5b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/CheckAndMutateIT.java @@ -32,6 +32,7 @@ import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.protobuf.ByteString; @@ -48,7 +49,7 @@ public class CheckAndMutateIT { @Test public void test() throws Exception { - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String rowKey = UUID.randomUUID().toString(); @@ -91,7 +92,7 @@ public void testOnAuthorizedView() throws Exception { AuthorizedView testAuthorizedView = createTestAuthorizedView(testEnvRule); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String rowKey = AUTHORIZED_VIEW_ROW_PREFIX + UUID.randomUUID(); BigtableDataClient dataClient = testEnvRule.env().getDataClient(); @@ -156,6 +157,7 @@ public void testOnAuthorizedView() throws Exception { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/DirectPathFallbackIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/DirectPathFallbackIT.java index 8666924a2f..9f1e2f7104 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/DirectPathFallbackIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/DirectPathFallbackIT.java @@ -18,10 +18,8 @@ import static com.google.common.truth.Truth.assertWithMessage; import static com.google.common.truth.TruthJUnit.assume; -import com.google.api.core.ApiFunction; -import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.grpc.ChannelPoolSettings; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.auth.oauth2.ComputeEngineCredentials; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.test_helpers.env.AbstractTestEnv.ConnectionMode; @@ -38,6 +36,7 @@ import io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoopGroup; import io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel; import io.grpc.netty.shaded.io.netty.util.ReferenceCountUtil; +import io.grpc.netty.shaded.io.netty.util.concurrent.Future; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -74,12 +73,12 @@ public class DirectPathFallbackIT { @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); - private AtomicBoolean blackholeDpAddr = new AtomicBoolean(); - private AtomicInteger numBlocked = new AtomicInteger(); - private AtomicInteger numDpAddrRead = new AtomicInteger(); + private final AtomicBoolean blackholeDpAddr = new AtomicBoolean(); + private final AtomicInteger numBlocked = new AtomicInteger(); + private final AtomicInteger numDpAddrRead = new AtomicInteger(); - private ChannelFactory channelFactory; - private EventLoopGroup eventLoopGroup; + private final ChannelFactory channelFactory; + private final EventLoopGroup eventLoopGroup; private BigtableDataClient instrumentedClient; public DirectPathFallbackIT() { @@ -103,21 +102,17 @@ public void setup() throws IOException { (InstantiatingGrpcChannelProvider) defaultSettings.getStubSettings().getTransportChannelProvider(); InstantiatingGrpcChannelProvider instrumentedTransportChannelProvider = - defaultTransportProvider - .toBuilder() + defaultTransportProvider.toBuilder() .setAttemptDirectPath(true) - .setPoolSize(1) + .setChannelPoolSettings(ChannelPoolSettings.staticallySized(1)) .setChannelConfigurator( - new ApiFunction() { - @Override - public ManagedChannelBuilder apply(ManagedChannelBuilder builder) { - injectNettyChannelHandler(builder); - - // Fail fast when blackhole is active - builder.keepAliveTime(1, TimeUnit.SECONDS); - builder.keepAliveTimeout(1, TimeUnit.SECONDS); - return builder; - } + builder -> { + injectNettyChannelHandler(builder); + + // Fail fast when blackhole is active + builder.keepAliveTime(1, TimeUnit.SECONDS); + builder.keepAliveTimeout(1, TimeUnit.SECONDS); + return builder; }) .build(); @@ -127,9 +122,7 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder builder) { settingsBuilder .stubSettings() - .setTransportChannelProvider(instrumentedTransportChannelProvider) - // Forcefully ignore GOOGLE_APPLICATION_CREDENTIALS - .setCredentialsProvider(FixedCredentialsProvider.create(ComputeEngineCredentials.create())); + .setTransportChannelProvider(instrumentedTransportChannelProvider); instrumentedClient = BigtableDataClient.create(settingsBuilder.build()); } @@ -140,7 +133,7 @@ public void teardown() { instrumentedClient.close(); } if (eventLoopGroup != null) { - eventLoopGroup.shutdownGracefully(); + Future ignored = eventLoopGroup.shutdownGracefully(); } } @@ -195,7 +188,9 @@ private void injectNettyChannelHandler(ManagedChannelBuilder channelBuilder) nettyChannelBuilder.eventLoopGroup(eventLoopGroup); } - /** @see com.google.cloud.bigtable.data.v2.it.DirectPathFallbackIT.MyChannelHandler */ + /** + * @see com.google.cloud.bigtable.data.v2.it.DirectPathFallbackIT.MyChannelHandler + */ private class MyChannelFactory implements ChannelFactory { @Override public NioSocketChannel newChannel() { @@ -231,7 +226,8 @@ public void connect( super.connect(ctx, remoteAddress, localAddress, promise); } else { // Fail the connection fast - promise.setFailure(new IOException("fake error")); + @SuppressWarnings("UnusedVariable") + ChannelPromise ignored = promise.setFailure(new IOException("fake error")); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java index 620d290338..f72ebf1437 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ExecuteQueryIT.java @@ -19,38 +19,56 @@ import static com.google.common.truth.TruthJUnit.assume; import static org.junit.Assert.assertThrows; +import com.google.api.gax.rpc.InvalidArgumentException; import com.google.cloud.Date; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.CreateSchemaBundleRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.Table; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; import com.google.cloud.bigtable.data.v2.models.sql.SqlType; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; import com.google.cloud.bigtable.data.v2.models.sql.Struct; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Album; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; +import com.google.cloud.bigtable.test_helpers.env.AbstractTestEnv; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.protobuf.ByteString; +import com.google.protobuf.DescriptorProtos.FileDescriptorSet; import java.io.IOException; +import java.time.Instant; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class ExecuteQueryIT { @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); private static BigtableDataClient dataClient; + private static BigtableTableAdminClient adminClient; private static String tableId; + private static Table table; + private static String schemaBundleId; private static String cf; private static String uniquePrefix; + private static final Logger logger = Logger.getLogger(ExecuteQueryIT.class.getName()); @BeforeClass public static void setUpAll() throws IOException { @@ -58,35 +76,63 @@ public static void setUpAll() throws IOException { .withMessage("ExecuteQuery is not supported on Emulator") .that(testEnvRule.env()) .isNotInstanceOf(EmulatorEnv.class); + assume() + .withMessage("ExecuteQuery only works over CloudPath") + .that(testEnvRule.env().getConnectionMode()) + .isNoneOf( + AbstractTestEnv.ConnectionMode.REQUIRE_DIRECT_PATH, + AbstractTestEnv.ConnectionMode.REQUIRE_DIRECT_PATH_IPV4); - tableId = testEnvRule.env().getTableId(); + tableId = PrefixGenerator.newPrefix("ExecuteQueryIT"); dataClient = testEnvRule.env().getDataClient(); + adminClient = testEnvRule.env().getTableAdminClient(); cf = testEnvRule.env().getFamilyId(); uniquePrefix = UUID.randomUUID() + "-execute-query-it-"; + schemaBundleId = PrefixGenerator.newPrefix("ExecuteQueryIT#bundle"); + + table = adminClient.createTable(CreateTableRequest.of(tableId).addFamily(cf)); + FileDescriptorSet fileDescriptorSet = + FileDescriptorSet.newBuilder() + .addFile(Singer.getDescriptor().getFile().toProto()) + .addFile(Album.getDescriptor().getFile().toProto()) + .build(); + adminClient.createSchemaBundle( + CreateSchemaBundleRequest.of(tableId, schemaBundleId) + .setProtoSchema(fileDescriptorSet.toByteString())); dataClient.mutateRow( - RowMutation.create(TableId.of(tableId), uniquePrefix + "a") + RowMutation.create(tableId, uniquePrefix + "a") .setCell(cf, ByteString.copyFromUtf8("qual"), 1000, ByteString.copyFromUtf8("old")) .setCell(cf, ByteString.copyFromUtf8("qual2"), 1000, ByteString.copyFromUtf8("old2"))); // Overwrite the previous values. Used for testing with_history dataClient.mutateRow( - RowMutation.create(TableId.of(tableId), uniquePrefix + "a") + RowMutation.create(tableId, uniquePrefix + "a") .setCell(cf, ByteString.copyFromUtf8("qual"), 10000, ByteString.copyFromUtf8("val")) .setCell(cf, ByteString.copyFromUtf8("qual2"), 10000, ByteString.copyFromUtf8("val2")) .setCell(cf, ByteString.copyFromUtf8("qual3"), 10000, ByteString.copyFromUtf8("val3"))); dataClient.mutateRow( - RowMutation.create(TableId.of(tableId), uniquePrefix + "b") + RowMutation.create(tableId, uniquePrefix + "b") .setCell(cf, ByteString.copyFromUtf8("qual"), 10000, ByteString.copyFromUtf8("bval")) .setCell( cf, ByteString.copyFromUtf8("qual2"), 10000, ByteString.copyFromUtf8("bval2"))); } + @AfterClass + public static void tearDownAll() { + if (table != null) { + // Deleting the table will also clean up all the schema bundles under it. + adminClient.deleteTable(tableId); + } + } + @Test public void selectStar() { - try (ResultSet rs = - dataClient.executeQuery( - Statement.of( - "SELECT * FROM " + tableId + " WHERE _key LIKE '" + uniquePrefix + "%'"))) { + PreparedStatement preparedStatement = + dataClient.prepareStatement( + "SELECT * FROM `" + tableId + "` WHERE _key LIKE '" + uniquePrefix + "%'", + new HashMap<>()); + BoundStatement statement = preparedStatement.bind().build(); + try (ResultSet rs = dataClient.executeQuery(statement)) { assertThat(rs.next()).isTrue(); assertThat(rs.getBytes("_key")).isEqualTo(ByteString.copyFromUtf8(uniquePrefix + "a")); assertThat( @@ -107,15 +153,16 @@ public void selectStar() { @Test public void withHistoryQuery() { - try (ResultSet rs = - dataClient.executeQuery( - Statement.of( - "SELECT * FROM `" - + tableId - + "`(with_history => true) WHERE _key LIKE '" - + uniquePrefix - + "%'"))) { - + PreparedStatement preparedStatement = + dataClient.prepareStatement( + "SELECT * FROM `" + + tableId + + "`(with_history => true) WHERE _key LIKE '" + + uniquePrefix + + "%'", + new HashMap<>()); + BoundStatement statement = preparedStatement.bind().build(); + try (ResultSet rs = dataClient.executeQuery(statement)) { assertThat(rs.next()).isTrue(); assertThat(rs.getBytes("_key")).isEqualTo(ByteString.copyFromUtf8(uniquePrefix + "a")); Map> rowACf = rs.getMap(cf, SqlType.historicalMap()); @@ -141,21 +188,50 @@ public void withHistoryQuery() { } } + @SuppressWarnings("DoubleBraceInitialization") @Test - public void allTypes() { - try (ResultSet rs = - dataClient.executeQuery( - Statement.of( - "SELECT 'stringVal' AS strCol, b'foo' as bytesCol, 1 AS intCol, CAST(1.2 AS FLOAT32) as f32Col, " - + "CAST(1.3 AS FLOAT64) as f64Col, true as boolCol, TIMESTAMP_FROM_UNIX_MILLIS(1000) AS tsCol, " - + "DATE(2024, 06, 01) as dateCol, STRUCT(1 as a, \"foo\" as b) AS structCol, [1,2,3] AS arrCol, " + public void allTypes() throws Exception { + Album album = Album.newBuilder().setTitle("Lover").build(); + + // For some reason the ExecuteQuery data path sometimes cannot resolve a newly-created schema + // bundle immediately after its creation. To avoid test flakiness, we wrap query preparation + // with a retry loop. + PreparedStatement preparedStatement; + int retryCount = 0; + int maxRetries = 10; + while (true) { + try { + preparedStatement = + dataClient.prepareStatement( + "SELECT 'stringVal' AS strCol, b'foo' as bytesCol, 1 AS intCol, CAST(1.2 AS" + + " FLOAT32) as f32Col, CAST(1.3 AS FLOAT64) as f64Col, true as boolCol," + + " TIMESTAMP_FROM_UNIX_MILLIS(1000) AS tsCol, DATE(2024, 06, 01) as dateCol," + + " STRUCT(1 as a, \"foo\" as b) AS structCol, [1,2,3] AS arrCol, " + cf - + " as mapCol FROM `" + + " as mapCol, " + + " CAST(b'\022\005Lover' AS `" + + schemaBundleId + + ".com.google.cloud.bigtable.data.v2.test.Album`) as protoCol, CAST('JAZZ' AS" + + " `" + + schemaBundleId + + ".com.google.cloud.bigtable.data.v2.test.Genre`) as enumCol FROM `" + tableId + "` WHERE _key='" + uniquePrefix - + "a' LIMIT 1"))) { + + "a' LIMIT 1", + new HashMap<>()); + break; + } catch (InvalidArgumentException e) { + if (++retryCount == maxRetries) { + throw e; + } + logger.log(Level.INFO, "Retrying prepareStatement, retryCount: " + retryCount); + Thread.sleep(5000); + } + } + BoundStatement statement = preparedStatement.bind().build(); + try (ResultSet rs = dataClient.executeQuery(statement)) { assertThat(rs.next()).isTrue(); assertThat(rs.getString("strCol")).isEqualTo("stringVal"); assertThat(rs.getString(0)).isEqualTo("stringVal"); @@ -199,66 +275,88 @@ public void allTypes() { put(ByteString.copyFromUtf8("qual3"), ByteString.copyFromUtf8("val3")); } }); - + assertThat(rs.getProtoMessage("protoCol", Album.getDefaultInstance())).isEqualTo(album); + assertThat(rs.getProtoMessage(11, Album.getDefaultInstance())).isEqualTo(album); + assertThat(rs.getProtoEnum("enumCol", Genre::forNumber)).isEqualTo(Genre.JAZZ); + assertThat(rs.getProtoEnum(12, Genre::forNumber)).isEqualTo(Genre.JAZZ); assertThat(rs.next()).isFalse(); } } @Test public void allQueryParamsTypes() { - ResultSet rs = - dataClient.executeQuery( - Statement.newBuilder( - "SELECT @stringParam AS strCol, @bytesParam as bytesCol, @int64Param AS intCol, " - + "@doubleParam AS doubleCol, @floatParam AS floatCol, @boolParam AS boolCol, " - + "@tsParam AS tsCol, @dateParam AS dateCol, @byteArrayParam AS byteArrayCol, " - + "@stringArrayParam AS stringArrayCol, @intArrayParam AS intArrayCol, " - + "@floatArrayParam AS floatArrayCol, @doubleArrayParam AS doubleArrayCol, " - + "@boolArrayParam AS boolArrayCol, @tsArrayParam AS tsArrayCol, " - + "@dateArrayParam AS dateArrayCol") - .setStringParam("stringParam", "stringVal") - .setBytesParam("bytesParam", ByteString.copyFromUtf8("foo")) - .setLongParam("int64Param", 1L) - .setDoubleParam("doubleParam", 1.3d) - .setFloatParam("floatParam", 1.4f) - .setBooleanParam("boolParam", true) - .setTimestampParam("tsParam", Instant.ofEpochMilli(1000)) - .setDateParam("dateParam", Date.fromYearMonthDay(2024, 6, 1)) - .setListParam( - "byteArrayParam", - Arrays.asList( - ByteString.copyFromUtf8("foo"), null, ByteString.copyFromUtf8("bar")), - SqlType.arrayOf(SqlType.bytes())) - .setListParam( - "stringArrayParam", - Arrays.asList("foo", null, "bar"), - SqlType.arrayOf(SqlType.string())) - .setListParam( - "intArrayParam", Arrays.asList(1L, null, 2L), SqlType.arrayOf(SqlType.int64())) - .setListParam( - "floatArrayParam", - Arrays.asList(1.2f, null, 1.3f), - SqlType.arrayOf(SqlType.float32())) - .setListParam( - "doubleArrayParam", - Arrays.asList(1.4d, null, 1.5d), - SqlType.arrayOf(SqlType.float64())) - .setListParam( - "boolArrayParam", - Arrays.asList(true, null, false), - SqlType.arrayOf(SqlType.bool())) - .setListParam( - "tsArrayParam", - Arrays.asList( - Instant.ofEpochSecond(1000, 1000), null, Instant.ofEpochSecond(2000, 2000)), - SqlType.arrayOf(SqlType.timestamp())) - .setListParam( - "dateArrayParam", - Arrays.asList( - Date.fromYearMonthDay(2024, 8, 1), null, Date.fromYearMonthDay(2024, 8, 2)), - SqlType.arrayOf(SqlType.date())) - .build()); + Map> paramTypes = new HashMap<>(); + paramTypes.put("stringParam", SqlType.string()); + paramTypes.put("bytesParam", SqlType.bytes()); + paramTypes.put("int64Param", SqlType.int64()); + paramTypes.put("doubleParam", SqlType.float64()); + paramTypes.put("floatParam", SqlType.float32()); + paramTypes.put("boolParam", SqlType.bool()); + paramTypes.put("tsParam", SqlType.timestamp()); + paramTypes.put("dateParam", SqlType.date()); + paramTypes.put("stringArrayParam", SqlType.arrayOf(SqlType.string())); + paramTypes.put("byteArrayParam", SqlType.arrayOf(SqlType.bytes())); + paramTypes.put("intArrayParam", SqlType.arrayOf(SqlType.int64())); + paramTypes.put("doubleArrayParam", SqlType.arrayOf(SqlType.float64())); + paramTypes.put("floatArrayParam", SqlType.arrayOf(SqlType.float32())); + paramTypes.put("boolArrayParam", SqlType.arrayOf(SqlType.bool())); + paramTypes.put("tsArrayParam", SqlType.arrayOf(SqlType.timestamp())); + paramTypes.put("dateArrayParam", SqlType.arrayOf(SqlType.date())); + PreparedStatement preparedStatement = + dataClient.prepareStatement( + "SELECT @stringParam AS strCol, @bytesParam as bytesCol, @int64Param AS intCol, " + + "@doubleParam AS doubleCol, @floatParam AS floatCol, @boolParam AS boolCol, " + + "@tsParam AS tsCol, @dateParam AS dateCol, @byteArrayParam AS byteArrayCol, " + + "@stringArrayParam AS stringArrayCol, @intArrayParam AS intArrayCol, " + + "@floatArrayParam AS floatArrayCol, @doubleArrayParam AS doubleArrayCol, " + + "@boolArrayParam AS boolArrayCol, @tsArrayParam AS tsArrayCol, " + + "@dateArrayParam AS dateArrayCol", + paramTypes); + BoundStatement boundStatement = + preparedStatement + .bind() + .setStringParam("stringParam", "stringVal") + .setBytesParam("bytesParam", ByteString.copyFromUtf8("foo")) + .setLongParam("int64Param", 1L) + .setDoubleParam("doubleParam", 1.3d) + .setFloatParam("floatParam", 1.4f) + .setBooleanParam("boolParam", true) + .setTimestampParam("tsParam", Instant.ofEpochMilli(1000)) + .setDateParam("dateParam", Date.fromYearMonthDay(2024, 6, 1)) + .setListParam( + "byteArrayParam", + Arrays.asList(ByteString.copyFromUtf8("foo"), null, ByteString.copyFromUtf8("bar")), + SqlType.arrayOf(SqlType.bytes())) + .setListParam( + "stringArrayParam", + Arrays.asList("foo", null, "bar"), + SqlType.arrayOf(SqlType.string())) + .setListParam( + "intArrayParam", Arrays.asList(1L, null, 2L), SqlType.arrayOf(SqlType.int64())) + .setListParam( + "floatArrayParam", + Arrays.asList(1.2f, null, 1.3f), + SqlType.arrayOf(SqlType.float32())) + .setListParam( + "doubleArrayParam", + Arrays.asList(1.4d, null, 1.5d), + SqlType.arrayOf(SqlType.float64())) + .setListParam( + "boolArrayParam", Arrays.asList(true, null, false), SqlType.arrayOf(SqlType.bool())) + .setListParam( + "tsArrayParam", + Arrays.asList( + Instant.ofEpochSecond(1000, 1000), null, Instant.ofEpochSecond(2000, 2000)), + SqlType.arrayOf(SqlType.timestamp())) + .setListParam( + "dateArrayParam", + Arrays.asList( + Date.fromYearMonthDay(2024, 8, 1), null, Date.fromYearMonthDay(2024, 8, 2)), + SqlType.arrayOf(SqlType.date())) + .build(); + + ResultSet rs = dataClient.executeQuery(boundStatement); assertThat(rs.next()).isTrue(); assertThat(rs.getString("strCol")).isEqualTo("stringVal"); assertThat(rs.getString(0)).isEqualTo("stringVal"); @@ -322,14 +420,16 @@ public void allQueryParamsTypes() { @Test public void testNullColumns() { - try (ResultSet rs = - dataClient.executeQuery( - Statement.of( - "SELECT cf['qual'] AS neverNull, cf['qual3'] AS maybeNull FROM " - + tableId - + " WHERE _key LIKE '" - + uniquePrefix - + "%'"))) { + PreparedStatement preparedStatement = + dataClient.prepareStatement( + "SELECT cf['qual'] AS neverNull, cf['qual3'] AS maybeNull FROM `" + + tableId + + "` WHERE _key LIKE '" + + uniquePrefix + + "%'", + new HashMap<>()); + BoundStatement statement = preparedStatement.bind().build(); + try (ResultSet rs = dataClient.executeQuery(statement)) { assertThat(rs.next()).isTrue(); assertThat(rs.getBytes("neverNull")).isEqualTo(ByteString.copyFromUtf8("val")); // qual3 is set in row A but not row B diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/LargeRowIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/LargeRowIT.java index 4ccf9167f4..3f73ad4514 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/LargeRowIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/LargeRowIT.java @@ -16,16 +16,37 @@ package com.google.cloud.bigtable.data.v2.it; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.TruthJUnit.assume; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.StreamController; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowCell; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; import com.google.protobuf.ByteString; +import java.util.List; import java.util.Random; import java.util.UUID; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; import org.junit.runner.RunWith; @@ -33,10 +54,29 @@ @RunWith(JUnit4.class) public class LargeRowIT { + private static final Logger logger = Logger.getLogger(LargeRowIT.class.getName()); @ClassRule public static final TestEnvRule testEnvRule = new TestEnvRule(); + private BigtableTableAdminClient tableAdminClient; + private Table table; + private final String familyId = "cf"; + + @Before + public void setup() { + tableAdminClient = testEnvRule.env().getTableAdminClient(); + String tableId = PrefixGenerator.newPrefix("LargeRowTest"); + table = tableAdminClient.createTable(CreateTableRequest.of(tableId).addFamily(familyId)); + } + + @After + public void tearDown() { + if (table != null) { + tableAdminClient.deleteTable(table.getId()); + } + } + @Test public void testWriteRead() throws Exception { String rowKey = UUID.randomUUID().toString(); @@ -73,4 +113,266 @@ public void testWriteRead() throws Exception { assertThat(row.getCells().get(0).getValue()).isEqualTo(largeValue); assertThat(row.getCells().get(1).getValue()).isEqualTo(largeValue); } + + @Test + public void testSkipLargeRow() throws Throwable { + assume() + .withMessage("Large row read errors are not supported by emulator") + .that(testEnvRule.env()) + .isNotInstanceOf(EmulatorEnv.class); + + BigtableDataClient client = testEnvRule.env().getDataClient(); + TableId tableId = TableId.of(table.getId()); + String familyId = this.familyId; + long timestampMicros = System.currentTimeMillis() * 1_000; + + // small row creations + client.bulkMutateRows( + BulkMutation.create(tableId) + .add( + RowMutationEntry.create("r1") + .setCell(familyId, "qualifier", timestampMicros, "my-value")) + .add( + RowMutationEntry.create("r4") + .setCell(familyId, "qualifier", timestampMicros, "my-value")) + .add( + RowMutationEntry.create("r5") + .setCell(familyId, "qualifier", timestampMicros, "my-value")) + .add( + RowMutationEntry.create("r6") + .setCell(familyId, "qualifier", timestampMicros, "my-value"))); + + Row expectedRow1 = + Row.create( + ByteString.copyFromUtf8("r1"), + ImmutableList.of( + RowCell.create( + familyId, + ByteString.copyFromUtf8("qualifier"), + timestampMicros, + ImmutableList.of(), + ByteString.copyFromUtf8("my-value")))); + + Row expectedRow4 = + Row.create( + ByteString.copyFromUtf8("r4"), + ImmutableList.of( + RowCell.create( + familyId, + ByteString.copyFromUtf8("qualifier"), + timestampMicros, + ImmutableList.of(), + ByteString.copyFromUtf8("my-value")))); + + Row expectedRow5 = + Row.create( + ByteString.copyFromUtf8("r5"), + ImmutableList.of( + RowCell.create( + familyId, + ByteString.copyFromUtf8("qualifier"), + timestampMicros, + ImmutableList.of(), + ByteString.copyFromUtf8("my-value")))); + + Row expectedRow6 = + Row.create( + ByteString.copyFromUtf8("r6"), + ImmutableList.of( + RowCell.create( + familyId, + ByteString.copyFromUtf8("qualifier"), + timestampMicros, + ImmutableList.of(), + ByteString.copyFromUtf8("my-value")))); + + // large row creation + byte[] largeValueBytes = new byte[3 * 1024 * 1024]; + ByteString largeValue = ByteString.copyFrom(largeValueBytes); + + for (int i = 0; i < 100; i++) { + ByteString qualifier = ByteString.copyFromUtf8("qualifier1_" + "_" + i); + client.mutateRow(RowMutation.create(tableId, "r2").setCell(familyId, qualifier, largeValue)); + client.mutateRow(RowMutation.create(tableId, "r3").setCell(familyId, qualifier, largeValue)); + } + + // sync + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endOpen("r3")))) + .containsExactly(expectedRow1) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endClosed("r4")))) + .containsExactly(expectedRow1, expectedRow4) + .inOrder(); + + List emptyRows = + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r2").endClosed("r3"))); + assertThat(emptyRows).isEmpty(); + + List startWithFaultyRow = + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r2").endClosed("r4"))); + assertThat(startWithFaultyRow).containsExactly(expectedRow4); + + List endsWithFaultyRow = + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endClosed("r3"))); + assertThat(endsWithFaultyRow).containsExactly(expectedRow1); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1").endClosed("r4")))) + .containsExactly(expectedRow1, expectedRow4) + .inOrder(); + + assertThat(client.skipLargeRowsCallable().all().call(Query.create(tableId))) + .containsExactly(expectedRow1, expectedRow4, expectedRow5, expectedRow6) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call(Query.create(tableId).range(ByteStringRange.unbounded().endClosed("r4")))) + .containsExactly(expectedRow1, expectedRow4) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call(Query.create(tableId).range(ByteStringRange.unbounded().startClosed("r1")))) + .containsExactly(expectedRow1, expectedRow4, expectedRow5, expectedRow6) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call(Query.create(tableId).range(ByteStringRange.unbounded().endOpen("r4")))) + .containsExactly(expectedRow1); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call(Query.create(tableId).range(ByteStringRange.unbounded().startOpen("r1")))) + .containsExactly(expectedRow4, expectedRow5, expectedRow6); + + assertThat(client.skipLargeRowsCallable().all().call(Query.create(tableId).reversed(true))) + .containsExactly(expectedRow6, expectedRow5, expectedRow4, expectedRow1) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().endClosed("r4")) + .reversed(true))) + .containsExactly(expectedRow4, expectedRow1) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r1")) + .reversed(true))) + .containsExactly(expectedRow6, expectedRow5, expectedRow4, expectedRow1) + .inOrder(); + + assertThat( + client + .skipLargeRowsCallable() + .all() + .call( + Query.create(tableId) + .range(ByteStringRange.unbounded().startClosed("r2").endOpen("r3\0")))) + .isEmpty(); + + // async + AccumulatingObserver observer = new AccumulatingObserver(); + Query query = Query.create(tableId).range("r1", "r3"); + client.skipLargeRowsCallable().call(query, observer); + observer.awaitCompletion(); + assertThat(observer.responses).containsExactly(expectedRow1); + + AccumulatingObserver observer2 = new AccumulatingObserver(); + Query query2 = Query.create(tableId).range("r1", "r5"); + client.skipLargeRowsCallable().call(query2, observer2); + observer2.awaitCompletion(); + assertThat(observer2.responses).containsExactly(expectedRow1, expectedRow4); + + AccumulatingObserver observer3 = new AccumulatingObserver(); + Query query3 = Query.create(tableId); + client.skipLargeRowsCallable().call(query3, observer3); + observer3.awaitCompletion(); + assertThat(observer3.responses) + .containsExactly(expectedRow1, expectedRow4, expectedRow5, expectedRow6); + } + + static class AccumulatingObserver implements ResponseObserver { + + final List responses = Lists.newArrayList(); + final SettableApiFuture completionFuture = SettableApiFuture.create(); + + void awaitCompletion() throws Throwable { + try { + completionFuture.get(10, TimeUnit.MINUTES); + } catch (ExecutionException e) { + throw e.getCause(); + } + } + + @Override + public void onStart(StreamController controller) {} + + @Override + public void onResponse(Row row) { + responses.add(row); + } + + @Override + public void onError(Throwable t) { + completionFuture.setException(t); + } + + @Override + public void onComplete() { + completionFuture.set(null); + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MetricsITUtils.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MetricsITUtils.java index 56f6bfa476..5e56d36e72 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MetricsITUtils.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MetricsITUtils.java @@ -15,7 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.it; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; import com.google.common.truth.Correspondence; import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.PointData; @@ -27,11 +27,11 @@ public class MetricsITUtils { static final Correspondence POINT_DATA_CLUSTER_ID_CONTAINS = Correspondence.from( - (pd, s) -> pd.getAttributes().get(BuiltinMetricsConstants.CLUSTER_ID_KEY).contains(s), + (pd, s) -> pd.getAttributes().get(TableSchema.CLUSTER_ID_KEY).contains(s), "contains attributes"); static final Correspondence POINT_DATA_ZONE_ID_CONTAINS = Correspondence.from( - (pd, s) -> pd.getAttributes().get(BuiltinMetricsConstants.ZONE_ID_KEY).contains(s), + (pd, s) -> pd.getAttributes().get(TableSchema.ZONE_ID_KEY).contains(s), "contains attributes"); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java index c99000be48..a54c726827 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/MutateRowIT.java @@ -150,6 +150,7 @@ public void testOnAuthorizedView() throws Exception { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java index 95ed16817e..51adc4abb6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadIT.java @@ -41,6 +41,7 @@ import com.google.cloud.bigtable.data.v2.models.RowCell; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.common.collect.ImmutableList; @@ -73,6 +74,7 @@ @RunWith(JUnit4.class) public class ReadIT { + private String prefix; @ClassRule public static TestEnvRule testEnvRule = new TestEnvRule(); @@ -85,7 +87,7 @@ public void setUp() { @Test public void isRowExists() throws Exception { String rowKey = prefix + "-test-row-key"; - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); testEnvRule .env() .getDataClient() @@ -110,7 +112,7 @@ public void isRowExistsOnAuthorizedView() throws Exception { .isNotInstanceOf(EmulatorEnv.class); BigtableDataClient dataClient = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String rowKey = AUTHORIZED_VIEW_ROW_PREFIX + prefix + "-isRowExistsOnAuthorizedView"; String rowKeyOutsideAuthorizedView = prefix + "-isRowExistsOnAuthorizedView"; @@ -148,7 +150,7 @@ public void isRowExistsOnAuthorizedView() throws Exception { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(tableId, testAuthorizedView.getId()); + .deleteAuthorizedView(tableId.getTableId(), testAuthorizedView.getId()); } @Test @@ -175,7 +177,7 @@ public void readEmptyOnAuthorizedView() throws Throwable { .that(testEnvRule.env()) .isNotInstanceOf(EmulatorEnv.class); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); BigtableDataClient dataClient = testEnvRule.env().getDataClient(); String uniqueKey = AUTHORIZED_VIEW_ROW_PREFIX + prefix + "-readEmptyOnAuthorizedView"; String uniqueKeyOutsideAuthorizedView = prefix + "-readEmptyOnAuthorizedView"; @@ -214,7 +216,7 @@ public void readEmptyOnAuthorizedView() throws Throwable { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(tableId, testAuthorizedView.getId()); + .deleteAuthorizedView(tableId.getTableId(), testAuthorizedView.getId()); } @Test @@ -246,7 +248,7 @@ public void read() throws Throwable { ByteString.copyFromUtf8("my-value"))))); } - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); // Sync Query query = Query.create(tableId).range(uniqueKey + "-0", uniqueKey + "-" + numRows); @@ -283,7 +285,7 @@ public void readOnAuthorizedView() throws Throwable { List expectedRows = Lists.newArrayList(); String uniqueKey = AUTHORIZED_VIEW_ROW_PREFIX + prefix + "-readOnAuthorizedView"; String uniqueKeyOutsideAuthorizedView = prefix + "-readOnAuthorizedView"; - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); BigtableDataClient dataClient = testEnvRule.env().getDataClient(); AuthorizedView testAuthorizedView = createTestAuthorizedView(testEnvRule); @@ -385,13 +387,13 @@ public void readOnAuthorizedView() throws Throwable { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(tableId, testAuthorizedView.getId()); + .deleteAuthorizedView(tableId.getTableId(), testAuthorizedView.getId()); } @Test public void rangeQueries() { BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String uniqueKey = prefix + "-range-queries"; String keyA = uniqueKey + "-" + "a"; @@ -460,14 +462,14 @@ public void rangeQueries() { } @Test - public void rangeQueriesOnAuthorizedView() { + public void rangeQueriesOnAuthorizedView() throws InterruptedException { assume() .withMessage("AuthorizedView is not supported on Emulator") .that(testEnvRule.env()) .isNotInstanceOf(EmulatorEnv.class); BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String uniqueKey = AUTHORIZED_VIEW_ROW_PREFIX + prefix + "-rangeQueriesOnAuthorizedView"; String keyA = uniqueKey + "-" + "a"; @@ -551,7 +553,7 @@ public void rangeQueriesOnAuthorizedView() { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(tableId, testAuthorizedView.getId()); + .deleteAuthorizedView(tableId.getTableId(), testAuthorizedView.getId()); } @Test @@ -561,7 +563,7 @@ public void reversed() { .that(testEnvRule.env()) .isNotInstanceOf(EmulatorEnv.class); BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String uniqueKey = prefix + "-rev-queries"; String keyA = uniqueKey + "-" + "a"; @@ -645,7 +647,7 @@ public void reversedWithForcedResumption() throws IOException, InterruptedExcept .isNotInstanceOf(EmulatorEnv.class); BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String familyId = testEnvRule.env().getFamilyId(); String uniqueKey = prefix + "-rev-queries2"; @@ -666,7 +668,10 @@ public void reversedWithForcedResumption() throws IOException, InterruptedExcept random.nextBytes(valueBytes); ByteString value = ByteString.copyFrom(valueBytes); - batcher.add(RowMutationEntry.create(key).setCell(familyId, qualifier, timestamp, value)); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = + batcher.add( + RowMutationEntry.create(key).setCell(familyId, qualifier, timestamp, value)); expectedResults.add( Row.create( key, @@ -685,12 +690,14 @@ public void reversedWithForcedResumption() throws IOException, InterruptedExcept ((InstantiatingGrpcChannelProvider) settingsBuilder.stubSettings().getTransportChannelProvider()) .toBuilder(); + @SuppressWarnings("rawtypes") ApiFunction oldConfigurator = transport.getChannelConfigurator(); // Randomly camp the deadline to force a timeout to force a retry transport.setChannelConfigurator( - (ManagedChannelBuilder c) -> { + (@SuppressWarnings("rawtypes") + ManagedChannelBuilder c) -> { if (oldConfigurator != null) { c = oldConfigurator.apply(c); } @@ -761,6 +768,7 @@ public void onSuccess(Row result) { } static class AccumulatingObserver implements ResponseObserver { + final List responses = Lists.newArrayList(); final SettableApiFuture completionFuture = SettableApiFuture.create(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java index ef5cf83c75..cb8f2f8b58 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/ReadModifyWriteIT.java @@ -27,6 +27,7 @@ import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.protobuf.ByteString; @@ -45,7 +46,7 @@ public class ReadModifyWriteIT { @Test public void test() throws InterruptedException, ExecutionException, TimeoutException { - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String family = testEnvRule.env().getFamilyId(); String rowKey = UUID.randomUUID().toString(); @@ -78,7 +79,7 @@ public void testOnAuthorizedView() AuthorizedView testAuthorizedView = createTestAuthorizedView(testEnvRule); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String family = testEnvRule.env().getFamilyId(); String rowKey = AUTHORIZED_VIEW_ROW_PREFIX + UUID.randomUUID(); @@ -136,6 +137,7 @@ public void testOnAuthorizedView() testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/RowMutationEntryBatcherIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/RowMutationEntryBatcherIT.java index 6b2eaf2047..c6ace17ade 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/RowMutationEntryBatcherIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/RowMutationEntryBatcherIT.java @@ -22,6 +22,7 @@ import static com.google.common.truth.TruthJUnit.assume; import static org.junit.Assert.fail; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.rpc.ServerStream; import com.google.cloud.bigtable.admin.v2.models.AuthorizedView; @@ -31,6 +32,7 @@ import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowCell; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.common.collect.ImmutableList; @@ -51,15 +53,17 @@ public class RowMutationEntryBatcherIT { @Test public void testNewBatcher() throws Exception { BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String family = testEnvRule.env().getFamilyId(); String rowPrefix = UUID.randomUUID().toString(); try (Batcher batcher = client.newBulkMutationBatcher(tableId)) { for (int i = 0; i < 10; i++) { - batcher.add( - RowMutationEntry.create(rowPrefix + "-" + i) - .setCell(family, "qualifier", 10_000L, "value-" + i)); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = + batcher.add( + RowMutationEntry.create(rowPrefix + "-" + i) + .setCell(family, "qualifier", 10_000L, "value-" + i)); } } @@ -91,16 +95,18 @@ public void testNewBatcherOnAuthorizedView() throws Exception { AuthorizedView testAuthorizedView = createTestAuthorizedView(testEnvRule); BigtableDataClient client = testEnvRule.env().getDataClient(); - String tableId = testEnvRule.env().getTableId(); + TableId tableId = testEnvRule.env().getTableId(); String family = testEnvRule.env().getFamilyId(); String rowPrefix = AUTHORIZED_VIEW_ROW_PREFIX + UUID.randomUUID(); try (Batcher batcher = client.newBulkMutationBatcher(AuthorizedViewId.of(tableId, testAuthorizedView.getId()))) { for (int i = 0; i < 10; i++) { - batcher.add( - RowMutationEntry.create(rowPrefix + "-" + i) - .setCell(family, AUTHORIZED_VIEW_COLUMN_QUALIFIER, 10_000L, "value-" + i)); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = + batcher.add( + RowMutationEntry.create(rowPrefix + "-" + i) + .setCell(family, AUTHORIZED_VIEW_COLUMN_QUALIFIER, 10_000L, "value-" + i)); } } @@ -126,9 +132,11 @@ public void testNewBatcherOnAuthorizedView() throws Exception { try { try (Batcher batcher = client.newBulkMutationBatcher(AuthorizedViewId.of(tableId, testAuthorizedView.getId()))) { - batcher.add( - RowMutationEntry.create(rowKeyOutsideAuthorizedView) - .setCell(family, AUTHORIZED_VIEW_COLUMN_QUALIFIER, 10_000L, "value")); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = + batcher.add( + RowMutationEntry.create(rowKeyOutsideAuthorizedView) + .setCell(family, AUTHORIZED_VIEW_COLUMN_QUALIFIER, 10_000L, "value")); } fail("Should not be able to apply bulk mutation on rows outside authorized view"); } catch (Exception e) { @@ -138,6 +146,7 @@ public void testNewBatcherOnAuthorizedView() throws Exception { testEnvRule .env() .getTableAdminClient() - .deleteAuthorizedView(testEnvRule.env().getTableId(), testAuthorizedView.getId()); + .deleteAuthorizedView( + testEnvRule.env().getTableId().getTableId(), testAuthorizedView.getId()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java index 5e5567e3b1..063d0d1f50 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/SampleRowsIT.java @@ -29,6 +29,7 @@ import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; +import com.google.cloud.bigtable.test_helpers.env.PrefixGenerator; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import com.google.common.collect.Lists; import com.google.protobuf.ByteString; @@ -103,10 +104,12 @@ public void testOnAuthorizedView() .env() .getTableAdminClient() .deleteAuthorizedView(testAuthorizedView.getTableId(), testAuthorizedView.getId()); + + testEnvRule.env().getTableAdminClient().deleteTable(testAuthorizedView.getTableId()); } private static AuthorizedView createPreSplitTableAndAuthorizedView() { - String tableId = UUID.randomUUID().toString(); + String tableId = PrefixGenerator.newPrefix("SampleRowsIT#AuthorizedView"); String authorizedViewId = UUID.randomUUID().toString(); testEnvRule diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/StreamingMetricsMetadataIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/StreamingMetricsMetadataIT.java index 84ab24f1c8..09ab6e0851 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/StreamingMetricsMetadataIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/StreamingMetricsMetadataIT.java @@ -26,10 +26,11 @@ import com.google.cloud.bigtable.admin.v2.models.Cluster; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableOperationLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -72,7 +73,7 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); + OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); @@ -93,7 +94,9 @@ public void testSuccess() throws Exception { String uniqueKey = prefix + "-read"; Query query = Query.create(testEnvRule.env().getTableId()).rowKey(uniqueKey); - ArrayList rows = Lists.newArrayList(client.readRows(query)); + // consume the iterator + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(query)); ApiFuture> clustersFuture = testEnvRule @@ -106,23 +109,23 @@ public void testSuccess() throws Exception { Collection allMetricData = metricReader.collectAllMetrics(); List metrics = metricReader.collectAllMetrics().stream() - .filter(m -> m.getName().contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME)) + .filter(m -> m.getName().contains(TableOperationLatency.NAME)) .collect(Collectors.toList()); assertThat(allMetricData) .comparingElementsUsing(METRIC_DATA_NAME_CONTAINS) - .contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME); + .contains(TableOperationLatency.NAME); assertThat(metrics).hasSize(1); MetricData metricData = metrics.get(0); List pointData = new ArrayList<>(metricData.getData().getPoints()); List clusterAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.CLUSTER_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.CLUSTER_ID_KEY)) .collect(Collectors.toList()); List zoneAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.ZONE_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.ZONE_ID_KEY)) .collect(Collectors.toList()); assertThat(pointData) @@ -137,39 +140,41 @@ public void testSuccess() throws Exception { @Test public void testFailure() { - Query query = Query.create("non-exist-table"); + Query query = Query.create(TableId.of("non-exist-table")); try { - Lists.newArrayList(client.readRows(query)); - } catch (NotFoundException e) { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(query)); + } catch (NotFoundException ignored) { + // dont care } Collection allMetricData = metricReader.collectAllMetrics(); List metrics = metricReader.collectAllMetrics().stream() - .filter(m -> m.getName().contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME)) + .filter(m -> m.getName().contains(TableOperationLatency.NAME)) .collect(Collectors.toList()); assertThat(allMetricData) .comparingElementsUsing(METRIC_DATA_NAME_CONTAINS) - .contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME); + .contains(TableOperationLatency.NAME); assertThat(metrics).hasSize(1); MetricData metricData = metrics.get(0); List pointData = new ArrayList<>(metricData.getData().getPoints()); List clusterAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.CLUSTER_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.CLUSTER_ID_KEY)) .collect(Collectors.toList()); List zoneAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.ZONE_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.ZONE_ID_KEY)) .collect(Collectors.toList()); assertThat(pointData) .comparingElementsUsing(POINT_DATA_CLUSTER_ID_CONTAINS) - .contains("unspecified"); + .contains(""); assertThat(pointData).comparingElementsUsing(POINT_DATA_ZONE_ID_CONTAINS).contains("global"); - assertThat(clusterAttributes).contains("unspecified"); + assertThat(clusterAttributes).contains(""); assertThat(zoneAttributes).contains("global"); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/UnaryMetricsMetadataIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/UnaryMetricsMetadataIT.java index 42adb8ea6e..5f151d749a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/UnaryMetricsMetadataIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/UnaryMetricsMetadataIT.java @@ -26,9 +26,11 @@ import com.google.cloud.bigtable.admin.v2.models.Cluster; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableAttemptLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.metrics.TableOperationLatency; +import com.google.cloud.bigtable.data.v2.internal.csm.schema.TableSchema; import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants; -import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsView; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.stub.metrics.CustomOpenTelemetryMetricsProvider; import com.google.cloud.bigtable.test_helpers.env.EmulatorEnv; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; @@ -71,7 +73,7 @@ public void setup() throws IOException { SdkMeterProviderBuilder meterProvider = SdkMeterProvider.builder().registerMetricReader(metricReader); - BuiltinMetricsView.registerBuiltinMetrics(testEnvRule.env().getProjectId(), meterProvider); + OpenTelemetry openTelemetry = OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); @@ -111,23 +113,23 @@ public void testSuccess() throws Exception { Collection allMetricData = metricReader.collectAllMetrics(); List metrics = allMetricData.stream() - .filter(m -> m.getName().contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME)) + .filter(m -> m.getName().contains(TableOperationLatency.NAME)) .collect(Collectors.toList()); assertThat(allMetricData) .comparingElementsUsing(METRIC_DATA_NAME_CONTAINS) - .contains(BuiltinMetricsConstants.OPERATION_LATENCIES_NAME); + .contains(TableOperationLatency.NAME); assertThat(metrics).hasSize(1); MetricData metricData = metrics.get(0); List pointData = new ArrayList<>(metricData.getData().getPoints()); List clusterAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.CLUSTER_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.CLUSTER_ID_KEY)) .collect(Collectors.toList()); List zoneAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.ZONE_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.ZONE_ID_KEY)) .collect(Collectors.toList()); assertThat(pointData) @@ -149,14 +151,13 @@ public void testFailure() throws Exception { client .mutateRowCallable() .futureCall( - RowMutation.create("non-exist-table", rowKey).setCell(familyId, "q", "myVal")); + RowMutation.create(TableId.of("non-exist-table"), rowKey) + .setCell(familyId, "q", "myVal")); try { future.get(1, TimeUnit.MINUTES); } catch (ExecutionException e) { - if (e.getCause() instanceof NotFoundException) { - // ignore NotFoundException - } else { + if (!(e.getCause() instanceof NotFoundException)) { throw e; } } @@ -164,10 +165,7 @@ public void testFailure() throws Exception { Collection allMetricData = metricReader.collectAllMetrics(); MetricData metricData = null; for (MetricData md : allMetricData) { - if (md.getName() - .equals( - BuiltinMetricsConstants.METER_NAME - + BuiltinMetricsConstants.ATTEMPT_LATENCIES_NAME)) { + if (md.getName().equals(TableAttemptLatency.NAME)) { metricData = md; break; } @@ -175,25 +173,25 @@ public void testFailure() throws Exception { assertThat(allMetricData) .comparingElementsUsing(METRIC_DATA_NAME_CONTAINS) - .contains(BuiltinMetricsConstants.ATTEMPT_LATENCIES_NAME); + .contains(TableAttemptLatency.NAME); assertThat(metricData).isNotNull(); List pointData = new ArrayList<>(metricData.getData().getPoints()); assertThat(pointData) .comparingElementsUsing(POINT_DATA_CLUSTER_ID_CONTAINS) - .contains("unspecified"); + .contains(""); assertThat(pointData).comparingElementsUsing(POINT_DATA_ZONE_ID_CONTAINS).contains("global"); List clusterAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.CLUSTER_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.CLUSTER_ID_KEY)) .collect(Collectors.toList()); List zoneAttributes = pointData.stream() - .map(pd -> pd.getAttributes().get(BuiltinMetricsConstants.ZONE_ID_KEY)) + .map(pd -> pd.getAttributes().get(TableSchema.ZONE_ID_KEY)) .collect(Collectors.toList()); - assertThat(clusterAttributes).contains("unspecified"); + assertThat(clusterAttributes).contains(""); assertThat(zoneAttributes).contains("global"); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewIdTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewIdTest.java index b20a99ec11..431125fb8c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewIdTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/AuthorizedViewIdTest.java @@ -45,7 +45,6 @@ public void testEquality() { assertThat(authorizedViewId).isEqualTo(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)); assertThat(authorizedViewId) .isNotEqualTo(AuthorizedViewId.of(TABLE_ID, "another-authorized-view")); - assertThat(authorizedViewId).isNotEqualTo(TableId.of(TABLE_ID)); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java index 84108d4a78..412959eb11 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/BulkMutationTest.java @@ -37,7 +37,7 @@ public class BulkMutationTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final String AUTHORIZED_VIEW_ID = "fake-authorized-view"; private static final String APP_PROFILE = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = @@ -61,7 +61,7 @@ public void test() throws ParseException { MutateRowsRequest.Builder expected = MutateRowsRequest.newBuilder() - .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID.getTableId())) .setAppProfileId(APP_PROFILE); TextFormat.merge( "entries {" @@ -116,7 +116,7 @@ public void test() throws ParseException { .clearTableName() .setAuthorizedViewName( NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + PROJECT_ID, INSTANCE_ID, TABLE_ID.getTableId(), AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE); assertThat(actual).isEqualTo(expected.build()); @@ -257,7 +257,7 @@ public void fromProtoTest() { assertThat(overriddenRequest).isNotEqualTo(protoRequest); assertThat(overriddenRequest.getTableName()) - .matches(NameUtil.formatTableName(projectId, instanceId, TABLE_ID)); + .matches(NameUtil.formatTableName(projectId, instanceId, TABLE_ID.getTableId())); assertThat(overriddenRequest.getAuthorizedViewName()).isEmpty(); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); @@ -280,7 +280,8 @@ public void fromProtoTest() { assertThat(overriddenRequest.getTableName()).isEmpty(); assertThat(overriddenRequest.getAuthorizedViewName()) .matches( - NameUtil.formatAuthorizedViewName(projectId, instanceId, TABLE_ID, AUTHORIZED_VIEW_ID)); + NameUtil.formatAuthorizedViewName( + projectId, instanceId, TABLE_ID.getTableId(), AUTHORIZED_VIEW_ID)); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index 61c028cdb6..761bec3765 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenInstant; import static com.google.common.truth.Truth.assertThat; import com.google.bigtable.v2.MutateRowRequest; @@ -29,11 +30,11 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.Instant; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class ChangeStreamMutationTest { @@ -45,6 +46,10 @@ public class ChangeStreamMutationTest { RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); private static final Instant FAKE_COMMIT_TIMESTAMP = Instant.ofEpochSecond(0, 1000L); private static final Instant FAKE_LOW_WATERMARK = Instant.ofEpochSecond(0, 2000L); + private static final org.threeten.bp.Instant FAKE_COMMIT_TIMESTAMP_THREETEN = + toThreetenInstant(FAKE_COMMIT_TIMESTAMP); + private static final org.threeten.bp.Instant FAKE_LOW_WATERMARK_THREETEN = + toThreetenInstant(FAKE_LOW_WATERMARK); @Test public void userInitiatedMutationTest() throws IOException, ClassNotFoundException { @@ -73,17 +78,20 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti Value.rawTimestamp(1000), Value.rawValue(ByteString.copyFrom(Longs.toByteArray(1234L)))) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Test the getters. assertThat(changeStreamMutation.getRowKey()).isEqualTo(ByteString.copyFromUtf8("key")); assertThat(changeStreamMutation.getType()).isEqualTo(ChangeStreamMutation.MutationType.USER); assertThat(changeStreamMutation.getSourceClusterId()).isEqualTo("fake-source-cluster-id"); - assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getCommitTime()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP_THREETEN); assertThat(changeStreamMutation.getTieBreaker()).isEqualTo(0); assertThat(changeStreamMutation.getToken()).isEqualTo("fake-token"); - assertThat(changeStreamMutation.getEstimatedLowWatermark()).isEqualTo(FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getEstimatedLowWatermarkTime()).isEqualTo(FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getEstimatedLowWatermark()) + .isEqualTo(FAKE_LOW_WATERMARK_THREETEN); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -112,7 +120,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Test the getters. @@ -120,10 +128,13 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { assertThat(changeStreamMutation.getType()) .isEqualTo(ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); Assert.assertTrue(changeStreamMutation.getSourceClusterId().isEmpty()); - assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getCommitTime()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP_THREETEN); assertThat(changeStreamMutation.getTieBreaker()).isEqualTo(0); assertThat(changeStreamMutation.getToken()).isEqualTo("fake-token"); - assertThat(changeStreamMutation.getEstimatedLowWatermark()).isEqualTo(FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getEstimatedLowWatermarkTime()).isEqualTo(FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getEstimatedLowWatermark()) + .isEqualTo(FAKE_LOW_WATERMARK_THREETEN); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -161,7 +172,7 @@ public void toRowMutationTest() { Value.rawTimestamp(1000), Value.rawValue(ByteString.copyFrom(Longs.toByteArray(1234L)))) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Convert it to a rowMutation and construct a MutateRowRequest. @@ -204,7 +215,7 @@ public void toRowMutationWithoutTokenShouldFailTest() { ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK); + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK); Assert.assertThrows(IllegalStateException.class, builder::build); } @@ -244,7 +255,7 @@ public void toRowMutationEntryTest() { Value.rawTimestamp(1000), Value.rawValue(ByteString.copyFrom(Longs.toByteArray(1234L)))) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Convert it to a rowMutationEntry and construct a MutateRowRequest. @@ -284,7 +295,7 @@ public void toRowMutationEntryWithoutTokenShouldFailTest() { ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK); + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK); Assert.assertThrows(IllegalStateException.class, builder::build); } @@ -309,7 +320,7 @@ public void testWithLongValue() { 1000L, ByteString.copyFrom(Longs.toByteArray(1L))) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); RowMutation rowMutation = changeStreamMutation.toRowMutation(TABLE_ID); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index 3f09d9b443..e46c7b30b2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -30,20 +30,15 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.Instant; import org.junit.Assert; -import org.junit.Rule; import org.junit.Test; -import org.junit.function.ThrowingRunnable; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class ChangeStreamRecordTest { - @Rule public ExpectedException expect = ExpectedException.none(); - @Test public void heartbeatSerializationTest() throws IOException, ClassNotFoundException { ReadChangeStreamResponse.Heartbeat heartbeatProto = @@ -129,7 +124,7 @@ public void heartbeatTest() { .build(); Heartbeat actualHeartbeat = Heartbeat.fromProto(heartbeatProto); - assertThat(actualHeartbeat.getEstimatedLowWatermark()) + assertThat(actualHeartbeat.getEstimatedLowWatermarkTime()) .isEqualTo(Instant.ofEpochSecond(lowWatermark.getSeconds(), lowWatermark.getNanos())); assertThat(actualHeartbeat.getChangeStreamContinuationToken().getPartition()) .isEqualTo(ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); @@ -189,7 +184,7 @@ public void closeStreamTest() { } // Tests that an OK CloseStream should not have continuation tokens. - @Test(expected = IllegalStateException.class) + @Test public void closeStreamOkWithContinuationTokenShouldFail() { Status status = Status.newBuilder().setCode(0).build(); RowRange rowRange = @@ -206,22 +201,20 @@ public void closeStreamOkWithContinuationTokenShouldFail() { .setToken(token)) .setStatus(status) .build(); - Assert.assertThrows( - IllegalStateException.class, (ThrowingRunnable) CloseStream.fromProto(closeStreamProto)); + Assert.assertThrows(IllegalStateException.class, () -> CloseStream.fromProto(closeStreamProto)); } // Tests that a non-OK CloseStream should have continuation tokens. - @Test(expected = IllegalStateException.class) + @Test public void closeStreamErrorWithoutContinuationTokenShouldFail() { Status status = Status.newBuilder().setCode(11).build(); ReadChangeStreamResponse.CloseStream closeStreamProto = ReadChangeStreamResponse.CloseStream.newBuilder().setStatus(status).build(); - Assert.assertThrows( - IllegalStateException.class, (ThrowingRunnable) CloseStream.fromProto(closeStreamProto)); + Assert.assertThrows(IllegalStateException.class, () -> CloseStream.fromProto(closeStreamProto)); } // Tests that the number of continuation tokens should match the number of new partitions. - @Test(expected = IllegalStateException.class) + @Test public void closeStreamTokenAndNewPartitionCountMismatchedTest() { Status status = Status.newBuilder().setCode(11).build(); RowRange rowRange = @@ -240,8 +233,7 @@ public void closeStreamTokenAndNewPartitionCountMismatchedTest() { .addNewPartitions(StreamPartition.newBuilder().setRowRange(rowRange)) .setStatus(status) .build(); - Assert.assertThrows( - IllegalStateException.class, (ThrowingRunnable) CloseStream.fromProto(closeStreamProto)); + Assert.assertThrows(IllegalStateException.class, () -> CloseStream.fromProto(closeStreamProto)); } // Tests that number of continuation tokens and new partitions don't need to match if new diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java index 0f4e11a162..3a376668cf 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ConditionalRowMutationTest.java @@ -38,7 +38,7 @@ public class ConditionalRowMutationTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final String AUTHORIZED_VIEW_ID = "fake-authorized-view"; private static final String APP_PROFILE_ID = "fake-profile"; @@ -61,7 +61,8 @@ public void toProtoTest() { assertThat(actualProto) .isEqualTo( CheckAndMutateRowRequest.newBuilder() - .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setTableName( + NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID.getTableId())) .setAppProfileId(APP_PROFILE_ID) .setRowKey(TEST_KEY) .build()); @@ -78,7 +79,7 @@ public void toProtoTest() { CheckAndMutateRowRequest.newBuilder() .setAuthorizedViewName( NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + PROJECT_ID, INSTANCE_ID, TABLE_ID.getTableId(), AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(TEST_KEY) .build()); @@ -276,7 +277,7 @@ public void fromProtoTest() { assertThat(overriddenRequest).isNotEqualTo(protoRequest); assertThat(overriddenRequest.getTableName()) - .matches(NameUtil.formatTableName(projectId, instanceId, TABLE_ID)); + .matches(NameUtil.formatTableName(projectId, instanceId, TABLE_ID.getTableId())); assertThat(overriddenRequest.getAuthorizedViewName()).isEmpty(); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); @@ -299,7 +300,8 @@ public void fromProtoTest() { assertThat(overriddenRequest.getTableName()).isEmpty(); assertThat(overriddenRequest.getAuthorizedViewName()) .matches( - NameUtil.formatAuthorizedViewName(projectId, instanceId, TABLE_ID, AUTHORIZED_VIEW_ID)); + NameUtil.formatAuthorizedViewName( + projectId, instanceId, TABLE_ID.getTableId(), AUTHORIZED_VIEW_ID)); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java index 22270bc269..1f74d72b7c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java @@ -15,7 +15,9 @@ */ package com.google.cloud.bigtable.data.v2.models; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenInstant; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.ReadChangeStreamResponse; @@ -25,14 +27,12 @@ import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; import com.google.rpc.Status; +import java.time.Instant; import org.junit.Assert; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class DefaultChangeStreamRecordAdapterTest { @@ -41,8 +41,8 @@ public class DefaultChangeStreamRecordAdapterTest { private ChangeStreamRecordBuilder changeStreamRecordBuilder; private static final Instant FAKE_COMMIT_TIMESTAMP = Instant.ofEpochSecond(0L, 1000L); private static final Instant FAKE_LOW_WATERMARK = Instant.ofEpochSecond(0L, 2000L); - - @Rule public ExpectedException expect = ExpectedException.none(); + private static final org.threeten.bp.Instant FAKE_LOW_WATERMARK_THREETEN = + toThreetenInstant(FAKE_LOW_WATERMARK); @Before public void setUp() { @@ -59,7 +59,7 @@ public void isHeartbeatTest() { ChangeStreamMutation.createGcMutation( ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); Assert.assertTrue(adapter.isHeartbeat(heartbeatRecord)); Assert.assertFalse(adapter.isHeartbeat(closeStreamRecord)); @@ -73,20 +73,23 @@ public void getTokenFromHeartbeatTest() { ReadChangeStreamResponse.Heartbeat.newBuilder() .setEstimatedLowWatermark( Timestamp.newBuilder() - .setSeconds(FAKE_LOW_WATERMARK.getEpochSecond()) - .setNanos(FAKE_LOW_WATERMARK.getNano())) + .setSeconds(FAKE_LOW_WATERMARK_THREETEN.getEpochSecond()) + .setNanos(FAKE_LOW_WATERMARK_THREETEN.getNano())) .setContinuationToken( StreamContinuationToken.newBuilder().setToken("heartbeat-token").build()) .build()); - Assert.assertEquals(adapter.getTokenFromHeartbeat(heartbeatRecord), "heartbeat-token"); + Assert.assertEquals("heartbeat-token", adapter.getTokenFromHeartbeat(heartbeatRecord)); } - @Test(expected = IllegalArgumentException.class) + @Test public void getTokenFromHeartbeatInvalidTypeTest() { ChangeStreamRecord closeStreamRecord = CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); - adapter.getTokenFromHeartbeat(closeStreamRecord); - expect.expectMessage("record is not a Heartbeat."); + + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, () -> adapter.getTokenFromHeartbeat(closeStreamRecord)); + assertThat(e).hasMessageThat().isEqualTo("record is not a Heartbeat."); } @Test @@ -99,7 +102,7 @@ public void isChangeStreamMutationTest() { ChangeStreamMutation.createGcMutation( ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); Assert.assertFalse(adapter.isChangeStreamMutation(heartbeatRecord)); Assert.assertFalse(adapter.isChangeStreamMutation(closeStreamRecord)); @@ -112,19 +115,22 @@ public void getTokenFromChangeStreamMutationTest() { ChangeStreamMutation.createGcMutation( ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("change-stream-mutation-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); Assert.assertEquals( - adapter.getTokenFromChangeStreamMutation(changeStreamMutationRecord), - "change-stream-mutation-token"); + "change-stream-mutation-token", + adapter.getTokenFromChangeStreamMutation(changeStreamMutationRecord)); } - @Test(expected = IllegalArgumentException.class) + @Test public void getTokenFromChangeStreamMutationInvalidTypeTest() { ChangeStreamRecord closeStreamRecord = CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); - adapter.getTokenFromChangeStreamMutation(closeStreamRecord); - expect.expectMessage("record is not a ChangeStreamMutation."); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> adapter.getTokenFromChangeStreamMutation(closeStreamRecord)); + assertThat(e).hasMessageThat().isEqualTo("record is not a ChangeStreamMutation."); } @Test @@ -133,8 +139,8 @@ public void heartbeatTest() { ReadChangeStreamResponse.Heartbeat.newBuilder() .setEstimatedLowWatermark( Timestamp.newBuilder() - .setSeconds(FAKE_LOW_WATERMARK.getEpochSecond()) - .setNanos(FAKE_LOW_WATERMARK.getNano()) + .setSeconds(FAKE_LOW_WATERMARK_THREETEN.getEpochSecond()) + .setNanos(FAKE_LOW_WATERMARK_THREETEN.getNano()) .build()) .setContinuationToken( StreamContinuationToken.newBuilder().setToken("random-token").build()) @@ -186,7 +192,7 @@ public void singleDeleteFamilyTest() { ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. @@ -225,7 +231,7 @@ public void singleDeleteCellTest() { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. @@ -258,7 +264,7 @@ public void singleNonChunkedCellTest() { 100L, ByteString.copyFromUtf8("fake-value")) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. @@ -290,7 +296,7 @@ public void singleChunkedCellTest() { 100L, ByteString.copyFromUtf8("fake-value1-value2")) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. @@ -327,7 +333,7 @@ public void multipleChunkedCellsTest() { } expectedChangeStreamMutationBuilder .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK); + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( @@ -369,7 +375,7 @@ public void multipleDifferentModsTest() { 100L, ByteString.copyFromUtf8("chunked-value")) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK); + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( @@ -418,7 +424,7 @@ public void resetTest() { ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); changeStreamRecordBuilder.startUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); @@ -438,7 +444,7 @@ public void resetTest() { 100L, ByteString.copyFromUtf8("fake-value1-value2")) .setToken("fake-token") - .setEstimatedLowWatermark(FAKE_LOW_WATERMARK) + .setEstimatedLowWatermarkTime(FAKE_LOW_WATERMARK) .build(); changeStreamRecordBuilder.startUserMutation( diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java index 748df81af6..645859f5aa 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java @@ -67,7 +67,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { public void deleteFamilyTest() { Entry deleteFamilyEntry = DeleteFamily.create("fake-family"); DeleteFamily deleteFamily = (DeleteFamily) deleteFamilyEntry; - assertThat("fake-family").isEqualTo(deleteFamily.getFamilyName()); + assertThat(deleteFamily.getFamilyName()).isEqualTo("fake-family"); } @Test @@ -78,10 +78,10 @@ public void deleteCellsTest() { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)); DeleteCells deleteCells = (DeleteCells) deleteCellEntry; - assertThat("fake-family").isEqualTo(deleteCells.getFamilyName()); - assertThat(ByteString.copyFromUtf8("fake-qualifier")).isEqualTo(deleteCells.getQualifier()); - assertThat(Range.TimestampRange.create(1000L, 2000L)) - .isEqualTo(deleteCells.getTimestampRange()); + assertThat(deleteCells.getFamilyName()).isEqualTo("fake-family"); + assertThat(deleteCells.getQualifier()).isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); + assertThat(deleteCells.getTimestampRange()) + .isEqualTo(Range.TimestampRange.create(1000L, 2000L)); } @Test @@ -93,9 +93,9 @@ public void setSellTest() { 1000, ByteString.copyFromUtf8("fake-value")); SetCell setCell = (SetCell) setCellEntry; - assertThat("fake-family").isEqualTo(setCell.getFamilyName()); - assertThat(ByteString.copyFromUtf8("fake-qualifier")).isEqualTo(setCell.getQualifier()); - assertThat(1000).isEqualTo(setCell.getTimestamp()); - assertThat(ByteString.copyFromUtf8("fake-value")).isEqualTo(setCell.getValue()); + assertThat(setCell.getFamilyName()).isEqualTo("fake-family"); + assertThat(setCell.getQualifier()).isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); + assertThat(setCell.getTimestamp()).isEqualTo(1000); + assertThat(setCell.getValue()).isEqualTo(ByteString.copyFromUtf8("fake-value")); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/FiltersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/FiltersTest.java index e5fcd133f5..b8311f592e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/FiltersTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/FiltersTest.java @@ -714,7 +714,7 @@ private static void checkSpawnedFilters( private static void checkClassDeclaresSerialVersionUid(Class cls) { String uid = "serialVersionUID"; for (Field field : cls.getDeclaredFields()) { - if (field.getName() == uid) { + if (uid.equals(field.getName())) { int modifiers = field.getModifiers(); assertWithMessage(field + " is not static").that(Modifier.isStatic(modifiers)).isTrue(); assertWithMessage(field + " is not final").that(Modifier.isFinal(modifiers)).isTrue(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewIdTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewIdTest.java new file mode 100644 index 0000000000..2f944c3ee0 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/MaterializedViewIdTest.java @@ -0,0 +1,67 @@ +/* + * 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 + * + * 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.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class MaterializedViewIdTest { + private static final String PROJECT_ID = "my-project"; + private static final String INSTANCE_ID = "my-instance"; + private static final String TABLE_ID = "my-table"; + private static final String MATERIALIZED_VIEW_ID = "my-materialized-view"; + + @Test + public void testToResourceName() { + MaterializedViewId authorizedViewId = MaterializedViewId.of(MATERIALIZED_VIEW_ID); + + assertThat(authorizedViewId.toResourceName(PROJECT_ID, INSTANCE_ID)) + .isEqualTo( + "projects/my-project/instances/my-instance/materializedViews/my-materialized-view"); + } + + @Test + public void testEquality() { + MaterializedViewId authorizedViewId = MaterializedViewId.of(MATERIALIZED_VIEW_ID); + + assertThat(authorizedViewId).isEqualTo(MaterializedViewId.of(MATERIALIZED_VIEW_ID)); + assertThat(authorizedViewId).isNotEqualTo(MaterializedViewId.of("another-materialized-view")); + } + + @Test + public void testHashCode() { + MaterializedViewId authorizedViewId = MaterializedViewId.of(MATERIALIZED_VIEW_ID); + + assertThat(authorizedViewId.hashCode()) + .isEqualTo(MaterializedViewId.of(MATERIALIZED_VIEW_ID).hashCode()); + assertThat(authorizedViewId.hashCode()) + .isNotEqualTo(MaterializedViewId.of("another-materialized-view").hashCode()); + assertThat(authorizedViewId.hashCode()).isNotEqualTo(TableId.of(TABLE_ID).hashCode()); + } + + @Test + public void testToString() { + MaterializedViewId authorizedViewId = MaterializedViewId.of(MATERIALIZED_VIEW_ID); + + assertThat(authorizedViewId.toString()) + .isEqualTo("MaterializedViewId{materializedViewId=my-materialized-view}"); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java index 6ba80ed767..b7c394eb15 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java @@ -17,9 +17,9 @@ import static com.google.cloud.bigtable.data.v2.models.Filters.FILTERS; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.bigtable.v2.ReadRowsRequest; -import com.google.bigtable.v2.ReadRowsRequest.Builder; import com.google.bigtable.v2.RowFilter; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.RowSet; @@ -38,9 +38,7 @@ import java.util.List; import java.util.SortedSet; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -48,13 +46,12 @@ public class QueryTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; - private static final String AUTHORIZED_VIEW_ID = "fake-authorized-view"; + private static final TableId TABLE_ID = TableId.of("fake-table"); + private static final AuthorizedViewId AUTHORIZED_VIEW_ID = + AuthorizedViewId.of(TABLE_ID, "fake-authorized-view"); private static final String APP_PROFILE_ID = "fake-profile-id"; private RequestContext requestContext; - @Rule public ExpectedException expect = ExpectedException.none(); - @Before public void setUp() { requestContext = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @@ -68,7 +65,7 @@ public void requestContextTest() { assertThat(proto).isEqualTo(expectedReadFromTableProtoBuilder().build()); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)); + query = Query.create(AUTHORIZED_VIEW_ID); proto = query.toProto(requestContext); assertThat(proto).isEqualTo(expectedReadFromAuthorizedViewProtoBuilder().build()); } @@ -92,7 +89,7 @@ public void rowKeysTest() { // AuthorizedView query test. query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) + Query.create(AUTHORIZED_VIEW_ID) .rowKey("simple-string") .rowKey(ByteString.copyFromUtf8("byte-string")); @@ -115,7 +112,7 @@ public void rowRangeTest() { .range(ByteString.copyFromUtf8("byte-begin"), ByteString.copyFromUtf8("byte-end")) .range(ByteStringRange.create("range-begin", "range-end")); - Builder expectedProto = expectedReadFromTableProtoBuilder(); + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder(); expectedProto .getRowsBuilder() .addRowRanges( @@ -136,7 +133,7 @@ public void rowRangeTest() { // AuthorizedView query test. query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) + Query.create(AUTHORIZED_VIEW_ID) .range("simple-begin", "simple-end") .range(ByteString.copyFromUtf8("byte-begin"), ByteString.copyFromUtf8("byte-end")) .range(ByteStringRange.create("range-begin", "range-end")); @@ -186,7 +183,7 @@ public void filterTestWithExceptions() { // AuthorizedView query test. actualException = null; try { - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).filter(null); + Query.create(AUTHORIZED_VIEW_ID).filter(null); } catch (Exception ex) { actualException = ex; } @@ -194,8 +191,7 @@ public void filterTestWithExceptions() { actualException = null; try { - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.value().exactMatch(largeValue)); + Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.value().exactMatch(largeValue)); } catch (Exception ex) { actualException = ex; } @@ -207,7 +203,7 @@ public void filterTest() { // Table query test. Query query = Query.create(TABLE_ID).filter(FILTERS.key().regex(".*")); - Builder expectedProto = + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder() .setFilter(RowFilter.newBuilder().setRowKeyRegexFilter(ByteString.copyFromUtf8(".*"))); @@ -215,9 +211,7 @@ public void filterTest() { assertThat(actualProto).isEqualTo(expectedProto.build()); // AuthorizedView query test. - query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.key().regex(".*")); + query = Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.key().regex(".*")); expectedProto = expectedReadFromAuthorizedViewProtoBuilder() @@ -232,13 +226,13 @@ public void limitTest() { // Table query test. Query query = Query.create(TABLE_ID).limit(10); - Builder expectedProto = expectedReadFromTableProtoBuilder().setRowsLimit(10); + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder().setRowsLimit(10); ReadRowsRequest actualProto = query.toProto(requestContext); assertThat(actualProto).isEqualTo(expectedProto.build()); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).limit(10); + query = Query.create(AUTHORIZED_VIEW_ID).limit(10); expectedProto = expectedReadFromAuthorizedViewProtoBuilder().setRowsLimit(10); @@ -262,9 +256,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { assertThat(actual.toProto(requestContext)).isEqualTo(expected.toProto(requestContext)); // AuthorizedView query test. - expected = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.key().regex(".*")); + expected = Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.key().regex(".*")); bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(bos); @@ -315,7 +307,7 @@ public void shardTestSplitPoints() { .build()); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).range("a", "z"); + query = Query.create(AUTHORIZED_VIEW_ID).range("a", "z"); subQueries = query.shard(splitPoints); @@ -324,8 +316,7 @@ public void shardTestSplitPoints() { .isEqualTo( ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -338,8 +329,7 @@ public void shardTestSplitPoints() { .isEqualTo( ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -389,7 +379,7 @@ public void shardTestKeyOffsets() { .build()); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).range("a", "z"); + query = Query.create(AUTHORIZED_VIEW_ID).range("a", "z"); subQueries = query.shard(keyOffsets); @@ -398,8 +388,7 @@ public void shardTestKeyOffsets() { .isEqualTo( ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -412,8 +401,7 @@ public void shardTestKeyOffsets() { .isEqualTo( ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRows( RowSet.newBuilder() @@ -433,8 +421,7 @@ private static ReadRowsRequest.Builder expectedReadFromTableProtoBuilder() { private static ReadRowsRequest.Builder expectedReadFromAuthorizedViewProtoBuilder() { return ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID); } @@ -462,8 +449,7 @@ public void testFromProto() { request = ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setFilter(RowFilter.newBuilder().setRowKeyRegexFilter(ByteString.copyFromUtf8(".*"))) .setRows( @@ -479,49 +465,65 @@ public void testFromProto() { assertThat(query.toProto(requestContext)).isEqualTo(request); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithInvalidTableId() { - Query.fromProto( - ReadRowsRequest.getDefaultInstance().toBuilder().setTableName("invalid-name").build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Invalid table name:"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + Query.fromProto( + ReadRowsRequest.getDefaultInstance().toBuilder() + .setTableName("invalid-name") + .build())); + + assertThat(e).hasMessageThat().startsWith("Invalid table name:"); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithInvalidAuthorizedViewId() { - Query.fromProto( - ReadRowsRequest.getDefaultInstance() - .toBuilder() - .setAuthorizedViewName("invalid-name") - .build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Invalid authorized view name:"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + Query.fromProto( + ReadRowsRequest.getDefaultInstance().toBuilder() + .setAuthorizedViewName("invalid-name") + .build())); + + assertThat(e).hasMessageThat().startsWith("Invalid authorized view name:"); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithEmptyTableAndAuthorizedViewId() { - Query.fromProto(ReadRowsRequest.getDefaultInstance()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Either table name or authorized view name must be specified"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> Query.fromProto(ReadRowsRequest.getDefaultInstance())); + assertThat(e) + .hasMessageThat() + .startsWith( + "Either table name, authorized view name or materialized view name must be specified."); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithBothTableAndAuthorizedViewId() { - Query.fromProto( - ReadRowsRequest.getDefaultInstance() - .toBuilder() - .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) - .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) - .build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage( - "Table name and authorized view name cannot be specified at the same time"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + Query.fromProto( + ReadRowsRequest.getDefaultInstance().toBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAuthorizedViewName( + NameUtil.formatAuthorizedViewName( + PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) + .build())); + + assertThat(e) + .hasMessageThat() + .startsWith( + "Only one of table name, authorized view name and materialized view name can be" + + " specified at the same time"); } @Test @@ -554,7 +556,7 @@ public void testEquality() { // AuthorizedView query test. request = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) + Query.create(AUTHORIZED_VIEW_ID) .rowKey("row-key") .range("a", "z") .limit(3) @@ -564,29 +566,23 @@ public void testEquality() { request.toProto(requestContext); assertThat(request) .isEqualTo( - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) + Query.create(AUTHORIZED_VIEW_ID) .rowKey("row-key") .range("a", "z") .limit(3) .filter(FILTERS.family().exactMatch("test"))); - assertThat(Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).rowKey("row-key")) - .isNotEqualTo( - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).rowKey("row-key-1")); - assertThat(Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).range("a", "z")) - .isNotEqualTo( - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).range("a", "s")); - assertThat( - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.family().regex("test"))) + assertThat(Query.create(AUTHORIZED_VIEW_ID).rowKey("row-key")) + .isNotEqualTo(Query.create(AUTHORIZED_VIEW_ID).rowKey("row-key-1")); + assertThat(Query.create(AUTHORIZED_VIEW_ID).range("a", "z")) + .isNotEqualTo(Query.create(AUTHORIZED_VIEW_ID).range("a", "s")); + assertThat(Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.family().regex("test"))) .isNotEqualTo( - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.family().exactMatch("test-one"))); - assertThat(Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).limit(4)) - .isNotEqualTo(Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).limit(5)); + Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.family().exactMatch("test-one"))); + assertThat(Query.create(AUTHORIZED_VIEW_ID).limit(4)) + .isNotEqualTo(Query.create(AUTHORIZED_VIEW_ID).limit(5)); - assertThat(Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID))) - .isNotEqualTo(Query.create(TABLE_ID)); + assertThat(Query.create(AUTHORIZED_VIEW_ID)).isNotEqualTo(Query.create(TABLE_ID)); } @Test @@ -609,15 +605,11 @@ public void testClone() { assertThat(clonedReq.toProto(requestContext)).isEqualTo(request); // AuthorizedView query test. - query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .filter(FILTERS.key().regex("temp")) - .limit(10); + query = Query.create(AUTHORIZED_VIEW_ID).filter(FILTERS.key().regex("temp")).limit(10); request = ReadRowsRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowsLimit(10) .setFilter( @@ -640,7 +632,7 @@ public void testQueryPaginatorRangeLimitReached() { Query nextQuery = paginator.getNextQuery(); - Builder expectedProto = + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder() .setRows( RowSet.newBuilder() @@ -670,10 +662,7 @@ public void testQueryPaginatorRangeLimitReached() { assertThat(paginator.advance(ByteString.copyFromUtf8("d"))).isFalse(); // AuthorizedView query test. - query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .range("a", "z") - .limit(limit); + query = Query.create(AUTHORIZED_VIEW_ID).range("a", "z").limit(limit); paginator = query.createPaginator(chunkSize); nextQuery = paginator.getNextQuery(); @@ -717,7 +706,7 @@ public void testQueryPaginatorRangeLimitMultiplyOfChunkSize() { Query nextQuery = paginator.getNextQuery(); - Builder expectedProto = + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder() .setRows( RowSet.newBuilder() @@ -747,10 +736,7 @@ public void testQueryPaginatorRangeLimitMultiplyOfChunkSize() { assertThat(paginator.advance(ByteString.copyFromUtf8("d"))).isFalse(); // AuthorizedView query test. - query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .range("a", "z") - .limit(limit); + query = Query.create(AUTHORIZED_VIEW_ID).range("a", "z").limit(limit); paginator = query.createPaginator(chunkSize); nextQuery = paginator.getNextQuery(); @@ -794,7 +780,7 @@ public void testQueryPaginatorRagneNoLimit() { Query nextQuery = paginator.getNextQuery(); - Builder expectedProto = + ReadRowsRequest.Builder expectedProto = expectedReadFromTableProtoBuilder() .setRows( RowSet.newBuilder() @@ -822,7 +808,7 @@ public void testQueryPaginatorRagneNoLimit() { assertThat(paginator.advance(ByteString.copyFromUtf8("z"))).isFalse(); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)).range("a", "z"); + query = Query.create(AUTHORIZED_VIEW_ID).range("a", "z"); paginator = query.createPaginator(chunkSize); nextQuery = paginator.getNextQuery(); @@ -887,11 +873,7 @@ public void testQueryPaginatorRowsNoLimit() { assertThat(paginator.advance(ByteString.copyFromUtf8("c"))).isFalse(); // AuthorizedView query test. - query = - Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)) - .rowKey("a") - .rowKey("b") - .rowKey("c"); + query = Query.create(AUTHORIZED_VIEW_ID).rowKey("a").rowKey("b").rowKey("c"); paginator = query.createPaginator(chunkSize); @@ -944,7 +926,7 @@ public void testQueryPaginatorFullTableScan() { assertThat(queryPaginator.advance(ByteString.copyFromUtf8("a"))).isFalse(); // AuthorizedView query test. - query = Query.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID)); + query = Query.create(AUTHORIZED_VIEW_ID); queryPaginator = query.createPaginator(chunkSize); expectedProto = expectedReadFromAuthorizedViewProtoBuilder().setRowsLimit(chunkSize); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java index 6f1061f8dc..6baea36099 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java @@ -315,6 +315,6 @@ public void byteStringRangeToByteStringTest() throws InvalidProtocolBufferExcept ByteString serialized = ByteStringRange.serializeToByteString(expected); ByteStringRange deserialized = ByteStringRange.toByteStringRange(serialized); - assertThat(expected).isEqualTo(deserialized); + assertThat(deserialized).isEqualTo(expected); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java index 699f60a8d1..a8b9ab5022 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java @@ -16,9 +16,9 @@ package com.google.cloud.bigtable.data.v2.models; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.bigtable.v2.ReadChangeStreamRequest; -import com.google.bigtable.v2.ReadChangeStreamRequest.Builder; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamContinuationTokens; @@ -34,14 +34,12 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.Instant; import java.util.Collections; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class ReadChangeStreamQueryTest { @@ -53,8 +51,6 @@ public class ReadChangeStreamQueryTest { private static final Instant FAKE_START_TIME = Instant.ofEpochSecond(1L, 1000L); private static final Instant FAKE_END_TIME = Instant.ofEpochSecond(1L, 2000L); - @Rule public ExpectedException expect = ExpectedException.none(); - @Before public void setUp() { requestContext = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @@ -74,7 +70,7 @@ public void streamPartitionTest() { ReadChangeStreamQuery query1 = ReadChangeStreamQuery.create(TABLE_ID).streamPartition("simple-begin", "simple-end"); ReadChangeStreamRequest actualProto1 = query1.toProto(requestContext); - Builder expectedProto1 = expectedProtoBuilder(); + ReadChangeStreamRequest.Builder expectedProto1 = expectedProtoBuilder(); expectedProto1.setPartition( StreamPartition.newBuilder() .setRowRange( @@ -91,7 +87,7 @@ public void streamPartitionTest() { .streamPartition( ByteString.copyFromUtf8("byte-begin"), ByteString.copyFromUtf8("byte-end")); ReadChangeStreamRequest actualProto2 = query2.toProto(requestContext); - Builder expectedProto2 = expectedProtoBuilder(); + ReadChangeStreamRequest.Builder expectedProto2 = expectedProtoBuilder(); expectedProto2.setPartition( StreamPartition.newBuilder() .setRowRange( @@ -107,7 +103,7 @@ public void streamPartitionTest() { ReadChangeStreamQuery.create(TABLE_ID) .streamPartition(ByteStringRange.create("range-begin", "range-end")); ReadChangeStreamRequest actualProto3 = query3.toProto(requestContext); - Builder expectedProto3 = expectedProtoBuilder(); + ReadChangeStreamRequest.Builder expectedProto3 = expectedProtoBuilder(); expectedProto3.setPartition( StreamPartition.newBuilder() .setRowRange( @@ -123,7 +119,7 @@ public void streamPartitionTest() { public void startTimeTest() { ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).startTime(FAKE_START_TIME); - Builder expectedProto = + ReadChangeStreamRequest.Builder expectedProto = expectedProtoBuilder() .setStartTime( Timestamp.newBuilder() @@ -138,7 +134,7 @@ public void startTimeTest() { public void endTimeTest() { ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).endTime(FAKE_END_TIME); - Builder expectedProto = + ReadChangeStreamRequest.Builder expectedProto = expectedProtoBuilder() .setEndTime( Timestamp.newBuilder() @@ -152,10 +148,9 @@ public void endTimeTest() { @Test public void heartbeatDurationTest() { ReadChangeStreamQuery query = - ReadChangeStreamQuery.create(TABLE_ID) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5)); + ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(java.time.Duration.ofSeconds(5)); - Builder expectedProto = + ReadChangeStreamRequest.Builder expectedProto = expectedProtoBuilder().setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()); ReadChangeStreamRequest actualProto = query.toProto(requestContext); @@ -180,7 +175,7 @@ public void continuationTokensTest() { ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).continuationTokens(Collections.singletonList(token)); - Builder expectedProto = + ReadChangeStreamRequest.Builder expectedProto = expectedProtoBuilder() .setContinuationTokens( StreamContinuationTokens.newBuilder().addTokens(tokenProto).build()); @@ -189,7 +184,7 @@ public void continuationTokensTest() { assertThat(actualProto).isEqualTo(expectedProto.build()); } - @Test(expected = IllegalStateException.class) + @Test public void createWithStartTimeAndContinuationTokensTest() { StreamContinuationToken tokenProto = StreamContinuationToken.newBuilder() @@ -204,12 +199,16 @@ public void createWithStartTimeAndContinuationTokensTest() { .setToken("random-token") .build(); ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); - ReadChangeStreamQuery query = - ReadChangeStreamQuery.create(TABLE_ID) - .startTime(FAKE_START_TIME) - .continuationTokens(Collections.singletonList(token)); - expect.expect(IllegalArgumentException.class); - expect.expectMessage("startTime and continuationTokens can't be specified together"); + IllegalStateException e = + assertThrows( + IllegalStateException.class, + () -> + ReadChangeStreamQuery.create(TABLE_ID) + .startTime(FAKE_START_TIME) + .continuationTokens(Collections.singletonList(token))); + assertThat(e) + .hasMessageThat() + .isEqualTo("startTime and continuationTokens can't be specified together"); } @Test @@ -232,7 +231,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { .streamPartition("simple-begin", "simple-end") .continuationTokens(Collections.singletonList(token)) .endTime(FAKE_END_TIME) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5)); + .heartbeatDuration(java.time.Duration.ofSeconds(5)); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); @@ -287,12 +286,14 @@ public void testFromProto() { assertThat(query.toProto(requestContext)).isEqualTo(request); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithEmptyTableId() { - ReadChangeStreamQuery.fromProto(ReadChangeStreamRequest.getDefaultInstance()); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> ReadChangeStreamQuery.fromProto(ReadChangeStreamRequest.getDefaultInstance())); - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Invalid table name:"); + assertThat(e).hasMessageThat().startsWith("Invalid table name:"); } @Test @@ -302,7 +303,7 @@ public void testEquality() { .streamPartition("simple-begin", "simple-end") .startTime(FAKE_START_TIME) .endTime(FAKE_END_TIME) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5)); + .heartbeatDuration(java.time.Duration.ofSeconds(5)); // ReadChangeStreamQuery#toProto should not change the ReadChangeStreamQuery instance state request.toProto(requestContext); @@ -312,7 +313,7 @@ public void testEquality() { .streamPartition("simple-begin", "simple-end") .startTime(FAKE_START_TIME) .endTime(FAKE_END_TIME) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5))); + .heartbeatDuration(java.time.Duration.ofSeconds(5))); assertThat(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-1", "end-1")) .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-2", "end-1")); @@ -324,10 +325,10 @@ public void testEquality() { ReadChangeStreamQuery.create(TABLE_ID).endTime(Instant.ofEpochSecond(1L, 1001L))); assertThat( ReadChangeStreamQuery.create(TABLE_ID) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5))) + .heartbeatDuration(java.time.Duration.ofSeconds(5))) .isNotEqualTo( ReadChangeStreamQuery.create(TABLE_ID) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(6))); + .heartbeatDuration(java.time.Duration.ofSeconds(6))); } @Test @@ -350,7 +351,7 @@ public void testClone() { .streamPartition("begin", "end") .continuationTokens(Collections.singletonList(token)) .endTime(FAKE_END_TIME) - .heartbeatDuration(org.threeten.bp.Duration.ofSeconds(5)); + .heartbeatDuration(java.time.Duration.ofSeconds(5)); ReadChangeStreamRequest request = ReadChangeStreamRequest.newBuilder() .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java index 90a8c6c1de..f48178d66f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRowTest.java @@ -35,8 +35,9 @@ public class ReadModifyWriteRowTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; - private static final String AUTHORIZED_VIEW_ID = "fake-authorized-view"; + private static final TableId TABLE_ID = TableId.of("fake-table"); + private static final AuthorizedViewId AUTHORIZED_VIEW_ID = + AuthorizedViewId.of(TABLE_ID, "fake-authorized-view"); private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @@ -74,7 +75,7 @@ public void testAppend() { // Test ReadModifyWriteRow on an authorized view. mutation = - ReadModifyWriteRow.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), "fake-key") + ReadModifyWriteRow.create(AUTHORIZED_VIEW_ID, "fake-key") .append( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -86,8 +87,7 @@ public void testAppend() { expected = ReadModifyWriteRowRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(ByteString.copyFromUtf8("fake-key")) .addRules( @@ -134,7 +134,7 @@ public void testIncrement() { // Test ReadModifyWriteRow on an authorized view. mutation = - ReadModifyWriteRow.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), "fake-key") + ReadModifyWriteRow.create(AUTHORIZED_VIEW_ID, "fake-key") .increment("fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1) .increment("fake-family", "fake-qualifier-str", 2); @@ -144,8 +144,7 @@ public void testIncrement() { .isEqualTo( ReadModifyWriteRowRequest.newBuilder() .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)) .setAppProfileId(APP_PROFILE_ID) .setRowKey(ByteString.copyFromUtf8("fake-key")) .addRules( @@ -181,7 +180,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { // Test ReadModifyWriteRow on an authorized view. expected = - ReadModifyWriteRow.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), "fake-key") + ReadModifyWriteRow.create(AUTHORIZED_VIEW_ID, "fake-key") .increment("fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1) .append("fake-family", "a", "b"); @@ -223,7 +222,7 @@ public void fromProtoTest() { // Test ReadModifyWriteRow on an authorized view. expected = - ReadModifyWriteRow.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), "row-key") + ReadModifyWriteRow.create(AUTHORIZED_VIEW_ID, "row-key") .increment("fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1) .append("fake-family", "fake-qualifier", "fake-value"); @@ -238,8 +237,7 @@ public void fromProtoTest() { assertThat(overriddenRequest).isNotEqualTo(protoRequest); assertThat(overriddenRequest.getTableName()).isEmpty(); assertThat(overriddenRequest.getAuthorizedViewName()) - .matches( - NameUtil.formatAuthorizedViewName(projectId, instanceId, TABLE_ID, AUTHORIZED_VIEW_ID)); + .matches(NameUtil.formatAuthorizedViewName(projectId, instanceId, AUTHORIZED_VIEW_ID)); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowCellTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowCellTest.java index f98e01e785..6ee8f1cf3e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowCellTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowCellTest.java @@ -20,7 +20,6 @@ import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import com.google.protobuf.LazyStringArrayList; -import com.google.protobuf.UnmodifiableLazyStringList; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -109,14 +108,16 @@ public void compareTest() { @Test public void testSerialization() throws IOException, ClassNotFoundException { - LazyStringArrayList lazyList = new LazyStringArrayList(); - lazyList.add("lazy"); - lazyList.add("very lazy"); + LazyStringArrayList lazyListNonEmpty = + new LazyStringArrayList(ImmutableList.of("lazy", "very lazy")); + lazyListNonEmpty.makeImmutable(); + LazyStringArrayList lazyListEmpty = LazyStringArrayList.emptyList(); + lazyListEmpty.makeImmutable(); List[] labelLists = { Arrays.asList("str1", "str2", "str3"), ImmutableList.of("string1", "string2"), - new UnmodifiableLazyStringList(lazyList), - new UnmodifiableLazyStringList(LazyStringArrayList.EMPTY) + lazyListNonEmpty, + lazyListEmpty }; for (int i = 0; i < labelLists.length; i++) { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java index 2e59c56336..16569ef97e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RowMutationTest.java @@ -20,6 +20,7 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.Mutation.SetCell; +import com.google.bigtable.v2.SessionMutateRowRequest; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.common.primitives.Longs; @@ -29,6 +30,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -37,8 +39,9 @@ public class RowMutationTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; - private static final String AUTHORIZED_VIEW_ID = "fake-authorized-view"; + private static final TableId TABLE_ID = TableId.of("fake-table"); + private static final AuthorizedViewId AUTHORIZED_VIEW_ID = + AuthorizedViewId.of(TABLE_ID, "fake-authorized-view"); private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); @@ -69,7 +72,7 @@ public void toProtoTest() { // Test RowMutation on an authorized view. rowMutation = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY) + RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY) .setCell("fake-family", "fake-qualifier", "fake-value"); actualRowMutation = rowMutation.toProto(REQUEST_CONTEXT); @@ -78,9 +81,7 @@ public void toProtoTest() { assertThat(actualRowMutation.getTableName()).isEmpty(); assertThat(actualRowMutation.getAuthorizedViewName()) - .isEqualTo( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)); + .isEqualTo(NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)); assertThat(actualRowMutation.getAppProfileId()).isEqualTo(APP_PROFILE_ID); assertThat(actualRowMutation.getMutationsList()).hasSize(1); assertThat(actualRowMutation.getMutations(0).getSetCell().getValue()) @@ -117,7 +118,7 @@ public void toBulkProtoTest() { // Test RowMutation on an authorized view. rowMutation = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY) + RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY) .setCell("fake-family", "fake-qualifier", "fake-value"); actualRowMutation = rowMutation.toBulkProto(REQUEST_CONTEXT); @@ -127,9 +128,7 @@ public void toBulkProtoTest() { assertThat(actualRowMutation.getTableName()).isEmpty(); assertThat(actualRowMutation.getAuthorizedViewName()) - .isEqualTo( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)); + .isEqualTo(NameUtil.formatAuthorizedViewName(PROJECT_ID, INSTANCE_ID, AUTHORIZED_VIEW_ID)); assertThat(actualRowMutation.getAppProfileId()).isEqualTo(APP_PROFILE_ID); assertThat(actualRowMutation.getEntriesList()).hasSize(1); assertThat(actualRowMutation.getEntries(0).getMutationsList()).hasSize(1); @@ -151,8 +150,7 @@ public void toProtoTestWithProvidedMutation() { assertThat(actualRowMutation.getMutationsList()).isEqualTo(mutation.getMutations()); // Test RowMutation on an authorized view. - rowMutation = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY, mutation); + rowMutation = RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY, mutation); actualRowMutation = rowMutation.toProto(REQUEST_CONTEXT); @@ -178,7 +176,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { // Test RowMutation on an authorized view. expected = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY) + RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY) .setCell("fake-family", "fake-qualifier", 10_000, "fake-value"); bos = new ByteArrayOutputStream(); @@ -218,7 +216,7 @@ public void testWithLongValue() { // Test RowMutation on an authorized view. rowMutation = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY) + RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY) .setCell("fake-family", "fake-qualifier", 100_000L) .setCell("fake-family", "fake-qualifier", 30_000L, 100_000L); @@ -266,7 +264,7 @@ public void fromProtoTest() { // Test RowMutation on an authorized view. rowMutation = - RowMutation.create(AuthorizedViewId.of(TABLE_ID, AUTHORIZED_VIEW_ID), TEST_KEY) + RowMutation.create(AUTHORIZED_VIEW_ID, TEST_KEY) .setCell("fake-family", "fake-qualifier-1", "fake-value") .setCell("fake-family", "fake-qualifier-2", 30_000L, "fake-value-2"); @@ -281,8 +279,25 @@ public void fromProtoTest() { assertThat(overriddenRequest).isNotEqualTo(protoRequest); assertThat(overriddenRequest.getTableName()).isEmpty(); assertThat(overriddenRequest.getAuthorizedViewName()) - .matches( - NameUtil.formatAuthorizedViewName(projectId, instanceId, TABLE_ID, AUTHORIZED_VIEW_ID)); + .matches(NameUtil.formatAuthorizedViewName(projectId, instanceId, AUTHORIZED_VIEW_ID)); assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); } + + @Test + public void toSessionProtoTest() { + RowMutation rowMutation = + RowMutation.create(TABLE_ID, TEST_KEY) + .setCell("cf1", "q1", "v1") + .setCell("cf2", "q2", "v2"); + + List mutations = + rowMutation.toProto(REQUEST_CONTEXT).getMutationsList(); + + SessionMutateRowRequest expected = + SessionMutateRowRequest.newBuilder().setKey(TEST_KEY).addAllMutations(mutations).build(); + + SessionMutateRowRequest sessionProto = rowMutation.toSessionProto(); + + assertThat(sessionProto).isEqualTo(expected); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequestTest.java index 4aa8a2b809..5b9c0cee4b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/SampleRowKeysRequestTest.java @@ -17,12 +17,11 @@ package com.google.cloud.bigtable.data.v2.models; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -35,7 +34,6 @@ public class SampleRowKeysRequestTest { private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); - @Rule public ExpectedException expect = ExpectedException.none(); @Test public void toProtoTest() { @@ -103,53 +101,68 @@ public void fromProtoTest() { assertThat(overriddenRequest.getAppProfileId()).matches(appProfile); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithInvalidTableId() { - SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() - .setTableName("invalid-name") - .build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Invalid table name:"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + SampleRowKeysRequest.fromProto( + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() + .setTableName("invalid-name") + .build())); + + assertThat(e).hasMessageThat().startsWith("Invalid table name:"); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithInvalidAuthorizedViewId() { - SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() - .setAuthorizedViewName("invalid-name") - .build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Invalid authorized view name:"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + SampleRowKeysRequest.fromProto( + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() + .setAuthorizedViewName("invalid-name") + .build())); + + assertThat(e).hasMessageThat().startsWith("Invalid authorized view name:"); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithEmptyTableAndAuthorizedViewId() { - SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage("Either table name or authorized view name must be specified"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + SampleRowKeysRequest.fromProto( + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance())); + + assertThat(e) + .hasMessageThat() + .startsWith( + "Either table name, authorized view name or materialized view name must be specified."); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromProtoWithBothTableAndAuthorizedViewId() { - SampleRowKeysRequest.fromProto( - com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance() - .toBuilder() - .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) - .setAuthorizedViewName( - NameUtil.formatAuthorizedViewName( - PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) - .build()); - - expect.expect(IllegalArgumentException.class); - expect.expectMessage( - "Table name and authorized view name cannot be specified at the same time"); + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, + () -> + SampleRowKeysRequest.fromProto( + com.google.bigtable.v2.SampleRowKeysRequest.getDefaultInstance().toBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAuthorizedViewName( + NameUtil.formatAuthorizedViewName( + PROJECT_ID, INSTANCE_ID, TABLE_ID, AUTHORIZED_VIEW_ID)) + .build())); + + assertThat(e) + .hasMessageThat() + .startsWith( + "Only one of table name, authorized view name and materialized view name can be" + + " specified at the same time."); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/StatementTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java similarity index 65% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/StatementTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java index cb19a7fde9..71f46610a2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/StatementTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/BoundStatementTest.java @@ -21,6 +21,7 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.boolValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; @@ -28,7 +29,9 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.floatValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.nullValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.timestampType; @@ -36,51 +39,101 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; +import com.google.bigtable.v2.ColumnMetadata; import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.Value; import com.google.cloud.Date; +import com.google.cloud.Timestamp; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.protobuf.ByteString; +import java.time.Duration; +import java.time.Instant; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; +import javax.annotation.Nullable; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) -public class StatementTest { +public class BoundStatementTest { private static final String EXPECTED_APP_PROFILE = "test-profile"; private static final RequestContext REQUEST_CONTEXT = RequestContext.create("test-project", "test-instance", EXPECTED_APP_PROFILE); private static final String EXPECTED_INSTANCE_NAME = "projects/test-project/instances/test-instance"; + private static final ByteString EXPECTED_PREPARED_QUERY = ByteString.copyFromUtf8("foo"); + // BoundStatement doesn't validate params against schema right now, so we can use hardcoded + // columns for now + private static final ColumnMetadata[] DEFAULT_COLUMNS = { + columnMetadata("_key", bytesType()), columnMetadata("cf", stringType()) + }; + private static final @Nullable ByteString NO_RESUME_TOKEN = null; + + // Use ColumnMetadata as a more concise way of specifying params + public static BoundStatement.Builder boundStatementBuilder(ColumnMetadata... paramColumns) { + HashMap> paramTypes = new HashMap<>(paramColumns.length); + for (ColumnMetadata c : paramColumns) { + paramTypes.put(c.getName(), SqlType.fromProto(c.getType())); + } + // This doesn't impact bound statement, but set it so it looks like a real response + Instant expiry = Instant.now().plus(Duration.ofMinutes(1)); + return preparedStatement( + PrepareResponse.fromProto( + PrepareQueryResponse.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .setMetadata(metadata(DEFAULT_COLUMNS)) + .setValidUntil( + Timestamp.ofTimeSecondsAndNanos(expiry.getEpochSecond(), expiry.getNano()) + .toProto()) + .build()), + paramTypes) + .bind(); + } @Test public void statementWithoutParameters() { - Statement s = Statement.of("SELECT * FROM table"); + BoundStatement s = boundStatementBuilder().build(); + + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setPreparedQuery(EXPECTED_PREPARED_QUERY) + .setInstanceName(EXPECTED_INSTANCE_NAME) + .setAppProfileId(EXPECTED_APP_PROFILE) + .build()); + } + + @Test + public void statementWithResumeToken() { + BoundStatement s = boundStatementBuilder().build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat( + s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, ByteString.copyFromUtf8("token"))) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) + .setResumeToken(ByteString.copyFromUtf8("token")) .build()); } @Test public void statementWithBytesParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE _key=@key") + BoundStatement s = + boundStatementBuilder(columnMetadata("key", bytesType())) .setBytesParam("key", ByteString.copyFromUtf8("test")) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE _key=@key") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "key", Value.newBuilder() @@ -94,15 +147,15 @@ public void statementWithBytesParam() { @Test public void statementWithNullBytesParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE _key=@key") + BoundStatement s = + boundStatementBuilder(columnMetadata("key", bytesType())) .setBytesParam("key", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE _key=@key") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("key", Value.newBuilder().setType(bytesType()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -111,15 +164,15 @@ public void statementWithNullBytesParam() { @Test public void statementWithStringParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE _key=@key") + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) .setStringParam("key", "test") .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE _key=@key") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "key", Value.newBuilder().setType(stringType()).setStringValue("test").build()) .setInstanceName(EXPECTED_INSTANCE_NAME) @@ -129,15 +182,15 @@ public void statementWithStringParam() { @Test public void statementWithNullStringParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE _key=@key") + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) .setStringParam("key", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE _key=@key") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("key", Value.newBuilder().setType(stringType()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -146,15 +199,15 @@ public void statementWithNullStringParam() { @Test public void statementWithInt64Param() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE 1=@number") + BoundStatement s = + boundStatementBuilder(columnMetadata("number", int64Type())) .setLongParam("number", 1L) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE 1=@number") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("number", Value.newBuilder().setType(int64Type()).setIntValue(1).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -163,15 +216,15 @@ public void statementWithInt64Param() { @Test public void statementWithNullInt64Param() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE 1=@number") + BoundStatement s = + boundStatementBuilder(columnMetadata("number", int64Type())) .setLongParam("number", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE 1=@number") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("number", Value.newBuilder().setType(int64Type()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -180,15 +233,15 @@ public void statementWithNullInt64Param() { @Test public void statementWithBoolParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE @bool") + BoundStatement s = + boundStatementBuilder(columnMetadata("bool", boolType())) .setBooleanParam("bool", true) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE @bool") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "bool", Value.newBuilder().setType(boolType()).setBoolValue(true).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) @@ -198,15 +251,15 @@ public void statementWithBoolParam() { @Test public void statementWithNullBoolParam() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE @bool") + BoundStatement s = + boundStatementBuilder(columnMetadata("bool", boolType())) .setBooleanParam("bool", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE @bool") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("bool", Value.newBuilder().setType(boolType()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -215,17 +268,15 @@ public void statementWithNullBoolParam() { @Test public void statementWithTimestampParam() { - Statement s = - Statement.newBuilder( - "SELECT * FROM table WHERE PARSE_TIMESTAMP(\"%Y/%m/%dT%H:%M:%S\", CAST(cf[\"ts\"] AS STRING)) < @timeParam") + BoundStatement s = + boundStatementBuilder(columnMetadata("timeParam", timestampType())) .setTimestampParam("timeParam", Instant.ofEpochSecond(1000, 100)) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT * FROM table WHERE PARSE_TIMESTAMP(\"%Y/%m/%dT%H:%M:%S\", CAST(cf[\"ts\"] AS STRING)) < @timeParam") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "timeParam", Value.newBuilder() @@ -239,17 +290,15 @@ public void statementWithTimestampParam() { @Test public void statementWithNullTimestampParam() { - Statement s = - Statement.newBuilder( - "SELECT * FROM table WHERE PARSE_TIMESTAMP(\"%Y/%m/%dT%H:%M:%S\", CAST(cf[\"ts\"] AS STRING)) < @timeParam") + BoundStatement s = + boundStatementBuilder(columnMetadata("timeParam", timestampType())) .setTimestampParam("timeParam", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT * FROM table WHERE PARSE_TIMESTAMP(\"%Y/%m/%dT%H:%M:%S\", CAST(cf[\"ts\"] AS STRING)) < @timeParam") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("timeParam", Value.newBuilder().setType(timestampType()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -258,17 +307,15 @@ public void statementWithNullTimestampParam() { @Test public void statementWithDateParam() { - Statement s = - Statement.newBuilder( - "SELECT * FROM table WHERE PARSE_DATE(\"%Y%m%d\", CAST(cf[\"date\"] AS STRING)) < @dateParam") + BoundStatement s = + boundStatementBuilder(columnMetadata("dateParam", dateType())) .setDateParam("dateParam", Date.fromYearMonthDay(2024, 6, 11)) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT * FROM table WHERE PARSE_DATE(\"%Y%m%d\", CAST(cf[\"date\"] AS STRING)) < @dateParam") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "dateParam", Value.newBuilder() @@ -282,17 +329,15 @@ public void statementWithDateParam() { @Test public void statementWithNullDateParam() { - Statement s = - Statement.newBuilder( - "SELECT * FROM table WHERE PARSE_DATE(\"%Y%m%d\", CAST(cf[\"date\"] AS STRING)) < @dateParam") + BoundStatement s = + boundStatementBuilder(columnMetadata("dateParam", dateType())) .setDateParam("dateParam", null) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT * FROM table WHERE PARSE_DATE(\"%Y%m%d\", CAST(cf[\"date\"] AS STRING)) < @dateParam") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams("dateParam", Value.newBuilder().setType(dateType()).build()) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) @@ -301,9 +346,12 @@ public void statementWithNullDateParam() { @Test public void statementWithBytesListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(bytesType())), + columnMetadata("listWithNullElem", arrayType(bytesType())), + columnMetadata("emptyList", arrayType(bytesType())), + columnMetadata("nullList", arrayType(bytesType()))) .setListParam( "listParam", Arrays.asList(ByteString.copyFromUtf8("foo"), ByteString.copyFromUtf8("bar")), @@ -316,11 +364,10 @@ public void statementWithBytesListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.bytes())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -350,9 +397,12 @@ public void statementWithBytesListParam() { @Test public void statementWithStringListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(stringType())), + columnMetadata("listWithNullElem", arrayType(stringType())), + columnMetadata("emptyList", arrayType(stringType())), + columnMetadata("nullList", arrayType(stringType()))) .setListParam( "listParam", Arrays.asList("foo", "bar"), SqlType.arrayOf(SqlType.string())) .setListParam( @@ -363,11 +413,10 @@ public void statementWithStringListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.string())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -397,9 +446,12 @@ public void statementWithStringListParam() { @Test public void statementWithInt64ListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(int64Type())), + columnMetadata("listWithNullElem", arrayType(int64Type())), + columnMetadata("emptyList", arrayType(int64Type())), + columnMetadata("nullList", arrayType(int64Type()))) .setListParam("listParam", Arrays.asList(1L, 2L), SqlType.arrayOf(SqlType.int64())) .setListParam( "listWithNullElem", Arrays.asList(null, 3L, 4L), SqlType.arrayOf(SqlType.int64())) @@ -407,11 +459,10 @@ public void statementWithInt64ListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.int64())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -439,9 +490,12 @@ public void statementWithInt64ListParam() { @Test public void statementWithFloat32ListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(float32Type())), + columnMetadata("listWithNullElem", arrayType(float32Type())), + columnMetadata("emptyList", arrayType(float32Type())), + columnMetadata("nullList", arrayType(float32Type()))) .setListParam( "listParam", Arrays.asList(1.1f, 1.2f), SqlType.arrayOf(SqlType.float32())) .setListParam( @@ -452,11 +506,10 @@ public void statementWithFloat32ListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.float32())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -486,9 +539,12 @@ public void statementWithFloat32ListParam() { @Test public void statementWithFloat64ListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(float64Type())), + columnMetadata("listWithNullElem", arrayType(float64Type())), + columnMetadata("emptyList", arrayType(float64Type())), + columnMetadata("nullList", arrayType(float64Type()))) .setListParam( "listParam", Arrays.asList(1.1d, 1.2d), SqlType.arrayOf(SqlType.float64())) .setListParam( @@ -499,11 +555,10 @@ public void statementWithFloat64ListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.float64())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -532,9 +587,12 @@ public void statementWithFloat64ListParam() { @Test public void statementWithBooleanListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(boolType())), + columnMetadata("listWithNullElem", arrayType(boolType())), + columnMetadata("emptyList", arrayType(boolType())), + columnMetadata("nullList", arrayType(boolType()))) .setListParam("listParam", Arrays.asList(true, false), SqlType.arrayOf(SqlType.bool())) .setListParam( "listWithNullElem", @@ -544,11 +602,10 @@ public void statementWithBooleanListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.bool())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -578,9 +635,12 @@ public void statementWithBooleanListParam() { @Test public void statementWithTimestampListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(timestampType())), + columnMetadata("listWithNullElem", arrayType(timestampType())), + columnMetadata("emptyList", arrayType(timestampType())), + columnMetadata("nullList", arrayType(timestampType()))) .setListParam( "listParam", Arrays.asList(Instant.ofEpochSecond(3000, 100), Instant.ofEpochSecond(4000, 100)), @@ -595,11 +655,10 @@ public void statementWithTimestampListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.timestamp())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -634,9 +693,12 @@ public void statementWithTimestampListParam() { @Test public void statementWithDateListParam() { - Statement s = - Statement.newBuilder( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + BoundStatement s = + boundStatementBuilder( + columnMetadata("listParam", arrayType(dateType())), + columnMetadata("listWithNullElem", arrayType(dateType())), + columnMetadata("emptyList", arrayType(dateType())), + columnMetadata("nullList", arrayType(dateType()))) .setListParam( "listParam", Arrays.asList(Date.fromYearMonthDay(2024, 6, 1), Date.fromYearMonthDay(2024, 7, 1)), @@ -650,11 +712,10 @@ public void statementWithDateListParam() { .setListParam("nullList", null, SqlType.arrayOf(SqlType.date())) .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery( - "SELECT cf, @listParam, @listWithNullElem, @emptyList, @nullList FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "listParam", Value.newBuilder() @@ -685,7 +746,7 @@ public void statementWithDateListParam() { @Test public void setListParamRejectsUnsupportedElementTypes() { - Statement.Builder statement = Statement.newBuilder("SELECT @param"); + BoundStatement.Builder statement = boundStatementBuilder(); assertThrows( IllegalArgumentException.class, @@ -704,18 +765,18 @@ public void setListParamRejectsUnsupportedElementTypes() { @Test public void statementBuilderAllowsParamsToBeOverridden() { - Statement s = - Statement.newBuilder("SELECT * FROM table WHERE _key=@key") + BoundStatement s = + boundStatementBuilder(columnMetadata("key", stringType())) .setStringParam("key", "test1") .setStringParam("key", "test2") .setStringParam("key", "test3") .setStringParam("key", "test4") .build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table WHERE _key=@key") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .putParams( "key", Value.newBuilder().setType(stringType()).setStringValue("test4").build()) .setInstanceName(EXPECTED_INSTANCE_NAME) @@ -725,14 +786,87 @@ public void statementBuilderAllowsParamsToBeOverridden() { @Test public void builderWorksWithNoParams() { - Statement s = Statement.newBuilder("SELECT * FROM table").build(); + BoundStatement s = boundStatementBuilder().build(); - assertThat(s.toProto(REQUEST_CONTEXT)) + assertThat(s.toProto(EXPECTED_PREPARED_QUERY, REQUEST_CONTEXT, NO_RESUME_TOKEN)) .isEqualTo( ExecuteQueryRequest.newBuilder() - .setQuery("SELECT * FROM table") + .setPreparedQuery(EXPECTED_PREPARED_QUERY) .setInstanceName(EXPECTED_INSTANCE_NAME) .setAppProfileId(EXPECTED_APP_PROFILE) .build()); } + + @Test + public void builderValidatesParameterNames() { + BoundStatement.Builder builder = boundStatementBuilder(); + + IllegalArgumentException e = + assertThrows( + IllegalArgumentException.class, () -> builder.setStringParam("non-existent", "test")); + assertThat(e.getMessage()).contains("No parameter named: non-existent"); + } + + @Test + public void builderValidatesTypesMatch() { + BoundStatement.Builder builder = + boundStatementBuilder( + columnMetadata("stringParam", stringType()), + columnMetadata("bytesParam", bytesType()), + columnMetadata("stringListParam", stringType())); + + IllegalArgumentException eString = + assertThrows( + IllegalArgumentException.class, + () -> builder.setBytesParam("stringParam", ByteString.copyFromUtf8("foo"))); + assertThat(eString.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eBytes = + assertThrows( + IllegalArgumentException.class, () -> builder.setStringParam("bytesParam", "foo")); + assertThat(eBytes.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eLong = + assertThrows(IllegalArgumentException.class, () -> builder.setLongParam("bytesParam", 1L)); + assertThat(eLong.getMessage()).contains("Invalid type passed for query param"); + assertThrows(IllegalArgumentException.class, () -> builder.setDoubleParam("bytesParam", 1.1d)); + assertThat(eLong.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eFloat = + assertThrows( + IllegalArgumentException.class, () -> builder.setFloatParam("bytesParam", 1.1f)); + assertThat(eFloat.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eBool = + assertThrows( + IllegalArgumentException.class, () -> builder.setBooleanParam("bytesParam", true)); + assertThat(eBool.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eTs = + assertThrows( + IllegalArgumentException.class, + () -> builder.setTimestampParam("bytesParam", Instant.now())); + assertThat(eTs.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eDate = + assertThrows( + IllegalArgumentException.class, + () -> builder.setDateParam("bytesParam", Date.fromYearMonthDay(2025, 1, 1))); + assertThat(eDate.getMessage()).contains("Invalid type passed for query param"); + IllegalArgumentException eList = + assertThrows( + IllegalArgumentException.class, + () -> + builder.setListParam( + "stringListParam", + Collections.singletonList(ByteString.copyFromUtf8("foo")), + SqlType.arrayOf(SqlType.bytes()))); + assertThat(eList.getMessage()).contains("Invalid type passed for query param"); + } + + @Test + public void builderValidatesAllParamsAreSet() { + BoundStatement.Builder builder = + boundStatementBuilder( + columnMetadata("stringParam", stringType()), columnMetadata("bytesParam", bytesType())); + builder.setStringParam("stringParam", "s"); + + IllegalArgumentException e = assertThrows(IllegalArgumentException.class, builder::build); + assertThat(e.getMessage()) + .contains("Attempting to build BoundStatement without binding parameter: bytesParam"); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/SqlTypeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/SqlTypeTest.java index 8fef0f6c03..e8e33387a6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/SqlTypeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/sql/SqlTypeTest.java @@ -19,10 +19,12 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.boolType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.dateType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.enumType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float32Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.float64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.protoType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structField; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structType; @@ -30,8 +32,14 @@ import static com.google.common.truth.Truth.assertThat; import com.google.bigtable.v2.Type; +import com.google.cloud.bigtable.common.Type.SchemalessEnum; +import com.google.cloud.bigtable.common.Type.SchemalessProto; import com.google.cloud.bigtable.common.Type.StructWithSchema; import com.google.cloud.bigtable.data.v2.models.sql.SqlType.Code; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Album; +import com.google.cloud.bigtable.data.v2.test.AlbumProto.Format; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Genre; +import com.google.cloud.bigtable.data.v2.test.SingerProto.Singer; import com.google.protobuf.ByteString; import java.util.Arrays; import java.util.EnumSet; @@ -68,6 +76,9 @@ public void setUp() { protoToJavaMapping.put(arrayType(stringType()), SqlType.arrayOf(SqlType.string())); protoToJavaMapping.put( mapType(bytesType(), stringType()), SqlType.mapOf(SqlType.bytes(), SqlType.string())); + protoToJavaMapping.put( + protoType("foo", "my_bundle"), SchemalessProto.create("foo", "my_bundle")); + protoToJavaMapping.put(enumType("foo", "my_bundle"), SchemalessEnum.create("foo", "my_bundle")); } @Test @@ -158,6 +169,101 @@ public void typesMatch_checksMapSchema() { .isFalse(); } + @Test + public void typesMatch_checksProto() { + SqlType.Proto singerProto = SqlType.protoOf(Singer.getDefaultInstance()); + SqlType.Proto albumProto = SqlType.protoOf(Album.getDefaultInstance()); + SqlType.Proto schemalessSinger = + SchemalessProto.create("com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle"); + SqlType.Proto schemalessAlbum = + SchemalessProto.create("com.google.cloud.bigtable.data.v2.test.Album", "my_bundle"); + + // Both Schemaless types + assertThat(SqlType.typesMatch(schemalessSinger, schemalessAlbum)).isFalse(); + assertThat( + SqlType.typesMatch( + schemalessSinger, + SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Singer", "my_bundle"))) + .isTrue(); + + // Both concrete types + assertThat(SqlType.typesMatch(singerProto, albumProto)).isFalse(); + assertThat(SqlType.typesMatch(singerProto, SqlType.protoOf(Singer.getDefaultInstance()))) + .isTrue(); + + // Schemaless versus concrete types (unqualified proto message names must match) + assertThat(SqlType.typesMatch(schemalessSinger, singerProto)).isTrue(); + assertThat(SqlType.typesMatch(singerProto, schemalessSinger)).isTrue(); + assertThat(SqlType.typesMatch(singerProto, SchemalessProto.create("Singer", "my_bundle"))) + .isTrue(); + assertThat( + SqlType.typesMatch(singerProto, SchemalessProto.create("foo.bar.Singer", "my_bundle"))) + .isTrue(); + assertThat(SqlType.typesMatch(singerProto, SchemalessProto.create("Singer", "other_bundle"))) + .isTrue(); + assertThat( + SqlType.typesMatch( + singerProto, SchemalessProto.create("foo.bar.Singer", "other_bundle"))) + .isTrue(); + assertThat(SqlType.typesMatch(schemalessSinger, albumProto)).isFalse(); + assertThat(SqlType.typesMatch(albumProto, schemalessSinger)).isFalse(); + assertThat(SqlType.typesMatch(singerProto, SchemalessProto.create("Album", "my_bundle"))) + .isFalse(); + assertThat( + SqlType.typesMatch( + singerProto, + SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Album", "my_bundle"))) + .isFalse(); + assertThat(SqlType.typesMatch(singerProto, SchemalessProto.create("", "my_bundle"))).isFalse(); + } + + @Test + public void typesMatch_checksEnum() { + SqlType.Enum genreEnum = SqlType.enumOf(Genre::forNumber); + SqlType.Enum formatEnum = SqlType.enumOf(Format::forNumber); + SqlType.Enum schemalessGenre = + SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle"); + SqlType.Enum schemalessFormat = + SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Format", "my_bundle"); + + // Both Schemaless types + assertThat(SqlType.typesMatch(schemalessGenre, schemalessFormat)).isFalse(); + assertThat( + SqlType.typesMatch( + schemalessGenre, + SchemalessEnum.create("com.google.cloud.bigtable.data.v2.test.Genre", "my_bundle"))) + .isTrue(); + + // Both concrete types + assertThat(SqlType.typesMatch(genreEnum, formatEnum)).isFalse(); + assertThat(SqlType.typesMatch(genreEnum, SqlType.enumOf(Genre::forNumber))).isTrue(); + + // Schemaless versus concrete types (unqualified enum message names must match) + assertThat(SqlType.typesMatch(schemalessGenre, genreEnum)).isTrue(); + assertThat(SqlType.typesMatch(genreEnum, schemalessGenre)).isTrue(); + assertThat(SqlType.typesMatch(genreEnum, SchemalessEnum.create("Genre", "my_bundle"))).isTrue(); + assertThat(SqlType.typesMatch(genreEnum, SchemalessEnum.create("foo.bar.Genre", "my_bundle"))) + .isTrue(); + assertThat(SqlType.typesMatch(genreEnum, SchemalessEnum.create("Genre", "other_bundle"))) + .isTrue(); + assertThat( + SqlType.typesMatch(genreEnum, SchemalessEnum.create("foo.bar.Genre", "other_bundle"))) + .isTrue(); + assertThat(SqlType.typesMatch(schemalessGenre, formatEnum)).isFalse(); + assertThat(SqlType.typesMatch(formatEnum, schemalessGenre)).isFalse(); + assertThat(SqlType.typesMatch(genreEnum, SchemalessEnum.create("Format", "my_bundle"))) + .isFalse(); + assertThat( + SqlType.typesMatch( + genreEnum, + SchemalessProto.create( + "com.google.cloud.bigtable.data.v2.test.Format", "my_bundle"))) + .isFalse(); + assertThat(SqlType.typesMatch(genreEnum, SchemalessEnum.create("", "my_bundle"))).isFalse(); + } + @Test public void struct_getFields() { Type structProto = diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimerTest.java index e1f22bebbd..7913e97540 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimerTest.java @@ -16,14 +16,17 @@ package com.google.cloud.bigtable.data.v2.stub; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; import com.google.auth.oauth2.AccessToken; import com.google.auth.oauth2.OAuth2Credentials; import com.google.bigtable.v2.BigtableGrpc.BigtableImplBase; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.common.collect.ImmutableMap; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.Metadata; @@ -38,6 +41,8 @@ import java.io.IOException; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; import java.util.logging.Handler; import java.util.logging.LogRecord; import java.util.logging.Logger; @@ -69,10 +74,11 @@ public void setup() throws IOException { primer = BigtableChannelPrimer.create( - OAuth2Credentials.create(new AccessToken(TOKEN_VALUE, null)), "fake-project", "fake-instance", - "fake-app-profile"); + "fake-app-profile", + OAuth2Credentials.create(new AccessToken(TOKEN_VALUE, null)), + ImmutableMap.of("bigtable-feature", "fake-feature")); channel = ManagedChannelBuilder.forAddress("localhost", server.getPort()).usePlaintext().build(); @@ -133,7 +139,7 @@ public PingAndWarmResponse apply(PingAndWarmRequest pingAndWarmRequest) { assertThat(logHandler.logs).hasSize(1); for (LogRecord log : logHandler.logs) { - assertThat(log.getMessage()).contains("FAILED_PRECONDITION"); + assertThat(log.getThrown().getMessage()).contains("FAILED_PRECONDITION"); } } @@ -146,10 +152,53 @@ public void testChannelErrorsAreLogged() { assertThat(logHandler.logs).hasSize(1); for (LogRecord log : logHandler.logs) { - assertThat(log.getMessage()).contains("UnsupportedOperationException"); + assertThat(log.getThrown()).isInstanceOf(UnsupportedOperationException.class); + } + } + + @Test + public void testHeadersAreSent() { + primer.primeChannel(channel); + + for (Metadata metadata : metadataInterceptor.metadataList) { + assertThat(metadata.get(BigtableChannelPrimer.REQUEST_PARAMS)) + .isEqualTo( + "name=projects%2Ffake-project%2Finstances%2Ffake-instance&app_profile_id=fake-app-profile"); + assertThat( + metadata.get(Metadata.Key.of("bigtable-feature", Metadata.ASCII_STRING_MARSHALLER))) + .isEqualTo("fake-feature"); } } + // New test for the async success path + @Test + public void testAsyncSuccess() throws Exception { + ApiFuture future = primer.sendPrimeRequestsAsync(channel); + + PingAndWarmResponse response = future.get(1, TimeUnit.SECONDS); + assertThat(response).isNotNull(); + assertThat(future.isDone()).isTrue(); + } + + // New test for the async failure path + @Test + public void testAsyncFailure() { + // Configure the server to return a gRPC error + fakeService.pingAndWarmCallback = + new ApiFunction() { + @Override + public PingAndWarmResponse apply(PingAndWarmRequest pingAndWarmRequest) { + throw new StatusRuntimeException(Status.UNAVAILABLE); + } + }; + + ApiFuture future = primer.sendPrimeRequestsAsync(channel); + + ExecutionException e = + assertThrows(ExecutionException.class, () -> future.get(5, TimeUnit.SECONDS)); + assertThat(e).hasCauseThat().hasMessageThat().contains("UNAVAILABLE"); + } + private static class MetadataInterceptor implements ServerInterceptor { ConcurrentLinkedQueue metadataList = new ConcurrentLinkedQueue<>(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallableTest.java new file mode 100644 index 0000000000..2b07044c9a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableUnaryOperationCallableTest.java @@ -0,0 +1,160 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; + +import com.google.api.core.ApiFuture; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.api.gax.tracing.SpanName; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCall; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCallable; +import com.google.common.collect.ImmutableList; +import java.util.concurrent.ExecutionException; +import java.util.logging.Logger; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +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.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class BigtableUnaryOperationCallableTest { + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + @Mock private ApiTracerFactory tracerFactory; + @Mock private BigtableTracer tracer; + + @Before + public void setUp() throws Exception { + Mockito.when(tracerFactory.newTracer(Mockito.any(), Mockito.any(), Mockito.any())) + .thenReturn(tracer); + } + + @Test + public void testFutureResolve() throws Exception { + BigtableUnaryOperationCallable callable = + new BigtableUnaryOperationCallable<>( + new FakeStreamingApi.ServerStreamingStashCallable<>(ImmutableList.of("value")), + GrpcCallContext.createDefault(), + tracerFactory, + SpanName.of("Fake", "method"), + false); + + ApiFuture f = callable.futureCall("fake"); + assertThat(f.get()).isEqualTo("value"); + } + + @Test + public void testMultipleResponses() throws Exception { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + + BigtableUnaryOperationCallable callable = + new BigtableUnaryOperationCallable<>( + inner, + GrpcCallContext.createDefault(), + tracerFactory, + SpanName.of("Fake", "method"), + false); + callable.logger = Mockito.mock(Logger.class); + + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = callable.futureCall("fake"); + MockServerStreamingCall call = inner.popLastCall(); + call.getController().getObserver().onResponse("first"); + call.getController().getObserver().onResponse("second"); + + ArgumentCaptor msgCaptor = ArgumentCaptor.forClass(String.class); + verify(callable.logger).log(Mockito.any(), msgCaptor.capture()); + assertThat(msgCaptor.getValue()) + .isEqualTo( + "Received response after future is resolved for a Fake.method unary operation." + + " previous: first, New response: second"); + + assertThat(call.getController().isCancelled()).isTrue(); + } + + @Test + public void testCancel() { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + BigtableUnaryOperationCallable callable = + new BigtableUnaryOperationCallable<>( + inner, + GrpcCallContext.createDefault(), + tracerFactory, + SpanName.of("Fake", "method"), + false); + ApiFuture f = callable.futureCall("req"); + f.cancel(true); + + MockServerStreamingCall call = inner.popLastCall(); + assertThat(call.getController().isCancelled()).isTrue(); + } + + @Test + public void testMissingResponse() { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + BigtableUnaryOperationCallable callable = + new BigtableUnaryOperationCallable<>( + inner, + GrpcCallContext.createDefault(), + tracerFactory, + SpanName.of("Fake", "method"), + false); + ApiFuture f = callable.futureCall("req"); + MockServerStreamingCall call = inner.popLastCall(); + call.getController().getObserver().onComplete(); + + Throwable cause = Assert.assertThrows(ExecutionException.class, f::get).getCause(); + assertThat(cause) + .hasMessageThat() + .isEqualTo("Fake.method unary operation completed without a response message"); + } + + @Test + public void testTracing() throws Exception { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + BigtableUnaryOperationCallable callable = + new BigtableUnaryOperationCallable<>( + inner, + GrpcCallContext.createDefault(), + tracerFactory, + SpanName.of("Fake", "method"), + false); + ApiFuture f = callable.futureCall("req"); + MockServerStreamingCall call = inner.popLastCall(); + call.getController().getObserver().onResponse("value"); + call.getController().getObserver().onComplete(); + + f.get(); + verify(tracer).responseReceived(); + verify(tracer).operationSucceeded(); + + // afterResponse is the responsibility of BigtableTracerStreamingCallable + verify(tracer, never()).afterResponse(Mockito.anyLong()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java deleted file mode 100644 index 5441f1d1f8..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CheckAndMutateRowCallableTest.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.core.ApiFuture; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.grpc.GrpcStatusCode; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.NotFoundException; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.CheckAndMutateRowRequest; -import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.bigtable.v2.Mutation.DeleteFromRow; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; -import com.google.cloud.bigtable.data.v2.models.Mutation; -import com.google.protobuf.ByteString; -import io.grpc.Status.Code; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class CheckAndMutateRowCallableTest { - - private final RequestContext requestContext = - RequestContext.create("my-project", "my-instance", "my-app-profile"); - private FakeCallable inner; - private CheckAndMutateRowCallable callable; - - @Before - public void setUp() { - inner = new FakeCallable(); - callable = new CheckAndMutateRowCallable(inner, requestContext); - } - - @Test - public void requestIsCorrect() { - callable.futureCall( - ConditionalRowMutation.create("my-table", "row-key").then(Mutation.create().deleteRow())); - - assertThat(inner.request) - .isEqualTo( - CheckAndMutateRowRequest.newBuilder() - .setTableName( - NameUtil.formatTableName( - requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) - .setRowKey(ByteString.copyFromUtf8("row-key")) - .setAppProfileId(requestContext.getAppProfileId()) - .addTrueMutations( - com.google.bigtable.v2.Mutation.newBuilder() - .setDeleteFromRow(DeleteFromRow.getDefaultInstance())) - .build()); - } - - @Test - public void responseCorrectlyTransformed() throws Exception { - ApiFuture result = - callable.futureCall( - ConditionalRowMutation.create("my-table", "row-key") - .then(Mutation.create().deleteRow())); - - inner.response.set(CheckAndMutateRowResponse.newBuilder().setPredicateMatched(true).build()); - - assertThat(result.get(1, TimeUnit.SECONDS)).isEqualTo(true); - } - - @Test - public void errorIsPropagated() throws Exception { - ApiFuture result = - callable.futureCall( - ConditionalRowMutation.create("my-table", "row-key") - .then(Mutation.create().deleteRow())); - - Throwable expectedError = - new NotFoundException("fake error", null, GrpcStatusCode.of(Code.NOT_FOUND), false); - inner.response.setException(expectedError); - - Throwable actualError = null; - try { - result.get(1, TimeUnit.SECONDS); - } catch (ExecutionException e) { - actualError = e.getCause(); - } - - assertThat(actualError).isEqualTo(expectedError); - } - - static class FakeCallable - extends UnaryCallable { - CheckAndMutateRowRequest request; - ApiCallContext callContext; - SettableApiFuture response = SettableApiFuture.create(); - - @Override - public ApiFuture futureCall( - CheckAndMutateRowRequest request, ApiCallContext context) { - this.request = request; - this.callContext = context; - - return response; - } - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java index 03afa79586..3fd2204905 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java @@ -16,6 +16,9 @@ package com.google.cloud.bigtable.data.v2.stub; import static com.google.cloud.bigtable.data.v2.MetadataSubject.assertThat; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.common.truth.Truth.assertThat; import com.google.api.gax.retrying.RetrySettings; @@ -29,6 +32,8 @@ import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; @@ -47,10 +52,14 @@ import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.common.collect.Lists; import io.grpc.ForwardingServerCall; import io.grpc.Metadata; import io.grpc.MethodDescriptor; @@ -61,8 +70,9 @@ import io.grpc.Status; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; -import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -86,6 +96,7 @@ public class CookiesHolderTest { private static final Metadata.Key BAD_KEY = Metadata.Key.of("x-goog-cbt-not-cookie", Metadata.ASCII_STRING_MARSHALLER); + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final String testHeaderCookie = "header-cookie"; private static final String testCookie = "test-routing-cookie"; private static final String routingCookie1Header = "should-be-overridden"; @@ -94,9 +105,9 @@ public class CookiesHolderTest { private final FakeService fakeService = new FakeService(); private BigtableDataSettings.Builder settings; private BigtableDataClient client; - private final List serverMetadata = new ArrayList<>(); + private final List serverMetadata = Collections.synchronizedList(new ArrayList<>()); - private final Set methods = new HashSet<>(); + private final Set methods = Collections.synchronizedSet(new HashSet<>()); @Before public void setup() throws Exception { @@ -111,13 +122,17 @@ public ServerCall.Listener interceptCall( if (metadata.containsKey(ROUTING_COOKIE_1)) { methods.add(serverCall.getMethodDescriptor().getBareMethodName()); } + + Metadata responseHeaders = new Metadata(); + responseHeaders.put(ROUTING_COOKIE_HEADER, testHeaderCookie); + responseHeaders.put(ROUTING_COOKIE_1, routingCookie1Header); + serverCall.sendHeaders(responseHeaders); + return serverCallHandler.startCall( new ForwardingServerCall.SimpleForwardingServerCall(serverCall) { @Override public void sendHeaders(Metadata responseHeaders) { - responseHeaders.put(ROUTING_COOKIE_HEADER, testHeaderCookie); - responseHeaders.put(ROUTING_COOKIE_1, routingCookie1Header); - super.sendHeaders(responseHeaders); + // headers already sent! } }, metadata); @@ -174,7 +189,8 @@ public void tearDown() throws Exception { @Test public void testReadRows() { - client.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -196,7 +212,7 @@ public void testReadRows() { @Test public void testReadRow() { - client.readRow("fake-table", "key"); + client.readRow(TABLE_ID, "key"); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -219,8 +235,7 @@ public void testReadRow() { @Test public void testMutateRows() { client.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); + BulkMutation.create(TABLE_ID).add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -242,7 +257,7 @@ public void testMutateRows() { @Test public void testMutateRow() { - client.mutateRow(RowMutation.create("table", "key").setCell("cf", "q", "v")); + client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -265,7 +280,7 @@ public void testMutateRow() { @Test public void testSampleRowKeys() { - client.sampleRowKeys("fake-table"); + client.sampleRowKeys(TABLE_ID); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -287,7 +302,7 @@ public void testSampleRowKeys() { @Test public void testReadChangeStream() { - for (ChangeStreamRecord record : + for (ChangeStreamRecord ignored : client.readChangeStream(ReadChangeStreamQuery.create("table"))) {} assertThat(fakeService.count.get()).isGreaterThan(1); @@ -310,7 +325,9 @@ public void testReadChangeStream() { @Test public void testGenerateInitialChangeStreamPartition() { - client.generateInitialChangeStreamPartitions("table").iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -331,11 +348,34 @@ public void testGenerateInitialChangeStreamPartition() { serverMetadata.clear(); } + @Test + public void testPrepareQuery() { + client.prepareStatement("SELECT * FROM table", new HashMap<>()); + + assertThat(fakeService.count.get()).isGreaterThan(1); + assertThat(serverMetadata).hasSize(fakeService.count.get()); + + Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); + + assertThat(lastMetadata) + .containsAtLeast( + ROUTING_COOKIE_1.name(), + "prepareQuery", + ROUTING_COOKIE_2.name(), + testCookie, + ROUTING_COOKIE_HEADER.name(), + testHeaderCookie); + assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + + serverMetadata.clear(); + } + @Test public void testNoCookieSucceedReadRows() { fakeService.returnCookie = false; - client.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -353,7 +393,7 @@ public void testNoCookieSucceedReadRows() { public void testNoCookieSucceedReadRow() { fakeService.returnCookie = false; - client.readRow("fake-table", "key"); + client.readRow(TABLE_ID, "key"); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -371,8 +411,7 @@ public void testNoCookieSucceedMutateRows() { fakeService.returnCookie = false; client.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); + BulkMutation.create(TABLE_ID).add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -389,7 +428,7 @@ public void testNoCookieSucceedMutateRows() { public void testNoCookieSucceedMutateRow() { fakeService.returnCookie = false; - client.mutateRow(RowMutation.create("fake-table", "key").setCell("cf", "q", "v")); + client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -406,7 +445,7 @@ public void testNoCookieSucceedMutateRow() { public void testNoCookieSucceedSampleRowKeys() { fakeService.returnCookie = false; - client.sampleRowKeys("fake-table"); + client.sampleRowKeys(TABLE_ID); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -423,7 +462,7 @@ public void testNoCookieSucceedSampleRowKeys() { public void testNoCookieSucceedReadChangeStream() { fakeService.returnCookie = false; - for (ChangeStreamRecord record : + for (ChangeStreamRecord ignored : client.readChangeStream(ReadChangeStreamQuery.create("table"))) {} assertThat(fakeService.count.get()).isGreaterThan(1); @@ -443,15 +482,34 @@ public void testNoCookieSucceedReadChangeStream() { public void testNoCookieSucceedGenerateInitialChangeStreamParition() { fakeService.returnCookie = false; - client.generateInitialChangeStreamPartitions("table").iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) - .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name(), BAD_KEY.name()); + assertThat(lastMetadata).doesNotContainKeys(ROUTING_COOKIE_2.name(), BAD_KEY.name()); + assertThat(lastMetadata).containsAtLeast(ROUTING_COOKIE_1.name(), routingCookie1Header); + + serverMetadata.clear(); + } + + @Test + public void testNoCookieSucceedPrepareQuery() { + fakeService.returnCookie = false; + + client.prepareStatement("SELECT * FROM table", new HashMap<>()); + + assertThat(fakeService.count.get()).isGreaterThan(1); + assertThat(serverMetadata).hasSize(fakeService.count.get()); + + Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); + + assertThat(lastMetadata).doesNotContainKeys(ROUTING_COOKIE_2.name(), BAD_KEY.name()); + assertThat(lastMetadata).containsAtLeast(ROUTING_COOKIE_1.name(), routingCookie1Header); serverMetadata.clear(); } @@ -496,8 +554,9 @@ public void sendHeaders(Metadata headers) { .setInstanceId("fake-instance"); try (BigtableDataClient client = BigtableDataClient.create(settings.build())) { - - client.readRows(Query.create("table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readRows(Query.create(TableId.of("table")))); Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); @@ -517,35 +576,44 @@ public void testAllMethodsAreCalled() { // This test ensures that all methods respect the retry cookie except for the ones that are // explicitly added to the methods list. It requires that any newly method is exercised in this // test. This is enforced by introspecting grpc method descriptors. - client.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); fakeService.count.set(0); - client.mutateRow(RowMutation.create("fake-table", "key").setCell("cf", "q", "v")); + client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")); fakeService.count.set(0); client.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); + BulkMutation.create(TABLE_ID).add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); fakeService.count.set(0); - client.sampleRowKeys("fake-table"); + client.sampleRowKeys(TABLE_ID); fakeService.count.set(0); client.checkAndMutateRow( - ConditionalRowMutation.create("fake-table", "key") + ConditionalRowMutation.create(TABLE_ID, "key") .then(Mutation.create().setCell("cf", "q", "v"))); fakeService.count.set(0); - client.readModifyWriteRow( - ReadModifyWriteRow.create("fake-table", "key").append("cf", "q", "v")); + client.readModifyWriteRow(ReadModifyWriteRow.create(TABLE_ID, "key").append("cf", "q", "v")); fakeService.count.set(0); - client.generateInitialChangeStreamPartitions("fake-table").iterator().hasNext(); + @SuppressWarnings({ + "MismatchedQueryAndUpdateOfCollection", + "UnusedVariable", + "ModifiedButNotUsed" + }) + ArrayList ignored2 = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("fake-table")); fakeService.count.set(0); - for (ChangeStreamRecord record : + for (@SuppressWarnings("UnusedVariable") + ChangeStreamRecord ignored1 : client.readChangeStream(ReadChangeStreamQuery.create("fake-table"))) {} + fakeService.count.set(0); + client.prepareStatement("SELECT * FROM table", new HashMap<>()); + Set expected = BigtableGrpc.getServiceDescriptor().getMethods().stream() .map(MethodDescriptor::getBareMethodName) @@ -553,7 +621,13 @@ public void testAllMethodsAreCalled() { // Exclude methods that are not supported by routing cookie methods.add("PingAndWarm"); - methods.add("ExecuteQuery"); + methods.add("ExecuteQuery"); // TODO remove when retries are implemented + + // Session APIs. Routing cookie is handled differently + methods.add("OpenAuthorizedView"); + methods.add("OpenMaterializedView"); + methods.add("GetClientConfiguration"); + methods.add("OpenTable"); assertThat(methods).containsExactlyElementsIn(expected); } @@ -564,7 +638,8 @@ public void testCookieSetWithBigtableClientFactory() throws Exception { BigtableDataClient client1 = factory.createDefault(); BigtableDataClient client2 = factory.createForAppProfile("app-profile"); - client1.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client1.readRows(Query.create(TABLE_ID))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -585,7 +660,12 @@ public void testCookieSetWithBigtableClientFactory() throws Exception { fakeService.count.set(0); serverMetadata.clear(); - client2.readRows(Query.create("fake-table")).iterator().hasNext(); + @SuppressWarnings({ + "MismatchedQueryAndUpdateOfCollection", + "UnusedVariable", + "ModifiedButNotUsed" + }) + ArrayList ignored2 = Lists.newArrayList(client2.readRows(Query.create(TABLE_ID))); assertThat(fakeService.count.get()).isGreaterThan(1); assertThat(serverMetadata).hasSize(fakeService.count.get()); @@ -606,58 +686,9 @@ public void testCookieSetWithBigtableClientFactory() throws Exception { } } - @Test - public void testDisableRoutingCookie() throws IOException { - // This test disables routing cookie in the client settings and ensures that none of the routing - // cookie - // is added. - settings.stubSettings().setEnableRoutingCookie(false); - try (BigtableDataClient client = BigtableDataClient.create(settings.build())) { - client.readRows(Query.create("fake-table")).iterator().hasNext(); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.mutateRow(RowMutation.create("fake-table", "key").setCell("cf", "q", "v")); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("key").setCell("cf", "q", "v"))); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.sampleRowKeys("fake-table"); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.checkAndMutateRow( - ConditionalRowMutation.create("fake-table", "key") - .then(Mutation.create().setCell("cf", "q", "v"))); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.readModifyWriteRow( - ReadModifyWriteRow.create("fake-table", "key").append("cf", "q", "v")); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - client.generateInitialChangeStreamPartitions("fake-table").iterator().hasNext(); - assertThat(fakeService.count.get()).isEqualTo(2); - fakeService.count.set(0); - - for (ChangeStreamRecord record : - client.readChangeStream(ReadChangeStreamQuery.create("fake-table"))) {} - - assertThat(fakeService.count.get()).isEqualTo(2); - - assertThat(methods).isEmpty(); - } - } - static class FakeService extends BigtableGrpc.BigtableImplBase { - private boolean returnCookie = true; + private volatile boolean returnCookie = true; private final AtomicInteger count = new AtomicInteger(); @Override @@ -666,7 +697,6 @@ public void readRows( if (count.getAndIncrement() < 1) { Metadata trailers = new Metadata(); maybePopulateCookie(trailers, "readRows"); - responseObserver.onNext(ReadRowsResponse.getDefaultInstance()); StatusRuntimeException exception = new StatusRuntimeException(Status.UNAVAILABLE, trailers); responseObserver.onError(exception); return; @@ -681,7 +711,6 @@ public void mutateRow( if (count.getAndIncrement() < 1) { Metadata trailers = new Metadata(); maybePopulateCookie(trailers, "mutateRow"); - responseObserver.onNext(MutateRowResponse.getDefaultInstance()); StatusRuntimeException exception = new StatusRuntimeException(Status.UNAVAILABLE, trailers); responseObserver.onError(exception); return; @@ -696,7 +725,6 @@ public void mutateRows( if (count.getAndIncrement() < 1) { Metadata trailers = new Metadata(); maybePopulateCookie(trailers, "mutateRows"); - responseObserver.onNext(MutateRowsResponse.getDefaultInstance()); StatusRuntimeException exception = new StatusRuntimeException(Status.UNAVAILABLE, trailers); responseObserver.onError(exception); return; @@ -714,7 +742,6 @@ public void sampleRowKeys( if (count.getAndIncrement() < 1) { Metadata trailers = new Metadata(); maybePopulateCookie(trailers, "sampleRowKeys"); - responseObserver.onNext(SampleRowKeysResponse.getDefaultInstance()); StatusRuntimeException exception = new StatusRuntimeException(Status.UNAVAILABLE, trailers); responseObserver.onError(exception); return; @@ -794,6 +821,24 @@ public void generateInitialChangeStreamPartitions( responseObserver.onCompleted(); } + @Override + public void prepareQuery( + PrepareQueryRequest request, StreamObserver responseObserver) { + if (count.getAndIncrement() < 1) { + Metadata trailers = new Metadata(); + maybePopulateCookie(trailers, "prepareQuery"); + StatusRuntimeException exception = new StatusRuntimeException(Status.UNAVAILABLE, trailers); + responseObserver.onError(exception); + return; + } + responseObserver.onNext( + // Need to set metadata for response to parse + PrepareQueryResponse.newBuilder() + .setMetadata(metadata(columnMetadata("foo", stringType()))) + .build()); + responseObserver.onCompleted(); + } + private void maybePopulateCookie(Metadata trailers, String label) { if (returnCookie) { trailers.put(ROUTING_COOKIE_1, label); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlCallableTest.java index 0083d94d12..5a493653a7 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlCallableTest.java @@ -100,10 +100,11 @@ public void cleanup() { @Test public void testLatenciesAreRecorded() throws Exception { - DynamicFlowControlStats stats = new DynamicFlowControlStats(); DynamicFlowControlCallable callableToTest = new DynamicFlowControlCallable( - innerCallable, flowController, stats, TARGET_LATENCY_MS, ADJUSTING_INTERVAL_MS); + // significantly increase targetLatency to ensure that slow CI runners dont accidentally + // trigger a resize + innerCallable, flowController, stats, TARGET_LATENCY_MS * 10, ADJUSTING_INTERVAL_MS); Map> extraHeaders = new HashMap<>(); extraHeaders.put(LATENCY_HEADER, Arrays.asList("5")); ApiCallContext newContext = context.withExtraHeaders(extraHeaders); @@ -243,7 +244,9 @@ public void testDeadlineExceeded() throws Exception { // very high latency with deadline exceeded exception, limits should be decreased Map> extraHeaders = new HashMap<>(); extraHeaders.put(LATENCY_HEADER, Arrays.asList(String.valueOf(DEADLINE_EXCEEDED_LATENCY))); - callableToTest.futureCall(request, context.withExtraHeaders(extraHeaders)); + @SuppressWarnings("VariableUnused") + ApiFuture ignored = + callableToTest.futureCall(request, context.withExtraHeaders(extraHeaders)); assertThat(flowController.getCurrentElementCountLimit()) .isEqualTo( INITIAL_ELEMENT diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStatsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStatsTest.java index 2a407dda93..8863b4a1a9 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStatsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/DynamicFlowControlStatsTest.java @@ -18,7 +18,7 @@ import static com.google.common.truth.Truth.assertThat; import com.google.api.core.ApiClock; -import java.util.LinkedList; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -73,7 +73,7 @@ public void testUpdate() { public void testConcurrentUpdates() throws InterruptedException, ExecutionException { final DynamicFlowControlStats stats = new DynamicFlowControlStats(); ExecutorService executor = Executors.newCachedThreadPool(); - List> futures = new LinkedList<>(); + List> futures = new ArrayList<>(); for (int i = 1; i <= 50; i++) { final long latency = i; Runnable r = diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseRetryTest.java index 66254fada7..b974649a53 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseRetryTest.java @@ -26,6 +26,7 @@ import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; import io.grpc.Server; import io.grpc.Status; import io.grpc.stub.StreamObserver; @@ -36,7 +37,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.atomic.AtomicInteger; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -53,7 +53,6 @@ public class EnhancedBigtableStubCloseRetryTest { private ExecutorService testExecutor; private BlockingQueue requests; - private AtomicInteger numRequests; private Server server; private EnhancedBigtableStub stub; @@ -62,7 +61,6 @@ public class EnhancedBigtableStubCloseRetryTest { public void setUp() throws Exception { testExecutor = Executors.newCachedThreadPool(); requests = new ArrayBlockingQueue<>(10); - numRequests = new AtomicInteger(); server = FakeServiceBuilder.create(new FakeBigtable()).start(); @@ -70,8 +68,7 @@ public void setUp() throws Exception { BigtableDataSettings.newBuilderForEmulator(server.getPort()) .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) - .setCredentialsProvider(NoCredentialsProvider.create()) - .setRefreshingChannel(false); + .setCredentialsProvider(NoCredentialsProvider.create()); stub = EnhancedBigtableStub.create(settingBuilder.build().getStubSettings()); } @@ -86,7 +83,7 @@ public void tearDown() throws Exception { @Test public void outstandingRequestsFinishAfterClose() throws Exception { final ApiFuture> resultFuture = - stub.readRowsCallable().all().futureCall(Query.create("table1")); + stub.readRowsCallable().all().futureCall(Query.create(TableId.of("table1"))); // wait for the first request to hit the server requests.take(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java index e918378691..74d05e37fe 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java @@ -27,12 +27,14 @@ import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.common.util.concurrent.SettableFuture; import io.grpc.Server; import io.grpc.stub.StreamObserver; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.Future; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -81,19 +83,14 @@ public void tearDown() throws Exception { @Test public void outstandingRequestsFinishAfterClose() throws Exception { ApiFuture> resultFuture = - stub.readRowsCallable().all().futureCall(Query.create("table1")); + stub.readRowsCallable().all().futureCall(Query.create(TableId.of("table1"))); // Wait for the server to receive the request requestReceivedBarrier.get(1, MINUTES); // Close the client - must happen in a separate thread because close will block until all // requests have completed, which can't happen until the clientClosedBarrier is released. - testExecutor.submit( - new Runnable() { - @Override - public void run() { - stub.close(); - } - }); + @SuppressWarnings("UnusedVariable") + Future ignored = testExecutor.submit(() -> stub.close()); Thread.sleep(200); // give the closer a chance to run clientClosedBarrier.set(null); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index 4bcacab4c7..971f264626 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -28,13 +28,15 @@ import com.google.api.gax.rpc.WatchdogProvider; import com.google.auth.Credentials; import com.google.bigtable.v2.PingAndWarmRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; import com.google.cloud.bigtable.data.v2.internal.SqlRow; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Range; @@ -43,7 +45,6 @@ import java.lang.reflect.Modifier; import java.net.URI; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; @@ -54,6 +55,7 @@ import org.threeten.bp.Duration; @RunWith(JUnit4.class) +@SuppressWarnings("deprecation") // TODO: remove this public class EnhancedBigtableStubSettingsTest { @Test public void instanceNameIsRequiredTest() { @@ -79,8 +81,7 @@ public void settingsAreNotLostTest() { CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); WatchdogProvider watchdogProvider = Mockito.mock(WatchdogProvider.class); Duration watchdogInterval = Duration.ofSeconds(12); - boolean enableRoutingCookie = false; - boolean enableRetryInfo = false; + String metricsEndpoint = "test-endpoint:443"; EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() @@ -92,8 +93,7 @@ public void settingsAreNotLostTest() { .setCredentialsProvider(credentialsProvider) .setStreamWatchdogProvider(watchdogProvider) .setStreamWatchdogCheckInterval(watchdogInterval) - .setEnableRoutingCookie(enableRoutingCookie) - .setEnableRetryInfo(enableRetryInfo); + .setMetricsEndpoint(metricsEndpoint); verifyBuilder( builder, @@ -105,8 +105,7 @@ public void settingsAreNotLostTest() { credentialsProvider, watchdogProvider, watchdogInterval, - enableRoutingCookie, - enableRetryInfo); + metricsEndpoint); verifySettings( builder.build(), projectId, @@ -117,8 +116,7 @@ public void settingsAreNotLostTest() { credentialsProvider, watchdogProvider, watchdogInterval, - enableRoutingCookie, - enableRetryInfo); + metricsEndpoint); verifyBuilder( builder.build().toBuilder(), projectId, @@ -129,8 +127,7 @@ public void settingsAreNotLostTest() { credentialsProvider, watchdogProvider, watchdogInterval, - enableRoutingCookie, - enableRetryInfo); + metricsEndpoint); } private void verifyBuilder( @@ -143,8 +140,7 @@ private void verifyBuilder( CredentialsProvider credentialsProvider, WatchdogProvider watchdogProvider, Duration watchdogInterval, - boolean enableRoutingCookie, - boolean enableRetryInfo) { + String metricsEndpoint) { assertThat(builder.getProjectId()).isEqualTo(projectId); assertThat(builder.getInstanceId()).isEqualTo(instanceId); assertThat(builder.getAppProfileId()).isEqualTo(appProfileId); @@ -153,8 +149,7 @@ private void verifyBuilder( assertThat(builder.getCredentialsProvider()).isEqualTo(credentialsProvider); assertThat(builder.getStreamWatchdogProvider()).isSameInstanceAs(watchdogProvider); assertThat(builder.getStreamWatchdogCheckInterval()).isEqualTo(watchdogInterval); - assertThat(builder.getEnableRoutingCookie()).isEqualTo(enableRoutingCookie); - assertThat(builder.getEnableRetryInfo()).isEqualTo(enableRetryInfo); + assertThat(builder.getMetricsEndpoint()).isEqualTo(metricsEndpoint); } private void verifySettings( @@ -167,8 +162,7 @@ private void verifySettings( CredentialsProvider credentialsProvider, WatchdogProvider watchdogProvider, Duration watchdogInterval, - boolean enableRoutingCookie, - boolean enableRetryInfo) { + String metricsEndpoint) { assertThat(settings.getProjectId()).isEqualTo(projectId); assertThat(settings.getInstanceId()).isEqualTo(instanceId); assertThat(settings.getAppProfileId()).isEqualTo(appProfileId); @@ -177,8 +171,7 @@ private void verifySettings( assertThat(settings.getCredentialsProvider()).isEqualTo(credentialsProvider); assertThat(settings.getStreamWatchdogProvider()).isSameInstanceAs(watchdogProvider); assertThat(settings.getStreamWatchdogCheckInterval()).isEqualTo(watchdogInterval); - assertThat(settings.getEnableRoutingCookie()).isEqualTo(enableRoutingCookie); - assertThat(settings.getEnableRetryInfo()).isEqualTo(enableRetryInfo); + assertThat(settings.getMetricsEndpoint()).isEqualTo(metricsEndpoint); } @Test @@ -194,7 +187,7 @@ public void multipleChannelsByDefaultTest() { InstantiatingGrpcChannelProvider provider = (InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider(); - assertThat(provider.toBuilder().getPoolSize()).isGreaterThan(1); + assertThat(provider.getChannelPoolSettings().getInitialChannelCount()).isGreaterThan(1); } @Test @@ -217,7 +210,6 @@ public void readRowsIsNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); builder @@ -276,7 +268,6 @@ public void readRowIsNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); builder @@ -364,7 +355,6 @@ public void sampleRowKeysSettingsAreNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); builder @@ -412,7 +402,6 @@ public void mutateRowSettingsAreNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); builder @@ -462,7 +451,6 @@ public void bulkMutateRowsSettingsAreNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); long flowControlSetting = 10L; @@ -539,17 +527,13 @@ public void bulkMutateRowsSettingsAreNotLostTest() { assertThat(builder.build().toBuilder().bulkMutateRowsSettings().getTargetRpcLatencyMs()) .isEqualTo(targetLatency); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .bulkMutateRowsSettings() .getDynamicFlowControlSettings() .getMaxOutstandingElementCount()) .isEqualTo(flowControlSetting); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .bulkMutateRowsSettings() .getDynamicFlowControlSettings() .getMaxOutstandingRequestBytes()) @@ -574,7 +558,6 @@ public void bulkReadRowsSettingsAreNotLostTest() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); BatchingSettings batchingSettings = BatchingSettings.newBuilder().build(); @@ -694,16 +677,12 @@ public void generateInitialChangeStreamPartitionsSettingsAreNotLostTest() { .isEqualTo(retrySettings); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .generateInitialChangeStreamPartitionsSettings() .getRetryableCodes()) .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); assertThat( - builder - .build() - .toBuilder() + builder.build().toBuilder() .generateInitialChangeStreamPartitionsSettings() .getRetrySettings()) .isEqualTo(retrySettings); @@ -784,7 +763,6 @@ public void executeQuerySettingsAreNotLost() { .setInitialRpcTimeout(Duration.ofSeconds(10)) .setRpcTimeoutMultiplier(1) .setMaxRpcTimeout(Duration.ofSeconds(10)) - .setJittered(true) .build(); builder @@ -817,24 +795,65 @@ public void executeQuerySettingsAreNotLost() { @Test public void executeQueryHasSaneDefaults() { - ServerStreamingCallSettings.Builder builder = + ServerStreamingCallSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder().executeQuerySettings(); // Retries aren't supported right now // call verifyRetrySettingAreSane when we do - assertThat(builder.getRetryableCodes()).containsExactlyElementsIn(Collections.emptySet()); - assertThat(builder.getRetrySettings().getInitialRpcTimeout()).isEqualTo(Duration.ofSeconds(30)); - assertThat(builder.getRetrySettings().getMaxRpcTimeout()).isEqualTo(Duration.ofSeconds(30)); - assertThat(builder.getRetrySettings().getMaxAttempts()).isEqualTo(1); + assertThat(builder.getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE); + assertThat(builder.getRetrySettings().getInitialRpcTimeout()).isEqualTo(Duration.ofMinutes(30)); + assertThat(builder.getRetrySettings().getMaxRpcTimeout()).isEqualTo(Duration.ofMinutes(30)); + assertThat(builder.getRetrySettings().getMaxAttempts()).isEqualTo(10); } @Test - public void executeQueryRetriesAreDisabled() { - ServerStreamingCallSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder().executeQuerySettings(); + public void prepareQuerySettingsAreNotLost() { + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; - assertThat(builder.getRetrySettings().getMaxAttempts()).isAtMost(1); - assertThat(builder.getRetrySettings().getInitialRpcTimeout()).isAtMost(Duration.ofSeconds(30)); + EnhancedBigtableStubSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId) + // Here and everywhere in this test, disable channel priming so we won't need + // authentication for sending the prime request since we're only testing the settings. + .setRefreshingChannel(false); + + RetrySettings retrySettings = + RetrySettings.newBuilder() + .setMaxAttempts(10) + .setTotalTimeout(Duration.ofHours(1)) + .setInitialRpcTimeout(Duration.ofSeconds(10)) + .setRpcTimeoutMultiplier(1) + .setMaxRpcTimeout(Duration.ofSeconds(10)) + .build(); + + builder + .prepareQuerySettings() + .setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED) + .setRetrySettings(retrySettings) + .build(); + + assertThat(builder.prepareQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.prepareQuerySettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().prepareQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().prepareQuerySettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().toBuilder().prepareQuerySettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().toBuilder().prepareQuerySettings().getRetrySettings()) + .isEqualTo(retrySettings); + } + + @Test + public void prepareQueryHasSaneDefaults() { + UnaryCallSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder().prepareQuerySettings(); + verifyRetrySettingAreSane(builder.getRetryableCodes(), builder.getRetrySettings()); } private void verifyRetrySettingAreSane(Set retryCodes, RetrySettings retrySettings) { @@ -876,95 +895,18 @@ public void isRefreshingChannelFalseValueTest() { assertThat(builder.build().toBuilder().isRefreshingChannel()).isFalse(); } - @Test - public void routingCookieIsEnabled() throws IOException { - String dummyProjectId = "my-project"; - String dummyInstanceId = "my-instance"; - CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); - Mockito.when(credentialsProvider.getCredentials()).thenReturn(new FakeCredentials()); - EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId) - .setCredentialsProvider(credentialsProvider); - - assertThat(builder.getEnableRoutingCookie()).isTrue(); - assertThat(builder.build().getEnableRoutingCookie()).isTrue(); - assertThat(builder.build().toBuilder().getEnableRoutingCookie()).isTrue(); - } - - @Test - public void enableRetryInfoDefaultValueTest() throws IOException { - String dummyProjectId = "my-project"; - String dummyInstanceId = "my-instance"; - CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); - Mockito.when(credentialsProvider.getCredentials()).thenReturn(new FakeCredentials()); - EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId) - .setCredentialsProvider(credentialsProvider); - assertThat(builder.getEnableRetryInfo()).isTrue(); - assertThat(builder.build().getEnableRetryInfo()).isTrue(); - assertThat(builder.build().toBuilder().getEnableRetryInfo()).isTrue(); - } - - @Test - public void routingCookieFalseValueSet() throws IOException { - String dummyProjectId = "my-project"; - String dummyInstanceId = "my-instance"; - CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); - Mockito.when(credentialsProvider.getCredentials()).thenReturn(new FakeCredentials()); - EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId) - .setEnableRoutingCookie(false) - .setCredentialsProvider(credentialsProvider); - assertThat(builder.getEnableRoutingCookie()).isFalse(); - assertThat(builder.build().getEnableRoutingCookie()).isFalse(); - assertThat(builder.build().toBuilder().getEnableRoutingCookie()).isFalse(); - } - - @Test - public void enableRetryInfoFalseValueTest() throws IOException { - String dummyProjectId = "my-project"; - String dummyInstanceId = "my-instance"; - CredentialsProvider credentialsProvider = Mockito.mock(CredentialsProvider.class); - Mockito.when(credentialsProvider.getCredentials()).thenReturn(new FakeCredentials()); - EnhancedBigtableStubSettings.Builder builder = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId) - .setEnableRetryInfo(false) - .setCredentialsProvider(credentialsProvider); - assertThat(builder.getEnableRetryInfo()).isFalse(); - assertThat(builder.build().getEnableRetryInfo()).isFalse(); - assertThat(builder.build().toBuilder().getEnableRetryInfo()).isFalse(); - } - static final String[] SETTINGS_LIST = { "projectId", "instanceId", "appProfileId", "isRefreshingChannel", - "primedTableIds", - "jwtAudienceMapping", - "enableRoutingCookie", - "enableRetryInfo", - "readRowsSettings", - "readRowSettings", - "sampleRowKeysSettings", - "mutateRowSettings", - "bulkMutateRowsSettings", - "bulkReadRowsSettings", - "checkAndMutateRowSettings", - "readModifyWriteRowSettings", - "generateInitialChangeStreamPartitionsSettings", - "readChangeStreamSettings", - "pingAndWarmSettings", - "executeQuerySettings", + "perOpSettings", "metricsProvider", + "metricsEndpoint", + "areInternalMetricsEnabled", + "jwtAudience", + "directPathConfig", + "sessionsEnabled", }; @Test @@ -978,18 +920,12 @@ public void testToString() { .build(); checkToString(defaultSettings); - assertThat(defaultSettings.toString()).contains("primedTableIds=[]"); EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() - .setPrimedTableIds("2", "12", "85", "06") - .setEndpoint("example.com:1234") - .build(); + defaultSettings.toBuilder().setEndpoint("example.com:1234").build(); checkToString(settings); assertThat(settings.toString()).contains("endpoint=example.com:1234"); - assertThat(settings.toString()).contains("primedTableIds=[2, 12, 85, 06]"); int nonStaticFields = 0; for (Field field : EnhancedBigtableStubSettings.class.getDeclaredFields()) { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java index 50d086b711..a21eb3d707 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java @@ -18,6 +18,8 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.common.truth.Truth.assertThat; @@ -37,6 +39,7 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcCallContext; import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.rpc.FailedPreconditionException; import com.google.api.gax.rpc.FixedTransportChannelProvider; import com.google.api.gax.rpc.InstantiatingWatchdogProvider; import com.google.api.gax.rpc.ServerStream; @@ -44,15 +47,23 @@ import com.google.api.gax.rpc.WatchdogTimeoutException; import com.google.auth.oauth2.ServiceAccountJwtAccessCredentials; import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.CheckAndMutateRowRequest; +import com.google.bigtable.v2.CheckAndMutateRowResponse; import com.google.bigtable.v2.ExecuteQueryRequest; import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.FeatureFlags; +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.ReadModifyWriteRowRequest; +import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.RowSet; @@ -60,27 +71,45 @@ import com.google.cloud.bigtable.admin.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.internal.SqlRow; -import com.google.cloud.bigtable.data.v2.models.*; +import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter; +import com.google.cloud.bigtable.data.v2.models.Filters; +import com.google.cloud.bigtable.data.v2.models.Mutation; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; +import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.cloud.bigtable.data.v2.stub.sql.ExecuteQueryCallable; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory; import com.google.cloud.bigtable.data.v2.stub.sql.SqlServerStream; -import com.google.common.collect.ImmutableMap; +import com.google.common.base.Preconditions; import com.google.common.collect.Queues; import com.google.common.io.BaseEncoding; import com.google.protobuf.ByteString; import com.google.protobuf.BytesValue; import com.google.protobuf.StringValue; +import com.google.protobuf.Timestamp; import com.google.rpc.Code; import com.google.rpc.Status; +import io.grpc.CallOptions; import io.grpc.Context; import io.grpc.Deadline; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; import io.grpc.Metadata; -import io.grpc.Metadata.Key; +import io.grpc.MethodDescriptor; import io.grpc.Server; import io.grpc.ServerCall; import io.grpc.ServerCall.Listener; @@ -98,13 +127,16 @@ import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; +import java.time.Instant; import java.util.Base64; import java.util.Collection; +import java.util.HashMap; import java.util.Iterator; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -118,12 +150,21 @@ public class EnhancedBigtableStubTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; + private static final String INSTANCE_NAME = NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID); + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final String TABLE_NAME = - NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, "fake-table"); + NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID); private static final String APP_PROFILE_ID = "app-profile-id"; - private static final String WAIT_TIME_TABLE_ID = "test-wait-timeout"; + private static final TableId WAIT_TIME_TABLE_ID = TableId.of("test-wait-timeout"); private static final String WAIT_TIME_QUERY = "test-wait-timeout"; private static final Duration WATCHDOG_CHECK_DURATION = Duration.ofMillis(100); + private static final PrepareResponse PREPARE_RESPONSE = + PrepareResponse.fromProto( + prepareResponse( + ByteString.copyFromUtf8(WAIT_TIME_QUERY), + metadata(columnMetadata("foo", stringType())))); + private static final PreparedStatement WAIT_TIME_PREPARED_STATEMENT = + preparedStatement(PREPARE_RESPONSE, new HashMap<>()); private Server server; private MetadataInterceptor metadataInterceptor; @@ -150,6 +191,8 @@ public void setUp() throws IOException, IllegalAccessException, InstantiationExc .setInstanceId(INSTANCE_ID) .setAppProfileId(APP_PROFILE_ID) .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build() .getStubSettings(); @@ -165,9 +208,6 @@ public void tearDown() { @Test public void testJwtAudience() throws InterruptedException, IOException, NoSuchAlgorithmException, ExecutionException { - // close default stub - need to create custom one - enhancedBigtableStub.close(); - // Create fake jwt creds KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); KeyPair keyPair = keyGen.genKeyPair(); @@ -183,17 +223,19 @@ public void testJwtAudience() // Create a stub with overridden audience String expectedAudience = "http://localaudience"; EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() - .setJwtAudienceMapping(ImmutableMap.of("localhost", expectedAudience)) + defaultSettings.toBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(jwtCreds)) + .setJwtAudience(expectedAudience) .build(); - enhancedBigtableStub = EnhancedBigtableStub.create(settings); + try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings)) { + stub.readRowCallable().futureCall(Query.create(TABLE_ID)).get(); + } // Send rpc and grab the credentials sent - enhancedBigtableStub.readRowCallable().futureCall(Query.create("fake-table")).get(); Metadata metadata = metadataInterceptor.headers.take(); - String authValue = metadata.get(Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER)); + String authValue = + metadata.get(Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(authValue).isNotNull(); String expectedPrefix = "Bearer "; assertThat(authValue).startsWith(expectedPrefix); String jwtStr = authValue.substring(expectedPrefix.length()); @@ -204,9 +246,6 @@ public void testJwtAudience() @Test public void testBatchJwtAudience() throws InterruptedException, IOException, NoSuchAlgorithmException, ExecutionException { - // close default stub - need to create custom one - enhancedBigtableStub.close(); - // Create fake jwt creds KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); KeyPair keyPair = keyGen.genKeyPair(); @@ -219,34 +258,38 @@ public void testBatchJwtAudience() .setPrivateKeyId("fake-private-key") .build(); - // Create a fixed channel that will ignore the default endpoint and connect to the emulator - ManagedChannel emulatorChannel = + ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", server.getPort()).usePlaintext().build(); + // TODO: remove this suppression when setRefreshingChannel can be removed + @SuppressWarnings("deprecation") + EnhancedBigtableStubSettings settings = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId("fake-project") + .setInstanceId("fake-instance") + .setEndpoint("batch-bigtable.googleapis.com:443") + .setCredentialsProvider(FixedCredentialsProvider.create(jwtCreds)) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() + // Use a fixed channel that will ignore the default endpoint and connect to the emulator + .setTransportChannelProvider( + FixedTransportChannelProvider.create(GrpcTransportChannel.create(channel))) + // Channel refreshing doesn't work with FixedTransportChannelProvider. Disable it for + // the test + .setRefreshingChannel(false) + .build(); + Metadata metadata; - try { - EnhancedBigtableStubSettings settings = - EnhancedBigtableStubSettings.newBuilder() - .setProjectId("fake-project") - .setInstanceId("fake-instance") - .setEndpoint("batch-bigtable.googleapis.com:443") - .setCredentialsProvider(FixedCredentialsProvider.create(jwtCreds)) - .setTransportChannelProvider( - FixedTransportChannelProvider.create( - GrpcTransportChannel.create(emulatorChannel))) - // Channel refreshing doesn't work with FixedTransportChannelProvider. Disable it for - // the test - .setRefreshingChannel(false) - .build(); - enhancedBigtableStub = EnhancedBigtableStub.create(settings); + try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings)) { // Send rpc and grab the credentials sent - enhancedBigtableStub.readRowCallable().futureCall(Query.create("fake-table")).get(); + stub.readRowCallable().futureCall(Query.create(TABLE_ID)).get(); metadata = metadataInterceptor.headers.take(); - } finally { - emulatorChannel.shutdown(); } + channel.shutdown(); - String authValue = metadata.get(Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER)); + String authValue = + metadata.get(Metadata.Key.of("Authorization", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(authValue).isNotNull(); String expectedPrefix = "Bearer "; assertThat(authValue).startsWith(expectedPrefix); String jwtStr = authValue.substring(expectedPrefix.length()); @@ -256,12 +299,12 @@ public void testBatchJwtAudience() @Test public void testFeatureFlags() throws InterruptedException, IOException, ExecutionException { - - enhancedBigtableStub.readRowCallable().futureCall(Query.create("fake-table")).get(); + enhancedBigtableStub.readRowCallable().futureCall(Query.create(TABLE_ID)).get(); Metadata metadata = metadataInterceptor.headers.take(); String encodedFeatureFlags = - metadata.get(Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER)); + metadata.get(Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(encodedFeatureFlags).isNotNull(); FeatureFlags featureFlags = FeatureFlags.parseFrom(BaseEncoding.base64Url().decode(encodedFeatureFlags)); @@ -269,12 +312,211 @@ public void testFeatureFlags() throws InterruptedException, IOException, Executi assertThat(featureFlags.getLastScannedRowResponses()).isTrue(); } + @Test + public void testPingAndWarmFeatureFlags() throws InterruptedException, IOException { + // TODO: remove the suppression once setRefreshingChannel can be removed + @SuppressWarnings("deprecation") + EnhancedBigtableStubSettings settings = + defaultSettings.toBuilder().setRefreshingChannel(true).build(); + try (EnhancedBigtableStub ignored = EnhancedBigtableStub.create(settings)) { + Preconditions.checkState( + !fakeDataService.pingRequests.isEmpty(), "Ping request was not sent during setup"); + Metadata metadata = metadataInterceptor.headers.take(); + + String encodedFeatureFlags = + metadata.get(Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(encodedFeatureFlags).isNotNull(); + FeatureFlags featureFlags = + FeatureFlags.parseFrom(BaseEncoding.base64Url().decode(encodedFeatureFlags)); + + assertThat(featureFlags.getReverseScans()).isTrue(); + assertThat(featureFlags.getLastScannedRowResponses()).isTrue(); + assertThat(featureFlags.getRoutingCookie()).isTrue(); + assertThat(featureFlags.getRetryInfo()).isTrue(); + assertThat(featureFlags.getPeerInfo()).isTrue(); + assertThat(featureFlags.getSessionsCompatible()).isTrue(); + } + } + + @Test + public void testCheckAndMutateRequestResponseConversion() + throws ExecutionException, InterruptedException { + ConditionalRowMutation req = + ConditionalRowMutation.create(TableId.of("my-table"), "my-key") + .condition(Filters.FILTERS.pass()) + .then(Mutation.create().deleteRow()); + + ApiFuture f = enhancedBigtableStub.checkAndMutateRowCallable().futureCall(req, null); + f.get(); + + CheckAndMutateRowRequest protoReq = + fakeDataService.checkAndMutateRowRequests.poll(1, TimeUnit.SECONDS); + assertThat(protoReq) + .isEqualTo(req.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID))); + assertThat(f.get()).isEqualTo(true); + } + + @Test + public void testRMWRequestResponseConversion() throws ExecutionException, InterruptedException { + ReadModifyWriteRow req = + ReadModifyWriteRow.create(TableId.of("my-table"), "my-key").append("f", "q", "v"); + + ApiFuture f = enhancedBigtableStub.readModifyWriteRowCallable().futureCall(req, null); + f.get(); + + ReadModifyWriteRowRequest protoReq = fakeDataService.rmwRequests.poll(1, TimeUnit.SECONDS); + assertThat(protoReq) + .isEqualTo(req.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID))); + assertThat(f.get().getKey()).isEqualTo(ByteString.copyFromUtf8("my-key")); + } + + @Test + public void testMutateRowRequestResponseConversion() + throws ExecutionException, InterruptedException { + RowMutation req = RowMutation.create(TableId.of("my-table"), "my-key").deleteRow(); + CallOptions.Key testKey = CallOptions.Key.create("test-key"); + + GrpcCallContext ctx = + GrpcCallContext.createDefault() + .withCallOptions(CallOptions.DEFAULT.withOption(testKey, "callopt-value")); + ApiFuture f = enhancedBigtableStub.mutateRowCallable().futureCall(req, ctx); + f.get(); + + MutateRowRequest protoReq = fakeDataService.mutateRowRequests.poll(1, TimeUnit.SECONDS); + assertThat(protoReq) + .isEqualTo(req.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID))); + assertThat(f.get()).isEqualTo(null); + } + + @Test + public void testMutateRowRequestParams() throws ExecutionException, InterruptedException { + RowMutation req = RowMutation.create(TABLE_ID, "my-key").deleteRow(); + + ApiFuture f = enhancedBigtableStub.mutateRowCallable().futureCall(req, null); + f.get(); + + Metadata reqMetadata = metadataInterceptor.headers.poll(1, TimeUnit.SECONDS); + assertThat(reqMetadata).isNotNull(); + + // RequestParamsExtractor + String reqParams = + reqMetadata.get(Metadata.Key.of("x-goog-request-params", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(reqParams).contains("table_name=" + TABLE_NAME.replace("/", "%2F")); + assertThat(reqParams).contains(String.format("app_profile_id=%s", APP_PROFILE_ID)); + + // StatsHeadersUnaryCallable + assertThat(reqMetadata.keys()).contains("bigtable-client-attempt-epoch-usec"); + + assertThat(f.get()).isEqualTo(null); + } + + @Test + public void testMutateRowErrorPropagation() { + AtomicInteger invocationCount = new AtomicInteger(); + Mockito.doAnswer( + invocationOnMock -> { + StreamObserver observer = invocationOnMock.getArgument(1); + if (invocationCount.getAndIncrement() == 0) { + observer.onError(io.grpc.Status.UNAVAILABLE.asRuntimeException()); + } else { + observer.onError(io.grpc.Status.FAILED_PRECONDITION.asRuntimeException()); + } + return null; + }) + .when(fakeDataService) + .mutateRow(Mockito.any(), Mockito.any()); + + RowMutation req = RowMutation.create(TABLE_ID, "my-key").deleteRow(); + ApiFuture f = enhancedBigtableStub.mutateRowCallable().futureCall(req, null); + + ExecutionException e = assertThrows(ExecutionException.class, f::get); + assertThat(e.getCause()).isInstanceOf(FailedPreconditionException.class); + assertThat(invocationCount.get()).isEqualTo(2); + } + + @Test + public void testPrepareQueryRequestResponseConversion() + throws ExecutionException, InterruptedException { + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest req = + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest.create( + "SELECT * FROM TABLE", new HashMap<>()); + CallOptions.Key testKey = CallOptions.Key.create("test-key"); + + GrpcCallContext ctx = + GrpcCallContext.createDefault() + .withCallOptions(CallOptions.DEFAULT.withOption(testKey, "callopt-value")); + ApiFuture f = enhancedBigtableStub.prepareQueryCallable().futureCall(req, ctx); + f.get(); + + PrepareQueryRequest protoReq = fakeDataService.prepareRequests.poll(1, TimeUnit.SECONDS); + assertThat(protoReq) + .isEqualTo(req.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID))); + assertThat(f.get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(metadata(columnMetadata("foo", stringType())))); + assertThat(f.get().preparedQuery()).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(f.get().validUntil()).isEqualTo(Instant.ofEpochSecond(1000, 1000)); + } + + @Test + public void testPrepareQueryRequestParams() throws ExecutionException, InterruptedException { + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest req = + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest.create( + "SELECT * FROM TABLE", new HashMap<>()); + + ApiFuture f = + enhancedBigtableStub.prepareQueryCallable().futureCall(req, null); + f.get(); + + Metadata reqMetadata = metadataInterceptor.headers.poll(1, TimeUnit.SECONDS); + assertThat(reqMetadata).isNotNull(); + + // RequestParamsExtractor + String reqParams = + reqMetadata.get(Metadata.Key.of("x-goog-request-params", Metadata.ASCII_STRING_MARSHALLER)); + assertThat(reqParams).contains("name=" + INSTANCE_NAME.replace("/", "%2F")); + assertThat(reqParams).contains(String.format("app_profile_id=%s", APP_PROFILE_ID)); + + // StatsHeadersUnaryCallable + assertThat(reqMetadata.keys()).contains("bigtable-client-attempt-epoch-usec"); + + assertThat(f.get().resultSetMetadata()) + .isEqualTo(ProtoResultSetMetadata.fromProto(metadata(columnMetadata("foo", stringType())))); + assertThat(f.get().preparedQuery()).isEqualTo(ByteString.copyFromUtf8("foo")); + assertThat(f.get().validUntil()).isEqualTo(Instant.ofEpochSecond(1000, 1000)); + } + + @Test + public void testPrepareQueryErrorPropagation() { + AtomicInteger invocationCount = new AtomicInteger(); + Mockito.doAnswer( + invocationOnMock -> { + StreamObserver observer = invocationOnMock.getArgument(1); + if (invocationCount.getAndIncrement() == 0) { + observer.onError(io.grpc.Status.UNAVAILABLE.asRuntimeException()); + } else { + observer.onError(io.grpc.Status.FAILED_PRECONDITION.asRuntimeException()); + } + return null; + }) + .when(fakeDataService) + .prepareQuery(Mockito.any(), Mockito.any()); + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest req = + com.google.cloud.bigtable.data.v2.internal.PrepareQueryRequest.create( + "SELECT * FROM TABLE", new HashMap<>()); + ApiFuture f = + enhancedBigtableStub.prepareQueryCallable().futureCall(req, null); + + ExecutionException e = assertThrows(ExecutionException.class, f::get); + assertThat(e.getCause()).isInstanceOf(FailedPreconditionException.class); + assertThat(invocationCount.get()).isEqualTo(2); + } + @Test public void testCreateReadRowsCallable() throws InterruptedException { ServerStreamingCallable streamingCallable = enhancedBigtableStub.createReadRowsCallable(new DefaultRowAdapter()); - Query request = Query.create("table-id").rowKey("row-key"); + Query request = Query.create(TableId.of("table-id")).rowKey("row-key"); streamingCallable.call(request).iterator().next(); ReadRowsRequest expected = request.toProto(RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID)); @@ -306,11 +548,17 @@ public void testCreateReadRowsRawCallable() throws InterruptedException { @Test public void testChannelPrimerConfigured() throws IOException { + // TODO: remove the suppression once setRefreshingChannel can be removed + @SuppressWarnings("deprecation") EnhancedBigtableStubSettings settings = - defaultSettings.toBuilder().setRefreshingChannel(true).build(); + defaultSettings.toBuilder() + .setRefreshingChannel(true) + .setDirectPathConfig(EnhancedBigtableStubSettings.DirectPathConfig.DEFAULT) + .build(); try (EnhancedBigtableStub ignored = EnhancedBigtableStub.create(settings)) { - assertThat(fakeDataService.pingRequests).hasSize(1); + // direct access checker ping + assertThat(fakeDataService.pingRequests).hasSize(2); } } @@ -319,7 +567,7 @@ public void testUserAgent() throws InterruptedException { ServerStreamingCallable streamingCallable = enhancedBigtableStub.createReadRowsCallable(new DefaultRowAdapter()); - Query request = Query.create("table-id").rowKey("row-key"); + Query request = Query.create(TABLE_ID).rowKey("row-key"); streamingCallable.call(request).iterator().next(); assertThat(metadataInterceptor.headers).hasSize(1); @@ -354,11 +602,12 @@ public void export(Collection collection) { .spanBuilder("fake-parent-span") .setSampler(Samplers.alwaysSample()) .startScopedSpan()) { - enhancedBigtableStub.readRowCallable().call(Query.create("table-id").rowKey("row-key")); + enhancedBigtableStub.readRowCallable().call(Query.create(TABLE_ID).rowKey("row-key")); } for (int i = 0; i < 100; i++) { SpanData spanData = spans.poll(10, TimeUnit.SECONDS); + assertThat(spanData).isNotNull(); if ("Bigtable.ReadRow".equals(spanData.getName())) { foundSpanData = spanData; break; @@ -415,8 +664,10 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { // Creating 2 batchers from the same stub, they should share the same FlowController and // FlowControlEventStats - try (BatcherImpl batcher1 = (BatcherImpl) stub1.newMutateRowsBatcher("my-table1", null); - BatcherImpl batcher2 = (BatcherImpl) stub1.newMutateRowsBatcher("my-table2", null)) { + try (BatcherImpl batcher1 = + (BatcherImpl) stub1.newMutateRowsBatcher(TableId.of("my-table1"), null); + BatcherImpl batcher2 = + (BatcherImpl) stub1.newMutateRowsBatcher(TableId.of("my-table2"), null)) { assertThat(batcher1.getFlowController()).isNotNull(); assertThat(batcher1.getFlowController().getFlowControlEventStats()).isNotNull(); assertThat(batcher1).isNotSameInstanceAs(batcher2); @@ -440,8 +691,10 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { // Creating 2 batchers from different stubs, they should not share the same FlowController and // FlowControlEventStats - try (BatcherImpl batcher1 = (BatcherImpl) stub1.newMutateRowsBatcher("my-table1", null); - BatcherImpl batcher2 = (BatcherImpl) stub2.newMutateRowsBatcher("my-table2", null)) { + try (BatcherImpl batcher1 = + (BatcherImpl) stub1.newMutateRowsBatcher(TableId.of("my-table1"), null); + BatcherImpl batcher2 = + (BatcherImpl) stub2.newMutateRowsBatcher(TableId.of("my-table2"), null)) { assertThat(batcher1.getFlowController()).isNotNull(); assertThat(batcher1.getFlowController().getFlowControlEventStats()).isNotNull(); assertThat(batcher1.getFlowController()).isNotSameInstanceAs(batcher2.getFlowController()); @@ -458,7 +711,8 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { .build() .getStubSettings()); ) { - try (BatcherImpl batcher = (BatcherImpl) stub2.newMutateRowsBatcher("my-table", null)) { + try (BatcherImpl batcher = + (BatcherImpl) stub2.newMutateRowsBatcher(TableId.of("my-table"), null)) { assertThat(batcher.getFlowController().getMaxElementCountLimit()).isEqualTo(100L); assertThat(batcher.getFlowController().getCurrentElementCountLimit()).isEqualTo(100L); assertThat(batcher.getFlowController().getMinElementCountLimit()).isEqualTo(100L); @@ -469,12 +723,7 @@ public void testBulkMutationFlowControllerConfigured() throws Exception { @Test public void testCallContextPropagatedInMutationBatcher() throws IOException, InterruptedException, ExecutionException { - EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() - .setRefreshingChannel(true) - .setPrimedTableIds("table1", "table2") - .build(); + EnhancedBigtableStubSettings settings = defaultSettings.toBuilder().build(); try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings)) { // clear the previous contexts @@ -486,12 +735,12 @@ public void testCallContextPropagatedInMutationBatcher() // Send a batch try (Batcher batcher = - stub.newMutateRowsBatcher("table1", clientCtx)) { + stub.newMutateRowsBatcher(TableId.of("table1"), clientCtx)) { batcher.add(RowMutationEntry.create("key").deleteRow()).get(); } // Ensure that the server got the overriden deadline - Context serverCtx = contextInterceptor.contexts.poll(); + Context serverCtx = contextInterceptor.pollContext(BigtableGrpc.getMutateRowsMethod()); assertThat(serverCtx).isNotNull(); assertThat(serverCtx.getDeadline()).isAtLeast(Deadline.after(8, TimeUnit.MINUTES)); } @@ -500,12 +749,7 @@ public void testCallContextPropagatedInMutationBatcher() @Test public void testCallContextPropagatedInReadBatcher() throws IOException, InterruptedException, ExecutionException { - EnhancedBigtableStubSettings settings = - defaultSettings - .toBuilder() - .setRefreshingChannel(true) - .setPrimedTableIds("table1", "table2") - .build(); + EnhancedBigtableStubSettings settings = defaultSettings.toBuilder().build(); try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings)) { // clear the previous contexts @@ -517,12 +761,12 @@ public void testCallContextPropagatedInReadBatcher() // Send a batch try (Batcher batcher = - stub.newBulkReadRowsBatcher(Query.create("table1"), clientCtx)) { + stub.newBulkReadRowsBatcher(Query.create(TABLE_ID), clientCtx)) { batcher.add(ByteString.copyFromUtf8("key")).get(); } // Ensure that the server got the overriden deadline - Context serverCtx = contextInterceptor.contexts.poll(); + Context serverCtx = contextInterceptor.pollContext(BigtableGrpc.getReadRowsMethod()); assertThat(serverCtx).isNotNull(); assertThat(serverCtx.getDeadline()).isAtLeast(Deadline.after(8, TimeUnit.MINUTES)); } @@ -531,7 +775,7 @@ public void testCallContextPropagatedInReadBatcher() @Test public void testBulkMutationFlowControlFeatureFlagIsSet() throws Exception { BulkMutation bulkMutation = - BulkMutation.create("my-table") + BulkMutation.create(TABLE_ID) .add(RowMutationEntry.create("row-key").setCell("cf", "q", "value")); // Test the header is set when the feature is enabled @@ -553,7 +797,7 @@ public void testBulkMutationFlowControlFeatureFlagIsSet() throws Exception { @Test public void testBulkMutationFlowControlFeatureFlagIsNotSet() throws Exception { BulkMutation bulkMutation = - BulkMutation.create("my-table") + BulkMutation.create(TABLE_ID) .add(RowMutationEntry.create("row-key").setCell("cf", "q", "value")); EnhancedBigtableStubSettings.Builder settings = defaultSettings.toBuilder(); @@ -598,7 +842,8 @@ public void testReadChangeStreamWaitTimeoutIsSet() throws Exception { try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build())) { ServerStream results = - stub.readChangeStreamCallable().call(ReadChangeStreamQuery.create(WAIT_TIME_TABLE_ID)); + stub.readChangeStreamCallable() + .call(ReadChangeStreamQuery.create(WAIT_TIME_TABLE_ID.getTableId())); WatchdogTimeoutException ex = assertThrows(WatchdogTimeoutException.class, () -> results.iterator().next()); assertThat(ex).hasMessageThat().contains("Canceled due to timeout waiting for next response"); @@ -608,10 +853,13 @@ public void testReadChangeStreamWaitTimeoutIsSet() throws Exception { @Test public void testBatchMutationsPartialFailure() { Batcher batcher = - enhancedBigtableStub.newMutateRowsBatcher("table1", GrpcCallContext.createDefault()); + enhancedBigtableStub.newMutateRowsBatcher( + TableId.of("table1"), GrpcCallContext.createDefault()); - batcher.add(RowMutationEntry.create("key0").deleteRow()); - batcher.add(RowMutationEntry.create("key1").deleteRow()); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = batcher.add(RowMutationEntry.create("key0").deleteRow()); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored1 = batcher.add(RowMutationEntry.create("key1").deleteRow()); Mockito.doAnswer( invocationOnMock -> { @@ -636,12 +884,12 @@ public void testBatchMutationsPartialFailure() { return null; }) .when(fakeDataService) - .mutateRows(Mockito.any(MutateRowsRequest.class), Mockito.any(StreamObserver.class)); - BatchingException batchingException = - assertThrows(BatchingException.class, () -> batcher.close()); + .mutateRows(Mockito.any(MutateRowsRequest.class), Mockito.any()); + BatchingException batchingException = assertThrows(BatchingException.class, batcher::close); assertThat(batchingException.getMessage()) .contains( - "Batching finished with 1 partial failures. The 1 partial failures contained 1 entries that failed with: 1 ApiException(1 PERMISSION_DENIED)."); + "Batching finished with 1 partial failures. The 1 partial failures contained 1 entries" + + " that failed with: 1 ApiException(1 PERMISSION_DENIED)."); assertThat(batchingException.getMessage()).contains("fake partial error"); assertThat(batchingException.getMessage()).doesNotContain("INTERNAL"); } @@ -649,7 +897,7 @@ public void testBatchMutationsPartialFailure() { @Test public void testBatchMutationRPCErrorCode() { Batcher batcher = - enhancedBigtableStub.newMutateRowsBatcher("table1", GrpcCallContext.createDefault()); + enhancedBigtableStub.newMutateRowsBatcher(TABLE_ID, GrpcCallContext.createDefault()); Mockito.doAnswer( invocationOnMock -> { @@ -658,26 +906,31 @@ public void testBatchMutationRPCErrorCode() { return null; }) .when(fakeDataService) - .mutateRows(Mockito.any(MutateRowsRequest.class), Mockito.any(StreamObserver.class)); + .mutateRows(Mockito.any(MutateRowsRequest.class), Mockito.any()); - batcher.add(RowMutationEntry.create("key0").deleteRow()); - BatchingException batchingException = - assertThrows(BatchingException.class, () -> batcher.close()); + @SuppressWarnings("UnusedVariable") + ApiFuture ignored = batcher.add(RowMutationEntry.create("key0").deleteRow()); + BatchingException batchingException = assertThrows(BatchingException.class, batcher::close); assertThat(batchingException.getMessage()) .contains( - "Batching finished with 1 batches failed to apply due to: 1 ApiException(1 PERMISSION_DENIED) and 0 partial failures"); + "Batching finished with 1 batches failed to apply due to: 1 ApiException(1" + + " PERMISSION_DENIED) and 0 partial failures"); } @Test public void testCreateExecuteQueryCallable() throws InterruptedException { ExecuteQueryCallable streamingCallable = enhancedBigtableStub.createExecuteQueryCallable(); - - SqlServerStream sqlServerStream = streamingCallable.call(Statement.of("SELECT * FROM table")); + PrepareResponse prepareResponse = + PrepareResponse.fromProto( + SqlProtoFactory.prepareResponse( + ByteString.copyFromUtf8("abc"), metadata(columnMetadata("foo", stringType())))); + PreparedStatement preparedStatement = preparedStatement(prepareResponse, new HashMap<>()); + SqlServerStream sqlServerStream = streamingCallable.call(preparedStatement.bind().build()); ExecuteQueryRequest expectedRequest = ExecuteQueryRequest.newBuilder() .setInstanceName(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) .setAppProfileId(APP_PROFILE_ID) - .setQuery("SELECT * FROM table") + .setPreparedQuery(ByteString.copyFromUtf8("abc")) .build(); assertThat(sqlServerStream.rows().iterator().next()).isNotNull(); assertThat(sqlServerStream.metadataFuture().isDone()).isTrue(); @@ -692,31 +945,38 @@ public void testExecuteQueryWaitTimeoutIsSet() throws IOException { settings.setStreamWatchdogProvider( InstantiatingWatchdogProvider.create().withCheckInterval(WATCHDOG_CHECK_DURATION)); - EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build()); - Iterator iterator = - stub.executeQueryCallable().call(Statement.of(WAIT_TIME_QUERY)).rows().iterator(); - WatchdogTimeoutException e = assertThrows(WatchdogTimeoutException.class, iterator::next); - assertThat(e).hasMessageThat().contains("Canceled due to timeout waiting for next response"); + Iterator iterator; + try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build())) { + iterator = + stub.executeQueryCallable() + .call(WAIT_TIME_PREPARED_STATEMENT.bind().build()) + .rows() + .iterator(); + WatchdogTimeoutException e = assertThrows(WatchdogTimeoutException.class, iterator::next); + assertThat(e).hasMessageThat().contains("Canceled due to timeout waiting for next response"); + } } @Test - public void testExecuteQueryWaitTimeoutWorksWithMetadataFuture() - throws IOException, InterruptedException { + public void testExecuteQueryWaitTimeoutWorksWithMetadataFuture() throws IOException { EnhancedBigtableStubSettings.Builder settings = defaultSettings.toBuilder(); // Set a shorter wait timeout and make watchdog checks more frequently settings.executeQuerySettings().setWaitTimeout(WATCHDOG_CHECK_DURATION.dividedBy(2)); settings.setStreamWatchdogProvider( InstantiatingWatchdogProvider.create().withCheckInterval(WATCHDOG_CHECK_DURATION)); - EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build()); - ApiFuture future = - stub.executeQueryCallable().call(Statement.of(WAIT_TIME_QUERY)).metadataFuture(); - - ExecutionException e = assertThrows(ExecutionException.class, future::get); - assertThat(e.getCause()).isInstanceOf(WatchdogTimeoutException.class); - assertThat(e.getCause().getMessage()) - .contains("Canceled due to timeout waiting for next response"); - assertThat(e).hasMessageThat().contains("Canceled due to timeout waiting for next response"); + try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build())) { + ApiFuture future = + stub.executeQueryCallable() + .call(WAIT_TIME_PREPARED_STATEMENT.bind().build()) + .metadataFuture(); + + ExecutionException e = assertThrows(ExecutionException.class, future::get); + assertThat(e.getCause()).isInstanceOf(WatchdogTimeoutException.class); + assertThat(e.getCause().getMessage()) + .contains("Canceled due to timeout waiting for next response"); + assertThat(e).hasMessageThat().contains("Canceled due to timeout waiting for next response"); + } } private static class MetadataInterceptor implements ServerInterceptor { @@ -733,16 +993,37 @@ public Listener interceptCall( } private static class ContextInterceptor implements ServerInterceptor { - final BlockingQueue contexts = Queues.newLinkedBlockingDeque(); + final BlockingQueue contexts = Queues.newLinkedBlockingDeque(); + + static class MethodContext { + final MethodDescriptor method; + final Context context; + + MethodContext(MethodDescriptor method, Context context) { + this.method = method; + this.context = context; + } + } @Override public Listener interceptCall( ServerCall serverCall, Metadata metadata, ServerCallHandler serverCallHandler) { - contexts.add(Context.current()); + contexts.add(new MethodContext(serverCall.getMethodDescriptor(), Context.current())); return serverCallHandler.startCall(serverCall, metadata); } + + Context pollContext(MethodDescriptor method) { + ContextInterceptor.MethodContext methodContext = contexts.poll(); + while (methodContext != null) { + if (method.equals(methodContext.method)) { + return methodContext.context; + } + methodContext = contexts.poll(); + } + return null; + } } private static class FakeDataService extends BigtableGrpc.BigtableImplBase { @@ -751,8 +1032,12 @@ private static class FakeDataService extends BigtableGrpc.BigtableImplBase { Queues.newLinkedBlockingDeque(); final BlockingQueue pingRequests = Queues.newLinkedBlockingDeque(); final BlockingQueue executeQueryRequests = Queues.newLinkedBlockingDeque(); + final BlockingQueue mutateRowRequests = Queues.newLinkedBlockingDeque(); + final BlockingQueue checkAndMutateRowRequests = + Queues.newLinkedBlockingDeque(); + final BlockingQueue rmwRequests = Queues.newLinkedBlockingDeque(); + final BlockingQueue prepareRequests = Queues.newLinkedBlockingDeque(); - @SuppressWarnings("unchecked") ReadRowsRequest popLastRequest() throws InterruptedException { return requests.poll(1, TimeUnit.SECONDS); } @@ -761,6 +1046,37 @@ ExecuteQueryRequest popLastExecuteQueryRequest() throws InterruptedException { return executeQueryRequests.poll(1, TimeUnit.SECONDS); } + @Override + public void mutateRow( + MutateRowRequest request, StreamObserver responseObserver) { + mutateRowRequests.add(request); + + responseObserver.onNext(MutateRowResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + @Override + public void checkAndMutateRow( + CheckAndMutateRowRequest request, + StreamObserver responseObserver) { + checkAndMutateRowRequests.add(request); + responseObserver.onNext( + CheckAndMutateRowResponse.newBuilder().setPredicateMatched(true).build()); + responseObserver.onCompleted(); + } + + @Override + public void readModifyWriteRow( + ReadModifyWriteRowRequest request, + StreamObserver responseObserver) { + rmwRequests.add(request); + responseObserver.onNext( + ReadModifyWriteRowResponse.newBuilder() + .setRow(com.google.bigtable.v2.Row.newBuilder().setKey(request.getRowKey())) + .build()); + responseObserver.onCompleted(); + } + @Override public void mutateRows( MutateRowsRequest request, StreamObserver responseObserver) { @@ -775,11 +1091,11 @@ public void mutateRows( @Override public void readRows( ReadRowsRequest request, StreamObserver responseObserver) { - if (request.getTableName().contains(WAIT_TIME_TABLE_ID)) { + if (request.getTableName().contains(WAIT_TIME_TABLE_ID.getTableId())) { try { Thread.sleep(WATCHDOG_CHECK_DURATION.toMillis() * 2); - } catch (Exception e) { - + } catch (Exception ignored) { + // dont care about interruption } } requests.add(request); @@ -801,11 +1117,11 @@ public void readRows( public void readChangeStream( ReadChangeStreamRequest request, StreamObserver responseObserver) { - if (request.getTableName().contains(WAIT_TIME_TABLE_ID)) { + if (request.getTableName().contains(WAIT_TIME_TABLE_ID.getTableId())) { try { Thread.sleep(WATCHDOG_CHECK_DURATION.toMillis() * 2); - } catch (Exception e) { - + } catch (Exception ignored) { + // dont care about interruption } } readChangeReadStreamRequests.add(request); @@ -825,16 +1141,36 @@ public void pingAndWarm( @Override public void executeQuery( ExecuteQueryRequest request, StreamObserver responseObserver) { - if (request.getQuery().contains(WAIT_TIME_QUERY)) { + if (request.getPreparedQuery().startsWith(ByteString.copyFromUtf8(WAIT_TIME_QUERY))) { try { Thread.sleep(WATCHDOG_CHECK_DURATION.toMillis() * 2); - } catch (Exception e) { - + } catch (Exception ignored) { + // dont care about interruption } } executeQueryRequests.add(request); - responseObserver.onNext(metadata(columnMetadata("foo", stringType()))); responseObserver.onNext(partialResultSetWithToken(stringValue("test"))); + responseObserver.onCompleted(); + } + + @Override + public void prepareQuery( + PrepareQueryRequest request, StreamObserver responseObserver) { + if (request.getQuery().contains(WAIT_TIME_QUERY)) { + try { + Thread.sleep(WATCHDOG_CHECK_DURATION.toMillis() * 2); + } catch (Exception ignored) { + // dont care about interruption + } + } + prepareRequests.add(request); + responseObserver.onNext( + PrepareQueryResponse.newBuilder() + .setPreparedQuery(ByteString.copyFromUtf8("foo")) + .setMetadata(metadata(columnMetadata("foo", stringType()))) + .setValidUntil(Timestamp.newBuilder().setSeconds(1000).setNanos(1000).build()) + .build()); + responseObserver.onCompleted(); } } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java index 16e886f9b7..146cc1017f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java @@ -15,8 +15,13 @@ */ package com.google.cloud.bigtable.data.v2.stub; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.common.truth.Truth.assertThat; +import com.google.api.core.ApiFuture; import com.google.api.gax.batching.Batcher; import com.google.api.gax.rpc.FixedHeaderProvider; import com.google.api.gax.rpc.HeaderProvider; @@ -27,6 +32,8 @@ import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; @@ -37,12 +44,15 @@ import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.rpc.Status; import io.grpc.Metadata; import io.grpc.Server; @@ -50,6 +60,8 @@ import io.grpc.ServerCallHandler; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import java.util.HashMap; +import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import org.junit.After; @@ -62,11 +74,11 @@ public class HeadersTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private static final String INSTANCE_NAME = "projects%2F" + PROJECT_ID + "%2Finstances%2F" + INSTANCE_ID; - private static final String TABLE_NAME = INSTANCE_NAME + "%2Ftables%2F" + TABLE_ID; + private static final String TABLE_NAME = INSTANCE_NAME + "%2Ftables%2F" + TABLE_ID.getTableId(); private static final String APP_PROFILE_ID = "fake-profile"; private static final String TEST_FIXED_HEADER_STRING = "test_fixed_header"; @@ -78,7 +90,7 @@ public class HeadersTest { Metadata.Key.of(TEST_FIXED_HEADER_STRING, Metadata.ASCII_STRING_MARSHALLER); private Server server; - private BlockingQueue sentMetadata = new ArrayBlockingQueue<>(10); + private final BlockingQueue sentMetadata = new ArrayBlockingQueue<>(10); private BigtableDataClient client; @@ -104,11 +116,7 @@ public void setUp() throws Exception { .setHeaderProvider(headerProvider) .bulkMutateRowsSettings() .setBatchingSettings( - settings - .stubSettings() - .bulkMutateRowsSettings() - .getBatchingSettings() - .toBuilder() + settings.stubSettings().bulkMutateRowsSettings().getBatchingSettings().toBuilder() .setElementCountThreshold(1L) .build()); @@ -129,20 +137,22 @@ public void readRowsTest() { @Test public void sampleRowKeysTest() { - client.sampleRowKeysAsync(TABLE_ID); + @SuppressWarnings("UnusedVariable") + ApiFuture> ignored = client.sampleRowKeysAsync(TABLE_ID); verifyHeaderSent(); } @Test public void mutateRowTest() { - client.mutateRowAsync(RowMutation.create(TABLE_ID, "fake-key").deleteRow()); + ApiFuture ignored = + client.mutateRowAsync(RowMutation.create(TABLE_ID, "fake-key").deleteRow()); verifyHeaderSent(); } @Test public void mutateRowsTest() throws InterruptedException { try (Batcher batcher = client.newBulkMutationBatcher(TABLE_ID)) { - batcher.add(RowMutationEntry.create("fake-key").deleteRow()); + ApiFuture ignored = batcher.add(RowMutationEntry.create("fake-key").deleteRow()); } catch (RuntimeException e) { // Ignore the errors: none of the methods are actually implemented } @@ -151,21 +161,32 @@ public void mutateRowsTest() throws InterruptedException { @Test public void checkAndMutateRowTest() { - client.checkAndMutateRowAsync( - ConditionalRowMutation.create(TABLE_ID, "fake-key").then(Mutation.create().deleteRow())); + ApiFuture ignored = + client.checkAndMutateRowAsync( + ConditionalRowMutation.create(TABLE_ID, "fake-key") + .then(Mutation.create().deleteRow())); verifyHeaderSent(); } @Test public void readModifyWriteTest() { - client.readModifyWriteRowAsync( - ReadModifyWriteRow.create(TABLE_ID, "fake-key").increment("cf", "q", 1)); + ApiFuture ignored = + client.readModifyWriteRowAsync( + ReadModifyWriteRow.create(TABLE_ID, "fake-key").increment("cf", "q", 1)); verifyHeaderSent(); } @Test public void executeQueryTest() { - client.executeQuery(Statement.of("SELECT * FROM table")); + PreparedStatement preparedStatement = + preparedStatement(metadata(columnMetadata("foo", stringType()))); + client.executeQuery(preparedStatement.bind().build()); + verifyHeaderSent(true); + } + + @Test + public void prepareQueryTest() { + client.prepareStatement("SELECT * FROM table", new HashMap<>()); verifyHeaderSent(true); } @@ -259,5 +280,16 @@ public void readModifyWriteRow( responseObserver.onNext(ReadModifyWriteRowResponse.getDefaultInstance()); responseObserver.onCompleted(); } + + @Override + public void prepareQuery( + PrepareQueryRequest request, StreamObserver responseObserver) { + responseObserver.onNext( + // Need to set metadata for response to parse + PrepareQueryResponse.newBuilder() + .setMetadata(metadata(columnMetadata("foo", stringType()))) + .build()); + responseObserver.onCompleted(); + } } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java deleted file mode 100644 index 4792b66890..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/MutateRowCallableTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.MutateRowRequest; -import com.google.bigtable.v2.MutateRowResponse; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.common.primitives.Longs; -import com.google.common.truth.Truth; -import com.google.protobuf.ByteString; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; - -@RunWith(JUnit4.class) -public class MutateRowCallableTest { - - private static final RequestContext REQUEST_CONTEXT = - RequestContext.create("fake-project", "fake-instance", "fake-profile"); - private UnaryCallable innerCallable; - private ArgumentCaptor innerMutation; - private SettableApiFuture innerResult; - - @SuppressWarnings("unchecked") - @Before - public void setUp() { - innerCallable = Mockito.mock(UnaryCallable.class); - innerMutation = ArgumentCaptor.forClass(MutateRowRequest.class); - innerResult = SettableApiFuture.create(); - Mockito.when(innerCallable.futureCall(innerMutation.capture(), Mockito.any())) - .thenReturn(innerResult); - } - - @Test - public void testRequestConversion() { - MutateRowCallable callable = new MutateRowCallable(innerCallable, REQUEST_CONTEXT); - RowMutation outerRequest = - RowMutation.create("fake-table", "fake-key") - .setCell("fake-family", "fake-qualifier", 1_000, "fake-value") - .addToCell("family-2", "qualifier", 1_000, 1234) - .mergeToCell( - "family-2", "qualifier2", 1_000, ByteString.copyFrom(Longs.toByteArray(1234L))); - - innerResult.set(MutateRowResponse.getDefaultInstance()); - callable.call(outerRequest); - - Truth.assertThat(innerMutation.getValue()).isEqualTo(outerRequest.toProto(REQUEST_CONTEXT)); - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimerTest.java new file mode 100644 index 0000000000..60bbad5196 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/NoOpChannelPrimerTest.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 + * + * 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.bigtable.data.v2.stub; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoInteractions; + +import io.grpc.ManagedChannel; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class NoOpChannelPrimerTest { + @Test + public void primeChannelDoesNothing() { + // Create an instance of NoOpChannelPrimer + NoOpChannelPrimer primer = NoOpChannelPrimer.create(); + + // Create a mock ManagedChannel + ManagedChannel mockChannel = mock(ManagedChannel.class); + + // Call the primeChannel method + primer.primeChannel(mockChannel); + + // Verify that no interactions occurred with the mock channel. + // This confirms the "no-op" behavior. + verifyNoInteractions(mockChannel); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java index f2fe77725d..652049b266 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java @@ -36,12 +36,12 @@ import com.google.protobuf.Duration; import com.google.rpc.Code; import com.google.rpc.Status; +import java.time.Instant; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mockito; -import org.threeten.bp.Instant; @RunWith(JUnit4.class) public class RateLimitingCallableTest { @@ -72,7 +72,7 @@ public void testUpdateRate() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1)); + Instant earlier = Instant.now().minus(java.time.Duration.ofHours(1)); // Make sure rate will be updated. callableToTest.getNextRateUpdateTime().set(earlier); @@ -105,7 +105,7 @@ public void testNoRateLimitInfoDoesNotUpdateRate() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1)); + Instant earlier = Instant.now().minus(java.time.Duration.ofHours(1)); // Make sure rate will be updated. callableToTest.getNextRateUpdateTime().set(earlier); @@ -131,7 +131,7 @@ public void testInvalidRateLimitInfoDoesNotUpdateRate() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1)); + Instant earlier = Instant.now().minus(java.time.Duration.ofHours(1)); // make sure QPS will be updated callableToTest.getNextRateUpdateTime().set(earlier); @@ -166,7 +166,7 @@ public void testMissingRateLimitInfoFactorDoesNotUpdateRate() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1)); + Instant earlier = Instant.now().minus(java.time.Duration.ofHours(1)); // Make sure rate can be updated. callableToTest.getNextRateUpdateTime().set(earlier); @@ -199,7 +199,7 @@ public void testNoUpdateBeforeAllowedTime() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant later = Instant.now().plus(org.threeten.bp.Duration.ofHours(1)); + Instant later = Instant.now().plus(java.time.Duration.ofHours(1)); // Make sure rate will not be updated. callableToTest.getNextRateUpdateTime().set(later); double oldQps = callableToTest.getCurrentRate(); @@ -232,7 +232,7 @@ public void testDoesNotDisableBeforeAllowedTime() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setLimiterEnabled(true); - Instant later = Instant.now().plus(org.threeten.bp.Duration.ofHours(1)); + Instant later = Instant.now().plus(java.time.Duration.ofHours(1)); // Make sure limiter will not be disabled. callableToTest.getNextRateUpdateTime().set(later); double oldQps = callableToTest.getCurrentRate(); @@ -257,7 +257,7 @@ public void testEnableWithinPeriodDoesNotUpdateRate() throws Exception { callableToTest.call(request, responseObserver, context); callableToTest.setRate(1.5); - Instant later = Instant.now().plus(org.threeten.bp.Duration.ofHours(1)); + Instant later = Instant.now().plus(java.time.Duration.ofHours(1)); // Even though the rate update time is far in the future, enable is always allowed. callableToTest.getNextRateUpdateTime().set(later); double oldQps = callableToTest.getCurrentRate(); @@ -289,7 +289,7 @@ public void testEnableWithinPeriodDoesNotUpdateRate() throws Exception { public void testErrorInfoLowerQPS() throws Exception { callableToTest.call(request, responseObserver, context); - Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1)); + Instant earlier = Instant.now().minus(java.time.Duration.ofHours(1)); // make sure QPS will be updated callableToTest.getNextRateUpdateTime().set(earlier); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java deleted file mode 100644 index 4a8f857d05..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ReadModifyWriteRowCallableTest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.core.ApiFuture; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.grpc.GrpcStatusCode; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.NotFoundException; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.Cell; -import com.google.bigtable.v2.Column; -import com.google.bigtable.v2.Family; -import com.google.bigtable.v2.ReadModifyWriteRowRequest; -import com.google.bigtable.v2.ReadModifyWriteRowResponse; -import com.google.bigtable.v2.ReadModifyWriteRule; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; -import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.cloud.bigtable.data.v2.models.RowCell; -import com.google.common.collect.ImmutableList; -import com.google.protobuf.ByteString; -import io.grpc.Status.Code; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class ReadModifyWriteRowCallableTest { - private final RequestContext requestContext = - RequestContext.create("fake-project", "fake-instance", "fake-profile"); - private FakeCallable inner; - private ReadModifyWriteRowCallable callable; - - @Before - public void setUp() { - inner = new FakeCallable(); - callable = new ReadModifyWriteRowCallable(inner, requestContext); - } - - @Test - public void requestIsCorrect() { - callable.futureCall( - ReadModifyWriteRow.create("my-table", "my-key").append("my-family", "", "suffix")); - - assertThat(inner.request) - .isEqualTo( - ReadModifyWriteRowRequest.newBuilder() - .setTableName( - NameUtil.formatTableName( - requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) - .setAppProfileId(requestContext.getAppProfileId()) - .setRowKey(ByteString.copyFromUtf8("my-key")) - .addRules( - ReadModifyWriteRule.newBuilder() - .setFamilyName("my-family") - .setColumnQualifier(ByteString.EMPTY) - .setAppendValue(ByteString.copyFromUtf8("suffix"))) - .build()); - } - - @Test - public void responseCorrectlyTransformed() throws Exception { - ApiFuture result = - callable.futureCall( - ReadModifyWriteRow.create("my-table", "my-key").append("my-family", "col", "suffix")); - - inner.response.set( - ReadModifyWriteRowResponse.newBuilder() - .setRow( - com.google.bigtable.v2.Row.newBuilder() - .setKey(ByteString.copyFromUtf8("my-key")) - .addFamilies( - Family.newBuilder() - .setName("my-family") - .addColumns( - Column.newBuilder() - .setQualifier(ByteString.copyFromUtf8("col")) - .addCells( - Cell.newBuilder() - .setTimestampMicros(1_000) - .setValue(ByteString.copyFromUtf8("suffix")))))) - .build()); - - assertThat(result.get(1, TimeUnit.SECONDS)) - .isEqualTo( - Row.create( - ByteString.copyFromUtf8("my-key"), - ImmutableList.of( - RowCell.create( - "my-family", - ByteString.copyFromUtf8("col"), - 1_000, - ImmutableList.of(), - ByteString.copyFromUtf8("suffix"))))); - } - - @Test - public void responseSortsFamilies() throws Exception { - ByteString col = ByteString.copyFromUtf8("col1"); - ByteString value1 = ByteString.copyFromUtf8("value1"); - ByteString value2 = ByteString.copyFromUtf8("value2"); - - ApiFuture result = - callable.futureCall( - ReadModifyWriteRow.create("my-table", "my-key").append("my-family", "col", "suffix")); - - inner.response.set( - ReadModifyWriteRowResponse.newBuilder() - .setRow( - com.google.bigtable.v2.Row.newBuilder() - .setKey(ByteString.copyFromUtf8("my-key")) - // family2 is out of order - .addFamilies( - Family.newBuilder() - .setName("family2") - .addColumns( - Column.newBuilder() - .setQualifier(col) - .addCells( - Cell.newBuilder() - .setTimestampMicros(1_000) - .setValue(value2)))) - .addFamilies( - Family.newBuilder() - .setName("family1") - .addColumns( - Column.newBuilder() - .setQualifier(col) - .addCells( - Cell.newBuilder() - .setTimestampMicros(1_000) - .setValue(value1))) - .build())) - .build()); - - assertThat(result.get(1, TimeUnit.SECONDS)) - .isEqualTo( - Row.create( - ByteString.copyFromUtf8("my-key"), - ImmutableList.of( - RowCell.create("family1", col, 1_000, ImmutableList.of(), value1), - RowCell.create("family2", col, 1_000, ImmutableList.of(), value2)))); - } - - @Test - public void errorIsPropagated() throws Exception { - ApiFuture result = - callable.futureCall( - ReadModifyWriteRow.create("my-table", "my-key").append("my-family", "", "suffix")); - - Throwable expectedError = - new NotFoundException("fake error", null, GrpcStatusCode.of(Code.NOT_FOUND), false); - inner.response.setException(expectedError); - - Throwable actualError = null; - try { - result.get(1, TimeUnit.SECONDS); - } catch (ExecutionException e) { - actualError = e.getCause(); - } - - assertThat(actualError).isEqualTo(expectedError); - } - - static class FakeCallable - extends UnaryCallable { - ReadModifyWriteRowRequest request; - ApiCallContext callContext; - SettableApiFuture response = SettableApiFuture.create(); - - @Override - public ApiFuture futureCall( - ReadModifyWriteRowRequest request, ApiCallContext context) { - this.request = request; - this.callContext = context; - - return response; - } - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RetryInfoTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RetryInfoTest.java index c1299f82c9..8b93a043f6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RetryInfoTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RetryInfoTest.java @@ -15,6 +15,9 @@ */ package com.google.cloud.bigtable.data.v2.stub; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; @@ -32,6 +35,8 @@ import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; @@ -44,18 +49,22 @@ import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters; import com.google.cloud.bigtable.data.v2.models.MutateRowsException; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; import com.google.common.collect.Queues; import com.google.protobuf.Any; import com.google.rpc.RetryInfo; @@ -71,6 +80,8 @@ import io.grpc.stub.StreamObserver; import java.io.IOException; import java.time.Duration; +import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.Queue; import java.util.Set; @@ -87,15 +98,15 @@ public class RetryInfoTest { private static final Metadata.Key ERROR_DETAILS_KEY = Metadata.Key.of("grpc-status-details-bin", Metadata.BINARY_BYTE_MARSHALLER); + private static final TableId TABLE_ID = TableId.of("table"); private final Set methods = new HashSet<>(); private FakeBigtableService service; private Server server; private BigtableDataClient client; - private BigtableDataSettings.Builder settings; - private AtomicInteger attemptCounter = new AtomicInteger(); + private final AtomicInteger attemptCounter = new AtomicInteger(); private com.google.protobuf.Duration defaultDelay = com.google.protobuf.Duration.newBuilder().setSeconds(2).setNanos(0).build(); @@ -125,7 +136,7 @@ public void close(Status status, Metadata trailers) { }; server = FakeServiceBuilder.create(service).intercept(serverInterceptor).start(); - settings = + BigtableDataSettings.Builder settings = BigtableDataSettings.newBuilderForEmulator(server.getPort()) .setProjectId("fake-project") .setInstanceId("fake-instance"); @@ -146,35 +157,36 @@ public void tearDown() { @Test public void testAllMethods() { // Verify retry info is handled correctly for all the methods in data API. - verifyRetryInfoIsUsed(() -> client.readRow(TableId.of("table"), "row"), true); + verifyRetryInfoIsUsed(() -> client.readRow(TABLE_ID, "row"), true); attemptCounter.set(0); verifyRetryInfoIsUsed( - () -> client.readRows(Query.create(TableId.of("table"))).iterator().hasNext(), true); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); + }, + true); attemptCounter.set(0); verifyRetryInfoIsUsed( () -> client.bulkMutateRows( - BulkMutation.create(TableId.of("fake-table")) + BulkMutation.create(TABLE_ID) .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v"))), true); attemptCounter.set(0); verifyRetryInfoIsUsed( - () -> - client.mutateRow( - RowMutation.create(TableId.of("fake-table"), "key").setCell("cf", "q", "v")), - true); + () -> client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")), true); attemptCounter.set(0); - verifyRetryInfoIsUsed(() -> client.sampleRowKeys(TableId.of("table")), true); + verifyRetryInfoIsUsed(() -> client.sampleRowKeys(TABLE_ID), true); attemptCounter.set(0); verifyRetryInfoIsUsed( () -> client.checkAndMutateRow( - ConditionalRowMutation.create("table", "key") + ConditionalRowMutation.create(TABLE_ID, "key") .condition(Filters.FILTERS.value().regex("old-value")) .then(Mutation.create().setCell("cf", "q", "v"))), true); @@ -183,18 +195,30 @@ public void testAllMethods() { verifyRetryInfoIsUsed( () -> client.readModifyWriteRow( - ReadModifyWriteRow.create("table", "row").append("cf", "q", "v")), + ReadModifyWriteRow.create(TABLE_ID, "row").append("cf", "q", "v")), true); attemptCounter.set(0); verifyRetryInfoIsUsed( - () -> client.readChangeStream(ReadChangeStreamQuery.create("table")).iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, true); attemptCounter.set(0); verifyRetryInfoIsUsed( - () -> client.generateInitialChangeStreamPartitions("table").iterator().hasNext(), true); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); + }, + true); + attemptCounter.set(0); + verifyRetryInfoIsUsed( + () -> client.prepareStatement("SELECT * FROM table", new HashMap<>()), true); // Verify that the new data API methods are tested or excluded. This is enforced by // introspecting grpc // method descriptors. @@ -205,66 +229,45 @@ public void testAllMethods() { // Exclude methods that don't support retry info methods.add("PingAndWarm"); - methods.add("ExecuteQuery"); + methods.add("ExecuteQuery"); // TODO remove when retries are implemented + + // Session APIs. RetryInfo is handled differently + methods.add("OpenAuthorizedView"); + methods.add("OpenMaterializedView"); + methods.add("GetClientConfiguration"); + methods.add("OpenTable"); assertThat(methods).containsExactlyElementsIn(expected); } @Test public void testReadRowNonRetryableErrorWithRetryInfo() { - verifyRetryInfoIsUsed(() -> client.readRow("table", "row"), false); - } - - @Test - public void testReadRowDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled(() -> newClient.readRow("table", "row")); - } + verifyRetryInfoIsUsed(() -> client.readRow(TABLE_ID, "row"), false); } @Test public void testReadRowServerNotReturningRetryInfo() { - verifyNoRetryInfo(() -> client.readRow("table", "row"), true); - } - - @Test - public void testReadRowServerNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo(() -> newClient.readRow("table", "row"), true); - } + verifyNoRetryInfo(() -> client.readRow(TABLE_ID, "row"), true); } @Test public void testReadRowsNonRetraybleErrorWithRetryInfo() { - verifyRetryInfoIsUsed(() -> client.readRows(Query.create("table")).iterator().hasNext(), false); - } - - @Test - public void testReadRowsDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled( - () -> newClient.readRows(Query.create("table")).iterator().hasNext()); - } + verifyRetryInfoIsUsed( + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); + }, + false); } @Test public void testReadRowsServerNotReturningRetryInfo() { - verifyNoRetryInfo(() -> client.readRows(Query.create("table")).iterator().hasNext(), true); - } - - @Test - public void testReadRowsServerNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo(() -> newClient.readRows(Query.create("table")).iterator().hasNext(), true); - } + verifyNoRetryInfo( + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = Lists.newArrayList(client.readRows(Query.create(TABLE_ID))); + }, + true); } @Test @@ -272,127 +275,41 @@ public void testMutateRowsNonRetryableErrorWithRetryInfo() { verifyRetryInfoIsUsed( () -> client.bulkMutateRows( - BulkMutation.create("fake-table") + BulkMutation.create(TABLE_ID) .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v"))), false); } - @Test - public void testMutateRowsDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled( - () -> - newClient.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v")))); - } - } - @Test public void testMutateRowsServerNotReturningRetryInfo() { verifyNoRetryInfo( () -> client.bulkMutateRows( - BulkMutation.create("fake-table") + BulkMutation.create(TABLE_ID) .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v"))), true); } - @Test - public void testMutateRowsServerNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> - newClient.bulkMutateRows( - BulkMutation.create("fake-table") - .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v"))), - true); - } - } - @Test public void testMutateRowNonRetryableErrorWithRetryInfo() { verifyRetryInfoIsUsed( - () -> client.mutateRow(RowMutation.create("table", "key").setCell("cf", "q", "v")), false); - } - - @Test - public void testMutateRowDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - - verifyRetryInfoCanBeDisabled( - () -> newClient.mutateRow(RowMutation.create("table", "key").setCell("cf", "q", "v"))); - } + () -> client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")), false); } @Test public void testMutateRowServerNotReturningRetryInfo() { verifyNoRetryInfo( - () -> client.mutateRow(RowMutation.create("table", "key").setCell("cf", "q", "v")), true); - } - - @Test - public void testMutateRowServerNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> newClient.mutateRow(RowMutation.create("table", "key").setCell("cf", "q", "v")), - true); - } + () -> client.mutateRow(RowMutation.create(TABLE_ID, "key").setCell("cf", "q", "v")), true); } @Test public void testSampleRowKeysNonRetryableErrorWithRetryInfo() { - verifyRetryInfoIsUsed(() -> client.sampleRowKeys("table"), false); - } - - @Test - public void testSampleRowKeysDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled(() -> newClient.sampleRowKeys("table")); - } + verifyRetryInfoIsUsed(() -> client.sampleRowKeys(TABLE_ID), false); } @Test public void testSampleRowKeysServerNotReturningRetryInfo() { - verifyNoRetryInfo(() -> client.sampleRowKeys("table"), true); - } - - @Test - public void testSampleRowKeysServerNotReturningRetryInfoClientDisabledHandling() - throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo(() -> newClient.sampleRowKeys("table"), true); - } - } - - @Test - public void testCheckAndMutateDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient client = BigtableDataClient.create(settings.build())) { - ApiException exception = enqueueNonRetryableExceptionWithDelay(defaultDelay); - try { - client.checkAndMutateRow( - ConditionalRowMutation.create("table", "key") - .condition(Filters.FILTERS.value().regex("old-value")) - .then(Mutation.create().setCell("cf", "q", "v"))); - } catch (ApiException e) { - assertThat(e.getStatusCode()).isEqualTo(exception.getStatusCode()); - } - assertThat(attemptCounter.get()).isEqualTo(1); - } + verifyNoRetryInfo(() -> client.sampleRowKeys(TABLE_ID), true); } @Test @@ -400,141 +317,74 @@ public void testCheckAndMutateServerNotReturningRetryInfo() { verifyNoRetryInfo( () -> client.checkAndMutateRow( - ConditionalRowMutation.create("table", "key") + ConditionalRowMutation.create(TABLE_ID, "key") .condition(Filters.FILTERS.value().regex("old-value")) .then(Mutation.create().setCell("cf", "q", "v"))), false); } - @Test - public void testCheckAndMutateServerNotReturningRetryInfoClientDisabledHandling() - throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> - newClient.checkAndMutateRow( - ConditionalRowMutation.create("table", "key") - .condition(Filters.FILTERS.value().regex("old-value")) - .then(Mutation.create().setCell("cf", "q", "v"))), - false); - } - } - - @Test - public void testReadModifyWriteDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient client = BigtableDataClient.create(settings.build())) { - ApiException exception = enqueueNonRetryableExceptionWithDelay(defaultDelay); - try { - client.readModifyWriteRow(ReadModifyWriteRow.create("table", "row").append("cf", "q", "v")); - } catch (ApiException e) { - assertThat(e.getStatusCode()).isEqualTo(exception.getStatusCode()); - } - assertThat(attemptCounter.get()).isEqualTo(1); - } - } - @Test public void testReadModifyWriteServerNotReturningRetryInfo() { verifyNoRetryInfo( () -> client.readModifyWriteRow( - ReadModifyWriteRow.create("table", "row").append("cf", "q", "v")), + ReadModifyWriteRow.create(TABLE_ID, "row").append("cf", "q", "v")), false); } - @Test - public void testReadModifyWriteNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> - newClient.readModifyWriteRow( - ReadModifyWriteRow.create("table", "row").append("cf", "q", "v")), - false); - } - } - @Test public void testReadChangeStreamNonRetryableErrorWithRetryInfo() { verifyRetryInfoIsUsed( - () -> client.readChangeStream(ReadChangeStreamQuery.create("table")).iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, false); } - @Test - public void testReadChangeStreamDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled( - () -> - newClient - .readChangeStream(ReadChangeStreamQuery.create("table")) - .iterator() - .hasNext()); - } - } - @Test public void testReadChangeStreamServerNotReturningRetryInfo() { verifyNoRetryInfo( - () -> client.readChangeStream(ReadChangeStreamQuery.create("table")).iterator().hasNext(), + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.readChangeStream(ReadChangeStreamQuery.create("table"))); + }, true); } - @Test - public void testReadChangeStreamNotReturningRetryInfoClientDisabledHandling() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> - newClient - .readChangeStream(ReadChangeStreamQuery.create("table")) - .iterator() - .hasNext(), - true, - com.google.protobuf.Duration.newBuilder().setSeconds(5).setNanos(0).build()); - } - } - @Test public void testGenerateInitialChangeStreamPartitionNonRetryableError() { verifyRetryInfoIsUsed( - () -> client.generateInitialChangeStreamPartitions("table").iterator().hasNext(), false); + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); + }, + false); } @Test - public void testGenerateInitialChangeStreamPartitionDisableRetryInfo() throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyRetryInfoCanBeDisabled( - () -> newClient.generateInitialChangeStreamPartitions("table").iterator().hasNext()); - } + public void testGenerateInitialChangeStreamServerNotReturningRetryInfo() { + verifyNoRetryInfo( + () -> { + @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") + ArrayList ignored = + Lists.newArrayList(client.generateInitialChangeStreamPartitions("table")); + }, + true); } @Test - public void testGenerateInitialChangeStreamServerNotReturningRetryInfo() { - verifyNoRetryInfo( - () -> client.generateInitialChangeStreamPartitions("table").iterator().hasNext(), true); + public void testPrepareQueryNonRetryableErrorWithRetryInfo() { + verifyRetryInfoIsUsed( + () -> client.prepareStatement("SELECT * FROM table", new HashMap<>()), false); } @Test - public void testGenerateInitialChangeStreamServerNotReturningRetryInfoClientDisabledHandling() - throws IOException { - settings.stubSettings().setEnableRetryInfo(false); - - try (BigtableDataClient newClient = BigtableDataClient.create(settings.build())) { - verifyNoRetryInfo( - () -> newClient.generateInitialChangeStreamPartitions("table").iterator().hasNext(), - true); - } + public void testPrepareQueryServerNotReturningRetryInfo() { + verifyNoRetryInfo(() -> client.prepareStatement("SELECT * FROM table", new HashMap<>()), true); } // Test the case where server returns retry info and client enables handling of retry info @@ -542,7 +392,8 @@ private void verifyRetryInfoIsUsed(Runnable runnable, boolean retryableError) { if (retryableError) { enqueueRetryableExceptionWithDelay(defaultDelay); } else { - enqueueNonRetryableExceptionWithDelay(defaultDelay); + @SuppressWarnings("ThrowableNotThrown") + ApiException ignored = enqueueNonRetryableExceptionWithDelay(defaultDelay); } Stopwatch stopwatch = Stopwatch.createStarted(); runnable.run(); @@ -552,34 +403,6 @@ private void verifyRetryInfoIsUsed(Runnable runnable, boolean retryableError) { assertThat(stopwatch.elapsed()).isAtLeast(Duration.ofSeconds(defaultDelay.getSeconds())); } - // Test the case where server returns retry info but client disabled handling of retry info - private void verifyRetryInfoCanBeDisabled(Runnable runnable) { - enqueueRetryableExceptionWithDelay(defaultDelay); - Stopwatch stopwatch = Stopwatch.createStarted(); - runnable.run(); - stopwatch.stop(); - - assertThat(attemptCounter.get()).isEqualTo(2); - assertThat(stopwatch.elapsed()).isLessThan(Duration.ofSeconds(defaultDelay.getSeconds())); - - attemptCounter.set(0); - ApiException expectedApiException = enqueueNonRetryableExceptionWithDelay(defaultDelay); - ApiException actualException = - assertThrows("non retryable operations should fail", ApiException.class, runnable::run); - if (actualException instanceof MutateRowsException) { - assertThat( - ((MutateRowsException) actualException) - .getFailedMutations() - .get(0) - .getError() - .getStatusCode()) - .isEqualTo(expectedApiException.getStatusCode()); - } else { - assertThat(actualException.getStatusCode()).isEqualTo(expectedApiException.getStatusCode()); - } - assertThat(attemptCounter.get()).isEqualTo(1); - } - // Test the case where server does not return retry info private void verifyNoRetryInfo(Runnable runnable, boolean operationRetryable) { verifyNoRetryInfo(runnable, operationRetryable, defaultDelay); @@ -802,5 +625,22 @@ public void readChangeStream( responseObserver.onError(expectedRpc); } } + + @Override + public void prepareQuery( + PrepareQueryRequest request, StreamObserver responseObserver) { + attemptCounter.incrementAndGet(); + if (expectations.isEmpty()) { + responseObserver.onNext( + // Need to set metadata for response to parse + PrepareQueryResponse.newBuilder() + .setMetadata(metadata(columnMetadata("foo", stringType()))) + .build()); + responseObserver.onCompleted(); + } else { + Exception expectedRpc = expectations.poll(); + responseObserver.onError(expectedRpc); + } + } } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java deleted file mode 100644 index 40a30d3263..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.core.ApiFuture; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.grpc.GrpcStatusCode; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.NotFoundException; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.SampleRowKeysRequest; -import com.google.bigtable.v2.SampleRowKeysResponse; -import com.google.cloud.bigtable.data.v2.internal.NameUtil; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.KeyOffset; -import com.google.common.collect.ImmutableList; -import com.google.protobuf.ByteString; -import io.grpc.Status.Code; -import java.util.List; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class SampleRowKeysCallableTest { - - private final RequestContext requestContext = - RequestContext.create("my-project", "my-instance", "my-profile"); - private FakeCallable inner; - private SampleRowKeysCallable callable; - - @Before - public void setUp() { - inner = new FakeCallable(); - callable = new SampleRowKeysCallable(inner, requestContext); - } - - @Test - public void requestIsCorrect() { - callable.futureCall("my-table"); - - assertThat(inner.request) - .isEqualTo( - SampleRowKeysRequest.newBuilder() - .setTableName( - NameUtil.formatTableName( - requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) - .setAppProfileId(requestContext.getAppProfileId()) - .build()); - } - - @Test - public void responseCorrectlyTransformed() throws Exception { - ApiFuture> result = callable.futureCall("my-table"); - - inner.response.set( - ImmutableList.of( - SampleRowKeysResponse.newBuilder() - .setRowKey(ByteString.copyFromUtf8("key1")) - .setOffsetBytes(100) - .build(), - SampleRowKeysResponse.newBuilder() - .setRowKey(ByteString.copyFromUtf8("")) - .setOffsetBytes(1000) - .build())); - - assertThat(result.get(1, TimeUnit.SECONDS)) - .isEqualTo( - ImmutableList.of( - KeyOffset.create(ByteString.copyFromUtf8("key1"), 100), - KeyOffset.create(ByteString.EMPTY, 1000))); - } - - @Test - public void errorIsPropagated() throws Exception { - ApiFuture> result = callable.futureCall("my-table"); - - Throwable expectedError = - new NotFoundException("fake error", null, GrpcStatusCode.of(Code.NOT_FOUND), false); - inner.response.setException(expectedError); - - Throwable actualError = null; - try { - result.get(1, TimeUnit.SECONDS); - } catch (ExecutionException e) { - actualError = e.getCause(); - } - - assertThat(actualError).isEqualTo(expectedError); - } - - static class FakeCallable - extends UnaryCallable> { - SampleRowKeysRequest request; - ApiCallContext callContext; - SettableApiFuture> response = SettableApiFuture.create(); - - @Override - public ApiFuture> futureCall( - SampleRowKeysRequest request, ApiCallContext context) { - this.request = request; - this.callContext = context; - - return response; - } - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableWithRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableWithRequestTest.java index f974076ceb..8bd40a363b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableWithRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SampleRowKeysCallableWithRequestTest.java @@ -56,7 +56,8 @@ public void setUp() { @Test public void requestIsCorrect() { - callable.futureCall(SampleRowKeysRequest.create(TableId.of("my-table"))); + ApiFuture> ignored = + callable.futureCall(SampleRowKeysRequest.create(TableId.of("my-table"))); assertThat(inner.request) .isEqualTo( diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java new file mode 100644 index 0000000000..40f7e5b17a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java @@ -0,0 +1,284 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.Mockito.when; + +import com.google.api.core.ApiFuture; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.tracing.ApiTracerFactory; +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.CheckAndMutateRowResponse; +import com.google.bigtable.v2.MutateRowResponse; +import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.ReadModifyWriteRowResponse; +import com.google.bigtable.v2.ReadRowsResponse; +import com.google.bigtable.v2.Row; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.Filters; +import com.google.cloud.bigtable.data.v2.models.Mutation; +import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.models.TargetId; +import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; +import com.google.common.base.Preconditions; +import com.google.common.base.Supplier; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.ByteString; +import com.google.protobuf.BytesValue; +import com.google.protobuf.Message; +import com.google.protobuf.StringValue; +import io.grpc.BindableService; +import io.grpc.MethodDescriptor; +import io.grpc.Server; +import io.grpc.ServerServiceDefinition; +import io.grpc.stub.ServerCalls; +import io.grpc.stub.StreamObserver; +import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicInteger; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class SkipTrailersTest { + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final TargetId TABLE_ID = TableId.of("fake-table"); + + private HackedBigtableService hackedService; + private Server server; + + @Mock private ApiTracerFactory tracerFactory; + private FakeTracer tracer = new FakeTracer(); + + private BigtableDataClient client; + + @Before + public void setUp() throws Exception { + hackedService = new HackedBigtableService(); + server = FakeServiceBuilder.create(hackedService).start(); + + when(tracerFactory.newTracer(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(tracer); + when(tracerFactory.withContext(Mockito.any())).thenReturn(tracerFactory); + + BigtableDataSettings.Builder clientBuilder = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() + .setCredentialsProvider(NoCredentialsProvider.create()); + clientBuilder.stubSettings().setTracerFactory(tracerFactory); + + client = BigtableDataClient.create(clientBuilder.build()); + } + + @After + public void tearDown() throws Exception { + client.close(); + server.shutdown(); + } + + @Test + public void testReadRow() throws InterruptedException, ExecutionException { + ReadRowsResponse fakeResponse = + ReadRowsResponse.newBuilder() + .addChunks( + ReadRowsResponse.CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("fake-key")) + .setFamilyName(StringValue.newBuilder().setValue("cf")) + .setQualifier(BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("q"))) + .setTimestampMicros(0) + .setValue(ByteString.copyFromUtf8("value")) + .setCommitRow(true)) + .build(); + test(() -> client.readRowAsync(TABLE_ID, "fake-key"), fakeResponse); + } + + @Test + public void testMutateRow() throws ExecutionException, InterruptedException { + test( + () -> client.mutateRowAsync(RowMutation.create(TABLE_ID, "fake-key")), + MutateRowResponse.getDefaultInstance()); + } + + @Test + public void testCheckAndMutateRow() throws ExecutionException, InterruptedException { + ConditionalRowMutation req = + ConditionalRowMutation.create(TABLE_ID, "fake-key") + .condition(Filters.FILTERS.pass()) + .then(Mutation.create().deleteRow()); + test(() -> client.checkAndMutateRowAsync(req), CheckAndMutateRowResponse.getDefaultInstance()); + } + + @Test + public void testRMW() throws ExecutionException, InterruptedException { + ReadModifyWriteRow req = ReadModifyWriteRow.create(TABLE_ID, "fake-key").append("cf", "q", "A"); + test( + () -> client.readModifyWriteRowAsync(req), + ReadModifyWriteRowResponse.newBuilder().setRow(Row.getDefaultInstance()).build()); + } + + private void test(Supplier> invoker, T fakeResponse) + throws InterruptedException, ExecutionException { + ApiFuture future = invoker.get(); + + // Wait for the call to start on the server + @SuppressWarnings("unchecked") + ServerRpc rpc = (ServerRpc) hackedService.rpcs.poll(30, TimeUnit.SECONDS); + Preconditions.checkNotNull( + rpc, "Timed out waiting for the call to be received by the mock server"); + + // Send the only row + rpc.getResponseStream().onNext(fakeResponse); + + // Ensure that the future resolves and does not throw an error + try { + future.get(1, TimeUnit.MINUTES); + } catch (TimeoutException e) { + throw new AssertionError( + "timed out waiting for the trailer optimization future to resolve", e); + } + + // The tracer will be notified in parallel to the future being resolved + // This normal and expected, but requires the test to wait a bit + for (int i = 10; i > 0; i--) { + try { + assertThat(tracer.getCallCount("operationFinishEarly")).isEqualTo(1); + break; + } catch (AssertionError e) { + if (i > 1) { + Thread.sleep(100); + } else { + throw e; + } + } + } + assertThat(tracer.getCallCount("operationSucceeded")).isEqualTo(0); + + // clean up + rpc.getResponseStream().onCompleted(); + + // Ensure that the tracer is invoked after the internal operation is complete + // Since we dont have a way to know exactly when this happens, we poll + for (int i = 10; i > 0; i--) { + try { + assertThat(tracer.getCallCount("operationSucceeded")).isEqualTo(1); + break; + } catch (AssertionError e) { + if (i > 1) { + Thread.sleep(100); + } else { + throw e; + } + } + } + } + + static class FakeTracer extends BigtableTracer { + ConcurrentHashMap callCounts = new ConcurrentHashMap<>(); + + @Override + public void operationFinishEarly() { + record("operationFinishEarly"); + } + + @Override + public void operationSucceeded() { + record("operationSucceeded"); + } + + private void record(String op) { + callCounts.computeIfAbsent(op, (ignored) -> new AtomicInteger()).getAndIncrement(); + } + + private int getCallCount(String op) { + return Optional.ofNullable(callCounts.get(op)).map(AtomicInteger::get).orElse(0); + } + } + + /** + * Hack the srvice definition to allow grpc server to simulate delayed trailers. This will augment + * the bigtable service definition to promote unary rpcs to server streaming + */ + class HackedBigtableService implements BindableService { + private final LinkedBlockingDeque> rpcs = new LinkedBlockingDeque<>(); + + @Override + public ServerServiceDefinition bindService() { + ServerServiceDefinition.Builder builder = + ServerServiceDefinition.builder(BigtableGrpc.SERVICE_NAME) + .addMethod( + BigtableGrpc.getPingAndWarmMethod(), + ServerCalls.asyncUnaryCall( + (ignored, observer) -> { + observer.onNext(PingAndWarmResponse.getDefaultInstance()); + observer.onCompleted(); + })) + .addMethod( + BigtableGrpc.getReadRowsMethod(), + ServerCalls.asyncServerStreamingCall( + (req, observer) -> rpcs.add(ServerRpc.create(req, observer)))); + ImmutableList> unaryDescriptors = + ImmutableList.of( + BigtableGrpc.getMutateRowMethod(), + BigtableGrpc.getCheckAndMutateRowMethod(), + BigtableGrpc.getReadModifyWriteRowMethod()); + + for (MethodDescriptor desc : unaryDescriptors) { + builder.addMethod( + desc.toBuilder().setType(MethodDescriptor.MethodType.SERVER_STREAMING).build(), + ServerCalls.asyncServerStreamingCall( + (req, observer) -> rpcs.add(ServerRpc.create(req, observer)))); + } + return builder.build(); + } + } + + @AutoValue + abstract static class ServerRpc { + abstract ReqT getRequest(); + + abstract StreamObserver getResponseStream(); + + static ServerRpc create(ReqT req, StreamObserver resp) { + // return new AutoValue__(req, resp); + return new AutoValue_SkipTrailersTest_ServerRpc<>(req, resp); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallableTest.java new file mode 100644 index 0000000000..856d732f5c --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/TransformingServerStreamingCallableTest.java @@ -0,0 +1,74 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockResponseObserver; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCall; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCallable; +import com.google.common.base.Functions; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class TransformingServerStreamingCallableTest { + @Test + public void testReqTransform() { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + TransformingServerStreamingCallable xform = + new TransformingServerStreamingCallable<>(inner, Object::toString, Functions.identity()); + + MockResponseObserver responseObserver = new MockResponseObserver<>(true); + xform.call(37, responseObserver); + + MockServerStreamingCall call = inner.popLastCall(); + assertThat(call.getRequest()).isEqualTo("37"); + } + + @Test + public void testRespTransform() { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + TransformingServerStreamingCallable xform = + new TransformingServerStreamingCallable<>(inner, Functions.identity(), Integer::parseInt); + + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + xform.call("req", outerObserver); + + MockServerStreamingCall call = inner.popLastCall(); + call.getController().getObserver().onResponse("37"); + + assertThat(outerObserver.popNextResponse()).isEqualTo(37); + } + + @Test + public void testError() { + MockServerStreamingCallable inner = new MockServerStreamingCallable<>(); + TransformingServerStreamingCallable xform = + new TransformingServerStreamingCallable<>( + inner, Functions.identity(), Functions.identity()); + + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + xform.call("req", outerObserver); + + MockServerStreamingCall call = inner.popLastCall(); + RuntimeException e = new RuntimeException("fake error"); + call.getController().getObserver().onError(e); + + assertThat(outerObserver.getFinalError()).isEqualTo(e); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java index f0939fb0cf..a5201770ee 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -85,6 +85,11 @@ public void heartbeatTest() { Instant.ofEpochSecond( heartbeatProto.getEstimatedLowWatermark().getSeconds(), heartbeatProto.getEstimatedLowWatermark().getNanos())); + assertThat(heartbeat.getEstimatedLowWatermarkTime()) + .isEqualTo( + java.time.Instant.ofEpochSecond( + heartbeatProto.getEstimatedLowWatermark().getSeconds(), + heartbeatProto.getEstimatedLowWatermark().getNanos())); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java index b51194f969..9cdd74f0de 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java @@ -92,6 +92,6 @@ public void testNoStackOverflowForManyMods() { ReadChangeStreamResponse.DataChange dataChange = createDataChangeWithDeleteFamilyMods(500000); changeStreamStateMachine.handleDataChange(dataChange); ChangeStreamRecord result = changeStreamStateMachine.consumeChangeStreamRecord(); - assertThat(result instanceof ChangeStreamMutation); + assertThat(result).isInstanceOf(ChangeStreamMutation.class); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index 7c3243ecfe..ce278f50c8 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -24,7 +24,7 @@ import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; -import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; +import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamPartition; @@ -49,6 +49,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -90,7 +91,7 @@ public static Collection data() throws IOException { .that(dataJson) .isNotNull(); - InputStreamReader reader = new InputStreamReader(dataJson); + InputStreamReader reader = new InputStreamReader(dataJson, StandardCharsets.UTF_8); ChangeStreamTestFile.Builder testBuilder = ChangeStreamTestFile.newBuilder(); JsonFormat.parser().merge(reader, testBuilder); ChangeStreamTestFile testDefinition = testBuilder.build(); @@ -195,12 +196,12 @@ public void test() throws Exception { ReadChangeStreamTest.TestChangeStreamMutation.Builder builder = ReadChangeStreamTest.TestChangeStreamMutation.newBuilder(); builder.setRowKey(changeStreamMutation.getRowKey()); - Type type = Type.UNRECOGNIZED; + DataChange.Type type = DataChange.Type.UNRECOGNIZED; if (changeStreamMutation.getType() == ChangeStreamMutation.MutationType.USER) { - type = Type.USER; + type = DataChange.Type.USER; } else if (changeStreamMutation.getType() == ChangeStreamMutation.MutationType.GARBAGE_COLLECTION) { - type = Type.GARBAGE_COLLECTION; + type = DataChange.Type.GARBAGE_COLLECTION; } builder.setType(type); if (changeStreamMutation.getSourceClusterId() != null) { @@ -285,20 +286,20 @@ public void test() throws Exception { private static boolean expectsError(ReadChangeStreamTest testCase) { List results = testCase.getResultsList(); - return results != null && !results.isEmpty() && results.get(results.size() - 1).getError(); + return !results.isEmpty() && results.get(results.size() - 1).getError(); } private static List getNonExceptionResults( ReadChangeStreamTest testCase) { List results = testCase.getResultsList(); List response = new ArrayList<>(); - if (results != null) { - for (ReadChangeStreamTest.Result result : results) { - if (!result.getError()) { - response.add(result); - } + + for (ReadChangeStreamTest.Result result : results) { + if (!result.getError()) { + response.add(result); } } + return response; } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java index 48a62bfee8..80f14b02cf 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java @@ -40,6 +40,7 @@ import com.google.cloud.bigtable.data.v2.models.CloseStream; import com.google.cloud.bigtable.data.v2.models.Heartbeat; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.common.collect.Lists; import com.google.common.collect.Queues; import com.google.common.truth.Truth; @@ -86,10 +87,12 @@ public void setUp() throws IOException { serverRule.getServiceRegistry().addService(service); BigtableDataSettings.Builder settings = - BigtableDataSettings.newBuilderForEmulator(serverRule.getServer().getPort()) + BigtableDataSettings.newBuilder() .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) - .setCredentialsProvider(NoCredentialsProvider.create()); + .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics(); settings .stubSettings() diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTestUtils.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTestUtils.java index 2ea4f99bdc..1aceebd64f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTestUtils.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTestUtils.java @@ -23,15 +23,17 @@ import com.google.protobuf.Timestamp; import com.google.protobuf.util.Timestamps; import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.sdk.metrics.data.DoublePointData; import io.opentelemetry.sdk.metrics.data.HistogramPointData; import io.opentelemetry.sdk.metrics.data.LongPointData; import io.opentelemetry.sdk.metrics.data.MetricData; +import io.opentelemetry.sdk.metrics.data.MetricDataType; +import io.opentelemetry.sdk.metrics.data.PointData; import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import org.junit.Assert; @InternalApi public class BuiltinMetricsTestUtils { @@ -41,7 +43,7 @@ public class BuiltinMetricsTestUtils { private BuiltinMetricsTestUtils() {} public static MetricData getMetricData(InMemoryMetricReader reader, String metricName) { - String fullMetricName = BuiltinMetricsConstants.METER_NAME + metricName; + String fullMetricName = metricName; Collection allMetricData = Collections.emptyList(); // Fetch the MetricData with retries @@ -76,6 +78,9 @@ public static MetricData getMetricData(InMemoryMetricReader reader, String metri } public static long getAggregatedValue(MetricData metricData, Attributes attributes) { + assertThat(metricData.getData().getPoints().stream().map(PointData::getAttributes)) + .contains(attributes); + switch (metricData.getType()) { case HISTOGRAM: HistogramPointData hd = @@ -96,7 +101,10 @@ public static long getAggregatedValue(MetricData metricData, Attributes attribut } } - public static Timestamp getStartTimeSeconds(MetricData metricData, Attributes attributes) { + public static double getAggregatedDoubleValue(MetricData metricData, Attributes attributes) { + assertThat(metricData.getData().getPoints().stream().map(PointData::getAttributes)) + .contains(attributes); + switch (metricData.getType()) { case HISTOGRAM: HistogramPointData hd = @@ -104,37 +112,43 @@ public static Timestamp getStartTimeSeconds(MetricData metricData, Attributes at .filter(pd -> pd.getAttributes().equals(attributes)) .collect(Collectors.toList()) .get(0); - return Timestamps.fromNanos(hd.getStartEpochNanos()); - case LONG_SUM: - LongPointData ld = - metricData.getLongSumData().getPoints().stream() + return hd.getSum() / hd.getCount(); + case DOUBLE_GAUGE: + DoublePointData dd = + metricData.getDoubleGaugeData().getPoints().stream() .filter(pd -> pd.getAttributes().equals(attributes)) .collect(Collectors.toList()) .get(0); - return Timestamps.fromNanos(ld.getStartEpochNanos()); + return dd.getValue(); default: - return Timestamp.getDefaultInstance(); + return 0.0; } } - public static void verifyAttributes(MetricData metricData, Attributes attributes) { + public static Timestamp getStartTimeSeconds(MetricData metricData, Attributes attributes) { switch (metricData.getType()) { case HISTOGRAM: - List hd = + HistogramPointData hd = metricData.getHistogramData().getPoints().stream() .filter(pd -> pd.getAttributes().equals(attributes)) - .collect(Collectors.toList()); - assertThat(hd).isNotEmpty(); - break; + .collect(Collectors.toList()) + .get(0); + return Timestamps.fromNanos(hd.getStartEpochNanos()); case LONG_SUM: - List ld = + LongPointData ld = metricData.getLongSumData().getPoints().stream() .filter(pd -> pd.getAttributes().equals(attributes)) - .collect(Collectors.toList()); - assertThat(ld).isNotEmpty(); - break; + .collect(Collectors.toList()) + .get(0); + return Timestamps.fromNanos(ld.getStartEpochNanos()); default: - Assert.fail("Unexpected type"); + return Timestamp.getDefaultInstance(); } } + + public static void verifyAttributes(MetricData metricData, Attributes attributes) { + assertThat(metricData.getType()).isAnyOf(MetricDataType.HISTOGRAM, MetricDataType.LONG_SUM); + assertThat(metricData.getData().getPoints().stream().map(PointData::getAttributes)) + .contains(attributes); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java deleted file mode 100644 index d37a2562bf..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ /dev/null @@ -1,841 +0,0 @@ -/* - * Copyright 2022 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.bigtable.data.v2.stub.metrics; - -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.APPLICATION_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ATTEMPT_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_BLOCKING_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLIENT_NAME_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CLUSTER_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.CONNECTIVITY_ERROR_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.METHOD_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.OPERATION_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.RETRY_COUNT_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.SERVER_LATENCIES_NAME; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.STATUS_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.STREAMING_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.TABLE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.ZONE_ID_KEY; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.getAggregatedValue; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.getMetricData; -import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTestUtils.verifyAttributes; -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.client.util.Lists; -import com.google.api.core.ApiFunction; -import com.google.api.core.SettableApiFuture; -import com.google.api.gax.batching.Batcher; -import com.google.api.gax.batching.BatchingException; -import com.google.api.gax.batching.BatchingSettings; -import com.google.api.gax.batching.FlowControlSettings; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.NotFoundException; -import com.google.api.gax.rpc.ResponseObserver; -import com.google.api.gax.rpc.StreamController; -import com.google.bigtable.v2.BigtableGrpc; -import com.google.bigtable.v2.MutateRowRequest; -import com.google.bigtable.v2.MutateRowResponse; -import com.google.bigtable.v2.MutateRowsRequest; -import com.google.bigtable.v2.MutateRowsResponse; -import com.google.bigtable.v2.ReadRowsRequest; -import com.google.bigtable.v2.ReadRowsResponse; -import com.google.bigtable.v2.ResponseParams; -import com.google.cloud.bigtable.Version; -import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; -import com.google.cloud.bigtable.data.v2.models.AuthorizedViewId; -import com.google.cloud.bigtable.data.v2.models.Query; -import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; -import com.google.cloud.bigtable.data.v2.models.TableId; -import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; -import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; -import com.google.common.base.Stopwatch; -import com.google.common.collect.Range; -import com.google.protobuf.ByteString; -import com.google.protobuf.BytesValue; -import com.google.protobuf.StringValue; -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.ClientInterceptor; -import io.grpc.ForwardingClientCall; -import io.grpc.ForwardingServerCall; -import io.grpc.ManagedChannelBuilder; -import io.grpc.Metadata; -import io.grpc.MethodDescriptor; -import io.grpc.Server; -import io.grpc.ServerCall; -import io.grpc.ServerCallHandler; -import io.grpc.ServerInterceptor; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; -import io.grpc.stub.ServerCallStreamObserver; -import io.grpc.stub.StreamObserver; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.sdk.OpenTelemetrySdk; -import io.opentelemetry.sdk.metrics.InstrumentSelector; -import io.opentelemetry.sdk.metrics.SdkMeterProvider; -import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; -import io.opentelemetry.sdk.metrics.View; -import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -@RunWith(JUnit4.class) -public class BuiltinMetricsTracerTest { - private static final String PROJECT_ID = "fake-project"; - private static final String INSTANCE_ID = "fake-instance"; - private static final String APP_PROFILE_ID = "default"; - private static final String TABLE = "fake-table"; - - private static final String BAD_TABLE_ID = "non-exist-table"; - private static final String ZONE = "us-west-1"; - private static final String CLUSTER = "cluster-0"; - private static final long FAKE_SERVER_TIMING = 50; - private static final long SERVER_LATENCY = 100; - private static final long APPLICATION_LATENCY = 200; - private static final long SLEEP_VARIABILITY = 15; - private static final String CLIENT_NAME = "java-bigtable/" + Version.VERSION; - - private static final long CHANNEL_BLOCKING_LATENCY = 75; - - @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); - - private final FakeService fakeService = new FakeService(); - private Server server; - - private EnhancedBigtableStub stub; - - private int batchElementCount = 2; - - private Attributes baseAttributes; - - private InMemoryMetricReader metricReader; - - @Before - public void setUp() throws Exception { - metricReader = InMemoryMetricReader.create(); - - baseAttributes = - Attributes.builder() - .put(BuiltinMetricsConstants.BIGTABLE_PROJECT_ID_KEY, PROJECT_ID) - .put(BuiltinMetricsConstants.INSTANCE_ID_KEY, INSTANCE_ID) - .put(BuiltinMetricsConstants.APP_PROFILE_KEY, APP_PROFILE_ID) - .build(); - - SdkMeterProviderBuilder meterProvider = - SdkMeterProvider.builder().registerMetricReader(metricReader); - - for (Map.Entry entry : - BuiltinMetricsConstants.getAllViews().entrySet()) { - meterProvider.registerView(entry.getKey(), entry.getValue()); - } - - OpenTelemetrySdk otel = - OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); - BuiltinMetricsTracerFactory facotry = BuiltinMetricsTracerFactory.create(otel, baseAttributes); - - // Add an interceptor to add server-timing in headers - ServerInterceptor trailersInterceptor = - new ServerInterceptor() { - @Override - public ServerCall.Listener interceptCall( - ServerCall serverCall, - Metadata metadata, - ServerCallHandler serverCallHandler) { - return serverCallHandler.startCall( - new ForwardingServerCall.SimpleForwardingServerCall(serverCall) { - @Override - public void sendHeaders(Metadata headers) { - headers.put( - Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER), - String.format("gfet4t7; dur=%d", FAKE_SERVER_TIMING)); - - ResponseParams params = - ResponseParams.newBuilder().setZoneId(ZONE).setClusterId(CLUSTER).build(); - byte[] byteArray = params.toByteArray(); - headers.put(Util.LOCATION_METADATA_KEY, byteArray); - - super.sendHeaders(headers); - } - }, - metadata); - } - }; - - ClientInterceptor clientInterceptor = - new ClientInterceptor() { - @Override - public ClientCall interceptCall( - MethodDescriptor methodDescriptor, - CallOptions callOptions, - Channel channel) { - return new ForwardingClientCall.SimpleForwardingClientCall( - channel.newCall(methodDescriptor, callOptions)) { - @Override - public void sendMessage(ReqT message) { - try { - Thread.sleep(CHANNEL_BLOCKING_LATENCY); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - super.sendMessage(message); - } - }; - } - }; - - server = FakeServiceBuilder.create(fakeService).intercept(trailersInterceptor).start(); - - BigtableDataSettings settings = - BigtableDataSettings.newBuilderForEmulator(server.getPort()) - .setProjectId(PROJECT_ID) - .setInstanceId(INSTANCE_ID) - .setAppProfileId(APP_PROFILE_ID) - .build(); - EnhancedBigtableStubSettings.Builder stubSettingsBuilder = - settings.getStubSettings().toBuilder(); - stubSettingsBuilder - .mutateRowSettings() - .retrySettings() - .setInitialRetryDelayDuration(java.time.Duration.ofMillis(200)); - - stubSettingsBuilder - .bulkMutateRowsSettings() - .setBatchingSettings( - // Each batch has 2 mutations, batch has 1 in-flight request, disable auto flush by - // setting the delay to 1 hour. - BatchingSettings.newBuilder() - .setElementCountThreshold((long) batchElementCount) - .setRequestByteThreshold(1000L) - .setDelayThresholdDuration(java.time.Duration.ofHours(1)) - .setFlowControlSettings( - FlowControlSettings.newBuilder() - .setMaxOutstandingElementCount((long) batchElementCount + 1) - .setMaxOutstandingRequestBytes(1001L) - .build()) - .build()); - - stubSettingsBuilder.setTracerFactory(facotry); - - InstantiatingGrpcChannelProvider.Builder channelProvider = - ((InstantiatingGrpcChannelProvider) stubSettingsBuilder.getTransportChannelProvider()) - .toBuilder(); - - @SuppressWarnings("rawtypes") - final ApiFunction oldConfigurator = - channelProvider.getChannelConfigurator(); - - channelProvider.setChannelConfigurator( - (builder) -> { - if (oldConfigurator != null) { - builder = oldConfigurator.apply(builder); - } - return builder.intercept(clientInterceptor); - }); - stubSettingsBuilder.setTransportChannelProvider(channelProvider.build()); - - EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build(); - stub = new EnhancedBigtableStub(stubSettings, ClientContext.create(stubSettings)); - } - - @After - public void tearDown() { - stub.close(); - server.shutdown(); - } - - @Test - public void testReadRowsOperationLatencies() { - Stopwatch stopwatch = Stopwatch.createStarted(); - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE)).iterator()); - long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(STREAMING_KEY, true) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - MetricData metricData = getMetricData(metricReader, OPERATION_LATENCIES_NAME); - - long value = getAggregatedValue(metricData, expectedAttributes); - assertThat(value).isIn(Range.closed(SERVER_LATENCY, elapsed)); - } - - @Test - public void testReadRowsOperationLatenciesOnAuthorizedView() { - String authorizedViewId = "test-authorized-view-id"; - Stopwatch stopwatch = Stopwatch.createStarted(); - Lists.newArrayList( - stub.readRowsCallable().call(Query.create(AuthorizedViewId.of(TABLE, authorizedViewId)))); - long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(STREAMING_KEY, true) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - MetricData metricData = getMetricData(metricReader, OPERATION_LATENCIES_NAME); - long value = getAggregatedValue(metricData, expectedAttributes); - assertThat(value).isIn(Range.closed(SERVER_LATENCY, elapsed)); - } - - @Test - public void testGfeMetrics() { - Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE))); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(METHOD_KEY, "Bigtable.ReadRows") - .build(); - - MetricData serverLatenciesMetricData = getMetricData(metricReader, SERVER_LATENCIES_NAME); - - long serverLatencies = getAggregatedValue(serverLatenciesMetricData, expectedAttributes); - assertThat(serverLatencies).isEqualTo(FAKE_SERVER_TIMING); - - MetricData connectivityErrorCountMetricData = - getMetricData(metricReader, CONNECTIVITY_ERROR_COUNT_NAME); - Attributes expected1 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "UNAVAILABLE") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - Attributes expected2 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - verifyAttributes(connectivityErrorCountMetricData, expected1); - verifyAttributes(connectivityErrorCountMetricData, expected2); - - assertThat(getAggregatedValue(connectivityErrorCountMetricData, expected1)).isEqualTo(1); - assertThat(getAggregatedValue(connectivityErrorCountMetricData, expected2)).isEqualTo(0); - } - - @Test - public void testReadRowsApplicationLatencyWithAutoFlowControl() throws Exception { - final SettableApiFuture future = SettableApiFuture.create(); - final AtomicInteger counter = new AtomicInteger(0); - // For auto flow control, application latency is the time application spent in onResponse. - stub.readRowsCallable() - .call( - Query.create(TABLE), - new ResponseObserver() { - @Override - public void onStart(StreamController streamController) {} - - @Override - public void onResponse(Row row) { - try { - counter.getAndIncrement(); - Thread.sleep(APPLICATION_LATENCY); - } catch (InterruptedException e) { - } - } - - @Override - public void onError(Throwable throwable) { - future.setException(throwable); - } - - @Override - public void onComplete() { - future.set(null); - } - }); - future.get(); - - assertThat(counter.get()).isEqualTo(fakeService.getResponseCounter().get()); - - MetricData applicationLatency = - getMetricData(metricReader, APPLICATION_BLOCKING_LATENCIES_NAME); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(METHOD_KEY, "Bigtable.ReadRows") - .build(); - long value = getAggregatedValue(applicationLatency, expectedAttributes); - - assertThat(value).isAtLeast((APPLICATION_LATENCY - SLEEP_VARIABILITY) * counter.get()); - - MetricData operationLatency = getMetricData(metricReader, OPERATION_LATENCIES_NAME); - long operationLatencyValue = - getAggregatedValue( - operationLatency, - expectedAttributes.toBuilder().put(STATUS_KEY, "OK").put(STREAMING_KEY, true).build()); - assertThat(value).isAtMost(operationLatencyValue - SERVER_LATENCY); - } - - @Test - public void testReadRowsApplicationLatencyWithManualFlowControl() throws Exception { - int counter = 0; - - Iterator rows = stub.readRowsCallable().call(Query.create(TABLE)).iterator(); - - while (rows.hasNext()) { - counter++; - Thread.sleep(APPLICATION_LATENCY); - rows.next(); - } - - MetricData applicationLatency = - getMetricData(metricReader, APPLICATION_BLOCKING_LATENCIES_NAME); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(METHOD_KEY, "Bigtable.ReadRows") - .build(); - - long value = getAggregatedValue(applicationLatency, expectedAttributes); - // For manual flow control, the last application latency shouldn't count, because at that - // point the server already sent back all the responses. - assertThat(counter).isEqualTo(fakeService.getResponseCounter().get()); - assertThat(value).isAtLeast(APPLICATION_LATENCY * (counter - 1) - SERVER_LATENCY); - - MetricData operationLatency = getMetricData(metricReader, OPERATION_LATENCIES_NAME); - long operationLatencyValue = - getAggregatedValue( - operationLatency, - expectedAttributes.toBuilder().put(STATUS_KEY, "OK").put(STREAMING_KEY, true).build()); - assertThat(value).isAtMost(operationLatencyValue - SERVER_LATENCY); - } - - @Test - public void testRetryCount() throws InterruptedException { - stub.mutateRowCallable() - .call(RowMutation.create(TABLE, "random-row").setCell("cf", "q", "value")); - - MetricData metricData = getMetricData(metricReader, RETRY_COUNT_NAME); - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(METHOD_KEY, "Bigtable.MutateRow") - .put(STATUS_KEY, "OK") - .build(); - - long value = getAggregatedValue(metricData, expectedAttributes); - assertThat(value).isEqualTo(fakeService.getAttemptCounter().get() - 1); - } - - @Test - public void testMutateRowAttemptsTagValues() { - stub.mutateRowCallable() - .call(RowMutation.create(TABLE, "random-row").setCell("cf", "q", "value")); - - MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); - - Attributes expected1 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "UNAVAILABLE") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") - .put(METHOD_KEY, "Bigtable.MutateRow") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, false) - .build(); - - Attributes expected2 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.MutateRow") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, false) - .build(); - - verifyAttributes(metricData, expected1); - verifyAttributes(metricData, expected2); - } - - @Test - public void testMutateRowsPartialError() throws InterruptedException { - Batcher batcher = stub.newMutateRowsBatcher(TableId.of(TABLE), null); - int numMutations = 6; - for (int i = 0; i < numMutations; i++) { - String key = i % 2 == 0 ? "key" : "fail-key"; - batcher.add(RowMutationEntry.create(key).setCell("f", "q", "v")); - } - - Assert.assertThrows(BatchingException.class, batcher::close); - - MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); - - Attributes expected = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.MutateRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, false) - .build(); - - verifyAttributes(metricData, expected); - } - - @Test - public void testMutateRowsRpcError() { - Batcher batcher = - stub.newMutateRowsBatcher(TableId.of(BAD_TABLE_ID), null); - int numMutations = 6; - for (int i = 0; i < numMutations; i++) { - String key = i % 2 == 0 ? "key" : "fail-key"; - batcher.add(RowMutationEntry.create(key).setCell("f", "q", "v")); - } - - Assert.assertThrows(BatchingException.class, batcher::close); - - MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); - - Attributes expected = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "NOT_FOUND") - .put(TABLE_ID_KEY, BAD_TABLE_ID) - .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") - .put(METHOD_KEY, "Bigtable.MutateRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, false) - .build(); - - verifyAttributes(metricData, expected); - } - - @Test - public void testReadRowsAttemptsTagValues() { - Lists.newArrayList(stub.readRowsCallable().call(Query.create("fake-table")).iterator()); - - MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); - - Attributes expected1 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "UNAVAILABLE") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, "global") - .put(CLUSTER_ID_KEY, "unspecified") - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, true) - .build(); - - Attributes expected2 = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "OK") - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .put(STREAMING_KEY, true) - .build(); - - verifyAttributes(metricData, expected1); - verifyAttributes(metricData, expected2); - } - - @Test - public void testBatchBlockingLatencies() throws InterruptedException { - try (Batcher batcher = stub.newMutateRowsBatcher(TABLE, null)) { - for (int i = 0; i < 6; i++) { - batcher.add(RowMutationEntry.create("key").setCell("f", "q", "v")); - } - - // closing the batcher to trigger the third flush - batcher.close(); - - int expectedNumRequests = 6 / batchElementCount; - - MetricData applicationLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); - - Attributes expectedAttributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(ZONE_ID_KEY, ZONE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(METHOD_KEY, "Bigtable.MutateRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - long value = getAggregatedValue(applicationLatency, expectedAttributes); - // After the first request is sent, batcher will block on add because of the server latency. - // Blocking latency should be around server latency. So each data point would be at least - // (SERVER_LATENCY - 10). - long expected = (SERVER_LATENCY - 10) * (expectedNumRequests - 1) / expectedNumRequests; - assertThat(value).isAtLeast(expected); - } - } - - @Test - public void testQueuedOnChannelServerStreamLatencies() { - stub.readRowsCallable().all().call(Query.create(TABLE)); - - MetricData clientLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); - - Attributes attributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(ZONE_ID_KEY, ZONE) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - long value = getAggregatedValue(clientLatency, attributes); - assertThat(value).isAtLeast(CHANNEL_BLOCKING_LATENCY); - } - - @Test - public void testQueuedOnChannelUnaryLatencies() { - - stub.mutateRowCallable().call(RowMutation.create(TABLE, "a-key").setCell("f", "q", "v")); - - MetricData clientLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME); - - Attributes attributes = - baseAttributes - .toBuilder() - .put(TABLE_ID_KEY, TABLE) - .put(CLUSTER_ID_KEY, CLUSTER) - .put(ZONE_ID_KEY, ZONE) - .put(METHOD_KEY, "Bigtable.MutateRow") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - long expected = CHANNEL_BLOCKING_LATENCY * 2 / 3; - long actual = getAggregatedValue(clientLatency, attributes); - assertThat(actual).isAtLeast(expected); - } - - @Test - public void testPermanentFailure() { - try { - Lists.newArrayList(stub.readRowsCallable().call(Query.create(BAD_TABLE_ID)).iterator()); - Assert.fail("Request should throw not found error"); - } catch (NotFoundException e) { - } - - MetricData attemptLatency = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME); - - Attributes expected = - baseAttributes - .toBuilder() - .put(STATUS_KEY, "NOT_FOUND") - .put(TABLE_ID_KEY, BAD_TABLE_ID) - .put(CLUSTER_ID_KEY, "unspecified") - .put(ZONE_ID_KEY, "global") - .put(STREAMING_KEY, true) - .put(METHOD_KEY, "Bigtable.ReadRows") - .put(CLIENT_NAME_KEY, CLIENT_NAME) - .build(); - - verifyAttributes(attemptLatency, expected); - - MetricData opLatency = getMetricData(metricReader, OPERATION_LATENCIES_NAME); - verifyAttributes(opLatency, expected); - } - - private static class FakeService extends BigtableGrpc.BigtableImplBase { - - static List createFakeResponse() { - List responses = new ArrayList<>(); - for (int i = 0; i < 4; i++) { - responses.add( - ReadRowsResponse.newBuilder() - .addChunks( - ReadRowsResponse.CellChunk.newBuilder() - .setRowKey(ByteString.copyFromUtf8("fake-key-" + i)) - .setFamilyName(StringValue.of("cf")) - .setQualifier( - BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("q"))) - .setTimestampMicros(1_000) - .setValue( - ByteString.copyFromUtf8( - String.join("", Collections.nCopies(1024 * 1024, "A")))) - .setCommitRow(true)) - .build()); - } - return responses; - } - - private final AtomicInteger attemptCounter = new AtomicInteger(0); - private final AtomicInteger responseCounter = new AtomicInteger(0); - private final Iterator source = createFakeResponse().listIterator(); - - @Override - public void readRows( - ReadRowsRequest request, StreamObserver responseObserver) { - if (request.getTableName().contains(BAD_TABLE_ID)) { - responseObserver.onError(new StatusRuntimeException(Status.NOT_FOUND)); - return; - } - final AtomicBoolean done = new AtomicBoolean(); - final ServerCallStreamObserver target = - (ServerCallStreamObserver) responseObserver; - try { - Thread.sleep(SERVER_LATENCY); - } catch (InterruptedException e) { - } - if (attemptCounter.getAndIncrement() == 0) { - target.onError(new StatusRuntimeException(Status.UNAVAILABLE)); - return; - } - - // Only return the next response when the buffer is emptied for testing manual flow control. - // The fake service won't keep calling onNext unless it received an onRequest event from - // the application thread - target.setOnReadyHandler( - () -> { - while (target.isReady() && source.hasNext()) { - responseCounter.getAndIncrement(); - target.onNext(source.next()); - } - if (!source.hasNext() && done.compareAndSet(false, true)) { - target.onCompleted(); - } - }); - } - - @Override - public void mutateRow( - MutateRowRequest request, StreamObserver responseObserver) { - if (attemptCounter.getAndIncrement() < 2) { - responseObserver.onError(new StatusRuntimeException(Status.UNAVAILABLE)); - return; - } - responseObserver.onNext(MutateRowResponse.getDefaultInstance()); - responseObserver.onCompleted(); - } - - @Override - public void mutateRows( - MutateRowsRequest request, StreamObserver responseObserver) { - if (request.getTableName().contains(BAD_TABLE_ID)) { - responseObserver.onError(new StatusRuntimeException(Status.NOT_FOUND)); - return; - } - try { - Thread.sleep(SERVER_LATENCY); - } catch (InterruptedException e) { - } - MutateRowsResponse.Builder builder = MutateRowsResponse.newBuilder(); - for (int i = 0; i < request.getEntriesCount(); i++) { - if (request - .getEntries(i) - .getRowKey() - .toString(Charset.availableCharsets().get("UTF-8")) - .startsWith("fail")) { - builder - .addEntriesBuilder() - .setIndex(i) - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(com.google.rpc.Code.PERMISSION_DENIED_VALUE) - .build()); - continue; - } - builder.addEntriesBuilder().setIndex(i); - } - responseObserver.onNext(builder.build()); - responseObserver.onCompleted(); - } - - public AtomicInteger getAttemptCounter() { - return attemptCounter; - } - - public AtomicInteger getResponseCounter() { - return responseCounter; - } - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionTest.java deleted file mode 100644 index b34d21da17..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/ErrorCountPerConnectionTest.java +++ /dev/null @@ -1,308 +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 - * - * 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.bigtable.data.v2.stub.metrics; - -import static com.google.common.truth.Truth.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyLong; -import static org.mockito.Mockito.when; - -import com.google.api.gax.core.FixedExecutorProvider; -import com.google.api.gax.grpc.ChannelPoolSettings; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.bigtable.v2.*; -import com.google.cloud.bigtable.Version; -import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; -import com.google.cloud.bigtable.data.v2.models.*; -import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; -import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; -import io.grpc.Server; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; -import io.grpc.stub.StreamObserver; -import io.opentelemetry.api.common.Attributes; -import io.opentelemetry.sdk.OpenTelemetrySdk; -import io.opentelemetry.sdk.metrics.InstrumentSelector; -import io.opentelemetry.sdk.metrics.SdkMeterProvider; -import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder; -import io.opentelemetry.sdk.metrics.View; -import io.opentelemetry.sdk.metrics.data.HistogramPointData; -import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import org.mockito.stubbing.Answer; - -@RunWith(JUnit4.class) -public class ErrorCountPerConnectionTest { - private static final String SUCCESS_TABLE_NAME = "some-table"; - private static final String ERROR_TABLE_NAME = "nonexistent-table"; - private Server server; - private final FakeService fakeService = new FakeService(); - private EnhancedBigtableStubSettings.Builder builder; - private ArgumentCaptor runnableCaptor; - - private InMemoryMetricReader metricReader; - - private Attributes attributes; - - @Before - public void setup() throws Exception { - server = FakeServiceBuilder.create(fakeService).start(); - - ScheduledExecutorService executors = Mockito.mock(ScheduledExecutorService.class); - - attributes = - Attributes.builder() - .put(BuiltinMetricsConstants.BIGTABLE_PROJECT_ID_KEY, "fake-project") - .put(BuiltinMetricsConstants.INSTANCE_ID_KEY, "fake-instance") - .put(BuiltinMetricsConstants.APP_PROFILE_KEY, "") - .put(BuiltinMetricsConstants.CLIENT_NAME_KEY, "bigtable-java/" + Version.VERSION) - .build(); - - metricReader = InMemoryMetricReader.create(); - - SdkMeterProviderBuilder meterProvider = - SdkMeterProvider.builder().registerMetricReader(metricReader); - - for (Map.Entry entry : - BuiltinMetricsConstants.getAllViews().entrySet()) { - meterProvider.registerView(entry.getKey(), entry.getValue()); - } - - OpenTelemetrySdk otel = - OpenTelemetrySdk.builder().setMeterProvider(meterProvider.build()).build(); - - builder = - BigtableDataSettings.newBuilderForEmulator(server.getPort()) - .stubSettings() - .setBackgroundExecutorProvider(FixedExecutorProvider.create(executors)) - .setProjectId("fake-project") - .setInstanceId("fake-instance") - .setMetricsProvider(CustomOpenTelemetryMetricsProvider.create(otel)); - - runnableCaptor = ArgumentCaptor.forClass(Runnable.class); - when(executors.scheduleAtFixedRate(runnableCaptor.capture(), anyLong(), anyLong(), any())) - .then((Answer>) invocation -> Mockito.mock(ScheduledFuture.class)); - } - - @After - public void tearDown() throws Exception { - if (server != null) { - server.shutdown(); - } - } - - @Test - public void readWithOneChannel() throws Exception { - long errorCount = 0; - - try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(builder.build())) { - for (int i = 0; i < 20; i++) { - Query query; - if (i % 3 == 0) { - query = Query.create(ERROR_TABLE_NAME); - errorCount += 1; - } else { - query = Query.create(SUCCESS_TABLE_NAME); - } - try { - stub.readRowsCallable().call(query).iterator().hasNext(); - } catch (Exception e) { - // noop - } - } - } - - runInterceptorTasksAndAssertCount(); - - MetricData metricData = - BuiltinMetricsTestUtils.getMetricData( - metricReader, BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME); - - // Make sure the correct bucket is updated with the correct number of data points - ArrayList histogramPointData = - new ArrayList<>(metricData.getHistogramData().getPoints()); - assertThat(histogramPointData.size()).isEqualTo(1); - HistogramPointData point = histogramPointData.get(0); - int index = findDataPointIndex(point.getBoundaries(), errorCount); - assertThat(point.getCounts().get(index)).isEqualTo(1); - } - - @Test - public void readWithTwoChannels() throws Exception { - EnhancedBigtableStubSettings.Builder builderWithTwoChannels = - builder.setTransportChannelProvider( - ((InstantiatingGrpcChannelProvider) builder.getTransportChannelProvider()) - .toBuilder() - .setChannelPoolSettings(ChannelPoolSettings.staticallySized(2)) - .build()); - long totalErrorCount = 0; - try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(builderWithTwoChannels.build())) { - for (int i = 0; i < 20; i++) { - try { - if (i < 10) { - totalErrorCount += 1; - stub.readRowsCallable().call(Query.create(ERROR_TABLE_NAME)).iterator().hasNext(); - } else { - stub.readRowsCallable().call(Query.create(SUCCESS_TABLE_NAME)).iterator().hasNext(); - } - } catch (Exception e) { - // noop - } - } - } - runInterceptorTasksAndAssertCount(); - - long errorCountPerChannel = totalErrorCount / 2; - - MetricData metricData = - BuiltinMetricsTestUtils.getMetricData( - metricReader, BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME); - - // The 2 channels should get equal amount of errors, so the totalErrorCount / 2 bucket is - // updated twice. - ArrayList histogramPointData = - new ArrayList<>(metricData.getHistogramData().getPoints()); - assertThat(histogramPointData.size()).isEqualTo(1); - HistogramPointData point = histogramPointData.get(0); - int index = findDataPointIndex(point.getBoundaries(), errorCountPerChannel); - assertThat(point.getCounts().get(index)).isEqualTo(2); - } - - @Test - public void readOverTwoPeriods() throws Exception { - long errorCount1 = 0; - long errorCount2 = 0; - try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(builder.build())) { - - for (int i = 0; i < 20; i++) { - Query query; - if (i % 3 == 0) { - query = Query.create(ERROR_TABLE_NAME); - errorCount1 += 1; - } else { - query = Query.create(SUCCESS_TABLE_NAME); - } - try { - stub.readRowsCallable().call(query).iterator().hasNext(); - } catch (Exception e) { - // noop - } - } - - runInterceptorTasksAndAssertCount(); - - for (int i = 0; i < 20; i++) { - Query query; - if (i % 3 == 0) { - query = Query.create(SUCCESS_TABLE_NAME); - } else { - query = Query.create(ERROR_TABLE_NAME); - errorCount2 += 1; - } - try { - stub.readRowsCallable().call(query).iterator().hasNext(); - } catch (Exception e) { - // noop - } - } - } - - runInterceptorTasksAndAssertCount(); - - MetricData metricData = - BuiltinMetricsTestUtils.getMetricData( - metricReader, BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME); - - ArrayList histogramPointData = - new ArrayList<>(metricData.getHistogramData().getPoints()); - assertThat(histogramPointData.size()).isEqualTo(1); - HistogramPointData point = histogramPointData.get(0); - int index1 = findDataPointIndex(point.getBoundaries(), errorCount1); - int index2 = findDataPointIndex(point.getBoundaries(), errorCount2); - assertThat(point.getCounts().get(index1)).isEqualTo(1); - assertThat(point.getCounts().get(index2)).isEqualTo(1); - } - - @Test - public void noFailedRequests() throws Exception { - try (EnhancedBigtableStub stub = EnhancedBigtableStub.create(builder.build())) { - for (int i = 0; i < 20; i++) { - try { - stub.readRowsCallable().call(Query.create(SUCCESS_TABLE_NAME)).iterator().hasNext(); - } catch (Exception e) { - // noop - } - } - } - - runInterceptorTasksAndAssertCount(); - MetricData metricData = - BuiltinMetricsTestUtils.getMetricData( - metricReader, BuiltinMetricsConstants.PER_CONNECTION_ERROR_COUNT_NAME); - long value = BuiltinMetricsTestUtils.getAggregatedValue(metricData, attributes); - assertThat(value).isEqualTo(0); - } - - private void runInterceptorTasksAndAssertCount() { - int actualNumOfTasks = 0; - for (Runnable runnable : runnableCaptor.getAllValues()) { - if (runnable instanceof ErrorCountPerConnectionMetricTracker) { - runnable.run(); - actualNumOfTasks++; - } - } - assertThat(actualNumOfTasks).isEqualTo(1); - } - - private int findDataPointIndex(List boundaries, long dataPoint) { - int index = 0; - for (; index < boundaries.size(); index++) { - if (boundaries.get(index) >= dataPoint) { - break; - } - } - return index; - } - - static class FakeService extends BigtableGrpc.BigtableImplBase { - @Override - public void readRows( - ReadRowsRequest request, StreamObserver responseObserver) { - if (request.getTableName().contains(SUCCESS_TABLE_NAME)) { - responseObserver.onNext(ReadRowsResponse.getDefaultInstance()); - responseObserver.onCompleted(); - } else { - // Send a non-retriable error, since otherwise the client tries to use the mocked - // ScheduledExecutorService object for retyring, resulting in a hang. - StatusRuntimeException exception = new StatusRuntimeException(Status.INTERNAL); - responseObserver.onError(exception); - } - } - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsHeadersCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsHeadersCallableTest.java index 99b0ab5b5e..a990424aee 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsHeadersCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/StatsHeadersCallableTest.java @@ -68,14 +68,14 @@ public class StatsHeadersCallableTest { private Server server; - private FakeService fakeService = new FakeService(); + private final FakeService fakeService = new FakeService(); private EnhancedBigtableStub stub; private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; private static final String APP_PROFILE_ID = "default"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); private final int attemptCounts = 3; private MetadataInterceptor metadataInterceptor; @@ -97,8 +97,12 @@ public void setUp() throws Exception { @After public void tearDown() { - stub.close(); - server.shutdown(); + if (stub != null) { + stub.close(); + } + if (server != null) { + server.shutdown(); + } } @Test @@ -133,19 +137,18 @@ public void testMutateRowHeaders() throws Exception { verifyHeaders(attemptCounts, startTimestamp); } + @Deprecated @Test public void testSampleRowKeysHeaders() throws Exception { long startTimestamp = System.currentTimeMillis() * 1000; - stub.sampleRowKeysCallable().call(TABLE_ID).get(0); + stub.sampleRowKeysCallable().call(TABLE_ID.getTableId()).get(0); verifyHeaders(attemptCounts, startTimestamp); } @Test public void testSampleRowKeysWithRequestHeaders() throws Exception { long startTimestamp = System.currentTimeMillis() * 1000; - stub.sampleRowKeysCallableWithRequest() - .call(SampleRowKeysRequest.create(TableId.of(TABLE_ID))) - .get(0); + stub.sampleRowKeysCallableWithRequest().call(SampleRowKeysRequest.create(TABLE_ID)).get(0); verifyHeaders(attemptCounts, startTimestamp); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallableTest.java index 6dd1ff9bd0..60ec5193e4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallableTest.java @@ -41,6 +41,7 @@ import com.google.common.collect.Lists; import com.google.protobuf.ByteString; import com.google.rpc.Status; +import java.time.Duration; import java.util.List; import java.util.Set; import java.util.concurrent.Callable; @@ -49,7 +50,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.Mockito; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class MutateRowsAttemptCallableTest { @@ -140,7 +140,7 @@ public void missingEntry() throws Exception { @Test public void testNoRpcTimeout() { parentFuture.timedAttemptSettings = - parentFuture.timedAttemptSettings.toBuilder().setRpcTimeout(Duration.ZERO).build(); + parentFuture.timedAttemptSettings.toBuilder().setRpcTimeoutDuration(Duration.ZERO).build(); MutateRowsRequest request = MutateRowsRequest.newBuilder().addEntries(Entry.getDefaultInstance()).build(); @@ -405,12 +405,13 @@ static class MockRetryingFuture extends AbstractApiFuture requestBuilder = underTest.newRequestBuilder(bulkMutation); requestBuilder.add( @@ -76,7 +79,7 @@ public void requestBuilderTest() { BulkMutation actualBulkMutation = requestBuilder.build(); assertThat(actualBulkMutation.toProto(requestContext)) .isEqualTo( - BulkMutation.create("fake-table") + BulkMutation.create(TABLE_ID) .add(ROW_KEY, Mutation.create().setCell(FAMILY, QUALIFIER, timestamp, VALUE)) .add("rowKey-2", Mutation.create().setCell("family-2", "q", 20_000L, "some-value")) .toProto(requestContext)); @@ -119,14 +122,11 @@ public void splitResponsePartialErrorsTest() { MutateRowsBatchingDescriptor underTest = new MutateRowsBatchingDescriptor(); underTest.splitResponse( MutateRowsAttemptResult.create( - Arrays.asList( + Collections.singletonList( FailedMutation.create( 0, ApiExceptionFactory.createException( - "error message", - null, - GrpcStatusCode.of(io.grpc.Status.Code.INTERNAL), - false))), + "error message", null, GrpcStatusCode.of(Code.INTERNAL), false))), true), batchResponse); assertThat(batchResponse.get(0).getResultFuture().isDone()).isTrue(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsErrorConverterUnaryCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsErrorConverterUnaryCallableTest.java index 170aa66188..7f2de3e728 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsErrorConverterUnaryCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsErrorConverterUnaryCallableTest.java @@ -24,8 +24,10 @@ import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.MutateRowsException; import com.google.cloud.bigtable.data.v2.models.MutateRowsException.FailedMutation; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.stub.MutateRowsErrorConverterUnaryCallable; -import java.util.Arrays; +import io.grpc.Status.Code; +import java.util.Collections; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -41,6 +43,8 @@ @RunWith(JUnit4.class) public class MutateRowsErrorConverterUnaryCallableTest { + private static final TableId TABLE_ID = TableId.of("fake-table"); + @Mock private UnaryCallable innerCallable; @Captor private ArgumentCaptor innerMutation; private SettableApiFuture innerResult; @@ -63,7 +67,7 @@ public void testSuccess() { Throwable unexpectedError = null; try { - callable.call(BulkMutation.create("fake-table")); + callable.call(BulkMutation.create(TABLE_ID)); } catch (Throwable t) { unexpectedError = t; } @@ -77,19 +81,19 @@ public void testPartialFailure() { innerResult.set( MutateRowsAttemptResult.create( - Arrays.asList( + Collections.singletonList( FailedMutation.create( 0, ApiExceptionFactory.createException( - null, GrpcStatusCode.of(io.grpc.Status.Code.INTERNAL), false))), + null, GrpcStatusCode.of(Code.INTERNAL), false))), true)); MutateRowsException exception = Assert.assertThrows( - MutateRowsException.class, () -> callable.call(BulkMutation.create("fake-table"))); + MutateRowsException.class, () -> callable.call(BulkMutation.create(TABLE_ID))); assertThat(exception).isInstanceOf(MutateRowsException.class); - assertThat((exception).isRetryable()).isTrue(); + assertThat(exception.isRetryable()).isTrue(); } @Test @@ -100,8 +104,7 @@ public void testRPCFailure() { innerResult.setException(new Exception("RPC error")); Exception exception = - Assert.assertThrows( - Exception.class, () -> callable.call(BulkMutation.create("fake-table"))); + Assert.assertThrows(Exception.class, () -> callable.call(BulkMutation.create(TABLE_ID))); assertThat(exception).isInstanceOf(Exception.class); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java index 86a94d34ea..ce2f7a6c7c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java @@ -28,6 +28,8 @@ import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.common.collect.Queues; import io.grpc.Status; import io.grpc.StatusRuntimeException; @@ -51,7 +53,7 @@ public class MutateRowsRetryTest { private FakeBigtableService service; private BigtableDataClient client; - private AtomicInteger attemptCounter = new AtomicInteger(); + private final AtomicInteger attemptCounter = new AtomicInteger(); @Before public void setUp() throws IOException { @@ -62,15 +64,15 @@ public void setUp() throws IOException { BigtableDataSettings.newBuilder() .setProjectId("fake-project") .setInstanceId("fake-instance") - .setCredentialsProvider(NoCredentialsProvider.create()); + .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics(); settings .stubSettings() .setTransportChannelProvider( FixedTransportChannelProvider.create( GrpcTransportChannel.create(serverRule.getChannel()))) - // channel priming doesn't work with FixedTransportChannelProvider. Disable it for the test - .setRefreshingChannel(false) .build(); this.client = BigtableDataClient.create(settings.build()); @@ -90,13 +92,13 @@ public void testRetryRstStream() { try { client.bulkMutateRows( - BulkMutation.create("fake-table") + BulkMutation.create(TableId.of("fake-table")) .add(RowMutationEntry.create("row-key-1").setCell("cf", "q", "v"))); } catch (ApiException e) { - Assert.fail("Rst stream errors should be retried"); + throw new AssertionError("Rst stream errors should be retried", e); } - Assert.assertEquals(attemptCounter.get(), 2); + Assert.assertEquals(2, attemptCounter.get()); } private class FakeBigtableService extends BigtableGrpc.BigtableImplBase { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsBatchingDescriptorTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsBatchingDescriptorTest.java index 4bcf17674c..32571283a2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsBatchingDescriptorTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsBatchingDescriptorTest.java @@ -25,6 +25,7 @@ import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowCell; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import java.util.List; @@ -47,7 +48,7 @@ public class ReadRowsBatchingDescriptorTest { private static final Row ROW_KEY_2_RESPONSE = Row.create(ByteString.copyFromUtf8("row-key-2"), ImmutableList.of(ROW_CELL)); - private ReadRowsBatchingDescriptor underTest = new ReadRowsBatchingDescriptor(); + private final ReadRowsBatchingDescriptor underTest = new ReadRowsBatchingDescriptor(); @Test public void splitResponseTest() throws Exception { @@ -108,7 +109,7 @@ public void countBytesTest() { @Test public void requestBuilderTest() { BatchingRequestBuilder requestBuilder = - underTest.newRequestBuilder(Query.create("table-Id")); + underTest.newRequestBuilder(Query.create(TableId.of("table-Id"))); requestBuilder.add(ByteString.copyFromUtf8("row-key-1")); requestBuilder.add(ByteString.copyFromUtf8("row-key-2")); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java deleted file mode 100644 index 07cf3478c1..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2018 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.bigtable.data.v2.stub.readrows; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.verify; - -import com.google.api.gax.grpc.GrpcCallContext; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ResponseObserver; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; -import com.google.cloud.bigtable.data.v2.models.Query; -import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.common.truth.Truth; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.mockito.quality.Strictness; - -@RunWith(JUnit4.class) -public class ReadRowsFirstCallableTest { - @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN); - - private static final RequestContext REQUEST_CONTEXT = - RequestContext.create("fake-project", "fake-instance", "fake-profile"); - - private ServerStreamingCallable innerCallable; - private ArgumentCaptor innerQuery; - - @SuppressWarnings("unchecked") - @Before - public void setUp() { - innerCallable = Mockito.mock(ServerStreamingCallable.class); - innerQuery = ArgumentCaptor.forClass(Query.class); - } - - @Test - public void testLimitAdded() { - ReadRowsFirstCallable callable = new ReadRowsFirstCallable<>(innerCallable); - callable.futureCall(Query.create("fake-table"), GrpcCallContext.createDefault()); - verify(innerCallable) - .call(innerQuery.capture(), any(ResponseObserver.class), any(ApiCallContext.class)); - Truth.assertThat(innerQuery.getValue().toProto(REQUEST_CONTEXT)) - .isEqualTo(Query.create("fake-table").limit(1).toProto(REQUEST_CONTEXT)); - } - - @Test - public void testLimitChanged() { - ReadRowsFirstCallable callable = new ReadRowsFirstCallable<>(innerCallable); - callable.futureCall(Query.create("fake-table").limit(10), GrpcCallContext.createDefault()); - verify(innerCallable) - .call(innerQuery.capture(), any(ResponseObserver.class), any(ApiCallContext.class)); - Truth.assertThat(innerQuery.getValue().toProto(REQUEST_CONTEXT)) - .isEqualTo(Query.create("fake-table").limit(1).toProto(REQUEST_CONTEXT)); - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsMergingAcceptanceTest.java index e478eb911d..fa3a2030c0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsMergingAcceptanceTest.java @@ -35,6 +35,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -70,7 +71,7 @@ public static Collection data() throws IOException { .that(dataJson) .isNotNull(); - InputStreamReader reader = new InputStreamReader(dataJson); + InputStreamReader reader = new InputStreamReader(dataJson, StandardCharsets.UTF_8); TestFile.Builder testBuilder = TestFile.newBuilder(); JsonFormat.parser().merge(reader, testBuilder); TestFile testDefinition = testBuilder.build(); @@ -142,20 +143,20 @@ public void test() throws Exception { private static boolean expectsError(ReadRowsTest rrt) { List results = rrt.getResultsList(); - return results != null && !results.isEmpty() && results.get(results.size() - 1).getError(); + return !results.isEmpty() && results.get(results.size() - 1).getError(); } private static List getNonExceptionResults(ReadRowsTest rrt) { List results = rrt.getResultsList(); List response = new ArrayList<>(); - if (results != null) { - for (ReadRowsTest.Result result : results) { - if (!result.getError()) { - response.add(result); - } + + for (ReadRowsTest.Result result : results) { + if (!result.getError()) { + response.add(result); } } + return response; } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java index 8a8c6d7709..599d7cae5e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java @@ -15,13 +15,17 @@ */ package com.google.cloud.bigtable.data.v2.stub.readrows; +import static com.google.common.truth.Truth.assertThat; + import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ErrorDetails; import com.google.api.gax.rpc.FixedTransportChannelProvider; import com.google.api.gax.rpc.InternalException; import com.google.api.gax.rpc.ServerStream; +import com.google.api.gax.rpc.UnavailableException; import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; @@ -33,21 +37,31 @@ import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Range; import com.google.common.truth.Truth; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.BytesValue; import com.google.protobuf.StringValue; +import com.google.rpc.ErrorInfo; +import io.grpc.Metadata; import io.grpc.Status; import io.grpc.Status.Code; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; import io.grpc.testing.GrpcServerRule; import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Base64; import java.util.List; import java.util.Queue; import java.util.concurrent.LinkedBlockingDeque; +import java.util.stream.Collectors; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -59,7 +73,9 @@ public class ReadRowsRetryTest { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "fake-table"; + private static final TableId TABLE_ID = TableId.of("fake-table"); + private static final Metadata.Key ERROR_DETAILS_KEY = + Metadata.Key.of("grpc-status-details-bin", Metadata.BINARY_BYTE_MARSHALLER); @Rule public GrpcServerRule serverRule = new GrpcServerRule(); private TestBigtableService service; @@ -74,15 +90,15 @@ public void setUp() throws IOException { BigtableDataSettings.newBuilder() .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) - .setCredentialsProvider(NoCredentialsProvider.create()); + .setCredentialsProvider(NoCredentialsProvider.create()) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics(); settings .stubSettings() .setTransportChannelProvider( FixedTransportChannelProvider.create( GrpcTransportChannel.create(serverRule.getChannel()))) - // Refreshing channel doesn't work with FixedTransportChannelProvider - .setRefreshingChannel(false) .build(); client = BigtableDataClient.create(settings.build()); @@ -104,7 +120,7 @@ public void happyPathTest() { .respondWith("k1", "r1", "r2")); List actualResults = getResults(Query.create(TABLE_ID).rowKey("k1").range("r1", "r3")); - Truth.assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); } @Test @@ -121,7 +137,330 @@ public void immediateRetryTest() { .respondWith("k1", "r1", "r2")); List actualResults = getResults(Query.create(TABLE_ID).rowKey("k1").range("r1", "r3")); - Truth.assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); + } + + public ApiException createLargeRowException(String rowKey) { + ErrorInfo errorInfo = + ErrorInfo.newBuilder() + .setReason("LargeRowReadError") + .setDomain("bigtable.googleapis.com") + .putMetadata( + "rowKeyBase64Encoded", + Base64.getEncoder().encodeToString(rowKey.getBytes(StandardCharsets.UTF_8))) + .build(); + + Any packedErrorInfo = Any.pack(errorInfo); + + ErrorDetails errorDetails = + ErrorDetails.builder().setRawErrorMessages(ImmutableList.of(packedErrorInfo)).build(); + + Metadata trailers = new Metadata(); + byte[] status = + com.google.rpc.Status.newBuilder().addDetails(Any.pack(errorInfo)).build().toByteArray(); + trailers.put(ERROR_DETAILS_KEY, status); + return new UnavailableException( + new StatusRuntimeException(Status.FAILED_PRECONDITION, trailers), + GrpcStatusCode.of(Code.FAILED_PRECONDITION), + false, + errorDetails); + } + + @Test + public void readRowsWithLimitSkippingLargeRowsTest() { + // Large rows is r2 for range r1 to r8 + ApiException largeRowExceptionWithTrailersR2 = createLargeRowException("r2"); + + List actualResults; + + // TEST - range end is large row || row limit + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r1", "r3")) + .expectRowLimit(2) + .respondWith("r1") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR2)); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r1", "r3").limit(2)); + assertThat(actualResults).containsExactly("r1").inOrder(); + + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r4", "r7")) + .expectRowLimit(2) + .respondWith("r4", "r5")); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r4", "r7").limit(2)); + assertThat(actualResults).containsExactly("r4", "r5").inOrder(); + } + + @Test + public void readRowsForRowKeyWithLargeRowsTest() { + // Large rows is r2 for range r1 to r8 + ApiException largeRowExceptionWithTrailersR7 = createLargeRowException("r7"); + List actualResults; + + service.expectations.add( + RpcExpectation.create() + .expectRequest("r1", "r7", "r4", "r8") + .respondWith("r1", "r4") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR7)); + service.expectations.add(RpcExpectation.create().expectRequest("r8").respondWith("r8")); + + actualResults = + getSkipLargeRowsResults( + Query.create(TABLE_ID).rowKey("r1").rowKey("r7").rowKey("r4").rowKey("r8")); + assertThat(actualResults).containsExactly("r1", "r4", "r8").inOrder(); + } + + /** + * This tests if in a read rows request RowRange includes large rows, those rows are omitted in + * the response. + */ + @Test + public void readRowRangeWithSkippingLargeRows() { + + // Large rows are r2, r3,r7 from r1 to r8 + ApiException largeRowExceptionWithTrailersR2 = createLargeRowException("r2"); + ApiException largeRowExceptionWithTrailersR3 = createLargeRowException("r3"); + ApiException largeRowExceptionWithTrailersR7 = createLargeRowException("r7"); + + List> rangeList; + List actualResults; + + // TEST - only query for large rows - should receive an empty response + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r2", "r4")) + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR2)); + + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.open("r2", "r4")) + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR3)); + + rangeList = new ArrayList<>(); + rangeList.add(Range.open("r2", "r3")); + rangeList.add(Range.open("r3", "r4")); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges(rangeList) + .respondWithStatus(Code.OK)); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r2", "r4")); + assertThat(actualResults.size()).isEqualTo(0); + + // TEST - range start is large row + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r3", "r5")) + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR3)); + + service.expectations.add( + RpcExpectation.create().expectRequest(Range.open("r3", "r5")).respondWith("r4")); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r3", "r5")); + assertThat(actualResults).containsExactly("r4").inOrder(); + + // TEST - range end is large row + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r1", "r3")) + .respondWith("r1") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR2)); + + rangeList = new ArrayList<>(); + rangeList.add(Range.open("r1", "r2")); + rangeList.add(Range.open("r2", "r3")); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges(rangeList) + .respondWithStatus(Code.OK)); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r1", "r3")); + assertThat(actualResults).containsExactly("r1").inOrder(); + + // r2 faulty + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r1", "r9")) + .respondWith("r1") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR2)); + + // r3 faulty + rangeList = new ArrayList<>(); + rangeList.add(Range.open("r1", "r2")); + rangeList.add(Range.open("r2", "r9")); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges(rangeList) + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR3)); + + rangeList = new ArrayList<>(); + rangeList.add(Range.open("r1", "r2")); + rangeList.add(Range.open("r2", "r3")); + rangeList.add(Range.open("r3", "r9")); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges(rangeList) + .respondWith("r4", "r5") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR7)); + + rangeList = new ArrayList<>(); + rangeList.add(Range.open("r5", "r7")); + rangeList.add(Range.open("r7", "r9")); + + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges(rangeList) + .respondWith("r6", "r8")); + + actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).range("r1", "r9")); + assertThat(actualResults).containsExactly("r1", "r4", "r5", "r6", "r8").inOrder(); + + // TEST - reverse query with large rows + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.closedOpen("r3", "r7")) + .setReversed(true) + .respondWith("r6", "r5", "r4") + .respondWithException(Code.INTERNAL, largeRowExceptionWithTrailersR3)); + + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.open("r3", "r4")) + .setReversed(true) + .respondWithStatus(Code.OK)); + + actualResults = + getSkipLargeRowsResults(Query.create(TABLE_ID).range("r3", "r7").reversed(true)); + assertThat(actualResults).containsExactly("r6", "r5", "r4").inOrder(); + } + + @Test + public void readRowRangeWithUnboundedRanges() { + ApiException largeRowException = createLargeRowException("r3"); + + // Test case 1: Full table scan (unbounded start and end) + service.expectations.add( + RpcExpectation.create() + .respondWith("r1", "r2") + .respondWithException(Code.INTERNAL, largeRowException)); + + // After the large row error, the query should be split into two ranges + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.open("r2", "r3"), Range.greaterThan("r3"))) + .respondWith("r4") + .respondWithStatus(Code.OK)); + + List actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID)); + assertThat(actualResults).containsExactly("r1", "r2", "r4").inOrder(); + + // Test case 2: Unbounded end + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.atLeast("r2")) + .respondWith("r2") + .respondWithException(Code.INTERNAL, largeRowException)); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.open("r2", "r3"), Range.greaterThan("r3"))) + .respondWith("r4") + .respondWithStatus(Code.OK)); + + actualResults = + getSkipLargeRowsResults( + Query.create(TABLE_ID).range(ByteStringRange.unbounded().startClosed("r2"))); + assertThat(actualResults).containsExactly("r2", "r4").inOrder(); + + // Test case 3: Unbounded start + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.atMost("r4")) + .respondWith("r1", "r2") + .respondWithException(Code.INTERNAL, largeRowException)); + + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.open("r2", "r3"), Range.openClosed("r3", "r4"))) + .respondWith("r4") + .respondWithStatus(Code.OK)); + + actualResults = + getSkipLargeRowsResults( + Query.create(TABLE_ID).range(ByteStringRange.unbounded().endClosed("r4"))); + assertThat(actualResults).containsExactly("r1", "r2", "r4").inOrder(); + } + + @Test + public void readRowRangeWithUnboundedRangesReversed() { + ApiException largeRowException = createLargeRowException("r3"); + + // Test case 1: Full table scan (unbounded start and end) reversed + service.expectations.add( + RpcExpectation.create() + .setReversed(true) + .respondWith("r5", "r4") + .respondWithException(Code.INTERNAL, largeRowException)); + + // After the large row error, the query should be split into two ranges and retried + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.lessThan("r3"), Range.open("r3", "r4"))) + .setReversed(true) + .respondWith("r2", "r1") + .respondWithStatus(Code.OK)); + + List actualResults = getSkipLargeRowsResults(Query.create(TABLE_ID).reversed(true)); + assertThat(actualResults).containsExactly("r5", "r4", "r2", "r1").inOrder(); + + // Test case 2: Unbounded start reversed + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.atLeast("r2")) + .setReversed(true) + .respondWith("r5", "r4") + .respondWithException(Code.INTERNAL, largeRowException)); + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.closedOpen("r2", "r3"), Range.open("r3", "r4"))) + .setReversed(true) + .respondWith("r2") + .respondWithStatus(Code.OK)); + actualResults = + getSkipLargeRowsResults( + Query.create(TABLE_ID) + .range(ByteStringRange.unbounded().startClosed("r2")) + .reversed(true)); + assertThat(actualResults).containsExactly("r5", "r4", "r2").inOrder(); + + // Test case 3: Unbounded end reversed + service.expectations.add( + RpcExpectation.create() + .expectRequest(Range.atMost("r4")) + .setReversed(true) + .respondWith("r4") + .respondWithException(Code.INTERNAL, largeRowException)); + + service.expectations.add( + RpcExpectation.create() + .expectRequestForMultipleRowRanges( + ImmutableList.of(Range.lessThan("r3"), Range.open("r3", "r4"))) + .setReversed(true) + .respondWith("r2", "r1") + .respondWithStatus(Code.OK)); + actualResults = + getSkipLargeRowsResults( + Query.create(TABLE_ID) + .range(ByteStringRange.unbounded().endClosed("r4")) + .reversed(true)); + assertThat(actualResults).containsExactly("r4", "r2", "r1").inOrder(); } @Test @@ -144,7 +483,7 @@ public void multipleRetryTest() { RpcExpectation.create().expectRequest(Range.open("r7", "r9")).respondWith("r8")); List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r9")); - Truth.assertThat(actualResults) + assertThat(actualResults) .containsExactly("r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8") .inOrder(); } @@ -164,7 +503,7 @@ public void rowLimitTest() { .respondWith("r2")); List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").limit(2)); - Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @Test @@ -180,7 +519,7 @@ public void errorAfterRowLimitMetTest() { List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").limit(2)); - Truth.assertThat(actualResults).containsExactly("r1", "r2"); + assertThat(actualResults).containsExactly("r1", "r2"); } @Test @@ -196,7 +535,7 @@ public void errorAfterRequestCompleteTest() { List actualResults = getResults(Query.create(TABLE_ID).range("r1", "r3").rowKey("r4")); - Truth.assertThat(actualResults).containsExactly("r2", "r4"); + assertThat(actualResults).containsExactly("r2", "r4"); } @Test @@ -209,7 +548,7 @@ public void pointTest() { service.expectations.add(RpcExpectation.create().expectRequest("r2").respondWith("r2")); List actualResults = getResults(Query.create(TABLE_ID).rowKey("r1").rowKey("r2")); - Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @Test @@ -219,7 +558,7 @@ public void fullTableScanTest() { service.expectations.add( RpcExpectation.create().expectRequest(Range.greaterThan("r1")).respondWith("r2")); List actualResults = getResults(Query.create(TABLE_ID)); - Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @Test @@ -234,7 +573,7 @@ public void retryUnboundedStartTest() { List actualResults = getResults(Query.create(TABLE_ID).range(ByteStringRange.unbounded().endOpen("r9"))); - Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @Test @@ -249,7 +588,7 @@ public void retryUnboundedEndTest() { List actualResults = getResults(Query.create(TABLE_ID).range(ByteStringRange.unbounded().startClosed("r1"))); - Truth.assertThat(actualResults).containsExactly("r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("r1", "r2").inOrder(); } @Test @@ -263,7 +602,7 @@ public void retryWithLastScannedKeyTest() { RpcExpectation.create().expectRequest(Range.open("r5", "r9")).respondWith("r7")); List actualResults = getResults(Query.create(TABLE_ID).range(ByteStringRange.create("r1", "r9"))); - Truth.assertThat(actualResults).containsExactly("r7").inOrder(); + assertThat(actualResults).containsExactly("r7").inOrder(); } @Test @@ -287,7 +626,7 @@ public void retryRstStreamExceptionTest() { .respondWith("k1", "r1", "r2")); List actualResults = getResults(Query.create(TABLE_ID).rowKey("k1").range("r1", "r3")); - Truth.assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); + assertThat(actualResults).containsExactly("k1", "r1", "r2").inOrder(); } private List getResults(Query query) { @@ -299,6 +638,12 @@ private List getResults(Query query) { return actualValues; } + private List getSkipLargeRowsResults(Query query) { + return client.skipLargeRowsCallable().all().call(query).stream() + .map(row -> row.getKey().toStringUtf8()) + .collect(Collectors.toList()); + } + private static class TestBigtableService extends BigtableGrpc.BigtableImplBase { Queue expectations = new LinkedBlockingDeque<>(); int i = -1; @@ -308,6 +653,7 @@ public void readRows( ReadRowsRequest request, StreamObserver responseObserver) { RpcExpectation expectedRpc = expectations.poll(); + assertThat(expectedRpc).isNotNull(); i++; Truth.assertWithMessage("Unexpected request#" + i + ":" + request.toString()) @@ -336,6 +682,11 @@ private static class RpcExpectation { ApiException exception; List responses; + private RpcExpectation setReversed(boolean reverse) { + this.requestBuilder.setReversed(reverse); + return this; + } + private RpcExpectation() { this.requestBuilder = ReadRowsRequest.newBuilder() @@ -355,6 +706,52 @@ RpcExpectation expectRequest(String... keys) { return this; } + RpcExpectation expectRequestForMultipleRowRanges(List> rowRanges) { + for (Range range : rowRanges) { + rowRangeBuilder(range); + } + return this; + } + + /** Build Row Range */ + RowRange rowRangeBuilder(Range range) { + + RowRange.Builder rowRange = requestBuilder.getRowsBuilder().addRowRangesBuilder(); + + if (range.hasLowerBound()) { + switch (range.lowerBoundType()) { + case CLOSED: + rowRange.setStartKeyClosed(ByteString.copyFromUtf8(range.lowerEndpoint())); + break; + case OPEN: + rowRange.setStartKeyOpen(ByteString.copyFromUtf8(range.lowerEndpoint())); + break; + default: + throw new IllegalArgumentException( + "Unexpected lowerBoundType: " + range.lowerBoundType()); + } + } else { + rowRange.clearStartKey(); + } + + if (range.hasUpperBound()) { + switch (range.upperBoundType()) { + case CLOSED: + rowRange.setEndKeyClosed(ByteString.copyFromUtf8(range.upperEndpoint())); + break; + case OPEN: + rowRange.setEndKeyOpen(ByteString.copyFromUtf8(range.upperEndpoint())); + break; + default: + throw new IllegalArgumentException( + "Unexpected upperBoundType: " + range.upperBoundType()); + } + } else { + rowRange.clearEndKey(); + } + return rowRange.build(); + } + RpcExpectation expectRequest(Range range) { RowRange.Builder rowRange = requestBuilder.getRowsBuilder().addRowRangesBuilder(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java index b518a55415..3e1a652050 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsUserCallableTest.java @@ -19,6 +19,7 @@ import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; import com.google.common.truth.Truth; import org.junit.Test; @@ -35,7 +36,7 @@ public void testRequestConverted() { ServerStreamingStashCallable innerCallable = new ServerStreamingStashCallable<>(); ReadRowsUserCallable callable = new ReadRowsUserCallable<>(innerCallable, REQUEST_CONTEXT); - Query query = Query.create("fake-table"); + Query query = Query.create(TableId.of("fake-table")); callable.call(query); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachineTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachineTest.java index c98506eb41..4fe2762146 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachineTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachineTest.java @@ -59,8 +59,7 @@ public void testErrorHandlingStats() { stateMachine.consumeRow(); stateMachine.handleChunk( - chunk - .toBuilder() + chunk.toBuilder() .setRowKey(ByteString.copyFromUtf8("my-key3")) .setValueSize(123) // invalid value size .build()); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContextTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContextTest.java new file mode 100644 index 0000000000..14cfd25f66 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallContextTest.java @@ -0,0 +1,186 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.api.core.ApiFutures; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.DeadlineExceededException; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatementRefreshTimeoutException; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.FakePreparedStatement; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.ByteString; +import io.grpc.Deadline; +import io.grpc.Status.Code; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ExecuteQueryCallContextTest { + private static final ByteString PREPARED_QUERY = ByteString.copyFromUtf8("test"); + private static final com.google.bigtable.v2.ResultSetMetadata METADATA = + metadata(columnMetadata("foo", stringType()), columnMetadata("bar", bytesType())); + private static final Map> PARAM_TYPES = + ImmutableMap.of("foo", SqlType.string()); + private static final PreparedStatement PREPARED_STATEMENT = + preparedStatement( + PrepareResponse.fromProto(prepareResponse(PREPARED_QUERY, METADATA)), PARAM_TYPES); + + @Test + public void testToRequest() { + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext( + PREPARED_STATEMENT.bind().setStringParam("foo", "val").build(), + SettableApiFuture.create()); + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + ExecuteQueryRequest request = + callContext.buildRequestWithDeadline(requestContext, Deadline.after(1, TimeUnit.MINUTES)); + + assertThat(request.getPreparedQuery()).isEqualTo(PREPARED_QUERY); + assertThat(request.getAppProfileId()).isEqualTo("profile"); + assertThat(request.getInstanceName()) + .isEqualTo(NameUtil.formatInstanceName("project", "instance")); + assertThat(request.getParamsMap().get("foo").getStringValue()).isEqualTo("val"); + assertThat(request.getParamsMap().get("foo").getType()).isEqualTo(stringType()); + } + + @Test + public void testFirstResponseReceived() throws ExecutionException, InterruptedException { + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext( + PREPARED_STATEMENT.bind().setStringParam("foo", "val").build(), mdFuture); + + callContext.finalizeMetadata(); + assertThat(mdFuture.isDone()).isTrue(); + assertThat(mdFuture.get()).isEqualTo(ProtoResultSetMetadata.fromProto(METADATA)); + } + + @Test + public void testSetMetadataException() { + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext( + PREPARED_STATEMENT.bind().setStringParam("foo", "val").build(), mdFuture); + + callContext.setMetadataException(new RuntimeException("test")); + assertThat(mdFuture.isDone()).isTrue(); + ExecutionException e = assertThrows(ExecutionException.class, mdFuture::get); + assertThat(e.getCause()).isInstanceOf(RuntimeException.class); + } + + @Test + public void testBuildRequestAttemptDeadline() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + SettableApiFuture mdFuture = SettableApiFuture.create(); + PreparedQueryData initialPlan = PreparedQueryData.create(SettableApiFuture.create()); + ExecuteQueryCallContext callContext = + ExecuteQueryCallContext.create( + new FakePreparedStatement() + // Reuse the same plan since we wont call refresh + .withUpdatedPlans(initialPlan, initialPlan) + .bind() + .build(), + mdFuture); + + assertThrows( + PreparedStatementRefreshTimeoutException.class, + () -> + callContext.buildRequestWithDeadline( + requestContext, Deadline.after(2, TimeUnit.MILLISECONDS))); + } + + @Test + public void testHardRefreshUpdatesPreparedQuery() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext(new FakePreparedStatement().bind().build(), mdFuture); + + callContext.triggerImmediateRefreshOfPreparedQuery(); + ExecuteQueryRequest updatedRequest = + callContext.buildRequestWithDeadline( + requestContext, Deadline.after(10, TimeUnit.MILLISECONDS)); + assertThat(updatedRequest.getPreparedQuery()) + .isEqualTo(ByteString.copyFromUtf8("refreshedPlan")); + } + + @Test + public void testResumeToken() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext(new FakePreparedStatement().bind().build(), mdFuture); + callContext.setLatestResumeToken(ByteString.copyFromUtf8("token")); + + assertThat(callContext.hasResumeToken()).isTrue(); + assertThat( + callContext + .buildRequestWithDeadline( + requestContext, Deadline.after(100, TimeUnit.MILLISECONDS)) + .getResumeToken()) + .isEqualTo(ByteString.copyFromUtf8("token")); + } + + @Test + public void testPrepareExceptionIsRetryable() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext( + new FakePreparedStatement() + .withUpdatedPlans( + PreparedQueryData.create( + ApiFutures.immediateFailedFuture( + new DeadlineExceededException( + null, GrpcStatusCode.of(Code.DEADLINE_EXCEEDED), false))), + null) + .bind() + .build(), + mdFuture); + + ApiException e = + assertThrows( + ApiException.class, + () -> + callContext.buildRequestWithDeadline( + requestContext, Deadline.after(10, TimeUnit.MILLISECONDS))); + assertThat(e.isRetryable()).isTrue(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallableTest.java index 9788e5d55d..0d51e2d8f0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryCallableTest.java @@ -17,18 +17,41 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.DeadlineExceededException; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.FakeServiceBuilder; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl; import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; import com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow; -import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.internal.SqlRow; -import com.google.cloud.bigtable.data.v2.models.sql.Statement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; +import io.grpc.Context; +import io.grpc.Deadline; +import io.grpc.Server; +import io.grpc.stub.StreamObserver; +import java.io.IOException; +import java.time.Duration; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; +import java.util.concurrent.TimeUnit; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -36,20 +59,61 @@ @RunWith(JUnit4.class) public class ExecuteQueryCallableTest { - private static final RequestContext REQUEST_CONTEXT = - RequestContext.create("fake-project", "fake-instance", "fake-profile"); + private static final class FakePreparedStatement extends PreparedStatementImpl { + + public FakePreparedStatement() { + super( + PrepareResponse.fromProto(prepareResponse(metadata(columnMetadata("foo", stringType())))), + new HashMap<>(), + null, + null); + } + + @Override + public synchronized PreparedQueryData markExpiredAndStartRefresh( + PreparedQueryVersion expiredPreparedQueryVersion) { + return getLatestPrepareResponse(); + } + + @Override + public void assertUsingSameStub(EnhancedBigtableStub stub) {} + } + + private static final PreparedStatement PREPARED_STATEMENT = new FakePreparedStatement(); + + private Server server; + private FakeService fakeService = new FakeService(); + private EnhancedBigtableStub stub; + + @Before + public void setup() throws IOException { + server = FakeServiceBuilder.create(fakeService).start(); + + BigtableDataSettings settings = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId("fake-project") + .setInstanceId("fake-instance") + .build(); + + stub = EnhancedBigtableStub.create(settings.getStubSettings()); + } + + @After + public void tearDown() { + stub.close(); + server.shutdown(); + } @Test public void testCallContextAndServerStreamSetup() { SqlRow row = ProtoSqlRow.create( - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("test", stringType())).getMetadata()), + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("test", stringType()))), Collections.singletonList(stringValue("foo"))); ServerStreamingStashCallable innerCallable = new ServerStreamingStashCallable<>(Collections.singletonList(row)); - ExecuteQueryCallable callable = new ExecuteQueryCallable(innerCallable, REQUEST_CONTEXT); - SqlServerStream stream = callable.call(Statement.of("SELECT * FROM table")); + ExecuteQueryCallable callable = new ExecuteQueryCallable(innerCallable); + SqlServerStream stream = callable.call(PREPARED_STATEMENT.bind().build()); assertThat(stream.metadataFuture()) .isEqualTo(innerCallable.getActualRequest().resultSetMetadataFuture()); @@ -57,4 +121,69 @@ public void testCallContextAndServerStreamSetup() { assertThat(responseIterator.next()).isEqualTo(row); assertThat(responseIterator.hasNext()).isFalse(); } + + @Test + public void testExecuteQueryRequestsSetDefaultDeadline() { + SqlServerStream stream = stub.executeQueryCallable().call(PREPARED_STATEMENT.bind().build()); + // We don't care about this, just assert we get a response + boolean rowReceived = false; + for (@SuppressWarnings("UnusedVariable") SqlRow ignored : stream.rows()) { + rowReceived = true; + } + assertThat(rowReceived).isTrue(); + // We have 30m default, we give it a wide range to avoid flakiness, this is mostly just + // checking that some default is set + assertThat(fakeService.deadlineMillisRemaining).isLessThan(1800000L); + } + + @Test + public void testExecuteQueryRequestsRespectDeadline() throws IOException { + BigtableDataSettings.Builder overrideSettings = + BigtableDataSettings.newBuilderForEmulator(server.getPort()) + .setProjectId("fake-project") + .setInstanceId("fake-instance"); + overrideSettings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(10)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(10)) + .build()); + + try (EnhancedBigtableStub overrideDeadline = + EnhancedBigtableStub.create(overrideSettings.build().getStubSettings())) { + SqlServerStream streamOverride = + overrideDeadline.executeQueryCallable().call(PREPARED_STATEMENT.bind().build()); + Iterator overrideIterator = streamOverride.rows().iterator(); + // We don't care about this but are reusing the fake service that tests retries + assertThrows(DeadlineExceededException.class, overrideIterator::next); + } + } + + private static class FakeService extends BigtableGrpc.BigtableImplBase { + + private long deadlineMillisRemaining; + + @Override + public void executeQuery( + ExecuteQueryRequest request, StreamObserver responseObserver) { + Deadline deadline = Context.current().getDeadline(); + if (deadline != null) { + deadlineMillisRemaining = deadline.timeRemaining(TimeUnit.MILLISECONDS); + } else { + // set to max long when deadline isn't set + deadlineMillisRemaining = Long.MAX_VALUE; + } + // Sleep for 100ms to trigger deadline exceeded for tests with a shorter deadline + try { + Thread.sleep(100); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + responseObserver.onNext(partialResultSetWithoutToken(stringValue("foo"))); + responseObserver.onNext(partialResultSetWithToken(stringValue("bar"))); + responseObserver.onCompleted(); + } + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategyTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategyTest.java new file mode 100644 index 0000000000..d42529209f --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryResumptionStrategyTest.java @@ -0,0 +1,72 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; +import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat; + +import com.google.api.core.SettableApiFuture; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.protobuf.ByteString; +import io.grpc.Deadline; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ExecuteQueryResumptionStrategyTest { + + @Test + public void tracksResumeToken() throws ExecutionException, InterruptedException { + ExecuteQueryResumptionStrategy resumptionStrategy = new ExecuteQueryResumptionStrategy(); + + PreparedStatement preparedStatement = + preparedStatement(metadata(columnMetadata("s", stringType()))); + SettableApiFuture mdFuture = SettableApiFuture.create(); + ExecuteQueryCallContext callContext = + SqlProtoFactory.callContext(preparedStatement.bind().build(), mdFuture); + + resumptionStrategy.processResponse( + partialResultSetWithToken(ByteString.copyFromUtf8("token"), stringValue("s"))); + // This should not change the token + resumptionStrategy.processResponse(partialResultSetWithoutToken(stringValue("bar"))); + + ExecuteQueryCallContext updatedCallContext = resumptionStrategy.getResumeRequest(callContext); + assertThat( + updatedCallContext.buildRequestWithDeadline( + RequestContext.create("project", "instance", "profile"), + Deadline.after(1, TimeUnit.MINUTES))) + .isEqualTo( + ExecuteQueryRequest.newBuilder() + .setInstanceName(NameUtil.formatInstanceName("project", "instance")) + .setAppProfileId("profile") + .setPreparedQuery(ByteString.copyFromUtf8("foo")) + .setResumeToken(ByteString.copyFromUtf8("token")) + .build()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryRetryTest.java new file mode 100644 index 0000000000..d6c41397b1 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ExecuteQueryRetryTest.java @@ -0,0 +1,897 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSets; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.planRefreshError; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.tokenOnlyResultSet; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.FailedPreconditionException; +import com.google.api.gax.rpc.FixedTransportChannelProvider; +import com.google.api.gax.rpc.InternalException; +import com.google.api.gax.rpc.StatusCode; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.bigtable.v2.ResultSetMetadata; +import com.google.bigtable.v2.Value; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatementRefreshTimeoutException; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.ExecuteRpcExpectation; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.PrepareRpcExpectation; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.TestBigtableSqlService; +import com.google.cloud.bigtable.gaxx.reframing.IncompleteStreamException; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.ByteString; +import io.grpc.Status; +import io.grpc.Status.Code; +import io.grpc.StatusRuntimeException; +import io.grpc.testing.GrpcServerRule; +import java.io.IOException; +import java.lang.ref.WeakReference; +import java.time.Duration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ExecuteQueryRetryTest { + private static final ByteString PREPARED_QUERY = ByteString.copyFromUtf8("foo"); + private static final ResultSetMetadata DEFAULT_METADATA = + metadata(columnMetadata("strCol", stringType())); + + @Rule public GrpcServerRule serverRule = new GrpcServerRule(); + private TestBigtableSqlService service; + private BigtableDataClient client; + private PreparedStatement preparedStatement; + + public static BigtableDataSettings.Builder defaultSettings(GrpcServerRule serverRule) { + BigtableDataSettings.Builder settings = + BigtableDataSettings.newBuilder() + .setProjectId(TestBigtableSqlService.DEFAULT_PROJECT_ID) + .setInstanceId(TestBigtableSqlService.DEFAULT_INSTANCE_ID) + .setAppProfileId(TestBigtableSqlService.DEFAULT_APP_PROFILE_ID) + .setCredentialsProvider(NoCredentialsProvider.create()); + + settings + .stubSettings() + .setTransportChannelProvider( + FixedTransportChannelProvider.create( + GrpcTransportChannel.create(serverRule.getChannel()))) + .build(); + // Remove log noise from client side metrics + settings.setMetricsProvider(NoopMetricsProvider.INSTANCE).disableInternalMetrics(); + return settings; + } + + @Before + public void setUp() throws IOException { + service = new TestBigtableSqlService(); + serverRule.getServiceRegistry().addService(service); + client = BigtableDataClient.create(defaultSettings(serverRule).build()); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith(prepareResponse(PREPARED_QUERY, DEFAULT_METADATA))); + preparedStatement = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + // Reset the count of RPCs + service.prepareCount--; + } + + @After + public void tearDown() { + if (client != null) { + client.close(); + } + } + + @Test + public void testAllSuccesses() { + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith( + partialResultSetWithoutToken(stringValue("foo")), + partialResultSetWithoutToken(stringValue("bar")), + partialResultSetWithToken(stringValue("baz")))); + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.getMetadata().getColumns()).hasSize(1); + assertThat(rs.getMetadata().getColumns().get(0).name()).isEqualTo("strCol"); + assertThat(rs.getMetadata().getColumns().get(0).type()).isEqualTo(SqlType.string()); + + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("bar"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("baz"); + assertThat(rs.next()).isFalse(); + rs.close(); + } + + @Test + public void testRetryOnInitialError() { + // - First attempt immediately fails + // - Second attempt returns 'foo', w a token, and succeeds + // Expect result to be 'foo' + service.addExpectation(ExecuteRpcExpectation.create().respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create().respondWith(partialResultSetWithToken(stringValue("foo")))); + + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isFalse(); + rs.close(); + assertThat(service.executeCount).isEqualTo(2); + } + + @Test + public void testResumptionToken() { + // - First attempt gets a response with a token, and then fails with unavailable + // - Second Expects the request to contain the previous token, and returns a new response w + // token and then fails with unavailable + // - Third expects the request to contain the second token, returns a new response w token + // and then succeeds + // We expect the results to contain all of the returned data (no reset batches) + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("token1"), stringValue("foo"))) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withResumeToken(ByteString.copyFromUtf8("token1")) + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("token2"), stringValue("bar"))) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withResumeToken(ByteString.copyFromUtf8("token2")) + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("final"), stringValue("baz")))); + + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("bar"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("baz"); + assertThat(rs.next()).isFalse(); + rs.close(); + assertThat(service.executeCount).isEqualTo(3); + } + + @Test + public void testResetOnResumption() { + // - First attempt returns 'foo' with 'token1', then 'discard' w no token, then fails + // - Second attempt should resume w 'token1', returns an incomplete batch of two chunks. First + // chunk contains the reset bit and a some data, second contains some data, we fail w/o + // returning the final chunk w a token. + // - Third attempt should resume w 'token1', we return 'baz' w reset & a token, succeed + // Expect the results to be 'foo' and 'baz' + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("token1"), stringValue("foo")), + // This is after the token so should be dropped + partialResultSetWithoutToken(stringValue("discard"))) + .respondWithStatus(Code.UNAVAILABLE)); + List chunkedResponses = + partialResultSets( + 3, + true, + ByteString.copyFromUtf8("token2"), + stringValue("longerStringDiscard"), + stringValue("discard")); + service.addExpectation( + ExecuteRpcExpectation.create() + .withResumeToken(ByteString.copyFromUtf8("token1")) + // Skip the last response, so we don't send a new token + .respondWith(chunkedResponses.get(0), chunkedResponses.get(1)) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withResumeToken(ByteString.copyFromUtf8("token1")) + .respondWith( + partialResultSets(1, true, ByteString.copyFromUtf8("final"), stringValue("baz")) + .get(0))); + + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("baz"); + assertThat(rs.next()).isFalse(); + rs.close(); + assertThat(service.executeCount).isEqualTo(3); + } + + @Test + public void testErrorAfterFinalData() { + // - First attempt returns 'foo', 'bar', 'baz' w 'finalToken' but fails w unavailable + // - Second attempt uses 'finalToken' and succeeds + // Expect results to be 'foo', 'bar', 'baz' + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith( + partialResultSetWithoutToken(stringValue("foo")), + partialResultSetWithoutToken(stringValue("bar")), + partialResultSetWithToken( + ByteString.copyFromUtf8("finalToken"), stringValue("baz"))) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create().withResumeToken(ByteString.copyFromUtf8("finalToken"))); + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.getMetadata().getColumns()).hasSize(1); + assertThat(rs.getMetadata().getColumns().get(0).name()).isEqualTo("strCol"); + assertThat(rs.getMetadata().getColumns().get(0).type()).isEqualTo(SqlType.string()); + + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("bar"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("baz"); + assertThat(rs.next()).isFalse(); + rs.close(); + } + + @Test + public void permanentErrorPropagatesToMetadata() { + service.addExpectation(ExecuteRpcExpectation.create().respondWithStatus(Code.INVALID_ARGUMENT)); + + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + ApiException e = assertThrows(ApiException.class, rs::getMetadata); + assertThat(e.getStatusCode().getCode()).isEqualTo(StatusCode.Code.INVALID_ARGUMENT); + } + + @Test + public void exhaustedRetriesPropagatesToMetadata() throws IOException { + int attempts = + EnhancedBigtableStubSettings.newBuilder() + .executeQuerySettings() + .getRetrySettings() + .getMaxAttempts(); + assertThat(attempts).isGreaterThan(1); + for (int i = 0; i < attempts; i++) { + service.addExpectation(ExecuteRpcExpectation.create().respondWithStatus(Code.UNAVAILABLE)); + } + + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + ApiException e = assertThrows(ApiException.class, rs::getMetadata); + assertThat(e.getStatusCode().getCode()).isEqualTo(StatusCode.Code.UNAVAILABLE); + } + + @Test + public void retryableErrorWithSuccessfulRetryDoesNotPropagateToMetadata() { + service.addExpectation(ExecuteRpcExpectation.create().respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation(ExecuteRpcExpectation.create().respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith(tokenOnlyResultSet(ByteString.copyFromUtf8("t")))); + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThat(rs.getMetadata().getColumns()).hasSize(1); + } + + @Test + public void preservesParamsOnRetry() { + Map> paramTypes = ImmutableMap.of("strParam", SqlType.string()); + PreparedStatement preparedStatementWithParams = + SqlProtoFactory.preparedStatement( + metadata(columnMetadata("strCol", stringType())), paramTypes); + Map params = + ImmutableMap.of("strParam", stringValue("foo").toBuilder().setType(stringType()).build()); + service.addExpectation( + ExecuteRpcExpectation.create() + .withParams(params) + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("token1"), stringValue("foo"))) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withParams(params) + .withResumeToken(ByteString.copyFromUtf8("token1")) + .respondWith( + partialResultSetWithToken(ByteString.copyFromUtf8("token2"), stringValue("bar")))); + + ResultSet rs = + client.executeQuery( + preparedStatementWithParams.bind().setStringParam("strParam", "foo").build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("bar"); + assertThat(rs.next()).isFalse(); + } + + @Test + public void failsOnCompleteWithOpenPartialBatch() { + // Return 'foo' with no token, followed by ok + // This should throw an error, as the backend has violated its contract + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWith(partialResultSetWithoutToken(stringValue("foo"))) + .respondWithStatus(Code.OK)); + ResultSet rs = client.executeQuery(preparedStatement.bind().build()); + assertThrows(IncompleteStreamException.class, rs::next); + } + + @Test + public void retryOnExpiredPlan() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("bytesCol", bytesType()))))); + // change the schema on refresh (this can happen for SELECT * queries for example) + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("baz"), + metadata(columnMetadata("strCol", stringType()))))); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("baz")) + .respondWith(partialResultSetWithToken(stringValue("foo")))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void planRefreshAfterInitialPartialBatch() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("bytesCol", bytesType()))))); + // change the schema on refresh (this can happen for SELECT * queries for example) + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("baz"), + metadata(columnMetadata("strCol", stringType()))))); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWith(partialResultSetWithoutToken(bytesValue("b"))) + .respondWithStatus(Code.UNAVAILABLE)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + // This creates one response w reset=true and a token + List singleResponseBatch = partialResultSets(1, stringValue("foo")); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("baz")) + .respondWith(singleResponseBatch.get(0))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("foo"); + assertThat(rs.next()).isFalse(); + assertThat(rs.getMetadata().getColumnType("strCol")).isEqualTo(SqlType.string()); + assertThat(service.executeCount).isEqualTo(3); + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void planRefreshErrorAfterFirstTokenCausesError() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("bytesCol", bytesType()))))); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWith(partialResultSetWithToken(bytesValue("b"))) + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + // We received a token so the client yields the data + assertThat(rs.getBytes("bytesCol").toStringUtf8()).isEqualTo("b"); + IllegalStateException e = assertThrows(IllegalStateException.class, rs::next); + assertThat(e.getCause()).isInstanceOf(FailedPreconditionException.class); + } + + @Test + public void preparedStatementCanBeGarbageCollected() throws InterruptedException { + // Check for memory leaks since the PreparedStatement handles background refresh + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + service.addExpectation( + ExecuteRpcExpectation.create().respondWith(partialResultSetWithToken(stringValue("s")))); + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + WeakReference prepareWeakRef = new WeakReference<>(ps); + ResultSet rs = client.executeQuery(ps.bind().build()); + WeakReference resultSetWeakRef = new WeakReference<>(rs); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + rs.close(); + // Note that the result set holds a reference to the ResultSetMetadata that lives in + // the PreparedStatement. So prepare won't be gc'd until the ResultSet is null. + rs = null; + ps = null; + for (int i = 0; i < 5; i++) { + // This isn't guaranteed to run GC, so call it a few times. Testing has shown that this + // is enough to prevent any flakes in 1000 runs + System.gc(); + Thread.sleep(10); + } + assertThat(resultSetWeakRef.get()).isNull(); + assertThat(prepareWeakRef.get()).isNull(); + } + + @Test + public void planRefreshRespectsExecuteTotalTimeout() throws IOException { + BigtableDataSettings.Builder settings = defaultSettings(serverRule); + settings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + .setMaxAttempts(10) + .setTotalTimeoutDuration(Duration.ofMillis(30)) + .build()) + .build(); + settings.stubSettings().build(); + BigtableDataClient clientWithTimeout = BigtableDataClient.create(settings.build()); + + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + service.addExpectation( + PrepareRpcExpectation.create() + .withDelay(Duration.ofSeconds(2)) + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + + PreparedStatement ps = + clientWithTimeout.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = clientWithTimeout.executeQuery(ps.bind().build()); + assertThrows(PreparedStatementRefreshTimeoutException.class, rs::next); + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void planRefreshRespectsAttemptTimeout() throws IOException { + BigtableDataSettings.Builder settings = defaultSettings(serverRule); + settings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + // First attempt triggers plan refresh retry. + // Second should time out + .setMaxAttempts(2) + .setInitialRpcTimeoutDuration(Duration.ofMillis(500)) + .setMaxRpcTimeoutDuration(Duration.ofMinutes(500)) + .setTotalTimeoutDuration(Duration.ZERO) + .build()) + .build(); + settings.stubSettings().build(); + BigtableDataClient clientWithTimeout = BigtableDataClient.create(settings.build()); + + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + // called after failed precondition + service.addExpectation( + PrepareRpcExpectation.create() + .withDelay(Duration.ofSeconds(2)) + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + + PreparedStatement ps = + clientWithTimeout.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = clientWithTimeout.executeQuery(ps.bind().build()); + assertThrows(PreparedStatementRefreshTimeoutException.class, rs::next); + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void executeRetriesPlanRefreshErrors() throws IOException { + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWithStatus(Code.UNAVAILABLE)); + // called after unavailable + service.addExpectation( + PrepareRpcExpectation.create() + .withDelay(Duration.ofSeconds(2)) + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(3); + } + + @Test + public void prepareFailuresBurnExecuteAttempts() throws IOException { + BigtableDataSettings.Builder settings = defaultSettings(serverRule); + settings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + .setMaxAttempts(4) + .setInitialRpcTimeoutDuration(Duration.ofMinutes(10)) + .setMaxRpcTimeoutDuration(Duration.ofMinutes(10)) + .setTotalTimeoutDuration(Duration.ofMinutes(50)) + .build()) + .build(); + settings.stubSettings().build(); + BigtableDataClient clientWithTimeout = BigtableDataClient.create(settings.build()); + + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Attempt 1 - Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + // Attempt 2 + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWithStatus(Code.INTERNAL)); + // Attempt 3 + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWithStatus(Code.INTERNAL)); + // Attempt 4 + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWithStatus(Code.INTERNAL)); + // This is triggered by the failure in attempt 4. It succeeds + // but isn't used bc execute stops retrying + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + + PreparedStatement ps = + clientWithTimeout.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = clientWithTimeout.executeQuery(ps.bind().build()); + assertThrows(ApiException.class, rs::next); + // initial success plus 3 refresh failures, plus (maybe) refresh triggered by the final failure + assertThat(service.prepareCount).isGreaterThan(3); + } + + @Test + public void canRetryAfterRefreshAttemptTimeout() throws IOException { + BigtableDataSettings.Builder settings = defaultSettings(serverRule); + settings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + // First attempt triggers plan refresh retry. + // Second should time out, third should succeed + .setMaxAttempts(3) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(1)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(1)) + .setTotalTimeoutDuration(Duration.ofSeconds(5)) + .build()) + .build(); + settings.stubSettings().build(); + BigtableDataClient clientWithTimeout = BigtableDataClient.create(settings.build()); + + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Attempt 1 - Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + // Attempt 2 + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + // first refresh attempt times out, but then it succeeds + .withDelay(Duration.ofMillis(1500)) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = + clientWithTimeout.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = clientWithTimeout.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(2); + } + + @Test + public void prepareRefreshTimeIsFactoredIntoExecuteAttemptTimeout() throws IOException { + BigtableDataSettings.Builder settings = defaultSettings(serverRule); + settings + .stubSettings() + .executeQuerySettings() + .setRetrySettings( + RetrySettings.newBuilder() + // First attempt triggers plan refresh retry. + // Second should time out, third should succeed + .setMaxAttempts(2) + .setInitialRpcTimeoutDuration(Duration.ofMillis(500)) + .setMaxRpcTimeoutDuration(Duration.ofMillis(500)) + .setTotalTimeoutDuration(Duration.ofMinutes(500)) + .build()) + .build(); + settings.stubSettings().build(); + BigtableDataClient clientWithTimeout = BigtableDataClient.create(settings.build()); + // Initially return a prepare response without delay + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + // Attempt 1 - Trigger plan refresh + service.addExpectation( + ExecuteRpcExpectation.create() + .respondWithException(Code.FAILED_PRECONDITION, planRefreshError())); + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + // Burn most of the execute attempt timeout and succeed + .withDelay(Duration.ofMillis(350)) + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("bar"), + metadata(columnMetadata("strCol", stringType()))))); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("bar")) + // Should timeout bc we used 350 ms on prepare refresh and have 500ms timeout + .withDelay(Duration.ofMillis(350)) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = + clientWithTimeout.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = clientWithTimeout.executeQuery(ps.bind().build()); + ApiException e = assertThrows(ApiException.class, rs::next); + assertThat(e.getStatusCode().getCode()).isEqualTo(StatusCode.Code.DEADLINE_EXCEEDED); + // initial success plus one refresh + assertThat(service.prepareCount).isEqualTo(2); + // refresh error plus timed out req + assertThat(service.executeCount).isEqualTo(2); + } + + @Test + public void retriesRstStreamError() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + ApiException rstStreamException = + new InternalException( + new StatusRuntimeException( + Status.INTERNAL.withDescription( + "INTERNAL: HTTP/2 error code: INTERNAL_ERROR\nReceived Rst Stream")), + GrpcStatusCode.of(Status.Code.INTERNAL), + false); + service.addExpectation( + ExecuteRpcExpectation.create().respondWithException(Code.INTERNAL, rstStreamException)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("foo")) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(1); + } + + @Test + public void retriesRetriableAuthException() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + ApiException authException = + new InternalException( + new StatusRuntimeException( + Status.INTERNAL.withDescription( + "Authentication backend internal server error. Please retry")), + GrpcStatusCode.of(Status.Code.INTERNAL), + false); + service.addExpectation( + ExecuteRpcExpectation.create().respondWithException(Code.INTERNAL, authException)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("foo")) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(1); + } + + @Test + public void retriesGoAwayException() { + service.addExpectation( + PrepareRpcExpectation.create() + .withSql("SELECT * FROM table") + .respondWith( + prepareResponse( + ByteString.copyFromUtf8("foo"), + metadata(columnMetadata("strCol", stringType()))))); + ApiException authException = + new InternalException( + new StatusRuntimeException( + Status.INTERNAL.withDescription("Stream closed before write could take place")), + GrpcStatusCode.of(Status.Code.INTERNAL), + false); + service.addExpectation( + ExecuteRpcExpectation.create().respondWithException(Code.INTERNAL, authException)); + service.addExpectation( + ExecuteRpcExpectation.create() + .withPreparedQuery(ByteString.copyFromUtf8("foo")) + .respondWith(partialResultSetWithToken(stringValue("s")))); + + PreparedStatement ps = client.prepareStatement("SELECT * FROM table", new HashMap<>()); + ResultSet rs = client.executeQuery(ps.bind().build()); + assertThat(rs.next()).isTrue(); + assertThat(rs.getString("strCol")).isEqualTo("s"); + assertThat(rs.next()).isFalse(); + assertThat(service.executeCount).isEqualTo(2); + assertThat(service.prepareCount).isEqualTo(1); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallableTest.java new file mode 100644 index 0000000000..9312d3ffe5 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataErrorHandlingCallableTest.java @@ -0,0 +1,80 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.api.core.SettableApiFuture; +import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.stub.sql.MetadataErrorHandlingCallable.MetadataErrorHandlingObserver; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockResponseObserver; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCall; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCallable; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockStreamController; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class MetadataErrorHandlingCallableTest { + private ExecuteQueryCallContext callContext; + private MockResponseObserver outerObserver; + private SettableApiFuture metadataFuture; + private MetadataErrorHandlingCallable.MetadataErrorHandlingObserver observer; + + @Before + public void setUp() { + metadataFuture = SettableApiFuture.create(); + PreparedStatement preparedStatement = + preparedStatement( + metadata(columnMetadata("foo", stringType()), columnMetadata("bar", int64Type()))); + + callContext = SqlProtoFactory.callContext(preparedStatement.bind().build(), metadataFuture); + outerObserver = new MockResponseObserver<>(true); + observer = new MetadataErrorHandlingObserver(outerObserver, callContext); + } + + // cancel will manifest as an onError call so these are testing both cancellation and + // other exceptions + @Test + public void observer_passesThroughErrorAndSetsMetadataException() { + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + innerCallable.call(callContext, observer); + MockServerStreamingCall lastCall = innerCallable.popLastCall(); + MockStreamController innerController = lastCall.getController(); + + innerController.getObserver().onError(new CancellationException("Cancelled")); + + assertThat(metadataFuture.isDone()).isTrue(); + assertThrows(ExecutionException.class, metadataFuture::get); + ExecutionException e = assertThrows(ExecutionException.class, metadataFuture::get); + assertThat(e.getCause()).isInstanceOf(CancellationException.class); + assertThat(outerObserver.isDone()).isTrue(); + assertThat(outerObserver.getFinalError()).isInstanceOf(CancellationException.class); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallableTest.java deleted file mode 100644 index 1c04a11d33..0000000000 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/MetadataResolvingCallableTest.java +++ /dev/null @@ -1,204 +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 - * - * 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.bigtable.data.v2.stub.sql; - -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; -import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertThrows; - -import com.google.api.core.SettableApiFuture; -import com.google.bigtable.v2.ExecuteQueryRequest; -import com.google.bigtable.v2.ExecuteQueryResponse; -import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; -import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; -import com.google.cloud.bigtable.data.v2.stub.sql.MetadataResolvingCallable.MetadataObserver; -import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; -import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockResponseObserver; -import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCall; -import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCallable; -import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockStreamController; -import java.util.Arrays; -import java.util.Collections; -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public class MetadataResolvingCallableTest { - - private static final ExecuteQueryRequest FAKE_REQUEST = ExecuteQueryRequest.newBuilder().build(); - private static final ExecuteQueryResponse METADATA = - metadata(columnMetadata("foo", stringType()), columnMetadata("bar", int64Type())); - private static final ExecuteQueryResponse DATA = - partialResultSetWithToken(stringValue("fooVal"), int64Value(100)); - - MockResponseObserver outerObserver; - SettableApiFuture metadataFuture; - MetadataResolvingCallable.MetadataObserver observer; - - @Before - public void setUp() { - metadataFuture = SettableApiFuture.create(); - outerObserver = new MockResponseObserver<>(true); - observer = new MetadataObserver(outerObserver, metadataFuture); - } - - @Test - public void observer_parsesMetadataSetsFutureAndPassesThroughResponses() - throws ExecutionException, InterruptedException { - ServerStreamingStashCallable innerCallable = - new ServerStreamingStashCallable<>(Arrays.asList(METADATA, DATA)); - innerCallable.call(FAKE_REQUEST, observer); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThat(metadataFuture.get()) - .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA.getMetadata())); - assertThat(outerObserver.popNextResponse()).isEqualTo(METADATA); - assertThat(outerObserver.popNextResponse()).isEqualTo(DATA); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isNull(); - } - - @Test - public void observer_invalidMetadataFailsFutureAndPassesThroughError() { - ExecuteQueryResponse invalidMetadataResponse = metadata(); - ServerStreamingStashCallable innerCallable = - new ServerStreamingStashCallable<>(Arrays.asList(invalidMetadataResponse, DATA)); - innerCallable.call(FAKE_REQUEST, observer); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThrows(ExecutionException.class, metadataFuture::get); - ExecutionException e = assertThrows(ExecutionException.class, metadataFuture::get); - assertThat(e.getCause()).isInstanceOf(IllegalStateException.class); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isInstanceOf(IllegalStateException.class); - } - - @Test - public void observer_invalidFirstResponseFailsFutureAndPassesThroughError() { - ServerStreamingStashCallable innerCallable = - new ServerStreamingStashCallable<>(Collections.singletonList(DATA)); - innerCallable.call(FAKE_REQUEST, observer); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThrows(ExecutionException.class, metadataFuture::get); - ExecutionException e = assertThrows(ExecutionException.class, metadataFuture::get); - assertThat(e.getCause()).isInstanceOf(IllegalStateException.class); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isInstanceOf(IllegalStateException.class); - } - - // cancel will manifest as an onError call so these are testing both cancellation and - // other exceptions - @Test - public void observer_passesThroughErrorBeforeReceivingMetadata() { - MockServerStreamingCallable innerCallable = - new MockServerStreamingCallable<>(); - innerCallable.call(FAKE_REQUEST, observer); - MockServerStreamingCall lastCall = - innerCallable.popLastCall(); - MockStreamController innerController = lastCall.getController(); - - innerController.getObserver().onError(new CancellationException("Cancelled")); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThrows(ExecutionException.class, metadataFuture::get); - ExecutionException e = assertThrows(ExecutionException.class, metadataFuture::get); - assertThat(e.getCause()).isInstanceOf(CancellationException.class); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isInstanceOf(CancellationException.class); - } - - @Test - public void observer_passesThroughErrorAfterReceivingMetadata() - throws ExecutionException, InterruptedException { - MockServerStreamingCallable innerCallable = - new MockServerStreamingCallable<>(); - innerCallable.call(FAKE_REQUEST, observer); - MockServerStreamingCall lastCall = - innerCallable.popLastCall(); - MockStreamController innerController = lastCall.getController(); - - innerController.getObserver().onResponse(METADATA); - innerController.getObserver().onError(new RuntimeException("exception after metadata")); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThat(metadataFuture.get()) - .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA.getMetadata())); - assertThat(outerObserver.popNextResponse()).isEqualTo(METADATA); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isInstanceOf(RuntimeException.class); - } - - @Test - public void observer_passThroughOnStart() { - MockServerStreamingCallable innerCallable = - new MockServerStreamingCallable<>(); - innerCallable.call(FAKE_REQUEST, observer); - MockServerStreamingCall lastCall = - innerCallable.popLastCall(); - MockStreamController innerController = lastCall.getController(); - - assertThat(outerObserver.getController()).isEqualTo(innerController); - } - - @Test - public void observer_onCompleteBeforeMetadata_throwsException() throws InterruptedException { - MockServerStreamingCallable innerCallable = - new MockServerStreamingCallable<>(); - innerCallable.call(FAKE_REQUEST, observer); - MockServerStreamingCall lastCall = - innerCallable.popLastCall(); - MockStreamController innerController = lastCall.getController(); - - innerController.getObserver().onComplete(); - assertThrows(ExecutionException.class, metadataFuture::get); - ExecutionException e = assertThrows(ExecutionException.class, metadataFuture::get); - assertThat(e.getCause()).isInstanceOf(IllegalStateException.class); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isInstanceOf(IllegalStateException.class); - } - - @Test - public void testCallable() throws ExecutionException, InterruptedException { - ServerStreamingStashCallable innerCallable = - new ServerStreamingStashCallable<>(Arrays.asList(METADATA, DATA)); - MetadataResolvingCallable callable = new MetadataResolvingCallable(innerCallable); - MockResponseObserver outerObserver = new MockResponseObserver<>(true); - SettableApiFuture metadataFuture = SettableApiFuture.create(); - ExecuteQueryCallContext callContext = - ExecuteQueryCallContext.create(FAKE_REQUEST, metadataFuture); - - callable.call(callContext, outerObserver); - - assertThat(metadataFuture.isDone()).isTrue(); - assertThat(metadataFuture.get()) - .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA.getMetadata())); - assertThat(outerObserver.popNextResponse()).isEqualTo(METADATA); - assertThat(outerObserver.popNextResponse()).isEqualTo(DATA); - assertThat(outerObserver.isDone()).isTrue(); - assertThat(outerObserver.getFinalError()).isNull(); - } -} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallableTest.java new file mode 100644 index 0000000000..3511f51eae --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/PlanRefreshingCallableTest.java @@ -0,0 +1,338 @@ +/* + * 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 + * + * 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.bigtable.data.v2.stub.sql; + +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.planRefreshError; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.prepareResponse; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.api.core.ApiClock; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.core.FakeApiClock; +import com.google.api.gax.grpc.GrpcCallContext; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.FailedPreconditionException; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.bigtable.v2.ExecuteQueryRequest; +import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.cloud.bigtable.data.v2.stub.sql.PlanRefreshingCallable.PlanRefreshingObserver; +import com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.FakePreparedStatement; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockResponseObserver; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCall; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockServerStreamingCallable; +import com.google.cloud.bigtable.gaxx.testing.MockStreamingApi.MockStreamController; +import com.google.protobuf.ByteString; +import io.grpc.Deadline; +import io.grpc.Status.Code; +import java.time.Duration; +import java.time.Instant; +import java.util.Collections; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class PlanRefreshingCallableTest { + + private static final ExecuteQueryRequest FAKE_REQUEST = ExecuteQueryRequest.newBuilder().build(); + private static final com.google.bigtable.v2.ResultSetMetadata METADATA = + metadata(columnMetadata("foo", stringType()), columnMetadata("bar", int64Type())); + private static final ExecuteQueryResponse DATA = + partialResultSetWithToken(stringValue("fooVal"), int64Value(100)); + + ExecuteQueryCallContext callContext; + MockResponseObserver outerObserver; + SettableApiFuture metadataFuture; + PlanRefreshingObserver observer; + RetrySettings retrySettings; + ApiClock clock; + + @Before + public void setUp() { + metadataFuture = SettableApiFuture.create(); + PreparedStatement preparedStatement = + preparedStatement( + metadata(columnMetadata("foo", stringType()), columnMetadata("bar", int64Type()))); + + retrySettings = + EnhancedBigtableStubSettings.newBuilder().executeQuerySettings().retrySettings().build(); + clock = new FakeApiClock(System.nanoTime()); + callContext = ExecuteQueryCallContext.create(preparedStatement.bind().build(), metadataFuture); + outerObserver = new MockResponseObserver<>(true); + observer = new PlanRefreshingObserver(outerObserver, callContext); + } + + @Test + public void observer_doesNotSetFutureUntilTokenReceived() + throws ExecutionException, InterruptedException { + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + innerCallable.call(FAKE_REQUEST, observer); + MockServerStreamingCall lastCall = + innerCallable.popLastCall(); + MockStreamController innerController = lastCall.getController(); + + innerController.getObserver().onResponse(partialResultSetWithoutToken(stringValue("foo"))); + assertFalse(callContext.resultSetMetadataFuture().isDone()); + innerController.getObserver().onResponse(partialResultSetWithToken(stringValue("bar"))); + assertTrue(callContext.resultSetMetadataFuture().isDone()); + assertThat(callContext.resultSetMetadataFuture().get()) + .isEqualTo(ProtoResultSetMetadata.fromProto(METADATA)); + } + + @Test + public void observer_setsFutureAndPassesThroughResponses() + throws ExecutionException, InterruptedException { + // This has a token so it should finalize the metadata + ServerStreamingStashCallable innerCallable = + new ServerStreamingStashCallable<>(Collections.singletonList(DATA)); + innerCallable.call(FAKE_REQUEST, observer); + + assertThat(metadataFuture.isDone()).isTrue(); + assertThat(metadataFuture.get()).isEqualTo(ProtoResultSetMetadata.fromProto(METADATA)); + assertThat(outerObserver.popNextResponse()).isEqualTo(DATA); + assertThat(outerObserver.isDone()).isTrue(); + assertThat(outerObserver.getFinalError()).isNull(); + } + + @Test + public void observer_passThroughOnStart() { + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + innerCallable.call(FAKE_REQUEST, observer); + MockServerStreamingCall lastCall = + innerCallable.popLastCall(); + MockStreamController innerController = lastCall.getController(); + + assertThat(outerObserver.getController()).isEqualTo(innerController); + } + + @Test + public void observer_onCompleteWithNoData_resolvesMetadata() + throws InterruptedException, ExecutionException { + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + innerCallable.call(FAKE_REQUEST, observer); + MockServerStreamingCall lastCall = + innerCallable.popLastCall(); + MockStreamController innerController = lastCall.getController(); + + innerController.getObserver().onComplete(); + assertThat(metadataFuture.get()).isEqualTo(ProtoResultSetMetadata.fromProto(METADATA)); + assertThat(outerObserver.isDone()).isTrue(); + assertThat(outerObserver.getFinalError()).isNull(); + } + + @Test + public void testCallable() throws ExecutionException, InterruptedException { + ServerStreamingStashCallable innerCallable = + new ServerStreamingStashCallable<>(Collections.singletonList(DATA)); + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + PlanRefreshingCallable callable = new PlanRefreshingCallable(innerCallable, requestContext); + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + SettableApiFuture metadataFuture = SettableApiFuture.create(); + PreparedStatement preparedStatement = + preparedStatement( + metadata(columnMetadata("foo", stringType()), columnMetadata("bar", int64Type()))); + + ExecuteQueryCallContext callContext = + ExecuteQueryCallContext.create(preparedStatement.bind().build(), metadataFuture); + + callable.call(callContext, outerObserver); + + assertThat(metadataFuture.isDone()).isTrue(); + assertThat(metadataFuture.get()).isEqualTo(ProtoResultSetMetadata.fromProto(METADATA)); + assertThat(outerObserver.popNextResponse()).isEqualTo(DATA); + assertThat(outerObserver.isDone()).isTrue(); + assertThat(outerObserver.getFinalError()).isNull(); + } + + @Test + public void testPlanRefreshError() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + PlanRefreshingCallable planRefreshingCallable = + new PlanRefreshingCallable(innerCallable, requestContext); + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + ExecuteQueryCallContext callContext = + ExecuteQueryCallContext.create(new FakePreparedStatement().bind().build(), metadataFuture); + + planRefreshingCallable.call(callContext, outerObserver); + innerCallable.popLastCall().getController().getObserver().onError(planRefreshError()); + ApiException e = (ApiException) outerObserver.getFinalError(); + + assertThat(e.isRetryable()).isTrue(); + assertThat(callContext.resultSetMetadataFuture().isDone()).isFalse(); + ExecuteQueryRequest nextRequest = + callContext.buildRequestWithDeadline( + requestContext, Deadline.after(1, TimeUnit.MILLISECONDS)); + assertThat(nextRequest.getPreparedQuery()).isEqualTo(ByteString.copyFromUtf8("refreshedPlan")); + } + + @Test + public void testPlanRefreshErrorAfterToken() { + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + PlanRefreshingCallable planRefreshingCallable = + new PlanRefreshingCallable(innerCallable, requestContext); + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + ExecuteQueryCallContext callContext = + ExecuteQueryCallContext.create(new FakePreparedStatement().bind().build(), metadataFuture); + + planRefreshingCallable.call(callContext, outerObserver); + ResponseObserver innerObserver = + innerCallable.popLastCall().getController().getObserver(); + innerObserver.onResponse(partialResultSetWithToken(stringValue("foo"))); + innerObserver.onError(planRefreshError()); + + Throwable t = outerObserver.getFinalError(); + assertThat(t).isInstanceOf(IllegalStateException.class); + } + + @Test + public void testIsPlanRefreshError() { + assertThat(PlanRefreshingCallable.isPlanRefreshError(planRefreshError())).isTrue(); + assertFalse( + PlanRefreshingCallable.isPlanRefreshError( + new FailedPreconditionException( + "A different failed precondition", + null, + GrpcStatusCode.of(Code.FAILED_PRECONDITION), + false))); + } + + @Test + public void planRefreshDelayIsFactoredIntoExecuteTimeout() throws InterruptedException { + MockServerStreamingCallable innerCallable = + new MockServerStreamingCallable<>(); + RequestContext requestContext = RequestContext.create("project", "instance", "profile"); + PlanRefreshingCallable callable = new PlanRefreshingCallable(innerCallable, requestContext); + MockResponseObserver outerObserver = new MockResponseObserver<>(true); + SettableApiFuture metadataFuture = SettableApiFuture.create(); + SettableApiFuture prepareFuture = SettableApiFuture.create(); + PreparedStatement preparedStatement = + new FakePreparedStatement().withUpdatedPlans(PreparedQueryData.create(prepareFuture), null); + ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor(); + ExecuteQueryCallContext callContext = + ExecuteQueryCallContext.create(preparedStatement.bind().build(), metadataFuture); + + // This deadline is used for the prepare call and the ultimate execute call after + // that completes. It needs to leave a lot of margin for error for the scheduler below to + // be slower than expected to resolve. Previously 100ms deadline was not enough. + Duration originalAttemptTimeout = Duration.ofSeconds(5); + @SuppressWarnings("UnusedVariable") + ScheduledFuture ignored = + scheduler.schedule( + () -> { + prepareFuture.set( + PrepareResponse.fromProto( + prepareResponse( + ByteString.copyFromUtf8("initialPlan"), + metadata(columnMetadata("strCol", stringType()))))); + }, + 50, + TimeUnit.MILLISECONDS); + ApiCallContext context = + GrpcCallContext.createDefault().withTimeoutDuration(originalAttemptTimeout); + // prepare takes 50 ms to resolve. Despite that the execute timeout should be around 100ms from + // now (w padding) + Deadline paddedDeadlineAtStartOfCall = + Deadline.after(originalAttemptTimeout.toMillis() + 5, TimeUnit.MILLISECONDS); + callable.call(callContext, outerObserver, context); + scheduler.shutdown(); + scheduler.awaitTermination(30, TimeUnit.SECONDS); + // Make sure prepare didn't time out and return an error. + // Otherwise, the observer should not be done + assertFalse(outerObserver.isDone()); + GrpcCallContext grpcCallContext = + (GrpcCallContext) innerCallable.popLastCall().getApiCallContext(); + Deadline executeDeadline = grpcCallContext.getCallOptions().getDeadline(); + assertThat(executeDeadline.isBefore(paddedDeadlineAtStartOfCall)).isTrue(); + } + + @Test + public void testGetDeadlineWithAttemptTimeout() { + GrpcCallContext callContext = + GrpcCallContext.createDefault().withTimeoutDuration(Duration.ofMinutes(1)); + // startTimeOfOverallRequest doesn't matter here + Deadline deadline = PlanRefreshingCallable.getDeadline(callContext, Instant.now()); + long millisRemaining = deadline.timeRemaining(TimeUnit.MILLISECONDS); + assertThat(millisRemaining).isLessThan((60 * 1000) + 1); + // Give some padding in case tests are very slow + assertThat(millisRemaining).isGreaterThan(58 * 1000); + } + + @Test + public void testGetDeadlineWithTotalTimeout() { + GrpcCallContext callContext = + GrpcCallContext.createDefault() + .withRetrySettings( + RetrySettings.newBuilder() + .setTotalTimeout(org.threeten.bp.Duration.ofMinutes(1)) + .build()); + Deadline deadline = PlanRefreshingCallable.getDeadline(callContext, Instant.now()); + long millisRemaining = deadline.timeRemaining(TimeUnit.MILLISECONDS); + assertThat(millisRemaining).isLessThan((60 * 1000) + 1); + // Give some padding in case tests are very slow + assertThat(millisRemaining).isGreaterThan(58 * 1000); + } + + @Test + public void testAttemptTimeoutUsedOverTotalTimeout() { + GrpcCallContext callContext = + GrpcCallContext.createDefault() + .withTimeoutDuration(Duration.ofMinutes(1)) + .withRetrySettings( + RetrySettings.newBuilder() + .setTotalTimeout(org.threeten.bp.Duration.ofHours(1)) + .build()); + Deadline deadline = PlanRefreshingCallable.getDeadline(callContext, Instant.now()); + long millisRemaining = deadline.timeRemaining(TimeUnit.MILLISECONDS); + assertThat(millisRemaining).isLessThan((60 * 1000) + 1); + // Give some padding in case tests are very slow + assertThat(millisRemaining).isGreaterThan(58 * 1000); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineSubject.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineSubject.java index 9ec406d71e..e9f6bf09e6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineSubject.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineSubject.java @@ -46,11 +46,11 @@ public static ProtoRowsMergingStateMachineSubject assertThat( return assertAbout(stateMachine()).that(actual); } - public void hasCompleteBatch(boolean expectation) { + public void hasCompleteBatches(boolean expectation) { if (expectation) { - check("hasCompleteBatch()").that(actual.hasCompleteBatch()).isTrue(); + check("hasCompleteBatch()").that(actual.hasCompleteBatches()).isTrue(); } else { - check("hasCompleteBatch()").that(actual.hasCompleteBatch()).isFalse(); + check("hasCompleteBatch()").that(actual.hasCompleteBatches()).isFalse(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineTest.java index c4586a5c13..9da5224cf2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/ProtoRowsMergingStateMachineTest.java @@ -20,25 +20,35 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.bytesValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.checksum; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapElement; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.mapValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSets; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.structValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.tokenOnlyResultSet; import static com.google.common.truth.Truth.assertWithMessage; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.rpc.ApiExceptions; +import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.PartialResultSet; import com.google.bigtable.v2.ProtoRows; import com.google.bigtable.v2.ProtoRowsBatch; import com.google.bigtable.v2.Value; +import com.google.cloud.bigtable.common.Type; import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; import com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; @@ -47,6 +57,7 @@ import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import java.util.ArrayDeque; +import java.util.List; import org.junit.Test; import org.junit.experimental.runners.Enclosed; import org.junit.runner.RunWith; @@ -60,52 +71,47 @@ public final class ProtoRowsMergingStateMachineTest { public static final class IndividualTests { @Test - public void stateMachine_hasCompleteBatch_falseWhenEmpty() { + public void stateMachine_hasCompleteBatches_falseWhenEmpty() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); - assertThat(stateMachine).hasCompleteBatch(false); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + assertThat(stateMachine).hasCompleteBatches(false); } @Test - public void stateMachine_hasCompleteBatch_falseWhenAwaitingPartialBatch() { + public void stateMachine_hasCompleteBatches_falseWhenAwaitingPartialBatch() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("foo")).getResults()); - assertThat(stateMachine).hasCompleteBatch(false); + assertThat(stateMachine).hasCompleteBatches(false); } @Test - public void stateMachine_hasCompleteBatch_trueWhenAwaitingBatchConsume() { + public void stateMachine_hasCompleteBatches_trueWhenAwaitingBatchConsume() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("foo")).getResults()); stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("bar")).getResults()); - assertThat(stateMachine).hasCompleteBatch(true); + assertThat(stateMachine).hasCompleteBatches(true); } @Test public void stateMachine_isBatchInProgress_falseWhenEmpty() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); assertThat(stateMachine).isBatchInProgress(false); } @Test public void stateMachine_isBatchInProgress_trueWhenAwaitingPartialBatch() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("foo")).getResults()); assertThat(stateMachine).isBatchInProgress(true); @@ -114,9 +120,8 @@ public void stateMachine_isBatchInProgress_trueWhenAwaitingPartialBatch() { @Test public void stateMachine_isBatchInProgress_trueWhenAwaitingBatchConsume() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("foo")).getResults()); assertThat(stateMachine).isBatchInProgress(true); @@ -126,9 +131,8 @@ public void stateMachine_isBatchInProgress_trueWhenAwaitingBatchConsume() { public void stateMachine_consumeRow_throwsExceptionWhenColumnsArentComplete() { ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType()), columnMetadata("b", stringType())) - .getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + metadata(columnMetadata("a", stringType()), columnMetadata("b", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); // this is a valid partial result set so we don't expect an error until we call populateQueue stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("foo")).getResults()); assertThrows( @@ -138,9 +142,8 @@ public void stateMachine_consumeRow_throwsExceptionWhenColumnsArentComplete() { @Test public void stateMachine_consumeRow_throwsExceptionWhenAwaitingPartialBatch() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); // this doesn't have a token so we shouldn't allow results to be processed stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("foo")).getResults()); @@ -151,14 +154,13 @@ public void stateMachine_consumeRow_throwsExceptionWhenAwaitingPartialBatch() { @Test public void stateMachine_mergesPartialBatches() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); - stateMachine.addPartialResultSet( - partialResultSetWithoutToken(stringValue("foo")).getResults()); - stateMachine.addPartialResultSet( - partialResultSetWithoutToken(stringValue("bar")).getResults()); - stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("baz")).getResults()); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + List partialBatches = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + for (ExecuteQueryResponse res : partialBatches) { + stateMachine.addPartialResultSet(res.getResults()); + } assertThat(stateMachine) .populateQueueYields( @@ -168,11 +170,12 @@ public void stateMachine_mergesPartialBatches() { } @Test + @SuppressWarnings("InlineMeInliner") public void stateMachine_mergesPartialBatches_withRandomChunks() { ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("map", mapType(stringType(), bytesType()))).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + metadata(columnMetadata("map", mapType(stringType(), bytesType())))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); Value mapVal = mapValue( mapElement( @@ -190,6 +193,7 @@ public void stateMachine_mergesPartialBatches_withRandomChunks() { PartialResultSet.newBuilder() .setResumeToken(ByteString.copyFromUtf8("token")) .setProtoRowsBatch(ProtoRowsBatch.newBuilder().setBatchData(chunk2).build()) + .setBatchChecksum(checksum(rows.toByteString())) .build()); assertThat(stateMachine) @@ -201,12 +205,11 @@ public void stateMachine_reconstructsRowWithMultipleColumns() { ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( metadata( - columnMetadata("a", stringType()), - columnMetadata("b", bytesType()), - columnMetadata("c", arrayType(stringType())), - columnMetadata("d", mapType(stringType(), bytesType()))) - .getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + columnMetadata("a", stringType()), + columnMetadata("b", bytesType()), + columnMetadata("c", arrayType(stringType())), + columnMetadata("d", mapType(stringType(), bytesType())))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); Value stringVal = stringValue("test"); stateMachine.addPartialResultSet(partialResultSetWithoutToken(stringVal).getResults()); @@ -220,14 +223,14 @@ public void stateMachine_reconstructsRowWithMultipleColumns() { mapElement(stringValue("b"), bytesValue("bVal"))); stateMachine.addPartialResultSet(partialResultSetWithToken(mapVal).getResults()); - assertThat(stateMachine).hasCompleteBatch(true); + assertThat(stateMachine).hasCompleteBatches(true); assertThat(stateMachine) .populateQueueYields( ProtoSqlRow.create( metadata, ImmutableList.of(stringVal, bytesVal, arrayVal, mapVal))); // Once we consume a completed row the state machine should be reset - assertThat(stateMachine).hasCompleteBatch(false); + assertThat(stateMachine).hasCompleteBatches(false); assertThrows( IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); assertThat(stateMachine).isBatchInProgress(false); @@ -237,9 +240,8 @@ public void stateMachine_reconstructsRowWithMultipleColumns() { public void stateMachine_throwsExceptionWhenValuesDontMatchSchema() { ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType()), columnMetadata("b", bytesType())) - .getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + metadata(columnMetadata("a", stringType()), columnMetadata("b", bytesType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); // values in wrong order stateMachine.addPartialResultSet( @@ -251,9 +253,8 @@ public void stateMachine_throwsExceptionWhenValuesDontMatchSchema() { @Test public void stateMachine_handlesResumeTokenWithNoValues() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet(partialResultSetWithToken().getResults()); assertThat(stateMachine).populateQueueYields(new ProtoSqlRow[] {}); @@ -262,9 +263,8 @@ public void stateMachine_handlesResumeTokenWithNoValues() { @Test public void stateMachine_handlesResumeTokenWithOpenBatch() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet( partialResultSetWithoutToken(stringValue("test")).getResults()); @@ -277,9 +277,8 @@ public void stateMachine_handlesResumeTokenWithOpenBatch() { @Test public void addPartialResultSet_throwsExceptionWhenAwaitingRowConsume() { ResultSetMetadata metadata = - ProtoResultSetMetadata.fromProto( - metadata(columnMetadata("a", stringType())).getMetadata()); - ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(metadata); + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("test")).getResults()); assertThrows( @@ -288,6 +287,242 @@ public void addPartialResultSet_throwsExceptionWhenAwaitingRowConsume() { stateMachine.addPartialResultSet( partialResultSetWithToken(stringValue("test2")).getResults())); } + + @Test + public void stateMachine_throwsExceptionOnChecksumMismatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + // Override the checksum of the final response + PartialResultSet lastResultsWithBadChecksum = + responses.get(2).getResults().toBuilder().setBatchChecksum(1234).build(); + + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + stateMachine.addPartialResultSet(responses.get(0).getResults()); + stateMachine.addPartialResultSet(responses.get(1).getResults()); + + assertThrows( + IllegalStateException.class, + () -> stateMachine.addPartialResultSet(lastResultsWithBadChecksum)); + } + + @Test + public void stateMachine_handlesResetOnPartialBatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + // Initial response here has reset bit set + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + stateMachine.addPartialResultSet(responses.get(0).getResults()); + stateMachine.addPartialResultSet(responses.get(1).getResults()); + + // The two results above should be discarded by reset + for (ExecuteQueryResponse response : responses) { + stateMachine.addPartialResultSet(response.getResults()); + } + + assertThat(stateMachine) + .populateQueueYields( + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("foo"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("bar"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("baz")))); + } + + @Test + public void stateMachine_handlesResetWithUncommittedBatches() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + // Create 2 batches split into multiple chunks. Neither containing a resume token + List firstBatch = + partialResultSets( + 2, + true, + ByteString.EMPTY, + stringValue("foo"), + stringValue("bar"), + stringValue("baz")); + List secondBatch = + partialResultSets( + 3, false, ByteString.EMPTY, stringValue("a"), stringValue("b"), stringValue("c")); + + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + for (ExecuteQueryResponse res : firstBatch) { + stateMachine.addPartialResultSet(res.getResults()); + } + for (ExecuteQueryResponse res : secondBatch) { + stateMachine.addPartialResultSet(res.getResults()); + } + // Nothing should be yielded yet + assertThrows( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + + List resetBatch = + partialResultSets( + 2, + true, + ByteString.EMPTY, + stringValue("foo2"), + stringValue("bar2"), + stringValue("baz2")); + List batchAfterReset = + partialResultSets( + 3, + false, + ByteString.copyFromUtf8("token"), + stringValue("a2"), + stringValue("b2"), + stringValue("c2")); + for (ExecuteQueryResponse res : resetBatch) { + stateMachine.addPartialResultSet(res.getResults()); + } + for (ExecuteQueryResponse res : batchAfterReset) { + stateMachine.addPartialResultSet(res.getResults()); + } + assertThat(stateMachine) + .populateQueueYields( + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("foo2"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("bar2"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("baz2"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("a2"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("b2"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("c2")))); + } + + @Test + public void stateMachine_handlesMultipleCompleteBatchesBeforeToken() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + // Create 2 batches split into multiple chunks. Neither containing a resume token + List firstBatch = + partialResultSets( + 2, + true, + ByteString.EMPTY, + stringValue("foo"), + stringValue("bar"), + stringValue("baz")); + List secondBatch = + partialResultSets( + 3, false, ByteString.EMPTY, stringValue("a"), stringValue("b"), stringValue("c")); + + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + for (ExecuteQueryResponse res : firstBatch) { + stateMachine.addPartialResultSet(res.getResults()); + } + for (ExecuteQueryResponse res : secondBatch) { + stateMachine.addPartialResultSet(res.getResults()); + } + // Nothing should be yielded yet + assertThrows( + IllegalStateException.class, () -> stateMachine.populateQueue(new ArrayDeque<>())); + ExecuteQueryResponse resultWithToken = partialResultSetWithToken(stringValue("final")); + stateMachine.addPartialResultSet(resultWithToken.getResults()); + assertThat(stateMachine) + .populateQueueYields( + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("foo"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("bar"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("baz"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("a"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("b"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("c"))), + ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("final")))); + } + + @Test + public void stateMachine_throwsExceptionWithChecksumButNoData() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + PartialResultSet invalid = PartialResultSet.newBuilder().setBatchChecksum(1234).build(); + assertThrows(IllegalStateException.class, () -> stateMachine.addPartialResultSet(invalid)); + } + + @Test + public void stateMachine_resolvesMetadataOnlyAfterFirstToken() { + final boolean[] metadataHasBeenAccessed = {false}; + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = + new ProtoRowsMergingStateMachine( + () -> { + // hacky way to check if supplier has been resolved + // This is in an array so the variable can be final + metadataHasBeenAccessed[0] = true; + return metadata; + }); + + stateMachine.addPartialResultSet(partialResultSetWithoutToken(stringValue("s")).getResults()); + assertFalse(metadataHasBeenAccessed[0]); + stateMachine.addPartialResultSet(partialResultSetWithToken(stringValue("b")).getResults()); + assertTrue(metadataHasBeenAccessed[0]); + } + + @Test + public void stateMachine_handlesSchemaChangeAfterResetOfInitialBatch() { + SettableApiFuture mdFuture = SettableApiFuture.create(); + ProtoRowsMergingStateMachine stateMachine = + new ProtoRowsMergingStateMachine( + () -> ApiExceptions.callAndTranslateApiException(mdFuture)); + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("discard")).getResults()); + + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto( + metadata(columnMetadata("a", bytesType()), columnMetadata("b", int64Type()))); + mdFuture.set(metadata); + List retryResponses = + partialResultSets(2, bytesValue("bytes"), int64Value(123)); + for (ExecuteQueryResponse res : retryResponses) { + stateMachine.addPartialResultSet(res.getResults()); + } + assertThat(stateMachine) + .populateQueueYields( + ProtoSqlRow.create(metadata, ImmutableList.of(bytesValue("bytes"), int64Value(123)))); + } + + @Test + public void stateMachine_throwsExceptionWithTokenAndIncompleteBatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + List responses = + partialResultSets(2, stringValue("foo"), stringValue("bar")); + stateMachine.addPartialResultSet(responses.get(0).getResults()); + // We haven't added the second response above, this should error + assertThrows( + IllegalStateException.class, + () -> + stateMachine.addPartialResultSet( + tokenOnlyResultSet(ByteString.copyFromUtf8("token")).getResults())); + } + + @Test + public void isBatchInProgress_trueWithUncommitedCompleteBatches() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("foo")).getResults()); + assertThat(stateMachine).isBatchInProgress(true); + } + + @Test + public void hasCompleteBatches_falseWithUncommitedCompleteBatches() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + ProtoRowsMergingStateMachine stateMachine = new ProtoRowsMergingStateMachine(() -> metadata); + + stateMachine.addPartialResultSet( + partialResultSetWithoutToken(stringValue("foo")).getResults()); + assertThat(stateMachine).hasCompleteBatches(false); + } } @RunWith(Parameterized.class) @@ -421,12 +656,27 @@ public void testValidateSupportsAllTypes() { structValue( stringValue("key2"), bytesValue("val2"), bytesValue("val3"))))); break; + case PROTO: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + Type.SchemalessProto.create("test", "my_bundle"), stringValue("test"))); + break; + case ENUM: + assertThrows( + IllegalStateException.class, + () -> + ProtoRowsMergingStateMachine.validateValueAndType( + Type.SchemalessEnum.create("test", "my_bundle"), bytesValue("val"))); + break; default: assertWithMessage( "Unknown TypeCase " + typeCase.name() - + " seen. Check if SerializedProtoRowsMergingStateMachine.validateValueAndType" - + " supports all types.") + + " seen. Check if" + + " SerializedProtoRowsMergingStateMachine.validateValueAndType supports all" + + " types.") .fail(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactory.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactory.java index 34c49fed2e..1a3441a209 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactory.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactory.java @@ -15,10 +15,20 @@ */ package com.google.cloud.bigtable.data.v2.stub.sql; +import com.google.api.core.ApiFutures; +import com.google.api.core.SettableApiFuture; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ErrorDetails; +import com.google.api.gax.rpc.FailedPreconditionException; import com.google.bigtable.v2.ArrayValue; +import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.ColumnMetadata; +import com.google.bigtable.v2.ExecuteQueryRequest; import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.PartialResultSet; +import com.google.bigtable.v2.PrepareQueryRequest; +import com.google.bigtable.v2.PrepareQueryResponse; import com.google.bigtable.v2.ProtoRows; import com.google.bigtable.v2.ProtoRowsBatch; import com.google.bigtable.v2.ProtoSchema; @@ -26,16 +36,121 @@ import com.google.bigtable.v2.Type; import com.google.bigtable.v2.Type.Struct.Field; import com.google.bigtable.v2.Value; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.PrepareResponse; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryData; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl.PreparedQueryVersion; +import com.google.cloud.bigtable.data.v2.internal.QueryParamUtil; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.common.hash.HashFunction; +import com.google.common.hash.Hashing; +import com.google.common.truth.Truth; +import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; +import com.google.rpc.PreconditionFailure; +import com.google.rpc.PreconditionFailure.Violation; import com.google.type.Date; +import io.grpc.Metadata; +import io.grpc.Status; +import io.grpc.Status.Code; +import io.grpc.StatusRuntimeException; +import io.grpc.stub.StreamObserver; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; import java.util.Arrays; - +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Queue; +import java.util.concurrent.LinkedBlockingDeque; +import javax.annotation.Nullable; + +// TODO rename this to SqlApiTestUtils /** Utilities for creating sql proto objects in tests */ public class SqlProtoFactory { + private static final HashFunction CRC32C = Hashing.crc32c(); + private static final Metadata.Key ERROR_DETAILS_KEY = + Metadata.Key.of("grpc-status-details-bin", Metadata.BINARY_BYTE_MARSHALLER); + private SqlProtoFactory() {} + public static ApiException planRefreshError() { + Metadata trailers = new Metadata(); + PreconditionFailure failure = + PreconditionFailure.newBuilder() + .addViolations(Violation.newBuilder().setType("PREPARED_QUERY_EXPIRED").build()) + .build(); + ErrorDetails refreshErrorDetails = + ErrorDetails.builder().setRawErrorMessages(ImmutableList.of(Any.pack(failure))).build(); + byte[] status = + com.google.rpc.Status.newBuilder().addDetails(Any.pack(failure)).build().toByteArray(); + // This needs to be in trailers in order to round trip + trailers.put(ERROR_DETAILS_KEY, status); + + // This is not initially retryable, the PlanRefreshingCallable overrides this. + return new FailedPreconditionException( + new StatusRuntimeException(Status.FAILED_PRECONDITION, trailers), + GrpcStatusCode.of(Code.FAILED_PRECONDITION), + false, + refreshErrorDetails); + } + + public static PrepareQueryResponse prepareResponse( + ByteString preparedQuery, ResultSetMetadata metadata, Instant validUntil) { + return PrepareQueryResponse.newBuilder() + .setPreparedQuery(preparedQuery) + // set validUntil a year in the future so these plans never expire in test runs + .setValidUntil( + Timestamp.newBuilder() + .setSeconds(validUntil.getEpochSecond()) + .setNanos(validUntil.getNano()) + .build()) + .setMetadata(metadata) + .build(); + } + + public static PrepareQueryResponse prepareResponse( + ByteString preparedQuery, ResultSetMetadata metadata) { + return prepareResponse(preparedQuery, metadata, Instant.now().plus(Duration.ofDays(365))); + } + + public static PrepareQueryResponse prepareResponse(ResultSetMetadata metadata) { + return prepareResponse(ByteString.copyFromUtf8("foo"), metadata); + } + + public static PreparedStatementImpl preparedStatement(ResultSetMetadata metadata) { + return preparedStatement(metadata, new HashMap<>()); + } + + public static PreparedStatementImpl preparedStatement( + ResultSetMetadata metadata, Map> paramTypes) { + // We never expire the test prepare response so it's safe to null the stub and request + return preparedStatement(PrepareResponse.fromProto(prepareResponse(metadata)), paramTypes); + } + + public static PreparedStatementImpl preparedStatement( + PrepareResponse response, Map> paramTypes) { + return new FakePreparedStatement(response, paramTypes); + } + + public static ExecuteQueryCallContext callContext(BoundStatement boundStatement) { + return callContext(boundStatement, SettableApiFuture.create()); + } + + public static ExecuteQueryCallContext callContext( + BoundStatement boundStatement, + SettableApiFuture mdFuture) { + return ExecuteQueryCallContext.create(boundStatement, mdFuture); + } + public static ColumnMetadata columnMetadata(String name, Type type) { return ColumnMetadata.newBuilder().setName(name).setType(type).build(); } @@ -109,6 +224,19 @@ public static Type mapType(Type keyType, Type valueType) { .build(); } + public static Type protoType(String messageName, String schemaBundleId) { + return Type.newBuilder() + .setProtoType( + Type.Proto.newBuilder().setMessageName(messageName).setSchemaBundleId(schemaBundleId)) + .build(); + } + + public static Type enumType(String enumName, String schemaBundleId) { + return Type.newBuilder() + .setEnumType(Type.Enum.newBuilder().setEnumName(enumName).setSchemaBundleId(schemaBundleId)) + .build(); + } + public static Value nullValue() { return Value.newBuilder().build(); } @@ -121,6 +249,10 @@ public static Value bytesValue(String contents) { return Value.newBuilder().setBytesValue(ByteString.copyFromUtf8(contents)).build(); } + public static Value bytesValue(byte[] contents) { + return Value.newBuilder().setBytesValue(ByteString.copyFrom(contents)).build(); + } + public static Value int64Value(long data) { return Value.newBuilder().setIntValue(data).build(); } @@ -163,25 +295,19 @@ public static Value mapElement(Value... fields) { return structValue(fields); } - private static ProtoRowsBatch protoRowsBatch(Value... values) { - ProtoRows protoRows = ProtoRows.newBuilder().addAllValues(Arrays.asList(values)).build(); - return ProtoRowsBatch.newBuilder().setBatchData(protoRows.toByteString()).build(); - } - + /** Creates a single response representing a complete batch, with no token */ public static ExecuteQueryResponse partialResultSetWithoutToken(Value... values) { - return ExecuteQueryResponse.newBuilder() - .setResults(PartialResultSet.newBuilder().setProtoRowsBatch(protoRowsBatch(values)).build()) - .build(); + return partialResultSets(1, false, ByteString.EMPTY, values).get(0); } + /** Creates a single response representing a complete batch, with a resume token of 'test' */ public static ExecuteQueryResponse partialResultSetWithToken(Value... values) { - return ExecuteQueryResponse.newBuilder() - .setResults( - PartialResultSet.newBuilder() - .setProtoRowsBatch(protoRowsBatch(values)) - .setResumeToken(ByteString.copyFromUtf8("test")) - .build()) - .build(); + return partialResultSets(1, false, ByteString.copyFromUtf8("test"), values).get(0); + } + + /** Creates a single response representing a complete batch, with a resume token of token */ + public static ExecuteQueryResponse partialResultSetWithToken(ByteString token, Value... values) { + return partialResultSets(1, false, token, values).get(0); } public static ExecuteQueryResponse tokenOnlyResultSet(ByteString token) { @@ -190,11 +316,318 @@ public static ExecuteQueryResponse tokenOnlyResultSet(ByteString token) { .build(); } - public static ExecuteQueryResponse metadata(ColumnMetadata... columnMetadata) { + /** + * splits values across specified number of batches. Sets reset on first response, and resume + * token on final response + */ + public static ImmutableList partialResultSets( + int batches, Value... values) { + return partialResultSets(batches, true, ByteString.copyFromUtf8("test"), values); + } + + /** + * @param batches number of {@link ProtoRowsBatch}s to split values across + * @param reset whether to set the reset bit on the first response + * @param resumeToken resumption token for the final response. Unset if empty + * @param values List of values to split across batches + * @return List of responses with length equal to number of batches + */ + public static ImmutableList partialResultSets( + int batches, boolean reset, ByteString resumeToken, Value... values) { + ProtoRows protoRows = ProtoRows.newBuilder().addAllValues(Arrays.asList(values)).build(); + ByteString batchData = protoRows.toByteString(); + int batch_checksum = checksum(batchData); + ImmutableList.Builder responses = ImmutableList.builder(); + int batchSize = batchData.size() / batches; + for (int i = 0; i < batches; i++) { + boolean finalBatch = i == batches - 1; + int batchStart = i * batchSize; + int batchEnd = finalBatch ? batchData.size() : batchStart + batchSize; + ProtoRowsBatch.Builder batchBuilder = ProtoRowsBatch.newBuilder(); + batchBuilder.setBatchData(batchData.substring(batchStart, batchEnd)); + PartialResultSet.Builder resultSetBuilder = PartialResultSet.newBuilder(); + if (reset && i == 0) { + resultSetBuilder.setReset(true); + } + if (finalBatch) { + resultSetBuilder.setBatchChecksum(batch_checksum); + if (!resumeToken.isEmpty()) { + resultSetBuilder.setResumeToken(resumeToken); + } + } + resultSetBuilder.setProtoRowsBatch(batchBuilder.build()); + responses.add(ExecuteQueryResponse.newBuilder().setResults(resultSetBuilder.build()).build()); + } + return responses.build(); + } + + public static ResultSetMetadata metadata(ColumnMetadata... columnMetadata) { ProtoSchema schema = ProtoSchema.newBuilder().addAllColumns(Arrays.asList(columnMetadata)).build(); - ResultSetMetadata metadata = ResultSetMetadata.newBuilder().setProtoSchema(schema).build(); + return ResultSetMetadata.newBuilder().setProtoSchema(schema).build(); + } + + public static int checksum(ByteString bytes) { + return CRC32C.hashBytes(bytes.toByteArray()).asInt(); + } + + /** Used to test ExecuteQuery and PrepareQuery APIs using the RpcExpectations below */ + public static class TestBigtableSqlService extends BigtableGrpc.BigtableImplBase { + public static final String DEFAULT_PROJECT_ID = "fake-project"; + public static final String DEFAULT_INSTANCE_ID = "fake-instance"; + public static final String DEFAULT_APP_PROFILE_ID = "fake-app-profile"; + public static final ByteString DEFAULT_PREPARED_QUERY = ByteString.copyFromUtf8("foo"); + Queue executeExpectations = new LinkedBlockingDeque<>(); + Queue prepareExpectations = new LinkedBlockingDeque<>(); + int executeCount = 0; + public int prepareCount = 0; + + public void addExpectation(ExecuteRpcExpectation expectation) { + executeExpectations.add(expectation); + } + + public void addExpectation(PrepareRpcExpectation expectation) { + prepareExpectations.add(expectation); + } + + @Override + public void executeQuery( + ExecuteQueryRequest request, StreamObserver responseObserver) { + ExecuteRpcExpectation expectedRpc = executeExpectations.poll(); + executeCount++; + int requestIndex = executeCount - 1; + + Truth.assertWithMessage("Unexpected request#" + requestIndex + ":" + request.toString()) + .that(expectedRpc) + .isNotNull(); + Truth.assertWithMessage("Unexpected request#" + requestIndex) + .that(request) + .isEqualTo(expectedRpc.getExpectedRequest()); + + try { + Thread.sleep(expectedRpc.delay.toMillis()); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + for (ExecuteQueryResponse response : expectedRpc.responses) { + responseObserver.onNext(response); + } + if (expectedRpc.statusCode.toStatus().isOk()) { + responseObserver.onCompleted(); + } else if (expectedRpc.exception != null) { + responseObserver.onError(expectedRpc.exception); + } else { + responseObserver.onError(expectedRpc.statusCode.toStatus().asRuntimeException()); + } + } + + @Override + public void prepareQuery( + PrepareQueryRequest request, StreamObserver responseObserver) { + PrepareRpcExpectation expectedRpc = prepareExpectations.poll(); + prepareCount++; + int requestIndex = prepareCount - 1; + + Truth.assertWithMessage("Unexpected request#" + requestIndex + ":" + request.toString()) + .that(expectedRpc) + .isNotNull(); + Truth.assertWithMessage("Unexpected request#" + requestIndex) + .that(request) + .isEqualTo(expectedRpc.getExpectedRequest()); + + try { + Thread.sleep(expectedRpc.delay.toMillis()); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + if (expectedRpc.statusCode == Code.OK) { + responseObserver.onNext(expectedRpc.response); + responseObserver.onCompleted(); + } else { + responseObserver.onError(expectedRpc.statusCode.toStatus().asRuntimeException()); + } + } + } + + public static class ExecuteRpcExpectation { + ExecuteQueryRequest.Builder request; + Status.Code statusCode; + @Nullable ApiException exception; + List responses; + Duration delay; + + private ExecuteRpcExpectation() { + this.request = ExecuteQueryRequest.newBuilder(); + this.request.setPreparedQuery(TestBigtableSqlService.DEFAULT_PREPARED_QUERY); + this.request.setInstanceName( + NameUtil.formatInstanceName( + TestBigtableSqlService.DEFAULT_PROJECT_ID, + TestBigtableSqlService.DEFAULT_INSTANCE_ID)); + this.request.setAppProfileId(TestBigtableSqlService.DEFAULT_APP_PROFILE_ID); + this.statusCode = Code.OK; + this.responses = new ArrayList<>(); + this.delay = Duration.ZERO; + } + + public static ExecuteRpcExpectation create() { + return new ExecuteRpcExpectation(); + } + + public ExecuteRpcExpectation withResumeToken(ByteString resumeToken) { + this.request.setResumeToken(resumeToken); + return this; + } + + public ExecuteRpcExpectation withDelay(Duration delay) { + this.delay = delay; + return this; + } + + public ExecuteRpcExpectation withParams(Map params) { + this.request.putAllParams(params); + return this; + } + + public ExecuteRpcExpectation withPreparedQuery(ByteString preparedQuery) { + this.request.setPreparedQuery(preparedQuery); + return this; + } + + public ExecuteRpcExpectation respondWithStatus(Status.Code code) { + this.statusCode = code; + return this; + } + + public ExecuteRpcExpectation respondWithException(Status.Code code, ApiException exception) { + this.statusCode = code; + this.exception = exception; + return this; + } + + public ExecuteRpcExpectation respondWith(ExecuteQueryResponse... responses) { + this.responses = Arrays.asList(responses); + return this; + } + + ExecuteQueryRequest getExpectedRequest() { + return this.request.build(); + } + } + + public static class PrepareRpcExpectation { + PrepareQueryRequest.Builder request; + Status.Code statusCode; + PrepareQueryResponse response; + Duration delay; + + private PrepareRpcExpectation() { + this.request = PrepareQueryRequest.newBuilder(); + this.request.setInstanceName( + NameUtil.formatInstanceName( + TestBigtableSqlService.DEFAULT_PROJECT_ID, + TestBigtableSqlService.DEFAULT_INSTANCE_ID)); + this.request.setAppProfileId(TestBigtableSqlService.DEFAULT_APP_PROFILE_ID); + this.statusCode = Code.OK; + this.delay = Duration.ZERO; + } + + public static PrepareRpcExpectation create() { + return new PrepareRpcExpectation(); + } + + public PrepareRpcExpectation withSql(String sqlQuery) { + this.request.setQuery(sqlQuery); + return this; + } + + public PrepareRpcExpectation withParamTypes(Map> paramTypes) { + Map protoParamTypes = new HashMap<>(); + for (Map.Entry> entry : paramTypes.entrySet()) { + Type proto = QueryParamUtil.convertToQueryParamProto(entry.getValue()); + protoParamTypes.put(entry.getKey(), proto); + } + this.request.putAllParamTypes(protoParamTypes); + return this; + } + + public PrepareRpcExpectation respondWithStatus(Status.Code code) { + this.statusCode = code; + return this; + } + + public PrepareRpcExpectation respondWith(PrepareQueryResponse res) { + this.response = res; + return this; + } + + public PrepareRpcExpectation withDelay(Duration delay) { + this.delay = delay; + return this; + } + + PrepareQueryRequest getExpectedRequest() { + return this.request.build(); + } + } + + /** + * Fake prepared statement for testing. Note that the schema changes on calls to hard refresh. + * This is used to test plan updates propagate. + */ + public static final class FakePreparedStatement extends PreparedStatementImpl { + private static final PrepareResponse DEFAULT_INITIAL_RESPONSE = + PrepareResponse.fromProto( + prepareResponse( + ByteString.copyFromUtf8("initialPlan"), + metadata(columnMetadata("strCol", stringType())))); + private static final PreparedQueryData DEFAULT_INITIAL_PLAN = + PreparedQueryData.create(ApiFutures.immediateFuture(DEFAULT_INITIAL_RESPONSE)); + private static final PreparedQueryData DEFAULT_PLAN_ON_REFRESH = + PreparedQueryData.create( + ApiFutures.immediateFuture( + PrepareResponse.fromProto( + prepareResponse( + ByteString.copyFromUtf8("refreshedPlan"), + metadata(columnMetadata("bytesColl", bytesType())))))); + + private PreparedQueryData initialPlan; + private PreparedQueryData planOnRefresh; + + public FakePreparedStatement() { + super(DEFAULT_INITIAL_RESPONSE, new HashMap<>(), null, null); + this.initialPlan = DEFAULT_INITIAL_PLAN; + this.planOnRefresh = DEFAULT_PLAN_ON_REFRESH; + } + + public FakePreparedStatement( + PrepareResponse prepareResponse, Map> paramTypes) { + super(prepareResponse, paramTypes, null, null); + this.initialPlan = PreparedQueryData.create(ApiFutures.immediateFuture(prepareResponse)); + // Don't expect an refresh using this configuration + this.planOnRefresh = null; + } + + FakePreparedStatement withUpdatedPlans( + PreparedQueryData initialPlan, PreparedQueryData planOnRefresh) { + this.initialPlan = initialPlan; + this.planOnRefresh = planOnRefresh; + return this; + } + + @Override + public PreparedQueryData getLatestPrepareResponse() { + Preconditions.checkState( + initialPlan != null, "Trying to refresh FakePreparedStatement without planOnRefresh set"); + return initialPlan; + } + + @Override + public synchronized PreparedQueryData markExpiredAndStartRefresh( + PreparedQueryVersion expiredPreparedQueryVersion) { + return planOnRefresh; + } - return ExecuteQueryResponse.newBuilder().setMetadata(metadata).build(); + @Override + public void assertUsingSameStub(EnhancedBigtableStub stub) {} } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactoryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactoryTest.java index 2a3eb9e404..cb2c068939 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactoryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlProtoFactoryTest.java @@ -18,6 +18,9 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; import static com.google.common.truth.Truth.assertThat; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ErrorDetails; +import com.google.api.gax.rpc.StatusCode.Code; import com.google.bigtable.v2.ExecuteQueryResponse; import com.google.bigtable.v2.PartialResultSet; import com.google.bigtable.v2.ProtoRows; @@ -44,4 +47,16 @@ public void serializedProtoRows_canRoundTrip() throws InvalidProtocolBufferExcep assertThat(protoRows.getValuesList().get(1).getBytesValue()) .isEqualTo(ByteString.copyFromUtf8("bytes")); } + + @Test + public void testPlanRefreshError() { + ApiException planRefreshError = SqlProtoFactory.planRefreshError(); + assertThat(planRefreshError.getStatusCode().getCode()).isEqualTo(Code.FAILED_PRECONDITION); + ErrorDetails details = planRefreshError.getErrorDetails(); + assertThat(details.getPreconditionFailure()).isNotNull(); + assertThat(details.getPreconditionFailure().getViolationsList()).isNotEmpty(); + assertThat(details.getPreconditionFailure().getViolationsList().get(0).getType()) + .isEqualTo("PREPARED_QUERY_EXPIRED"); + assertThat(PlanRefreshingCallable.isPlanRefreshError(planRefreshError)).isTrue(); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerTest.java index 90e9672998..d61d9d5f20 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergerTest.java @@ -27,14 +27,15 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSets; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.tokenOnlyResultSet; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlRowMergerSubject.assertThat; import static org.junit.Assert.assertThrows; -import com.google.bigtable.v2.ColumnMetadata; import com.google.bigtable.v2.ExecuteQueryResponse; +import com.google.bigtable.v2.PartialResultSet; import com.google.bigtable.v2.Value; import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; import com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow; @@ -42,6 +43,8 @@ import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import java.util.Arrays; +import java.util.List; +import java.util.function.Supplier; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -49,67 +52,84 @@ @RunWith(JUnit4.class) public class SqlRowMergerTest { + static Supplier toSupplier( + com.google.bigtable.v2.ResultSetMetadata metadataProto) { + return () -> ProtoResultSetMetadata.fromProto(metadataProto); + } + @Test public void sqlRowMerger_handlesEmptyState() { - SqlRowMerger merger = new SqlRowMerger(); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); assertThat(merger).hasPartialFrame(false); assertThat(merger).hasFullFrame(false); } @Test public void sqlRowMerger_handlesMetadata() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), - columnMetadata("bytes", bytesType()), - columnMetadata("strArr", arrayType(stringType())), - columnMetadata("strByteMap", mapType(stringType(), bytesType())) - }; - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata( + columnMetadata("str", stringType()), + columnMetadata("bytes", bytesType()), + columnMetadata("strArr", arrayType(stringType())), + columnMetadata("strByteMap", mapType(stringType(), bytesType()))); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); assertThat(merger).hasPartialFrame(false); assertThat(merger).hasFullFrame(false); } @Test - public void sqlRowMerger_rejectsMetadataOfUnrecognizedType() { - SqlRowMerger merger = new SqlRowMerger(); - ExecuteQueryResponse unrecognizedMetadata = - ExecuteQueryResponse.newBuilder() - .setMetadata(com.google.bigtable.v2.ResultSetMetadata.newBuilder().build()) - .build(); - - assertThrows(IllegalStateException.class, () -> merger.push(unrecognizedMetadata)); + public void sqlRowMerger_doesntResolveMetadataUntilFirstPush() { + SqlRowMerger merger = + new SqlRowMerger( + () -> { + throw new RuntimeException("test"); + }); + + assertThat(merger).hasPartialFrame(false); + assertThat(merger).hasFullFrame(false); + assertThrows( + RuntimeException.class, () -> merger.push(ExecuteQueryResponse.getDefaultInstance())); } @Test - public void hasPartialFrame_trueWithIncompleteBatch() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()) - }; - merger.push(metadata(columns)); + public void hasPartialFrame_trueWithPartialBatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + SqlRowMerger merger = new SqlRowMerger(() -> metadata); + // Initial response here has reset bit set + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + merger.push(responses.get(0)); + merger.push(responses.get(1)); + assertThat(merger).hasPartialFrame(true); + } + + @Test + public void hasPartialFrame_trueWithUncommittedBatch() { + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); merger.push(partialResultSetWithoutToken(stringValue("test"))); assertThat(merger).hasPartialFrame(true); } @Test public void hasPartialFrame_trueWithFullRow() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()) - }; - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); merger.push(partialResultSetWithToken(stringValue("test"), bytesValue("test"))); assertThat(merger).hasPartialFrame(true); } @Test public void push_failsOnCompleteBatchWithIncompleteRow() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()) - }; - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); assertThrows( IllegalStateException.class, () -> merger.push(partialResultSetWithToken(stringValue("test")))); @@ -117,11 +137,9 @@ public void push_failsOnCompleteBatchWithIncompleteRow() { @Test public void hasFullFrame_trueWithFullRow() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()) - }; - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); merger.push(partialResultSetWithoutToken(stringValue("test"))); merger.push(partialResultSetWithToken(bytesValue("test"))); assertThat(merger).hasFullFrame(true); @@ -129,26 +147,37 @@ public void hasFullFrame_trueWithFullRow() { @Test public void hasFullFrame_falseWithIncompleteBatch() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()) - }; - merger.push(metadata(columns)); + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + SqlRowMerger merger = new SqlRowMerger(() -> metadata); + // Initial response here has reset bit set + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + merger.push(responses.get(0)); + merger.push(responses.get(1)); + assertThat(merger).hasFullFrame(false); + } + + @Test + public void hasFullFrame_falseWithUncommittedBatches() { + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); merger.push(partialResultSetWithoutToken(stringValue("test"))); assertThat(merger).hasFullFrame(false); } @Test public void sqlRowMerger_handlesResponseStream() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), - columnMetadata("bytes", bytesType()), - columnMetadata("strArr", arrayType(stringType())), - columnMetadata("strByteMap", mapType(stringType(), bytesType())) - }; - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadata(columns).getMetadata()); - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata( + columnMetadata("str", stringType()), + columnMetadata("bytes", bytesType()), + columnMetadata("strArr", arrayType(stringType())), + columnMetadata("strByteMap", mapType(stringType(), bytesType()))); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); // Three logical rows worth of values split across two responses Value[] values = { @@ -180,21 +209,56 @@ public void sqlRowMerger_handlesResponseStream() { } @Test - public void addValue_failsWithoutMetadataFirst() { - SqlRowMerger merger = new SqlRowMerger(); - assertThrows( - IllegalStateException.class, - () -> merger.push(partialResultSetWithToken(stringValue("test")))); + public void sqlRowMerger_handlesReset() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + SqlRowMerger merger = new SqlRowMerger(() -> metadata); + // Initial response here has reset bit set + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + merger.push(responses.get(0)); + merger.push(responses.get(1)); + assertThat(merger).hasPartialFrame(true); + assertThat(merger).hasFullFrame(false); + + for (ExecuteQueryResponse res : responses) { + merger.push(res); + } + assertThat(merger).hasFullFrame(true); + assertThat(merger.pop()) + .isEqualTo(ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("foo")))); + assertThat(merger.pop()) + .isEqualTo(ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("bar")))); + assertThat(merger.pop()) + .isEqualTo(ProtoSqlRow.create(metadata, ImmutableList.of(stringValue("baz")))); + assertThat(merger).hasFullFrame(false); } @Test - public void sqlRowMerger_handlesTokenWithOpenPartialBatch() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()), - }; - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadata(columns).getMetadata()); - merger.push(metadata(columns)); + public void sqlRowMerger_throwsExceptionOnChecksumMismatch() { + ResultSetMetadata metadata = + ProtoResultSetMetadata.fromProto(metadata(columnMetadata("a", stringType()))); + SqlRowMerger merger = new SqlRowMerger(() -> metadata); + List responses = + partialResultSets(3, stringValue("foo"), stringValue("bar"), stringValue("baz")); + + // Override the checksum of the final response + PartialResultSet lastResultsWithBadChecksum = + responses.get(2).getResults().toBuilder().setBatchChecksum(1234).build(); + ExecuteQueryResponse badChecksum = + ExecuteQueryResponse.newBuilder().setResults(lastResultsWithBadChecksum).build(); + merger.push(responses.get(0)); + merger.push(responses.get(1)); + assertThrows(IllegalStateException.class, () -> merger.push(badChecksum)); + } + + @Test + public void sqlRowMerger_handlesTokenWithUncommittedBatches() { + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); merger.push(partialResultSetWithoutToken(stringValue("test"))); merger.push(partialResultSetWithoutToken(bytesValue("test"))); merger.push(tokenOnlyResultSet(ByteString.copyFromUtf8("token"))); @@ -209,11 +273,9 @@ public void sqlRowMerger_handlesTokenWithOpenPartialBatch() { @Test public void sqlRowMerger_handlesTokensWithNoData() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()), - }; - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); merger.push(tokenOnlyResultSet(ByteString.copyFromUtf8("token1"))); merger.push(tokenOnlyResultSet(ByteString.copyFromUtf8("token2"))); merger.push(tokenOnlyResultSet(ByteString.copyFromUtf8("token3"))); @@ -224,12 +286,10 @@ public void sqlRowMerger_handlesTokensWithNoData() { @Test public void sqlRowMerger_handlesLeadingTokens() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = { - columnMetadata("str", stringType()), columnMetadata("bytes", bytesType()), - }; - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadata(columns).getMetadata()); - merger.push(metadata(columns)); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); + ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataProto); merger.push(tokenOnlyResultSet(ByteString.copyFromUtf8("token1"))); merger.push(partialResultSetWithoutToken(stringValue("test"))); merger.push(partialResultSetWithToken(bytesValue("test"))); @@ -243,18 +303,21 @@ public void sqlRowMerger_handlesLeadingTokens() { } @Test - public void addValue_failsOnDuplicateMetadata() { - SqlRowMerger merger = new SqlRowMerger(); - ColumnMetadata[] columns = {columnMetadata("str", stringType())}; - merger.push(metadata(columns)); - merger.push(partialResultSetWithToken(stringValue("test"))); + public void addValue_failsOnMetadataResponse() { + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); - assertThrows(IllegalStateException.class, () -> merger.push(metadata(columns))); + ExecuteQueryResponse deprecatedMetadataResponse = + ExecuteQueryResponse.newBuilder().setMetadata(metadataProto).build(); + assertThrows(IllegalStateException.class, () -> merger.push(deprecatedMetadataResponse)); } @Test public void pop_failsWhenQueueIsEmpty() { - SqlRowMerger merger = new SqlRowMerger(); + com.google.bigtable.v2.ResultSetMetadata metadataProto = + metadata(columnMetadata("str", stringType()), columnMetadata("bytes", bytesType())); + SqlRowMerger merger = new SqlRowMerger(toSupplier(metadataProto)); assertThrows(NullPointerException.class, merger::pop); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallableTest.java index 761ca4090f..fd6f0e2302 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/sql/SqlRowMergingCallableTest.java @@ -17,12 +17,14 @@ import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.arrayValue; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.callContext; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.columnMetadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Type; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.int64Value; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.metadata; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithToken; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.partialResultSetWithoutToken; +import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.preparedStatement; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringType; import static com.google.cloud.bigtable.data.v2.stub.sql.SqlProtoFactory.stringValue; import static com.google.common.truth.Truth.assertThat; @@ -30,16 +32,18 @@ import com.google.api.core.SettableApiFuture; import com.google.api.gax.rpc.ServerStream; -import com.google.bigtable.v2.ExecuteQueryRequest; import com.google.bigtable.v2.ExecuteQueryResponse; -import com.google.cloud.bigtable.data.v2.internal.ProtoResultSetMetadata; +import com.google.cloud.bigtable.data.v2.internal.PreparedStatementImpl; import com.google.cloud.bigtable.data.v2.internal.ProtoSqlRow; import com.google.cloud.bigtable.data.v2.internal.SqlRow; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; import com.google.cloud.bigtable.data.v2.models.sql.ResultSetMetadata; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; +import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; import org.junit.Test; import org.junit.runner.RunWith; @@ -54,29 +58,30 @@ public class SqlRowMergingCallableTest { @Test - public void testMerging() { - ExecuteQueryResponse metadataResponse = - metadata( - columnMetadata("stringCol", stringType()), - columnMetadata("intCol", int64Type()), - columnMetadata("arrayCol", arrayType(stringType()))); + public void testMerging() throws ExecutionException, InterruptedException { ServerStreamingStashCallable inner = new ServerStreamingStashCallable<>( Lists.newArrayList( - metadataResponse, partialResultSetWithoutToken( stringValue("foo"), int64Value(1), arrayValue(stringValue("foo"), stringValue("bar"))), partialResultSetWithToken(stringValue("test"), int64Value(10), arrayValue()))); + PreparedStatementImpl preparedStatement = + preparedStatement( + metadata( + columnMetadata("stringCol", stringType()), + columnMetadata("intCol", int64Type()), + columnMetadata("arrayCol", arrayType(stringType())))); + BoundStatement boundStatement = preparedStatement.bind().build(); + ResultSetMetadata metadata = + preparedStatement.getLatestPrepareResponse().prepareFuture().get().resultSetMetadata(); + SettableApiFuture mdFuture = SettableApiFuture.create(); + mdFuture.set(metadata); SqlRowMergingCallable rowMergingCallable = new SqlRowMergingCallable(inner); - ServerStream results = - rowMergingCallable.call( - ExecuteQueryCallContext.create( - ExecuteQueryRequest.getDefaultInstance(), SettableApiFuture.create())); + ServerStream results = rowMergingCallable.call(callContext(boundStatement, mdFuture)); List resultsList = results.stream().collect(Collectors.toList()); - ResultSetMetadata metadata = ProtoResultSetMetadata.fromProto(metadataResponse.getMetadata()); assertThat(resultsList) .containsExactly( ProtoSqlRow.create( @@ -90,17 +95,49 @@ public void testMerging() { } @Test - public void testError() { - // empty metadata is invalid + public void testError() throws ExecutionException, InterruptedException { + PreparedStatementImpl preparedStatement = + preparedStatement( + metadata( + columnMetadata("stringCol", stringType()), + columnMetadata("intCol", int64Type()), + columnMetadata("arrayCol", arrayType(stringType())))); + BoundStatement boundStatement = preparedStatement.bind().build(); + + // empty response is invalid ServerStreamingStashCallable inner = - new ServerStreamingStashCallable<>(Lists.newArrayList(metadata())); + new ServerStreamingStashCallable<>( + Lists.newArrayList(ExecuteQueryResponse.getDefaultInstance())); SqlRowMergingCallable rowMergingCallable = new SqlRowMergingCallable(inner); - ServerStream results = - rowMergingCallable.call( - ExecuteQueryCallContext.create( - ExecuteQueryRequest.getDefaultInstance(), SettableApiFuture.create())); + SettableApiFuture mdFuture = SettableApiFuture.create(); + mdFuture.set( + preparedStatement.getLatestPrepareResponse().prepareFuture().get().resultSetMetadata()); + ServerStream results = rowMergingCallable.call(callContext(boundStatement)); assertThrows(IllegalStateException.class, () -> results.iterator().next()); } + + @Test + public void testMetdataFutureError() { + PreparedStatement preparedStatement = + preparedStatement( + metadata( + columnMetadata("stringCol", stringType()), + columnMetadata("intCol", int64Type()), + columnMetadata("arrayCol", arrayType(stringType())))); + BoundStatement boundStatement = preparedStatement.bind().build(); + + // empty response is invalid + ServerStreamingStashCallable inner = + new ServerStreamingStashCallable<>( + Lists.newArrayList(ExecuteQueryResponse.getDefaultInstance())); + + SqlRowMergingCallable rowMergingCallable = new SqlRowMergingCallable(inner); + SettableApiFuture mdFuture = SettableApiFuture.create(); + mdFuture.setException(new RuntimeException("test")); + ServerStream results = rowMergingCallable.call(callContext(boundStatement, mdFuture)); + + assertThrows(RuntimeException.class, () -> results.iterator().next()); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettingsTest.java new file mode 100644 index 0000000000..7fb35308ea --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolSettingsTest.java @@ -0,0 +1,185 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.gax.grpc.ChannelPoolSettings; +import com.google.common.collect.ImmutableSet; +import io.grpc.ManagedChannel; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.Set; +import java.util.stream.Collectors; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.Mockito; + +@RunWith(JUnit4.class) +public class BigtableChannelPoolSettingsTest { + + @Test + public void testToBigtableChannelPoolSettingsAllFieldsSetCopiesCorrectly() throws Exception { + ChannelPoolSettings originalSettings = + ChannelPoolSettings.builder() + .setMinRpcsPerChannel(10) + .setMaxRpcsPerChannel(50) + .setMinChannelCount(5) + .setMaxChannelCount(100) + .setInitialChannelCount(20) + .setPreemptiveRefreshEnabled(true) + .build(); + + BigtableChannelPoolSettings copiedSettings = + BigtableChannelPoolSettings.copyFrom(originalSettings); + assertSettingsCopiedCorrectly(originalSettings, copiedSettings); + } + + @Test + public void testEntryRetainReleaseByType() { + ManagedChannel mockChannel = Mockito.mock(ManagedChannel.class); + BigtableChannelPool.Entry entry = new BigtableChannelPool.Entry(mockChannel); + + // Test Unary + assertThat(entry.retain(false)).isTrue(); // Unary + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(1); + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(1); + // Test Unary release + entry.release(false); + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(0); + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + + // Test Streaming + assertThat(entry.retain(true)).isTrue(); // Streaming + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(0); + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(1); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(1); + // Test Streaming again + assertThat(entry.retain(true)).isTrue(); // Streaming again + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(2); + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(2); + + entry.release(true); + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(1); + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(1); + + entry.release(true); + assertThat(entry.outstandingStreamingRpcs.get()).isEqualTo(0); + assertThat(entry.outstandingUnaryRpcs.get()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + + // Test Error Counting + entry.incrementErrorCount(); + assertThat(entry.getAndResetErrorCount()).isEqualTo(1); + assertThat(entry.getAndResetErrorCount()).isEqualTo(0); // Should be reset + + entry.incrementErrorCount(); + entry.incrementErrorCount(); + assertThat(entry.getAndResetErrorCount()).isEqualTo(2); + assertThat(entry.getAndResetErrorCount()).isEqualTo(0); + + // Test Success Counting + entry.incrementSuccessCount(); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(1); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); // Should be reset + + entry.incrementSuccessCount(); + entry.incrementSuccessCount(); + entry.incrementSuccessCount(); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(3); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + + // Test Mixed Error and Success Counting + entry.incrementErrorCount(); + entry.incrementSuccessCount(); + entry.incrementSuccessCount(); + entry.incrementErrorCount(); + entry.incrementSuccessCount(); + + assertThat(entry.getAndResetErrorCount()).isEqualTo(2); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(3); + + // Verify reset after mixed + assertThat(entry.getAndResetErrorCount()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + + // Ensure retain/release doesn't affect error/success counts + entry.incrementErrorCount(); + entry.retain(false); + entry.release(false); + assertThat(entry.getAndResetErrorCount()).isEqualTo(1); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + } + + @Test + public void testToBigtableChannelPoolSettingsDefaultValuesCopiesCorrectly() throws Exception { + ChannelPoolSettings originalSettings = ChannelPoolSettings.builder().build(); + BigtableChannelPoolSettings copiedSettings = + BigtableChannelPoolSettings.copyFrom(originalSettings); + assertSettingsCopiedCorrectly(originalSettings, copiedSettings); + } + + private void assertSettingsCopiedCorrectly( + ChannelPoolSettings originalSettings, BigtableChannelPoolSettings copiedSettings) + throws Exception { + + Set supportedGetters = + ImmutableSet.of( + "getMinRpcsPerChannel", + "getMaxRpcsPerChannel", + "getMinChannelCount", + "getMaxChannelCount", + "getInitialChannelCount", + "isPreemptiveRefreshEnabled", + "isStaticSize"); + + Set actualGetters = + Arrays.stream(ChannelPoolSettings.class.getDeclaredMethods()) + .filter( + method -> + Modifier.isPublic(method.getModifiers()) + && Modifier.isAbstract(method.getModifiers()) + && (method.getName().startsWith("get") + || method.getName().startsWith("is"))) + .map(Method::getName) + .collect(Collectors.toSet()); + + // If this fails then we need to add support for the additional attributes on the gax + // ChannelPool by updating the BigtableChannelPoolSettings.copyFrom method + assertThat(supportedGetters).containsAtLeastElementsIn(actualGetters); + + assertThat(originalSettings.getInitialChannelCount()) + .isEqualTo(copiedSettings.getInitialChannelCount()); + assertThat(originalSettings.getMaxChannelCount()) + .isEqualTo(copiedSettings.getMaxChannelCount()); + assertThat(originalSettings.getMinChannelCount()) + .isEqualTo(copiedSettings.getMinChannelCount()); + assertThat(originalSettings.getMaxRpcsPerChannel()) + .isEqualTo(copiedSettings.getMaxRpcsPerChannel()); + assertThat(originalSettings.getMinRpcsPerChannel()) + .isEqualTo(copiedSettings.getMinRpcsPerChannel()); + assertThat(originalSettings.getInitialChannelCount()) + .isEqualTo(copiedSettings.getInitialChannelCount()); + assertThat(originalSettings.isPreemptiveRefreshEnabled()) + .isEqualTo(copiedSettings.isPreemptiveRefreshEnabled()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolTest.java new file mode 100644 index 0000000000..6719a70d89 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/BigtableChannelPoolTest.java @@ -0,0 +1,236 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.*; + +import com.google.common.collect.Iterables; +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.io.InputStream; +import java.util.List; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.function.Supplier; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatchers; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class BigtableChannelPoolTest { + @Rule public final MockitoRule mockito = MockitoJUnit.rule(); + + @Mock private Supplier mockChannelFactory; + @Mock private ChannelPrimer mockChannelPrimer; + @Mock private ManagedChannel mockChannel; + @Mock private ClientCall mockClientCall; + + private MethodDescriptor unaryMethodDescriptor; + private MethodDescriptor streamingMethodDescriptor; + + @Captor private ArgumentCaptor> listenerCaptor; + + private BigtableChannelPool channelPool; + private ScheduledExecutorService executorService; + + private static class StringMarshaller implements MethodDescriptor.Marshaller { + @Override + public InputStream stream(String value) { + return null; // Not used in this test + } + + @Override + public String parse(InputStream stream) { + return null; // Not used in this test + } + } + + @Before + public void setUp() throws IOException { + when(mockChannelFactory.get()).thenReturn(mockChannel); + when(mockChannel.newCall( + ArgumentMatchers.>any(), any(CallOptions.class))) + .thenReturn(mockClientCall); + // Setup MethodDescriptors + // Initialize real MethodDescriptor instances + MethodDescriptor.Marshaller marshaller = new StringMarshaller(); + unaryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName(MethodDescriptor.generateFullMethodName("bigtable", "MutateRow")) + .setRequestMarshaller(marshaller) + .setResponseMarshaller(marshaller) + .build(); + + streamingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(MethodDescriptor.generateFullMethodName("bigtable", "ReadRows")) + .setRequestMarshaller(marshaller) + .setResponseMarshaller(marshaller) + .build(); + + executorService = Executors.newSingleThreadScheduledExecutor(); + + BigtableChannelPoolSettings settings = + BigtableChannelPoolSettings.builder() + .setInitialChannelCount(1) + .setMinChannelCount(1) + .setMaxChannelCount(1) + .build(); + channelPool = + new BigtableChannelPool(settings, mockChannelFactory, mockChannelPrimer, executorService); + + // Capture the listener when start is called + // Configure mockClientCall.start to capture the listener + doNothing().when(mockClientCall).start(listenerCaptor.capture(), any(Metadata.class)); + } + + private BigtableChannelPool.Entry getSingleEntry() { + List infos = channelPool.getChannelInfos(); + return (BigtableChannelPool.Entry) Iterables.getOnlyElement(infos); + } + + private ClientCall.Listener startCall(MethodDescriptor method) { + ClientCall call = channelPool.newCall(method, CallOptions.DEFAULT); + call.start(mock(ClientCall.Listener.class), new Metadata()); + return listenerCaptor.getValue(); + } + + @Test + public void testUnaryRpcSuccess() { + BigtableChannelPool.Entry entry = getSingleEntry(); + + // Before call + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(0); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + + ClientCall.Listener listener = startCall(unaryMethodDescriptor); + + // After start + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(1); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(1); + + // Simulate call success + listener.onClose(Status.OK, new Metadata()); + + // After close + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(0); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(1); + assertThat(entry.getAndResetErrorCount()).isEqualTo(0); + } + + @Test + public void testUnaryRpcFailure() { + BigtableChannelPool.Entry entry = getSingleEntry(); + ClientCall.Listener listener = startCall(unaryMethodDescriptor); + + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(1); + + // Simulate call failure + listener.onClose(Status.UNAVAILABLE, new Metadata()); + + // After close + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + assertThat(entry.getAndResetErrorCount()).isEqualTo(1); + } + + @Test + public void testStreamingRpcSuccess() { + BigtableChannelPool.Entry entry = getSingleEntry(); + + ClientCall.Listener listener = startCall(streamingMethodDescriptor); + + // After start + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(0); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(1); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(1); + + // Simulate call success + listener.onClose(Status.OK, new Metadata()); + + // After close + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(1); + assertThat(entry.getAndResetErrorCount()).isEqualTo(0); + } + + @Test + public void testStreamingRpcFailure() { + BigtableChannelPool.Entry entry = getSingleEntry(); + ClientCall.Listener listener = startCall(streamingMethodDescriptor); + + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(1); + + // Simulate call failure + listener.onClose(Status.DEADLINE_EXCEEDED, new Metadata()); + + // After close + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + assertThat(entry.getAndResetErrorCount()).isEqualTo(1); + } + + @Test + public void testMixedRpcs() { + BigtableChannelPool.Entry entry = getSingleEntry(); + + // 1 Unary OK + startCall(unaryMethodDescriptor).onClose(Status.OK, new Metadata()); + // 1 Unary Fail + startCall(unaryMethodDescriptor).onClose(Status.INTERNAL, new Metadata()); + // 1 Streaming OK + startCall(streamingMethodDescriptor).onClose(Status.OK, new Metadata()); + // 2 Streaming Fail + startCall(streamingMethodDescriptor).onClose(Status.CANCELLED, new Metadata()); + ClientCall.Listener streamingListener = startCall(streamingMethodDescriptor); + + // Before the last one closes + assertThat(entry.getOutstandingUnaryRpcs()).isEqualTo(0); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(1); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(2); // 1 Unary + 1 Streaming + assertThat(entry.getAndResetErrorCount()).isEqualTo(2); // 1 Unary + 1 Streaming + + // Close the last one + streamingListener.onClose(Status.UNKNOWN, new Metadata()); + assertThat(entry.getOutstandingStreamingRpcs()).isEqualTo(0); + assertThat(entry.getAndResetSuccessCount()).isEqualTo(0); + assertThat(entry.getAndResetErrorCount()).isEqualTo(1); // The last failure + assertThat(entry.totalOutstandingRpcs()).isEqualTo(0); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthCheckerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthCheckerTest.java new file mode 100644 index 0000000000..aaa68b175d --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/ChannelPoolHealthCheckerTest.java @@ -0,0 +1,189 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.api.core.SettableApiFuture; +import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.cloud.bigtable.data.v2.internal.session.fake.FakeClock; +import com.google.cloud.bigtable.data.v2.stub.BigtableChannelPrimer; +import com.google.cloud.bigtable.gaxx.grpc.BigtableChannelPool.Entry; +import com.google.cloud.bigtable.gaxx.grpc.ChannelPoolHealthChecker.ProbeResult; +import com.google.common.collect.ImmutableList; +import com.google.common.util.concurrent.ListeningScheduledExecutorService; +import com.google.common.util.concurrent.testing.TestingExecutors; +import io.grpc.ManagedChannel; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Supplier; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class ChannelPoolHealthCheckerTest { + @Rule public MockitoRule mockitoRule = MockitoJUnit.rule(); + @Mock private BigtableChannelPrimer mockPrimer; + private ListeningScheduledExecutorService executor; + private FakeClock fakeClock; + private ChannelPoolHealthChecker healthChecker; + private List channelList; + + @Before + public void setUp() { + executor = TestingExecutors.sameThreadScheduledExecutor(); + channelList = new ArrayList<>(); + Supplier> entrySupplier = () -> ImmutableList.copyOf(channelList); + + fakeClock = new FakeClock(Instant.parse("2025-08-01T10:00:00Z")); + healthChecker = new ChannelPoolHealthChecker(entrySupplier, mockPrimer, executor, fakeClock); + } + + // Helper method to create test entries + private Entry createTestEntry() { + ManagedChannel mockChannel = Mockito.mock(ManagedChannel.class); + return new Entry(mockChannel); + } + + @After + public void tearDown() { + executor.shutdownNow(); + } + + @Test + public void testOnComplete_successUpdatesCounters() { + Entry entry = createTestEntry(); + channelList.add(entry); + + SettableApiFuture successFuture = SettableApiFuture.create(); + Mockito.when(mockPrimer.sendPrimeRequestsAsync(entry.getManagedChannel())) + .thenReturn(successFuture); + + healthChecker.runProbes(); + + successFuture.set(PingAndWarmResponse.getDefaultInstance()); + + assertThat(entry.successfulProbesInWindow.get()).isEqualTo(1); + assertThat(entry.failedProbesInWindow.get()).isEqualTo(0); + } + + @Test + public void testOnComplete_cancellationIsFailure() { + Entry entry = createTestEntry(); + channelList.add(entry); + + SettableApiFuture hangingFuture = SettableApiFuture.create(); + Mockito.when(mockPrimer.sendPrimeRequestsAsync(entry.getManagedChannel())) + .thenReturn(hangingFuture); + + healthChecker.runProbes(); + + hangingFuture.cancel(true); + + assertThat(entry.failedProbesInWindow.get()).isEqualTo(1); + assertThat(entry.successfulProbesInWindow.get()).isEqualTo(0); + } + + @Test + public void testPruning_removesOldProbesAndCounters() { + Entry entry = createTestEntry(); + healthChecker.addProbeResult(entry, ProbeResult.create(fakeClock.instant(), false)); + assertThat(entry.failedProbesInWindow.get()).isEqualTo(1); + + fakeClock.increment(Duration.ofMinutes(6)); + healthChecker.pruneHistory(entry); // Manually call for direct testing + + assertThat(entry.probeHistory).isEmpty(); + assertThat(entry.failedProbesInWindow.get()).isEqualTo(0); + } + + @Test + public void testEviction_selectsUnhealthyChannel() { + Entry healthyEntry = createTestEntry(); + Entry badEntry = createTestEntry(); + Entry worseEntry = createTestEntry(); + + // A channel needs at least 4 probes to be considered for eviction + healthyEntry.successfulProbesInWindow.set(10); // 0% failure -> healthy + badEntry.failedProbesInWindow.set(3); // 3/13 = 23% failure -> healthy + badEntry.successfulProbesInWindow.set(10); + worseEntry.failedProbesInWindow.set(10); // 10/10 = 100% failure -> unhealthy + + channelList.addAll(Arrays.asList(healthyEntry, badEntry, worseEntry)); + + healthChecker.detectAndRemoveOutlierEntries(); + + // Assert that only the unhealthy channel was evicted + Mockito.verify(worseEntry.getManagedChannel()).enterIdle(); + Mockito.verify(badEntry.getManagedChannel(), Mockito.never()).enterIdle(); + Mockito.verify(healthyEntry.getManagedChannel(), Mockito.never()).enterIdle(); + } + + @Test + public void testEviction_selectsMostUnhealthyChannel() { + Entry healthyEntry = createTestEntry(); + Entry badEntry = createTestEntry(); + Entry worseEntry = createTestEntry(); + + // A channel needs at least 4 probes to be considered for eviction + healthyEntry.successfulProbesInWindow.set(10); // 0% failure -> healthy + badEntry.failedProbesInWindow.set(8); // 8/13 = 61% failure -> unhealthy + badEntry.successfulProbesInWindow.set(10); + worseEntry.failedProbesInWindow.set(10); // 10/10 = 100% failure -> most unhealthy + + channelList.addAll(Arrays.asList(healthyEntry, badEntry, worseEntry)); + + healthChecker.detectAndRemoveOutlierEntries(); + + // Assert that only the unhealthy channel was evicted + Mockito.verify(worseEntry.getManagedChannel()).enterIdle(); + Mockito.verify(badEntry.getManagedChannel(), Mockito.never()).enterIdle(); + Mockito.verify(healthyEntry.getManagedChannel(), Mockito.never()).enterIdle(); + } + + @Test + public void testCircuitBreaker_preventsEviction() { + Entry entry1 = createTestEntry(); + Entry entry2 = createTestEntry(); + Entry entry3 = createTestEntry(); + channelList.addAll(Arrays.asList(entry1, entry2, entry3)); + + // Set failure counts to exceed 60% SINGLE_CHANNEL_FAILURE_PERCENT_THRESHOLD with at least + // MIN_PROBES_FOR_EVALUATION (4) failures + for (Entry entry : channelList) { + entry.failedProbesInWindow.set(4); // 4 failures, 0 successes = 100% failure rate + } + + healthChecker.detectAndRemoveOutlierEntries(); + + // The circuit breaker should engage because 3/3 channels (100%) are unhealthy, + // which is greater than the 70% POOLWIDE_BAD_CHANNEL_CIRCUITBREAKER_PERCENT threshold. + Mockito.verify(entry1.getManagedChannel(), Mockito.never()).enterIdle(); + Mockito.verify(entry2.getManagedChannel(), Mockito.never()).enterIdle(); + Mockito.verify(entry3.getManagedChannel(), Mockito.never()).enterIdle(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/HealthChecker.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/HealthChecker.java new file mode 100644 index 0000000000..5e8e00b040 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/grpc/HealthChecker.java @@ -0,0 +1,25 @@ +/* + * 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 + * + * 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.bigtable.gaxx.grpc; + +import com.google.api.core.InternalApi; + +@InternalApi +public interface HealthChecker { + void start(); + + void stop(); +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserverTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserverTest.java index 23df3726d3..6adc71cae0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserverTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserverTest.java @@ -290,32 +290,33 @@ public void testConcurrentCancel() throws InterruptedException { final CountDownLatch latch = new CountDownLatch(2); - executor.submit( - new Runnable() { - @Override - public void run() { - while (!outerObserver.isDone()) { - outerObserver.popNextResponse(); - } - latch.countDown(); - } - }); + @SuppressWarnings("UnusedVariable") + Future ignored = + executor.submit( + () -> { + while (!outerObserver.isDone()) { + outerObserver.popNextResponse(); + } + latch.countDown(); + }); - executor.submit( - new Runnable() { - @Override - public void run() { - while (!innerController.isCancelled()) { - if (innerController.popLastPull() > 0) { - innerController.getObserver().onResponse("a"); + @SuppressWarnings("UnusedVariable") + Future ignored2 = + executor.submit( + new Runnable() { + @Override + public void run() { + while (!innerController.isCancelled()) { + if (innerController.popLastPull() > 0) { + innerController.getObserver().onResponse("a"); + } + } + innerController + .getObserver() + .onError(new RuntimeException("Some other upstream error")); + latch.countDown(); } - } - innerController - .getObserver() - .onError(new RuntimeException("Some other upstream error")); - latch.countDown(); - } - }); + }); outerObserver.getController().cancel(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/FakeStatusCode.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/FakeStatusCode.java index f1662dcd04..51c4f37880 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/FakeStatusCode.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/FakeStatusCode.java @@ -37,6 +37,7 @@ public Code getTransportCode() { } @Override + @SuppressWarnings("EqualsGetClass") public boolean equals(Object o) { if (this == o) { return true; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/MockStreamingApi.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/MockStreamingApi.java index 4ecca917ed..f82f1fed45 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/MockStreamingApi.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/gaxx/testing/MockStreamingApi.java @@ -25,6 +25,7 @@ import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import javax.annotation.Nullable; public class MockStreamingApi { public static class MockServerStreamingCallable @@ -36,7 +37,7 @@ public static class MockServerStreamingCallable public void call( RequestT request, ResponseObserver responseObserver, ApiCallContext context) { MockStreamController controller = new MockStreamController<>(responseObserver); - calls.add(new MockServerStreamingCall<>(request, controller)); + calls.add(new MockServerStreamingCall<>(request, controller, context)); responseObserver.onStart(controller); } @@ -52,10 +53,15 @@ public MockServerStreamingCall popLastCall() { public static class MockServerStreamingCall { private final RequestT request; private final MockStreamController controller; + private final ApiCallContext apiCallContext; - public MockServerStreamingCall(RequestT request, MockStreamController controller) { + public MockServerStreamingCall( + RequestT request, + MockStreamController controller, + @Nullable ApiCallContext apiCallContext) { this.request = request; this.controller = controller; + this.apiCallContext = apiCallContext; } public RequestT getRequest() { @@ -65,6 +71,10 @@ public RequestT getRequest() { public MockStreamController getController() { return controller; } + + public ApiCallContext getApiCallContext() { + return apiCallContext; + } } public static class MockStreamController implements StreamController { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/misc_utilities/AuthorizedViewTestHelper.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/misc_utilities/AuthorizedViewTestHelper.java index 83c40403f8..70e6a579ac 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/misc_utilities/AuthorizedViewTestHelper.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/misc_utilities/AuthorizedViewTestHelper.java @@ -16,22 +16,31 @@ package com.google.cloud.bigtable.misc_utilities; +import com.google.api.gax.rpc.UnavailableException; import com.google.cloud.bigtable.admin.v2.models.AuthorizedView; import com.google.cloud.bigtable.admin.v2.models.CreateAuthorizedViewRequest; import com.google.cloud.bigtable.admin.v2.models.FamilySubsets; import com.google.cloud.bigtable.admin.v2.models.SubsetView; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.test_helpers.env.TestEnvRule; import java.util.UUID; +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; public class AuthorizedViewTestHelper { + public static String AUTHORIZED_VIEW_ROW_PREFIX = "row#"; public static String AUTHORIZED_VIEW_COLUMN_QUALIFIER = "qualifier"; - public static AuthorizedView createTestAuthorizedView(TestEnvRule testEnvRule) { - String tableId = testEnvRule.env().getTableId(); + private static final Logger logger = Logger.getLogger(AuthorizedViewTestHelper.class.getName()); + + public static AuthorizedView createTestAuthorizedView(TestEnvRule testEnvRule) + throws InterruptedException { + TableId tableId = testEnvRule.env().getTableId(); String authorizedViewId = UUID.randomUUID().toString(); CreateAuthorizedViewRequest request = - CreateAuthorizedViewRequest.of(tableId, authorizedViewId) + CreateAuthorizedViewRequest.of(tableId.getTableId(), authorizedViewId) .setAuthorizedViewType( SubsetView.create() .addRowPrefix(AUTHORIZED_VIEW_ROW_PREFIX) @@ -40,6 +49,27 @@ public static AuthorizedView createTestAuthorizedView(TestEnvRule testEnvRule) { FamilySubsets.create() .addQualifierPrefix(AUTHORIZED_VIEW_COLUMN_QUALIFIER))) .setDeletionProtection(false); - return testEnvRule.env().getTableAdminClient().createAuthorizedView(request); + int retryCount = 0; + int maxRetries = 10; + while (true) { + try { + return testEnvRule.env().getTableAdminClient().createAuthorizedView(request); + } catch (UnavailableException e) { + if (++retryCount == maxRetries) { + throw e; + } + logger.log( + Level.INFO, + "Retrying createAuthorizedView " + + authorizedViewId + + " in table " + + tableId + + ", retryCount: " + + retryCount); + // Exponential backoff delay starting at 100ms. + double expSleep = 100 * Math.pow(2, retryCount); + Thread.sleep(Math.min((long) expSleep, TimeUnit.MINUTES.toMillis(1))); + } + } } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java index fd363099d9..f4bef01981 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/AbstractTestEnv.java @@ -22,6 +22,7 @@ import com.google.cloud.bigtable.admin.v2.models.Cluster; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -51,8 +52,6 @@ public enum ConnectionMode { public abstract BigtableDataClient getDataClient(); - public abstract BigtableDataClient getDataClientForInstance(String instanceId) throws IOException; - public abstract BigtableTableAdminClient getTableAdminClient(); public abstract BigtableTableAdminClient getTableAdminClientForInstance(String instanceId) @@ -82,9 +81,8 @@ public synchronized String getPrimaryClusterId() { byId.put(cluster.getId(), cluster); } - Cluster cluster = null; + Cluster cluster = byId.get(getInstanceId()); - cluster = byId.get(getInstanceId()); if (cluster == null) { // gcloud-devel setup cluster = byId.get(getInstanceId() + "-cluster"); @@ -102,7 +100,7 @@ public synchronized String getPrimaryClusterId() { return primaryClusterId; } - public abstract String getTableId(); + public abstract TableId getTableId(); public abstract String getKmsKeyName(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java index d7b9523b83..fe849af468 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java @@ -26,8 +26,8 @@ import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.TableId; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; -import com.google.common.base.Joiner; import com.google.common.base.MoreObjects; import com.google.common.base.Predicate; import com.google.common.base.Predicates; @@ -43,12 +43,11 @@ import io.grpc.ManagedChannelBuilder; import io.grpc.Metadata; import io.grpc.MethodDescriptor; +import io.grpc.Status; import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketAddress; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Optional; import javax.annotation.Nullable; @@ -63,7 +62,7 @@ *
    • {@code bigtable.table} * */ -class CloudEnv extends AbstractTestEnv { +public class CloudEnv extends AbstractTestEnv { private static final Predicate DIRECT_PATH_IPV6_MATCHER = new Predicate() { @Override @@ -81,9 +80,11 @@ public boolean apply(InetSocketAddress input) { private static final String DATA_ENDPOINT_PROPERTY_NAME = "bigtable.data-endpoint"; private static final String ADMIN_ENDPOINT_PROPERTY_NAME = "bigtable.admin-endpoint"; + private static final String DATA_JWT_OVERRIDE_PROPERTY_NAME = "bigtable.data-jwt-audience"; private static final String PROJECT_PROPERTY_NAME = "bigtable.project"; private static final String INSTANCE_PROPERTY_NAME = "bigtable.instance"; + private static final String APP_PROFILE_PROPERTY_NAME = "bigtable.app_profile"; private static final String TABLE_PROPERTY_NAME = "bigtable.table"; private static final String CMEK_KMS_KEY_PROPERTY_NAME = "bigtable.kms_key_name"; @@ -91,13 +92,13 @@ public boolean apply(InetSocketAddress input) { private final String projectId; private final String instanceId; - private final String tableId; - private final String tracingCookie; + private final TableId tableId; private final String kmsKeyName; private final BigtableDataSettings.Builder dataSettings; private final BigtableTableAdminSettings.Builder tableAdminSettings; private final BigtableInstanceAdminSettings.Builder instanceAdminSettings; + @Nullable private final String appProfileId; private BigtableDataClient dataClient; private BigtableTableAdminClient tableAdminClient; @@ -107,25 +108,29 @@ static CloudEnv fromSystemProperties() { return new CloudEnv( getOptionalProperty(DATA_ENDPOINT_PROPERTY_NAME, ""), getOptionalProperty(ADMIN_ENDPOINT_PROPERTY_NAME, ""), + getOptionalProperty(DATA_JWT_OVERRIDE_PROPERTY_NAME, ""), getOptionalProperty(CMEK_KMS_KEY_PROPERTY_NAME, ""), getRequiredProperty(PROJECT_PROPERTY_NAME), getRequiredProperty(INSTANCE_PROPERTY_NAME), - getRequiredProperty(TABLE_PROPERTY_NAME), + getOptionalProperty(APP_PROFILE_PROPERTY_NAME), + TableId.of(getRequiredProperty(TABLE_PROPERTY_NAME)), getOptionalProperty(TRACING_COOKIE_PROPERTY_NAME)); } private CloudEnv( @Nullable String dataEndpoint, @Nullable String adminEndpoint, + @Nullable String jwtAudienceOverride, @Nullable String kmsKeyName, String projectId, String instanceId, - String tableId, + @Nullable String appProfileId, + TableId tableId, @Nullable String tracingCookie) { this.projectId = projectId; this.instanceId = instanceId; + this.appProfileId = appProfileId; this.tableId = tableId; - this.tracingCookie = tracingCookie; this.kmsKeyName = kmsKeyName; this.dataSettings = @@ -133,6 +138,12 @@ private CloudEnv( if (!Strings.isNullOrEmpty(dataEndpoint)) { dataSettings.stubSettings().setEndpoint(dataEndpoint); } + if (!Strings.isNullOrEmpty(appProfileId)) { + dataSettings.setAppProfileId(appProfileId); + } + if (!Strings.isNullOrEmpty(jwtAudienceOverride)) { + dataSettings.stubSettings().setJwtAudience(jwtAudienceOverride); + } configureConnection(dataSettings.stubSettings()); configureUserAgent(dataSettings.stubSettings()); @@ -165,7 +176,7 @@ private static void injectTracingCookie( .build()); } - private void configureConnection(StubSettings.Builder stubSettings) { + private void configureConnection(StubSettings.Builder stubSettings) { // Build an remote address restricting interceptor final ClientInterceptor interceptor; @@ -193,6 +204,9 @@ private void configureConnection(StubSettings.Builder stubSettings) { throw new IllegalStateException("Unexpected ConnectionMode: " + getConnectionMode()); } + final ClientInterceptor appProfileInterceptor = + appProfileId != null ? new AppProfileInterceptor() : null; + // Inject the interceptor into the channel provider, taking care to preserve existing channel // configurator InstantiatingGrpcChannelProvider.Builder channelProvider = @@ -211,7 +225,11 @@ public ManagedChannelBuilder apply(ManagedChannelBuilder builder) { if (oldConfigurator != null) { builder = oldConfigurator.apply(builder); } - return builder.intercept(interceptor); + builder = builder.intercept(interceptor); + if (appProfileInterceptor != null) { + builder = builder.intercept(appProfileInterceptor); + } + return builder; } }; channelProvider.setChannelConfigurator(newConfigurator); @@ -255,25 +273,35 @@ public void onHeaders(Metadata headers) { }; } - private void configureUserAgent(EnhancedBigtableStubSettings.Builder stubSettings) { - List parts = new ArrayList<>(); - parts.add("java-bigtable-int-test"); - - switch (getConnectionMode()) { - case DEFAULT: - // nothing special - break; - case REQUIRE_CFE: - parts.add("bigtable-directpath-disable"); - break; - case REQUIRE_DIRECT_PATH: - case REQUIRE_DIRECT_PATH_IPV4: - parts.add("bigtable-directpath-enable"); - break; - default: - throw new IllegalStateException("Unexpected connectionMode: " + getConnectionMode()); + private class AppProfileInterceptor implements ClientInterceptor { + @Override + public ClientCall interceptCall( + MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) { + return new SimpleForwardingClientCall( + channel.newCall(methodDescriptor, callOptions)) { + @Override + public void start(Listener responseListener, Metadata headers) { + String reqParams = + headers.get( + Metadata.Key.of("x-goog-request-params", Metadata.ASCII_STRING_MARSHALLER)); + if (reqParams == null || !reqParams.contains("app_profile_id=" + appProfileId)) { + responseListener.onClose( + Status.FAILED_PRECONDITION.withDescription( + "Integration test was configured to run with app profile: " + + appProfileId + + ", but found a different app profile in the headers: " + + reqParams), + new Metadata()); + return; + } + super.start(responseListener, headers); + } + }; } - String newUserAgent = Joiner.on(" ").join(parts); + } + + private void configureUserAgent(EnhancedBigtableStubSettings.Builder stubSettings) { + String newUserAgent = "java-bigtable-int-test"; // Use the existing user-agent to use as a prefix Map existingHeaders = @@ -309,19 +337,6 @@ public BigtableDataClient getDataClient() { return dataClient; } - @Override - public BigtableDataClient getDataClientForInstance(String instanceId) throws IOException { - BigtableDataSettings.Builder settings = - BigtableDataSettings.newBuilder() - .setProjectId(dataSettings.getProjectId()) - .setInstanceId(instanceId); - settings - .stubSettings() - .setEndpoint(dataSettings.stubSettings().getEndpoint()) - .setTransportChannelProvider(dataSettings.stubSettings().getTransportChannelProvider()); - return BigtableDataClient.create(settings.build()); - } - @Override public BigtableTableAdminClient getTableAdminClient() { return tableAdminClient; @@ -378,10 +393,11 @@ public String getInstanceId() { } @Override - public String getTableId() { + public TableId getTableId() { return tableId; } + @Override public String getKmsKeyName() { return kmsKeyName; } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java index bec3e0eef2..2ba3bd72c1 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java @@ -22,6 +22,8 @@ import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.TableId; +import com.google.cloud.bigtable.data.v2.stub.metrics.NoopMetricsProvider; import com.google.cloud.bigtable.emulator.v2.Emulator; import com.google.common.base.Strings; import java.io.IOException; @@ -32,7 +34,7 @@ public class EmulatorEnv extends AbstractTestEnv { private static final String PROJECT_ID = "fake-project"; private static final String INSTANCE_ID = "fake-instance"; - private static final String TABLE_ID = "default-table"; + private static final TableId TABLE_ID = TableId.of("default-table"); private Emulator emulator; private BigtableTableAdminClient tableAdminClient; @@ -61,7 +63,8 @@ void start() throws Exception { BigtableDataSettings.newBuilderForEmulator(emulator.getPort()) .setProjectId("fake-project") .setInstanceId("fake-instance") - .setRefreshingChannel(false) + .setMetricsProvider(NoopMetricsProvider.INSTANCE) + .disableInternalMetrics() .build(); dataClient = BigtableDataClient.create(dataSettings); @@ -74,7 +77,8 @@ void start() throws Exception { tableAdminClient = BigtableTableAdminClient.create(tableAdminSettings); - tableAdminClient.createTable(CreateTableRequest.of(TABLE_ID).addFamily(getFamilyId())); + tableAdminClient.createTable( + CreateTableRequest.of(TABLE_ID.getTableId()).addFamily(getFamilyId())); } @Override @@ -110,7 +114,7 @@ public String getInstanceId() { } @Override - public String getTableId() { + public TableId getTableId() { return TABLE_ID; } @@ -119,11 +123,6 @@ public BigtableDataClient getDataClient() { return dataClient; } - @Override - public BigtableDataClient getDataClientForInstance(String instanceId) throws IOException { - throw new UnsupportedOperationException("Could not create a data client for another instance."); - } - @Override public BigtableTableAdminClient getTableAdminClient() { return tableAdminClient; @@ -140,6 +139,7 @@ public BigtableInstanceAdminClient getInstanceAdminClient() { throw new UnsupportedOperationException("InstanceAdminClient is not supported with emulator"); } + @Override public String getKmsKeyName() { throw new UnsupportedOperationException("CMEK is not supported with emulator"); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/PrefixGenerator.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/PrefixGenerator.java index c19d5a82b7..e003e5a6c8 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/PrefixGenerator.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/PrefixGenerator.java @@ -15,13 +15,13 @@ */ package com.google.cloud.bigtable.test_helpers.env; +import java.time.Instant; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; -import org.threeten.bp.Instant; public class PrefixGenerator implements TestRule { private static final Logger LOGGER = Logger.getLogger(TestEnvRule.class.getName()); @@ -35,6 +35,7 @@ public class PrefixGenerator implements TestRule { @Override public Statement apply(final Statement base, final Description description) { return new Statement() { + @Override public void evaluate() throws Throwable { before(description); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/TestEnvRule.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/TestEnvRule.java index b6e4651c6b..dcf0938a5c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/TestEnvRule.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/TestEnvRule.java @@ -24,9 +24,17 @@ import com.google.cloud.bigtable.admin.v2.models.AppProfile; import com.google.cloud.bigtable.admin.v2.models.Cluster; import com.google.cloud.bigtable.admin.v2.models.Instance; +import com.google.cloud.bigtable.admin.v2.models.LogicalView; +import com.google.cloud.bigtable.admin.v2.models.MaterializedView; +import com.google.cloud.bigtable.admin.v2.models.Table; import com.google.cloud.bigtable.admin.v2.models.UpdateAuthorizedViewRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateLogicalViewRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateMaterializedViewRequest; +import com.google.cloud.bigtable.admin.v2.models.UpdateTableRequest; import com.google.common.collect.ImmutableSet; import java.io.IOException; +import java.time.Instant; +import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -37,8 +45,6 @@ import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; -import org.threeten.bp.Instant; -import org.threeten.bp.temporal.ChronoUnit; /** * JUnit rule to start and stop the target test environment. @@ -63,9 +69,6 @@ public class TestEnvRule implements TestRule { private static final Logger LOGGER = Logger.getLogger(TestEnvRule.class.getName()); - private static final Boolean BIGTABLE_ENABLE_VERBOSE_GRPC_LOGS = - Boolean.getBoolean("bigtable.enable-grpc-logs"); - private static final String BIGTABLE_GRPC_LOG_DIR = System.getProperty("bigtable.grpc-log-dir"); private static final String BIGTABLE_EMULATOR_HOST_ENV_VAR = "BIGTABLE_EMULATOR_HOST"; private static final String ENV_PROPERTY = "bigtable.env"; private static final String env = System.getProperty(ENV_PROPERTY, "emulator"); @@ -79,6 +82,7 @@ public class TestEnvRule implements TestRule { @Override public Statement apply(final Statement base, final Description description) { return new Statement() { + @Override public void evaluate() throws Throwable { TestEnvRule.this.before(description); @@ -109,7 +113,8 @@ protected void before(Description description) throws Throwable { default: throw new IllegalArgumentException( String.format( - "Unknown env: %s. Please set the system property %s to either 'emulator' or 'cloud'.", + "Unknown env: %s. Please set the system property %s to either 'emulator' or" + + " 'cloud'.", env, ENV_PROPERTY)); } testEnv.start(); @@ -158,28 +163,41 @@ void cleanUpStale() throws ExecutionException, InterruptedException, IOException /** * Clean up AppProfile that were dynamically created in the default instance that have been * orphaned. - * - * @param stalePrefix */ private void cleanupStaleTables(String stalePrefix) { + LOGGER.info("Start cleaning up stale tables with stalePrefix=" + stalePrefix); for (String tableId : env().getTableAdminClient().listTables()) { if (!tableId.startsWith(PrefixGenerator.PREFIX)) { + LOGGER.info("Skip cleaning up table: " + tableId); continue; } if (stalePrefix.compareTo(tableId) > 0) { + LOGGER.info("Preparing stale table for delete: " + tableId); prepTableForDelete(tableId); try { + LOGGER.info("Deleting stable table: " + tableId); env().getTableAdminClient().deleteTable(tableId); - } catch (NotFoundException ignored) { - + } catch (NotFoundException e) { + LOGGER.log(Level.WARNING, "Deleting stale table failed: " + tableId, e); } } } } private void prepTableForDelete(String tableId) { - // Unprotected views if (!(env() instanceof EmulatorEnv)) { + // unprotect table + Table table = env().getTableAdminClient().getTable(tableId); + if (table.isDeletionProtected() || table.getChangeStreamRetention() != null) { + env() + .getTableAdminClient() + .updateTable( + UpdateTableRequest.of(tableId) + .setDeletionProtection(false) + .disableChangeStreamRetention()); + } + + // Unprotected views for (String viewId : env().getTableAdminClient().listAuthorizedViews(tableId)) { try { env() @@ -187,6 +205,7 @@ private void prepTableForDelete(String tableId) { .updateAuthorizedView( UpdateAuthorizedViewRequest.of(tableId, viewId).setDeletionProtection(false)); } catch (NotFoundException ignored) { + // nothing to clean up, the view was already deleted } } } @@ -195,8 +214,6 @@ private void prepTableForDelete(String tableId) { /** * Clean up AppProfile that were dynamically created in the default instance that have been * orphaned. - * - * @param stalePrefix */ private void cleanUpStaleAppProfile(String stalePrefix) { for (AppProfile appProfile : @@ -213,7 +230,7 @@ private void cleanUpStaleAppProfile(String stalePrefix) { .getInstanceAdminClient() .deleteAppProfile(env().getInstanceId(), appProfile.getId(), true); } catch (NotFoundException ignored) { - + // nothing to clean up, the app profile was already deleted } } } @@ -221,8 +238,6 @@ private void cleanUpStaleAppProfile(String stalePrefix) { /** * Clean up clusters that were dynamically created in the default instance that have been * orphaned. - * - * @param stalePrefix */ private void cleanUpStaleClusters(String stalePrefix) throws ExecutionException, InterruptedException { @@ -238,19 +253,48 @@ private void cleanUpStaleClusters(String stalePrefix) try { deleteBackups(env().getTableAdminClient(), cluster.getId()); } catch (NotFoundException ignored) { + // nothing to clean up, the backup was already deleted } try { env().getInstanceAdminClient().deleteCluster(env().getInstanceId(), cluster.getId()); } catch (NotFoundException ignored) { + // nothing to clean up, the cluster was already deleted } } } - /** - * Clean up dynamically created (non-default) instances that have been orphaned. - * - * @param stalePrefix - */ + private void prepInstanceForDelete(String instanceId) { + if (env() instanceof EmulatorEnv) { + return; + } + // Unprotected MaterializedViews. + for (MaterializedView materializedView : + env().getInstanceAdminClient().listMaterializedViews(instanceId)) { + try { + env() + .getInstanceAdminClient() + .updateMaterializedView( + UpdateMaterializedViewRequest.of(instanceId, materializedView.getId()) + .setDeletionProtection(false)); + } catch (NotFoundException ignored) { + // nothing to clean up, the materialized view was already deleted + } + } + // Unprotected LogicalViews. + for (LogicalView logicalView : env().getInstanceAdminClient().listLogicalViews(instanceId)) { + try { + env() + .getInstanceAdminClient() + .updateLogicalView( + UpdateLogicalViewRequest.of(instanceId, logicalView.getId()) + .setDeletionProtection(false)); + } catch (NotFoundException ignored) { + // nothing to clean up, the logical view was already deleted + } + } + } + + /** Clean up dynamically created (non-default) instances that have been orphaned. */ private void cleanUpStaleInstances(String stalePrefix) throws IOException, ExecutionException, InterruptedException { for (Instance instance : env().getInstanceAdminClient().listInstances()) { @@ -261,10 +305,11 @@ private void cleanUpStaleInstances(String stalePrefix) if (isNewerThanStale) { continue; } + prepInstanceForDelete(instance.getId()); try { deleteInstance(instance.getId()); } catch (NotFoundException ignored) { - + // nothing to clean up, the instance was already deleted } } } @@ -289,7 +334,7 @@ private void deleteInstance(String instanceId) try { env().getInstanceAdminClient().deleteCluster(instanceId, cluster.getId()); } catch (NotFoundException ignored) { - + // nothing to clean up, the cluster was already deleted } } isFirstCluster = false; @@ -300,7 +345,7 @@ private void deleteInstance(String instanceId) try { env().getInstanceAdminClient().deleteInstance(instanceId); } catch (NotFoundException ignored) { - + // nothing to clean up, the instance was already deleted } } diff --git a/google-cloud-bigtable/src/test/proto/album.proto b/google-cloud-bigtable/src/test/proto/album.proto new file mode 100644 index 0000000000..900c2c62db --- /dev/null +++ b/google-cloud-bigtable/src/test/proto/album.proto @@ -0,0 +1,36 @@ +/* + * 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 + * + * 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. + */ + +syntax = "proto3"; + +import "singer.proto"; + +package com.google.cloud.bigtable.data.v2.test; +option java_outer_classname = "AlbumProto"; +option java_package = "com.google.cloud.bigtable.data.v2.test"; + +enum Format { + CD = 0; + DIGITAL = 1; +} + +message Album { + Singer artist = 1; + string title = 2; + int32 release_year = 3; + Format format = 4; +} + diff --git a/google-cloud-bigtable/src/test/proto/google/bigtable/v2/fake.proto b/google-cloud-bigtable/src/test/proto/google/bigtable/v2/fake.proto new file mode 100644 index 0000000000..bf2c5eec5a --- /dev/null +++ b/google-cloud-bigtable/src/test/proto/google/bigtable/v2/fake.proto @@ -0,0 +1,83 @@ +syntax = "proto3"; + +import "google/bigtable/v2/bigtable.proto"; +import "google/bigtable/v2/session.proto"; +import "google/protobuf/duration.proto"; +import "google/rpc/status.proto"; + +package google.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; +option java_multiple_files = true; +option java_package = "com.google.bigtable.v2"; +option java_outer_classname = "FakeSessionProto"; + +service FakeSession { + rpc OpenSession(stream SessionRequest) returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = SESSION_TYPE_TEST; + } +} + +message OpenFakeSessionRequest { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TEST; + + google.protobuf.Duration go_away_delay = 2; + + // session set up phase + message StreamError { + google.rpc.Status status = 1; + map metadata = 2; + + // create a session but return a stream error after the delay + google.protobuf.Duration delay = 3; + } + + StreamError stream_error = 3; + SessionParametersResponse session_params = 4; + + // session steady phase + message Action { + google.protobuf.Duration delay = 1; + oneof payload { + VirtualRpcResponse response = 2; + ErrorResponse error_response = 3; + } + } + message ActionList { + bool repeat = 1; // if we should reuse the same action + repeated Action actions = 2; + } + map vrpc_actions = 6; + google.bigtable.v2.SessionRefreshConfig refresh_config = 7; + google.protobuf.Duration refresh_config_delay = 8; +} + +message OpenFakeSessionResponse { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TEST; +} + +message FakeSessionOpRequest { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TEST; + + oneof payload { + SessionFakeScriptedRequest scripted_request = 1; + } +} + +message SessionFakeScriptedRequest { + int64 tag = 1; +} + +message SessionFakeScriptedResponse { + string message = 1; +} + +message FakeSessionOpResponse { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TEST; + + oneof payload { + SessionFakeScriptedResponse scripted = 1; + } +} diff --git a/google-cloud-bigtable/src/test/proto/singer.proto b/google-cloud-bigtable/src/test/proto/singer.proto new file mode 100644 index 0000000000..838b85fbe6 --- /dev/null +++ b/google-cloud-bigtable/src/test/proto/singer.proto @@ -0,0 +1,34 @@ +/* + * 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 + * + * 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. + */ + +syntax = "proto3"; + +package com.google.cloud.bigtable.data.v2.test; +option java_outer_classname = "SingerProto"; +option java_package = "com.google.cloud.bigtable.data.v2.test"; + +enum Genre { + POP = 0; + JAZZ = 1; + FOLK = 2; + ROCK = 3; +} + +message Singer { + string name = 1; + Genre genre = 2; +} + diff --git a/google-cloud-bigtable/src/test/resources/logging-verbose.properties b/google-cloud-bigtable/src/test/resources/logging-verbose.properties index 6a3ac61364..58e1b79ef6 100644 --- a/google-cloud-bigtable/src/test/resources/logging-verbose.properties +++ b/google-cloud-bigtable/src/test/resources/logging-verbose.properties @@ -7,5 +7,5 @@ com.google.cloud.bigtable.data.v2.BigtableDataSettings.level=WARNING java.util.logging.ConsoleHandler.level = FINEST java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter -# time [level] loggerName: message -java.util.logging.SimpleFormatter.format=%1$tT [%4$-7s] %2$s: %5$s%n +# [YYYY-MM-DD HH:MM:SS.sss] [level] (loggerName): message +java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL.%1$tN] [%4$-7s] (%2$s): %5$s%n diff --git a/google-cloud-bigtable/src/test/resources/logging.properties b/google-cloud-bigtable/src/test/resources/logging.properties index 70319867bf..e181b45a01 100644 --- a/google-cloud-bigtable/src/test/resources/logging.properties +++ b/google-cloud-bigtable/src/test/resources/logging.properties @@ -7,6 +7,6 @@ java.util.logging.ConsoleHandler.level = INFO java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # time [level] loggerName: message -java.util.logging.SimpleFormatter.format=%1$tT [%4$-7s] %2$s: %5$s%n +java.util.logging.SimpleFormatter.format=%1$tT [%4$-7s] %2$s: %5$s %6$s%n diff --git a/google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb b/google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb new file mode 100644 index 0000000000..c9ac4086f5 --- /dev/null +++ b/google-cloud-bigtable/src/test/resources/proto_schema_bundle.pb @@ -0,0 +1,6 @@ + +q +proto_schema_bundle.proto#gcloud.bigtable.schema_bundles.test"' +Author + +first_name ( R firstNamebproto3 \ No newline at end of file diff --git a/google-cloud-bigtable/src/test/resources/proto_schema_bundle.proto b/google-cloud-bigtable/src/test/resources/proto_schema_bundle.proto new file mode 100644 index 0000000000..e03f0ccccb --- /dev/null +++ b/google-cloud-bigtable/src/test/resources/proto_schema_bundle.proto @@ -0,0 +1,22 @@ +/* +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. +*/ +// The `proto_schema_bundle.pb` binary is generated from this source file, via command: +// protoc --include_imports --descriptor_set_out=proto_schema_bundle.pb proto_schema_bundle.proto + +syntax = "proto3"; + +package gcloud.bigtable.schema_bundles.test; + +message Author { + string first_name = 1; +} diff --git a/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb b/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb new file mode 100644 index 0000000000..21f877a2fe --- /dev/null +++ b/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.pb @@ -0,0 +1,7 @@ + +– +!updated_proto_schema_bundle.proto#gcloud.bigtable.schema_bundles.test"D +Author + +first_name ( R firstName + last_name ( RlastNamebproto3 \ No newline at end of file diff --git a/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.proto b/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.proto new file mode 100644 index 0000000000..e9894cabd2 --- /dev/null +++ b/google-cloud-bigtable/src/test/resources/updated_proto_schema_bundle.proto @@ -0,0 +1,23 @@ +/* +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. +*/ +// The `updated_proto_schema_bundle.pb` binary is generated from this source file, via command: +// protoc --include_imports --descriptor_set_out=updated_proto_schema_bundle.pb updated_proto_schema_bundle.proto + +syntax = "proto3"; + +package gcloud.bigtable.schema_bundles.test; + +message Author { + string first_name = 1; + string last_name = 2; +} diff --git a/grpc-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml b/grpc-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml index 452e0b8902..68aac3bcac 100644 --- a/grpc-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml +++ b/grpc-google-cloud-bigtable-admin-v2/clirr-ignored-differences.xml @@ -1,15 +1,20 @@ + - - 6001 - com/google/bigtable/admin/v2/*Grpc - METHOD_* + 7012 + com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc$AsyncService + *LogicalView* + + + 7012 + com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc$AsyncService + *MaterializedView* 7012 - com/google/bigtable/admin/v2/BigtableTableAdminGrpc* + com/google/bigtable/admin/v2/BigtableTableAdminGrpc$AsyncService * diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml index 14510692d5..78a6e4c397 100644 --- a/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java index f786bb0b33..241ed9138f 100644 --- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java +++ b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 @@ * tables' metadata or data stored in those tables. * */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/bigtable/admin/v2/bigtable_instance_admin.proto") @io.grpc.stub.annotations.GrpcGenerated public final class BigtableInstanceAdminGrpc { @@ -970,6 +967,489 @@ private BigtableInstanceAdminGrpc() {} return getListHotTabletsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, com.google.longrunning.Operation> + getCreateLogicalViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateLogicalView", + requestType = com.google.bigtable.admin.v2.CreateLogicalViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, com.google.longrunning.Operation> + getCreateLogicalViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, com.google.longrunning.Operation> + getCreateLogicalViewMethod; + if ((getCreateLogicalViewMethod = BigtableInstanceAdminGrpc.getCreateLogicalViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getCreateLogicalViewMethod = BigtableInstanceAdminGrpc.getCreateLogicalViewMethod) + == null) { + BigtableInstanceAdminGrpc.getCreateLogicalViewMethod = + getCreateLogicalViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateLogicalView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.CreateLogicalViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("CreateLogicalView")) + .build(); + } + } + } + return getCreateLogicalViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView> + getGetLogicalViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLogicalView", + requestType = com.google.bigtable.admin.v2.GetLogicalViewRequest.class, + responseType = com.google.bigtable.admin.v2.LogicalView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView> + getGetLogicalViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView> + getGetLogicalViewMethod; + if ((getGetLogicalViewMethod = BigtableInstanceAdminGrpc.getGetLogicalViewMethod) == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getGetLogicalViewMethod = BigtableInstanceAdminGrpc.getGetLogicalViewMethod) == null) { + BigtableInstanceAdminGrpc.getGetLogicalViewMethod = + getGetLogicalViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLogicalView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.GetLogicalViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.LogicalView.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("GetLogicalView")) + .build(); + } + } + } + return getGetLogicalViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListLogicalViewsRequest, + com.google.bigtable.admin.v2.ListLogicalViewsResponse> + getListLogicalViewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogicalViews", + requestType = com.google.bigtable.admin.v2.ListLogicalViewsRequest.class, + responseType = com.google.bigtable.admin.v2.ListLogicalViewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListLogicalViewsRequest, + com.google.bigtable.admin.v2.ListLogicalViewsResponse> + getListLogicalViewsMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListLogicalViewsRequest, + com.google.bigtable.admin.v2.ListLogicalViewsResponse> + getListLogicalViewsMethod; + if ((getListLogicalViewsMethod = BigtableInstanceAdminGrpc.getListLogicalViewsMethod) == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getListLogicalViewsMethod = BigtableInstanceAdminGrpc.getListLogicalViewsMethod) + == null) { + BigtableInstanceAdminGrpc.getListLogicalViewsMethod = + getListLogicalViewsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLogicalViews")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListLogicalViewsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListLogicalViewsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("ListLogicalViews")) + .build(); + } + } + } + return getListLogicalViewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, com.google.longrunning.Operation> + getUpdateLogicalViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLogicalView", + requestType = com.google.bigtable.admin.v2.UpdateLogicalViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, com.google.longrunning.Operation> + getUpdateLogicalViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, com.google.longrunning.Operation> + getUpdateLogicalViewMethod; + if ((getUpdateLogicalViewMethod = BigtableInstanceAdminGrpc.getUpdateLogicalViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getUpdateLogicalViewMethod = BigtableInstanceAdminGrpc.getUpdateLogicalViewMethod) + == null) { + BigtableInstanceAdminGrpc.getUpdateLogicalViewMethod = + getUpdateLogicalViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateLogicalView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("UpdateLogicalView")) + .build(); + } + } + } + return getUpdateLogicalViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteLogicalViewRequest, com.google.protobuf.Empty> + getDeleteLogicalViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteLogicalView", + requestType = com.google.bigtable.admin.v2.DeleteLogicalViewRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteLogicalViewRequest, com.google.protobuf.Empty> + getDeleteLogicalViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteLogicalViewRequest, com.google.protobuf.Empty> + getDeleteLogicalViewMethod; + if ((getDeleteLogicalViewMethod = BigtableInstanceAdminGrpc.getDeleteLogicalViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getDeleteLogicalViewMethod = BigtableInstanceAdminGrpc.getDeleteLogicalViewMethod) + == null) { + BigtableInstanceAdminGrpc.getDeleteLogicalViewMethod = + getDeleteLogicalViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteLogicalView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("DeleteLogicalView")) + .build(); + } + } + } + return getDeleteLogicalViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.longrunning.Operation> + getCreateMaterializedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMaterializedView", + requestType = com.google.bigtable.admin.v2.CreateMaterializedViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.longrunning.Operation> + getCreateMaterializedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.longrunning.Operation> + getCreateMaterializedViewMethod; + if ((getCreateMaterializedViewMethod = + BigtableInstanceAdminGrpc.getCreateMaterializedViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getCreateMaterializedViewMethod = + BigtableInstanceAdminGrpc.getCreateMaterializedViewMethod) + == null) { + BigtableInstanceAdminGrpc.getCreateMaterializedViewMethod = + getCreateMaterializedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateMaterializedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier( + "CreateMaterializedView")) + .build(); + } + } + } + return getCreateMaterializedViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView> + getGetMaterializedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMaterializedView", + requestType = com.google.bigtable.admin.v2.GetMaterializedViewRequest.class, + responseType = com.google.bigtable.admin.v2.MaterializedView.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView> + getGetMaterializedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView> + getGetMaterializedViewMethod; + if ((getGetMaterializedViewMethod = BigtableInstanceAdminGrpc.getGetMaterializedViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getGetMaterializedViewMethod = BigtableInstanceAdminGrpc.getGetMaterializedViewMethod) + == null) { + BigtableInstanceAdminGrpc.getGetMaterializedViewMethod = + getGetMaterializedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetMaterializedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.GetMaterializedViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier("GetMaterializedView")) + .build(); + } + } + } + return getGetMaterializedViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListMaterializedViewsRequest, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse> + getListMaterializedViewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMaterializedViews", + requestType = com.google.bigtable.admin.v2.ListMaterializedViewsRequest.class, + responseType = com.google.bigtable.admin.v2.ListMaterializedViewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListMaterializedViewsRequest, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse> + getListMaterializedViewsMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListMaterializedViewsRequest, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse> + getListMaterializedViewsMethod; + if ((getListMaterializedViewsMethod = BigtableInstanceAdminGrpc.getListMaterializedViewsMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getListMaterializedViewsMethod = + BigtableInstanceAdminGrpc.getListMaterializedViewsMethod) + == null) { + BigtableInstanceAdminGrpc.getListMaterializedViewsMethod = + getListMaterializedViewsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListMaterializedViews")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListMaterializedViewsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier( + "ListMaterializedViews")) + .build(); + } + } + } + return getListMaterializedViewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.longrunning.Operation> + getUpdateMaterializedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMaterializedView", + requestType = com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.longrunning.Operation> + getUpdateMaterializedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.longrunning.Operation> + getUpdateMaterializedViewMethod; + if ((getUpdateMaterializedViewMethod = + BigtableInstanceAdminGrpc.getUpdateMaterializedViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getUpdateMaterializedViewMethod = + BigtableInstanceAdminGrpc.getUpdateMaterializedViewMethod) + == null) { + BigtableInstanceAdminGrpc.getUpdateMaterializedViewMethod = + getUpdateMaterializedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateMaterializedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier( + "UpdateMaterializedView")) + .build(); + } + } + } + return getUpdateMaterializedViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest, com.google.protobuf.Empty> + getDeleteMaterializedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMaterializedView", + requestType = com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest, com.google.protobuf.Empty> + getDeleteMaterializedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest, com.google.protobuf.Empty> + getDeleteMaterializedViewMethod; + if ((getDeleteMaterializedViewMethod = + BigtableInstanceAdminGrpc.getDeleteMaterializedViewMethod) + == null) { + synchronized (BigtableInstanceAdminGrpc.class) { + if ((getDeleteMaterializedViewMethod = + BigtableInstanceAdminGrpc.getDeleteMaterializedViewMethod) + == null) { + BigtableInstanceAdminGrpc.getDeleteMaterializedViewMethod = + getDeleteMaterializedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteMaterializedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableInstanceAdminMethodDescriptorSupplier( + "DeleteMaterializedView")) + .build(); + } + } + } + return getDeleteMaterializedViewMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static BigtableInstanceAdminStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -983,36 +1463,548 @@ public BigtableInstanceAdminStub newStub( return BigtableInstanceAdminStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static BigtableInstanceAdminBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableInstanceAdminBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableInstanceAdminBlockingV2Stub(channel, callOptions); + } + }; + return BigtableInstanceAdminBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BigtableInstanceAdminBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableInstanceAdminBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableInstanceAdminBlockingStub(channel, callOptions); + } + }; + return BigtableInstanceAdminBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BigtableInstanceAdminFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableInstanceAdminFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableInstanceAdminFutureStub(channel, callOptions); + } + }; + return BigtableInstanceAdminFutureStub.newStub(factory, channel); + } + + /** + * + * + *
      +   * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      +   * Clusters. Provides access to the Instance and Cluster schemas only, not the
      +   * tables' metadata or data stored in those tables.
      +   * 
      + */ + public interface AsyncService { + + /** + * + * + *
      +     * Create an instance within a project.
      +     * Note that exactly one of Cluster.serve_nodes and
      +     * Cluster.cluster_config.cluster_autoscaling_config can be set. If
      +     * serve_nodes is set to non-zero, then the cluster is manually scaled. If
      +     * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
      +     * enabled.
      +     * 
      + */ + default void createInstance( + com.google.bigtable.admin.v2.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstanceMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets information about an instance.
      +     * 
      + */ + default void getInstance( + com.google.bigtable.admin.v2.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists information about instances in a project.
      +     * 
      + */ + default void listInstances( + com.google.bigtable.admin.v2.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates an instance within a project. This method updates only the display
      +     * name and type for an Instance. To update other Instance properties, such as
      +     * labels, use PartialUpdateInstance.
      +     * 
      + */ + default void updateInstance( + com.google.bigtable.admin.v2.Instance request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInstanceMethod(), responseObserver); + } + + /** + * + * + *
      +     * Partially updates an instance within a project. This method can modify all
      +     * fields of an Instance and is the preferred way to update an Instance.
      +     * 
      + */ + default void partialUpdateInstance( + com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPartialUpdateInstanceMethod(), responseObserver); + } + + /** + * + * + *
      +     * Delete an instance from a project.
      +     * 
      + */ + default void deleteInstance( + com.google.bigtable.admin.v2.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
      +     * Creates a cluster within an instance.
      +     * Note that exactly one of Cluster.serve_nodes and
      +     * Cluster.cluster_config.cluster_autoscaling_config can be set. If
      +     * serve_nodes is set to non-zero, then the cluster is manually scaled. If
      +     * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
      +     * enabled.
      +     * 
      + */ + default void createCluster( + com.google.bigtable.admin.v2.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateClusterMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets information about a cluster.
      +     * 
      + */ + default void getCluster( + com.google.bigtable.admin.v2.GetClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists information about clusters in an instance.
      +     * 
      + */ + default void listClusters( + com.google.bigtable.admin.v2.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListClustersMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates a cluster within an instance.
      +     * Note that UpdateCluster does not support updating
      +     * cluster_config.cluster_autoscaling_config. In order to update it, you
      +     * must use PartialUpdateCluster.
      +     * 
      + */ + default void updateCluster( + com.google.bigtable.admin.v2.Cluster request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateClusterMethod(), responseObserver); + } + + /** + * + * + *
      +     * Partially updates a cluster within a project. This method is the preferred
      +     * way to update a Cluster.
      +     * To enable and update autoscaling, set
      +     * cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
      +     * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
      +     * are ignored. Note that an update cannot simultaneously set serve_nodes to
      +     * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
      +     * also specify both in the update_mask.
      +     * To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
      +     * and explicitly set a serve_node count via the update_mask.
      +     * 
      + */ + default void partialUpdateCluster( + com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPartialUpdateClusterMethod(), responseObserver); + } + + /** + * + * + *
      +     * Deletes a cluster from an instance.
      +     * 
      + */ + default void deleteCluster( + com.google.bigtable.admin.v2.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteClusterMethod(), responseObserver); + } + + /** + * + * + *
      +     * Creates an app profile within an instance.
      +     * 
      + */ + default void createAppProfile( + com.google.bigtable.admin.v2.CreateAppProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAppProfileMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets information about an app profile.
      +     * 
      + */ + default void getAppProfile( + com.google.bigtable.admin.v2.GetAppProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAppProfileMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists information about app profiles in an instance.
      +     * 
      + */ + default void listAppProfiles( + com.google.bigtable.admin.v2.ListAppProfilesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAppProfilesMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates an app profile within an instance.
      +     * 
      + */ + default void updateAppProfile( + com.google.bigtable.admin.v2.UpdateAppProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAppProfileMethod(), responseObserver); + } + + /** + * + * + *
      +     * Deletes an app profile from an instance.
      +     * 
      + */ + default void deleteAppProfile( + com.google.bigtable.admin.v2.DeleteAppProfileRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAppProfileMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets the access control policy for an instance resource. Returns an empty
      +     * policy if an instance exists but does not have a policy set.
      +     * 
      + */ + default void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
      +     * Sets the access control policy on an instance resource. Replaces any
      +     * existing policy.
      +     * 
      + */ + default void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
      +     * Returns permissions that the caller has on the specified instance resource.
      +     * 
      + */ + default void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTestIamPermissionsMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists hot tablets in a cluster, within the time range provided. Hot
      +     * tablets are ordered based on CPU usage.
      +     * 
      + */ + default void listHotTablets( + com.google.bigtable.admin.v2.ListHotTabletsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListHotTabletsMethod(), responseObserver); + } + + /** + * + * + *
      +     * Creates a logical view within an instance.
      +     * 
      + */ + default void createLogicalView( + com.google.bigtable.admin.v2.CreateLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateLogicalViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets information about a logical view.
      +     * 
      + */ + default void getLogicalView( + com.google.bigtable.admin.v2.GetLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLogicalViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists information about logical views in an instance.
      +     * 
      + */ + default void listLogicalViews( + com.google.bigtable.admin.v2.ListLogicalViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLogicalViewsMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates a logical view within an instance.
      +     * 
      + */ + default void updateLogicalView( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateLogicalViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Deletes a logical view from an instance.
      +     * 
      + */ + default void deleteLogicalView( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteLogicalViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Creates a materialized view within an instance.
      +     * 
      + */ + default void createMaterializedView( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMaterializedViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets information about a materialized view.
      +     * 
      + */ + default void getMaterializedView( + com.google.bigtable.admin.v2.GetMaterializedViewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMaterializedViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists information about materialized views in an instance.
      +     * 
      + */ + default void listMaterializedViews( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMaterializedViewsMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates a materialized view within an instance.
      +     * 
      + */ + default void updateMaterializedView( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMaterializedViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * Deletes a materialized view from an instance.
      +     * 
      + */ + default void deleteMaterializedView( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMaterializedViewMethod(), responseObserver); + } + } + /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service + * Base class for the server implementation of the service BigtableInstanceAdmin. + * + *
      +   * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      +   * Clusters. Provides access to the Instance and Cluster schemas only, not the
      +   * tables' metadata or data stored in those tables.
      +   * 
      */ - public static BigtableInstanceAdminBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BigtableInstanceAdminBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BigtableInstanceAdminBlockingStub(channel, callOptions); - } - }; - return BigtableInstanceAdminBlockingStub.newStub(factory, channel); - } + public abstract static class BigtableInstanceAdminImplBase + implements io.grpc.BindableService, AsyncService { - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static BigtableInstanceAdminFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BigtableInstanceAdminFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BigtableInstanceAdminFutureStub(channel, callOptions); - } - }; - return BigtableInstanceAdminFutureStub.newStub(factory, channel); + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return BigtableInstanceAdminGrpc.bindService(this); + } } /** - * + * A stub to allow clients to do asynchronous rpc calls to service BigtableInstanceAdmin. * *
          * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      @@ -1020,7 +2012,17 @@ public BigtableInstanceAdminFutureStub newStub(
          * tables' metadata or data stored in those tables.
          * 
      */ - public interface AsyncService { + public static final class BigtableInstanceAdminStub + extends io.grpc.stub.AbstractAsyncStub { + private BigtableInstanceAdminStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigtableInstanceAdminStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableInstanceAdminStub(channel, callOptions); + } /** * @@ -1034,11 +2036,13 @@ public interface AsyncService { * enabled. * */ - default void createInstance( + public void createInstance( com.google.bigtable.admin.v2.CreateInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateInstanceMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1048,11 +2052,13 @@ default void createInstance( * Gets information about an instance. * */ - default void getInstance( + public void getInstance( com.google.bigtable.admin.v2.GetInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetInstanceMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1062,12 +2068,14 @@ default void getInstance( * Lists information about instances in a project. * */ - default void listInstances( + public void listInstances( com.google.bigtable.admin.v2.ListInstancesRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListInstancesMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1079,11 +2087,13 @@ default void listInstances( * labels, use PartialUpdateInstance. * */ - default void updateInstance( + public void updateInstance( com.google.bigtable.admin.v2.Instance request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateInstanceMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1094,11 +2104,13 @@ default void updateInstance( * fields of an Instance and is the preferred way to update an Instance. * */ - default void partialUpdateInstance( + public void partialUpdateInstance( com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getPartialUpdateInstanceMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPartialUpdateInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1108,11 +2120,13 @@ default void partialUpdateInstance( * Delete an instance from a project. * */ - default void deleteInstance( + public void deleteInstance( com.google.bigtable.admin.v2.DeleteInstanceRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteInstanceMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1127,11 +2141,13 @@ default void deleteInstance( * enabled. * */ - default void createCluster( + public void createCluster( com.google.bigtable.admin.v2.CreateClusterRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateClusterMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1141,10 +2157,11 @@ default void createCluster( * Gets information about a cluster. * */ - default void getCluster( + public void getCluster( com.google.bigtable.admin.v2.GetClusterRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); } /** @@ -1154,12 +2171,14 @@ default void getCluster( * Lists information about clusters in an instance. * */ - default void listClusters( + public void listClusters( com.google.bigtable.admin.v2.ListClustersRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListClustersMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1172,11 +2191,13 @@ default void listClusters( * must use PartialUpdateCluster. * */ - default void updateCluster( + public void updateCluster( com.google.bigtable.admin.v2.Cluster request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateClusterMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1195,11 +2216,13 @@ default void updateCluster( * and explicitly set a serve_node count via the update_mask. * */ - default void partialUpdateCluster( + public void partialUpdateCluster( com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getPartialUpdateClusterMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPartialUpdateClusterMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1209,11 +2232,13 @@ default void partialUpdateCluster( * Deletes a cluster from an instance. * */ - default void deleteCluster( + public void deleteCluster( com.google.bigtable.admin.v2.DeleteClusterRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteClusterMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1223,11 +2248,13 @@ default void deleteCluster( * Creates an app profile within an instance. * */ - default void createAppProfile( + public void createAppProfile( com.google.bigtable.admin.v2.CreateAppProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAppProfileMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1237,11 +2264,13 @@ default void createAppProfile( * Gets information about an app profile. * */ - default void getAppProfile( + public void getAppProfile( com.google.bigtable.admin.v2.GetAppProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAppProfileMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1251,12 +2280,14 @@ default void getAppProfile( * Lists information about app profiles in an instance. * */ - default void listAppProfiles( + public void listAppProfiles( com.google.bigtable.admin.v2.ListAppProfilesRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAppProfilesMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAppProfilesMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1266,11 +2297,13 @@ default void listAppProfiles( * Updates an app profile within an instance. * */ - default void updateAppProfile( + public void updateAppProfile( com.google.bigtable.admin.v2.UpdateAppProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAppProfileMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1280,11 +2313,13 @@ default void updateAppProfile( * Deletes an app profile from an instance. * */ - default void deleteAppProfile( + public void deleteAppProfile( com.google.bigtable.admin.v2.DeleteAppProfileRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAppProfileMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAppProfileMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1295,11 +2330,13 @@ default void deleteAppProfile( * policy if an instance exists but does not have a policy set. * */ - default void getIamPolicy( + public void getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetIamPolicyMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1310,11 +2347,13 @@ default void getIamPolicy( * existing policy. * */ - default void setIamPolicy( + public void setIamPolicy( com.google.iam.v1.SetIamPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getSetIamPolicyMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1324,12 +2363,14 @@ default void setIamPolicy( * Returns permissions that the caller has on the specified instance resource. * */ - default void testIamPermissions( + public void testIamPermissions( com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getTestIamPermissionsMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); } /** @@ -1340,35 +2381,182 @@ default void testIamPermissions( * tablets are ordered based on CPU usage. * */ - default void listHotTablets( + public void listHotTablets( com.google.bigtable.admin.v2.ListHotTabletsRequest request, io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListHotTabletsMethod(), responseObserver); + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHotTabletsMethod(), getCallOptions()), + request, + responseObserver); } - } - /** - * Base class for the server implementation of the service BigtableInstanceAdmin. - * - *
      -   * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      -   * Clusters. Provides access to the Instance and Cluster schemas only, not the
      -   * tables' metadata or data stored in those tables.
      -   * 
      - */ - public abstract static class BigtableInstanceAdminImplBase - implements io.grpc.BindableService, AsyncService { + /** + * + * + *
      +     * Creates a logical view within an instance.
      +     * 
      + */ + public void createLogicalView( + com.google.bigtable.admin.v2.CreateLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateLogicalViewMethod(), getCallOptions()), + request, + responseObserver); + } - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return BigtableInstanceAdminGrpc.bindService(this); + /** + * + * + *
      +     * Gets information about a logical view.
      +     * 
      + */ + public void getLogicalView( + com.google.bigtable.admin.v2.GetLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLogicalViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Lists information about logical views in an instance.
      +     * 
      + */ + public void listLogicalViews( + com.google.bigtable.admin.v2.ListLogicalViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLogicalViewsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Updates a logical view within an instance.
      +     * 
      + */ + public void updateLogicalView( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateLogicalViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Deletes a logical view from an instance.
      +     * 
      + */ + public void deleteLogicalView( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteLogicalViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Creates a materialized view within an instance.
      +     * 
      + */ + public void createMaterializedView( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMaterializedViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Gets information about a materialized view.
      +     * 
      + */ + public void getMaterializedView( + com.google.bigtable.admin.v2.GetMaterializedViewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMaterializedViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Lists information about materialized views in an instance.
      +     * 
      + */ + public void listMaterializedViews( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMaterializedViewsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Updates a materialized view within an instance.
      +     * 
      + */ + public void updateMaterializedView( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMaterializedViewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Deletes a materialized view from an instance.
      +     * 
      + */ + public void deleteMaterializedView( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMaterializedViewMethod(), getCallOptions()), + request, + responseObserver); } } /** - * A stub to allow clients to do asynchronous rpc calls to service BigtableInstanceAdmin. + * A stub to allow clients to do synchronous rpc calls to service BigtableInstanceAdmin. * *
          * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      @@ -1376,16 +2564,17 @@ public final io.grpc.ServerServiceDefinition bindService() {
          * tables' metadata or data stored in those tables.
          * 
      */ - public static final class BigtableInstanceAdminStub - extends io.grpc.stub.AbstractAsyncStub { - private BigtableInstanceAdminStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class BigtableInstanceAdminBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private BigtableInstanceAdminBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected BigtableInstanceAdminStub build( + protected BigtableInstanceAdminBlockingV2Stub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BigtableInstanceAdminStub(channel, callOptions); + return new BigtableInstanceAdminBlockingV2Stub(channel, callOptions); } /** @@ -1396,17 +2585,14 @@ protected BigtableInstanceAdminStub build( * Note that exactly one of Cluster.serve_nodes and * Cluster.cluster_config.cluster_autoscaling_config can be set. If * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - */ - public void createInstance( - com.google.bigtable.admin.v2.CreateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), - request, - responseObserver); + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * + */ + public com.google.longrunning.Operation createInstance( + com.google.bigtable.admin.v2.CreateInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); } /** @@ -1416,13 +2602,10 @@ public void createInstance( * Gets information about an instance. * */ - public void getInstance( - com.google.bigtable.admin.v2.GetInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInstanceMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.Instance getInstance( + com.google.bigtable.admin.v2.GetInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); } /** @@ -1432,14 +2615,10 @@ public void getInstance( * Lists information about instances in a project. * */ - public void listInstances( - com.google.bigtable.admin.v2.ListInstancesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.ListInstancesResponse listInstances( + com.google.bigtable.admin.v2.ListInstancesRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); } /** @@ -1451,13 +2630,10 @@ public void listInstances( * labels, use PartialUpdateInstance. * */ - public void updateInstance( - com.google.bigtable.admin.v2.Instance request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.Instance updateInstance( + com.google.bigtable.admin.v2.Instance request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); } /** @@ -1468,13 +2644,11 @@ public void updateInstance( * fields of an Instance and is the preferred way to update an Instance. * */ - public void partialUpdateInstance( - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPartialUpdateInstanceMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation partialUpdateInstance( + com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPartialUpdateInstanceMethod(), getCallOptions(), request); } /** @@ -1484,13 +2658,10 @@ public void partialUpdateInstance( * Delete an instance from a project. * */ - public void deleteInstance( - com.google.bigtable.admin.v2.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteInstance( + com.google.bigtable.admin.v2.DeleteInstanceRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); } /** @@ -1505,13 +2676,10 @@ public void deleteInstance( * enabled. * */ - public void createCluster( - com.google.bigtable.admin.v2.CreateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateClusterMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation createCluster( + com.google.bigtable.admin.v2.CreateClusterRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateClusterMethod(), getCallOptions(), request); } /** @@ -1521,11 +2689,10 @@ public void createCluster( * Gets information about a cluster. * */ - public void getCluster( - com.google.bigtable.admin.v2.GetClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); + public com.google.bigtable.admin.v2.Cluster getCluster( + com.google.bigtable.admin.v2.GetClusterRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetClusterMethod(), getCallOptions(), request); } /** @@ -1535,14 +2702,10 @@ public void getCluster( * Lists information about clusters in an instance. * */ - public void listClusters( - com.google.bigtable.admin.v2.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListClustersMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.ListClustersResponse listClusters( + com.google.bigtable.admin.v2.ListClustersRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListClustersMethod(), getCallOptions(), request); } /** @@ -1555,13 +2718,10 @@ public void listClusters( * must use PartialUpdateCluster. * */ - public void updateCluster( - com.google.bigtable.admin.v2.Cluster request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation updateCluster( + com.google.bigtable.admin.v2.Cluster request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateClusterMethod(), getCallOptions(), request); } /** @@ -1580,13 +2740,11 @@ public void updateCluster( * and explicitly set a serve_node count via the update_mask. * */ - public void partialUpdateCluster( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getPartialUpdateClusterMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation partialUpdateCluster( + com.google.bigtable.admin.v2.PartialUpdateClusterRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPartialUpdateClusterMethod(), getCallOptions(), request); } /** @@ -1596,13 +2754,10 @@ public void partialUpdateCluster( * Deletes a cluster from an instance. * */ - public void deleteCluster( - com.google.bigtable.admin.v2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteCluster( + com.google.bigtable.admin.v2.DeleteClusterRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteClusterMethod(), getCallOptions(), request); } /** @@ -1612,13 +2767,11 @@ public void deleteCluster( * Creates an app profile within an instance. * */ - public void createAppProfile( - com.google.bigtable.admin.v2.CreateAppProfileRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAppProfileMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.AppProfile createAppProfile( + com.google.bigtable.admin.v2.CreateAppProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAppProfileMethod(), getCallOptions(), request); } /** @@ -1628,13 +2781,10 @@ public void createAppProfile( * Gets information about an app profile. * */ - public void getAppProfile( - com.google.bigtable.admin.v2.GetAppProfileRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAppProfileMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.AppProfile getAppProfile( + com.google.bigtable.admin.v2.GetAppProfileRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAppProfileMethod(), getCallOptions(), request); } /** @@ -1644,14 +2794,11 @@ public void getAppProfile( * Lists information about app profiles in an instance. * */ - public void listAppProfiles( - com.google.bigtable.admin.v2.ListAppProfilesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAppProfilesMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.ListAppProfilesResponse listAppProfiles( + com.google.bigtable.admin.v2.ListAppProfilesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAppProfilesMethod(), getCallOptions(), request); } /** @@ -1661,13 +2808,11 @@ public void listAppProfiles( * Updates an app profile within an instance. * */ - public void updateAppProfile( - com.google.bigtable.admin.v2.UpdateAppProfileRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAppProfileMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation updateAppProfile( + com.google.bigtable.admin.v2.UpdateAppProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAppProfileMethod(), getCallOptions(), request); } /** @@ -1677,13 +2822,11 @@ public void updateAppProfile( * Deletes an app profile from an instance. * */ - public void deleteAppProfile( - com.google.bigtable.admin.v2.DeleteAppProfileRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAppProfileMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteAppProfile( + com.google.bigtable.admin.v2.DeleteAppProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAppProfileMethod(), getCallOptions(), request); } /** @@ -1694,13 +2837,10 @@ public void deleteAppProfile( * policy if an instance exists but does not have a policy set. * */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); + 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); } /** @@ -1711,13 +2851,10 @@ public void getIamPolicy( * existing policy. * */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); + 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); } /** @@ -1727,37 +2864,168 @@ public void setIamPolicy( * Returns permissions that the caller has on the specified instance resource. * */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists hot tablets in a cluster, within the time range provided. Hot
      +     * tablets are ordered based on CPU usage.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListHotTabletsResponse listHotTablets( + com.google.bigtable.admin.v2.ListHotTabletsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListHotTabletsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a logical view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation createLogicalView( + com.google.bigtable.admin.v2.CreateLogicalViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets information about a logical view.
      +     * 
      + */ + public com.google.bigtable.admin.v2.LogicalView getLogicalView( + com.google.bigtable.admin.v2.GetLogicalViewRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists information about logical views in an instance.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListLogicalViewsResponse listLogicalViews( + com.google.bigtable.admin.v2.ListLogicalViewsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLogicalViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a logical view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation updateLogicalView( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Deletes a logical view from an instance.
      +     * 
      + */ + public com.google.protobuf.Empty deleteLogicalView( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a materialized view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation createMaterializedView( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateMaterializedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets information about a materialized view.
      +     * 
      + */ + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView( + com.google.bigtable.admin.v2.GetMaterializedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetMaterializedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists information about materialized views in an instance.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListMaterializedViewsResponse listMaterializedViews( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListMaterializedViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a materialized view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation updateMaterializedView( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateMaterializedViewMethod(), getCallOptions(), request); } /** * * *
      -     * Lists hot tablets in a cluster, within the time range provided. Hot
      -     * tablets are ordered based on CPU usage.
      +     * Deletes a materialized view from an instance.
            * 
      */ - public void listHotTablets( - com.google.bigtable.admin.v2.ListHotTabletsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListHotTabletsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteMaterializedView( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteMaterializedViewMethod(), getCallOptions(), request); } } /** - * A stub to allow clients to do synchronous rpc calls to service BigtableInstanceAdmin. + * A stub to allow clients to do limited synchronous rpc calls to service BigtableInstanceAdmin. * *
          * Service for creating, configuring, and deleting Cloud Bigtable Instances and
      @@ -2076,6 +3344,136 @@ public com.google.bigtable.admin.v2.ListHotTabletsResponse listHotTablets(
             return io.grpc.stub.ClientCalls.blockingUnaryCall(
                 getChannel(), getListHotTabletsMethod(), getCallOptions(), request);
           }
      +
      +    /**
      +     *
      +     *
      +     * 
      +     * Creates a logical view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation createLogicalView( + com.google.bigtable.admin.v2.CreateLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets information about a logical view.
      +     * 
      + */ + public com.google.bigtable.admin.v2.LogicalView getLogicalView( + com.google.bigtable.admin.v2.GetLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists information about logical views in an instance.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListLogicalViewsResponse listLogicalViews( + com.google.bigtable.admin.v2.ListLogicalViewsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLogicalViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a logical view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation updateLogicalView( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Deletes a logical view from an instance.
      +     * 
      + */ + public com.google.protobuf.Empty deleteLogicalView( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteLogicalViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a materialized view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation createMaterializedView( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMaterializedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets information about a materialized view.
      +     * 
      + */ + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView( + com.google.bigtable.admin.v2.GetMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMaterializedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists information about materialized views in an instance.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListMaterializedViewsResponse listMaterializedViews( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMaterializedViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a materialized view within an instance.
      +     * 
      + */ + public com.google.longrunning.Operation updateMaterializedView( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMaterializedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Deletes a materialized view from an instance.
      +     * 
      + */ + public com.google.protobuf.Empty deleteMaterializedView( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMaterializedViewMethod(), getCallOptions(), request); + } } /** @@ -2408,6 +3806,140 @@ protected BigtableInstanceAdminFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListHotTabletsMethod(), getCallOptions()), request); } + + /** + * + * + *
      +     * Creates a logical view within an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + createLogicalView(com.google.bigtable.admin.v2.CreateLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateLogicalViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Gets information about a logical view.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.LogicalView> + getLogicalView(com.google.bigtable.admin.v2.GetLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLogicalViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Lists information about logical views in an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.ListLogicalViewsResponse> + listLogicalViews(com.google.bigtable.admin.v2.ListLogicalViewsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLogicalViewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Updates a logical view within an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + updateLogicalView(com.google.bigtable.admin.v2.UpdateLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateLogicalViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Deletes a logical view from an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + deleteLogicalView(com.google.bigtable.admin.v2.DeleteLogicalViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteLogicalViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Creates a materialized view within an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + createMaterializedView(com.google.bigtable.admin.v2.CreateMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMaterializedViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Gets information about a materialized view.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.MaterializedView> + getMaterializedView(com.google.bigtable.admin.v2.GetMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMaterializedViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Lists information about materialized views in an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.ListMaterializedViewsResponse> + listMaterializedViews(com.google.bigtable.admin.v2.ListMaterializedViewsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMaterializedViewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Updates a materialized view within an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + updateMaterializedView(com.google.bigtable.admin.v2.UpdateMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMaterializedViewMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Deletes a materialized view from an instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + deleteMaterializedView(com.google.bigtable.admin.v2.DeleteMaterializedViewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMaterializedViewMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_INSTANCE = 0; @@ -2431,6 +3963,16 @@ protected BigtableInstanceAdminFutureStub build( private static final int METHODID_SET_IAM_POLICY = 18; private static final int METHODID_TEST_IAM_PERMISSIONS = 19; private static final int METHODID_LIST_HOT_TABLETS = 20; + private static final int METHODID_CREATE_LOGICAL_VIEW = 21; + private static final int METHODID_GET_LOGICAL_VIEW = 22; + private static final int METHODID_LIST_LOGICAL_VIEWS = 23; + private static final int METHODID_UPDATE_LOGICAL_VIEW = 24; + private static final int METHODID_DELETE_LOGICAL_VIEW = 25; + private static final int METHODID_CREATE_MATERIALIZED_VIEW = 26; + private static final int METHODID_GET_MATERIALIZED_VIEW = 27; + private static final int METHODID_LIST_MATERIALIZED_VIEWS = 28; + private static final int METHODID_UPDATE_MATERIALIZED_VIEW = 29; + private static final int METHODID_DELETE_MATERIALIZED_VIEW = 30; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2563,6 +4105,61 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_LOGICAL_VIEW: + serviceImpl.createLogicalView( + (com.google.bigtable.admin.v2.CreateLogicalViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_LOGICAL_VIEW: + serviceImpl.getLogicalView( + (com.google.bigtable.admin.v2.GetLogicalViewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_LOGICAL_VIEWS: + serviceImpl.listLogicalViews( + (com.google.bigtable.admin.v2.ListLogicalViewsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_LOGICAL_VIEW: + serviceImpl.updateLogicalView( + (com.google.bigtable.admin.v2.UpdateLogicalViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_LOGICAL_VIEW: + serviceImpl.deleteLogicalView( + (com.google.bigtable.admin.v2.DeleteLogicalViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_MATERIALIZED_VIEW: + serviceImpl.createMaterializedView( + (com.google.bigtable.admin.v2.CreateMaterializedViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MATERIALIZED_VIEW: + serviceImpl.getMaterializedView( + (com.google.bigtable.admin.v2.GetMaterializedViewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_MATERIALIZED_VIEWS: + serviceImpl.listMaterializedViews( + (com.google.bigtable.admin.v2.ListMaterializedViewsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.bigtable.admin.v2.ListMaterializedViewsResponse>) + responseObserver); + break; + case METHODID_UPDATE_MATERIALIZED_VIEW: + serviceImpl.updateMaterializedView( + (com.google.bigtable.admin.v2.UpdateMaterializedViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MATERIALIZED_VIEW: + serviceImpl.deleteMaterializedView( + (com.google.bigtable.admin.v2.DeleteMaterializedViewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -2710,6 +4307,69 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.bigtable.admin.v2.ListHotTabletsRequest, com.google.bigtable.admin.v2.ListHotTabletsResponse>( service, METHODID_LIST_HOT_TABLETS))) + .addMethod( + getCreateLogicalViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_LOGICAL_VIEW))) + .addMethod( + getGetLogicalViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.GetLogicalViewRequest, + com.google.bigtable.admin.v2.LogicalView>(service, METHODID_GET_LOGICAL_VIEW))) + .addMethod( + getListLogicalViewsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.ListLogicalViewsRequest, + com.google.bigtable.admin.v2.ListLogicalViewsResponse>( + service, METHODID_LIST_LOGICAL_VIEWS))) + .addMethod( + getUpdateLogicalViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_LOGICAL_VIEW))) + .addMethod( + getDeleteLogicalViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.DeleteLogicalViewRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_LOGICAL_VIEW))) + .addMethod( + getCreateMaterializedViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_MATERIALIZED_VIEW))) + .addMethod( + getGetMaterializedViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.GetMaterializedViewRequest, + com.google.bigtable.admin.v2.MaterializedView>( + service, METHODID_GET_MATERIALIZED_VIEW))) + .addMethod( + getListMaterializedViewsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.ListMaterializedViewsRequest, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse>( + service, METHODID_LIST_MATERIALIZED_VIEWS))) + .addMethod( + getUpdateMaterializedViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_MATERIALIZED_VIEW))) + .addMethod( + getDeleteMaterializedViewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_MATERIALIZED_VIEW))) .build(); } @@ -2782,6 +4442,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getSetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) .addMethod(getListHotTabletsMethod()) + .addMethod(getCreateLogicalViewMethod()) + .addMethod(getGetLogicalViewMethod()) + .addMethod(getListLogicalViewsMethod()) + .addMethod(getUpdateLogicalViewMethod()) + .addMethod(getDeleteLogicalViewMethod()) + .addMethod(getCreateMaterializedViewMethod()) + .addMethod(getGetMaterializedViewMethod()) + .addMethod(getListMaterializedViewsMethod()) + .addMethod(getUpdateMaterializedViewMethod()) + .addMethod(getDeleteMaterializedViewMethod()) .build(); } } diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java index 8e49c828c2..c827b0c4a7 100644 --- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java +++ b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 @@ * the tables. *
      */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/bigtable/admin/v2/bigtable_table_admin.proto") @io.grpc.stub.annotations.GrpcGenerated public final class BigtableTableAdminGrpc { @@ -1374,6 +1371,237 @@ private BigtableTableAdminGrpc() {} return getTestIamPermissionsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateSchemaBundleRequest, com.google.longrunning.Operation> + getCreateSchemaBundleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSchemaBundle", + requestType = com.google.bigtable.admin.v2.CreateSchemaBundleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateSchemaBundleRequest, com.google.longrunning.Operation> + getCreateSchemaBundleMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.CreateSchemaBundleRequest, + com.google.longrunning.Operation> + getCreateSchemaBundleMethod; + if ((getCreateSchemaBundleMethod = BigtableTableAdminGrpc.getCreateSchemaBundleMethod) + == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getCreateSchemaBundleMethod = BigtableTableAdminGrpc.getCreateSchemaBundleMethod) + == null) { + BigtableTableAdminGrpc.getCreateSchemaBundleMethod = + getCreateSchemaBundleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSchemaBundle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("CreateSchemaBundle")) + .build(); + } + } + } + return getCreateSchemaBundleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest, com.google.longrunning.Operation> + getUpdateSchemaBundleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSchemaBundle", + requestType = com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest, com.google.longrunning.Operation> + getUpdateSchemaBundleMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest, + com.google.longrunning.Operation> + getUpdateSchemaBundleMethod; + if ((getUpdateSchemaBundleMethod = BigtableTableAdminGrpc.getUpdateSchemaBundleMethod) + == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getUpdateSchemaBundleMethod = BigtableTableAdminGrpc.getUpdateSchemaBundleMethod) + == null) { + BigtableTableAdminGrpc.getUpdateSchemaBundleMethod = + getUpdateSchemaBundleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSchemaBundle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("UpdateSchemaBundle")) + .build(); + } + } + } + return getUpdateSchemaBundleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle> + getGetSchemaBundleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSchemaBundle", + requestType = com.google.bigtable.admin.v2.GetSchemaBundleRequest.class, + responseType = com.google.bigtable.admin.v2.SchemaBundle.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle> + getGetSchemaBundleMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.GetSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle> + getGetSchemaBundleMethod; + if ((getGetSchemaBundleMethod = BigtableTableAdminGrpc.getGetSchemaBundleMethod) == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getGetSchemaBundleMethod = BigtableTableAdminGrpc.getGetSchemaBundleMethod) == null) { + BigtableTableAdminGrpc.getGetSchemaBundleMethod = + getGetSchemaBundleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSchemaBundle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.GetSchemaBundleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("GetSchemaBundle")) + .build(); + } + } + } + return getGetSchemaBundleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListSchemaBundlesRequest, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse> + getListSchemaBundlesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSchemaBundles", + requestType = com.google.bigtable.admin.v2.ListSchemaBundlesRequest.class, + responseType = com.google.bigtable.admin.v2.ListSchemaBundlesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListSchemaBundlesRequest, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse> + getListSchemaBundlesMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.ListSchemaBundlesRequest, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse> + getListSchemaBundlesMethod; + if ((getListSchemaBundlesMethod = BigtableTableAdminGrpc.getListSchemaBundlesMethod) == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getListSchemaBundlesMethod = BigtableTableAdminGrpc.getListSchemaBundlesMethod) + == null) { + BigtableTableAdminGrpc.getListSchemaBundlesMethod = + getListSchemaBundlesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSchemaBundles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.ListSchemaBundlesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("ListSchemaBundles")) + .build(); + } + } + } + return getListSchemaBundlesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest, com.google.protobuf.Empty> + getDeleteSchemaBundleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSchemaBundle", + requestType = com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest, com.google.protobuf.Empty> + getDeleteSchemaBundleMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest, com.google.protobuf.Empty> + getDeleteSchemaBundleMethod; + if ((getDeleteSchemaBundleMethod = BigtableTableAdminGrpc.getDeleteSchemaBundleMethod) + == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getDeleteSchemaBundleMethod = BigtableTableAdminGrpc.getDeleteSchemaBundleMethod) + == null) { + BigtableTableAdminGrpc.getDeleteSchemaBundleMethod = + getDeleteSchemaBundleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSchemaBundle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("DeleteSchemaBundle")) + .build(); + } + } + } + return getDeleteSchemaBundleMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static BigtableTableAdminStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1387,6 +1615,19 @@ public BigtableTableAdminStub newStub( return BigtableTableAdminStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static BigtableTableAdminBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableTableAdminBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableTableAdminBlockingV2Stub(channel, callOptions); + } + }; + return BigtableTableAdminBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -1864,7 +2105,7 @@ default void copyBackup( * * *
      -     * Gets the access control policy for a Table or Backup resource.
      +     * Gets the access control policy for a Bigtable resource.
            * Returns an empty policy if the resource exists but does not have a policy
            * set.
            * 
      @@ -1880,7 +2121,7 @@ default void getIamPolicy( * * *
      -     * Sets the access control policy on a Table or Backup resource.
      +     * Sets the access control policy on a Bigtable resource.
            * Replaces any existing policy.
            * 
      */ @@ -1895,7 +2136,7 @@ default void setIamPolicy( * * *
      -     * Returns permissions that the caller has on the specified Table or Backup
      +     * Returns permissions that the caller has on the specified Bigtable
            * resource.
            * 
      */ @@ -1906,6 +2147,77 @@ default void testIamPermissions( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getTestIamPermissionsMethod(), responseObserver); } + + /** + * + * + *
      +     * Creates a new schema bundle in the specified table.
      +     * 
      + */ + default void createSchemaBundle( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSchemaBundleMethod(), responseObserver); + } + + /** + * + * + *
      +     * Updates a schema bundle in the specified table.
      +     * 
      + */ + default void updateSchemaBundle( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSchemaBundleMethod(), responseObserver); + } + + /** + * + * + *
      +     * Gets metadata information about the specified schema bundle.
      +     * 
      + */ + default void getSchemaBundle( + com.google.bigtable.admin.v2.GetSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSchemaBundleMethod(), responseObserver); + } + + /** + * + * + *
      +     * Lists all schema bundles associated with the specified table.
      +     * 
      + */ + default void listSchemaBundles( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSchemaBundlesMethod(), responseObserver); + } + + /** + * + * + *
      +     * Deletes a schema bundle in the specified table.
      +     * 
      + */ + default void deleteSchemaBundle( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSchemaBundleMethod(), responseObserver); + } } /** @@ -2298,13 +2610,602 @@ public void listSnapshots( * policy. * */ - public void deleteSnapshot( - com.google.bigtable.admin.v2.DeleteSnapshotRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSnapshotMethod(), getCallOptions()), - request, - responseObserver); + public void deleteSnapshot( + com.google.bigtable.admin.v2.DeleteSnapshotRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSnapshotMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Starts creating a new Cloud Bigtable Backup.  The returned backup
      +     * [long-running operation][google.longrunning.Operation] can be used to
      +     * track creation of the backup. The
      +     * [metadata][google.longrunning.Operation.metadata] field type is
      +     * [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
      +     * [response][google.longrunning.Operation.response] field type is
      +     * [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
      +     * returned operation will stop the creation and delete the backup.
      +     * 
      + */ + public void createBackup( + com.google.bigtable.admin.v2.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Gets metadata on a pending or completed Cloud Bigtable Backup.
      +     * 
      + */ + public void getBackup( + com.google.bigtable.admin.v2.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
      +     * Updates a pending or completed Cloud Bigtable Backup.
      +     * 
      + */ + public void updateBackup( + com.google.bigtable.admin.v2.UpdateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Deletes a pending or completed Cloud Bigtable backup.
      +     * 
      + */ + public void deleteBackup( + com.google.bigtable.admin.v2.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Lists Cloud Bigtable backups. Returns both completed and pending
      +     * backups.
      +     * 
      + */ + public void listBackups( + com.google.bigtable.admin.v2.ListBackupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Create a new table by restoring from a completed backup.  The
      +     * returned table [long-running operation][google.longrunning.Operation] can
      +     * be used to track the progress of the operation, and to cancel it.  The
      +     * [metadata][google.longrunning.Operation.metadata] field type is
      +     * [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata].  The
      +     * [response][google.longrunning.Operation.response] type is
      +     * [Table][google.bigtable.admin.v2.Table], if successful.
      +     * 
      + */ + public void restoreTable( + com.google.bigtable.admin.v2.RestoreTableRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreTableMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Copy a Cloud Bigtable backup to a new backup in the destination cluster
      +     * located in the destination instance and project.
      +     * 
      + */ + public void copyBackup( + com.google.bigtable.admin.v2.CopyBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCopyBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
      +     * Gets the access control policy for a Bigtable resource.
      +     * Returns an empty policy if the resource exists but does not have a policy
      +     * set.
      +     * 
      + */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Sets the access control policy on a Bigtable resource.
      +     * Replaces any existing policy.
      +     * 
      + */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Returns permissions that the caller has on the specified Bigtable
      +     * resource.
      +     * 
      + */ + public void testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Creates a new schema bundle in the specified table.
      +     * 
      + */ + public void createSchemaBundle( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSchemaBundleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Updates a schema bundle in the specified table.
      +     * 
      + */ + public void updateSchemaBundle( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSchemaBundleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Gets metadata information about the specified schema bundle.
      +     * 
      + */ + public void getSchemaBundle( + com.google.bigtable.admin.v2.GetSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSchemaBundleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Lists all schema bundles associated with the specified table.
      +     * 
      + */ + public void listSchemaBundles( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSchemaBundlesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Deletes a schema bundle in the specified table.
      +     * 
      + */ + public void deleteSchemaBundle( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSchemaBundleMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service BigtableTableAdmin. + * + *
      +   * Service for creating, configuring, and deleting Cloud Bigtable tables.
      +   * Provides access to the table schemas only, not the data stored within
      +   * the tables.
      +   * 
      + */ + public static final class BigtableTableAdminBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private BigtableTableAdminBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigtableTableAdminBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableTableAdminBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
      +     * Creates a new table in the specified instance.
      +     * The table can be created with a full set of initial column families,
      +     * specified in the request.
      +     * 
      + */ + public com.google.bigtable.admin.v2.Table createTable( + com.google.bigtable.admin.v2.CreateTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a new table from the specified snapshot. The target table must
      +     * not exist. The snapshot and the table must be in the same instance.
      +     * Note: This is a private alpha release of Cloud Bigtable snapshots. This
      +     * feature is not currently available to most Cloud Bigtable customers. This
      +     * feature might be changed in backward-incompatible ways and is not
      +     * recommended for production use. It is not subject to any SLA or deprecation
      +     * policy.
      +     * 
      + */ + public com.google.longrunning.Operation createTableFromSnapshot( + com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTableFromSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists all tables served from a specified instance.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListTablesResponse listTables( + com.google.bigtable.admin.v2.ListTablesRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTablesMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets metadata information about the specified table.
      +     * 
      + */ + public com.google.bigtable.admin.v2.Table getTable( + com.google.bigtable.admin.v2.GetTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a specified table.
      +     * 
      + */ + public com.google.longrunning.Operation updateTable( + com.google.bigtable.admin.v2.UpdateTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Permanently deletes a specified table and all of its data.
      +     * 
      + */ + public com.google.protobuf.Empty deleteTable( + com.google.bigtable.admin.v2.DeleteTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Restores a specified table which was accidentally deleted.
      +     * 
      + */ + public com.google.longrunning.Operation undeleteTable( + com.google.bigtable.admin.v2.UndeleteTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUndeleteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a new AuthorizedView in a table.
      +     * 
      + */ + public com.google.longrunning.Operation createAuthorizedView( + com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists all AuthorizedViews from a specific table.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListAuthorizedViewsResponse listAuthorizedViews( + com.google.bigtable.admin.v2.ListAuthorizedViewsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAuthorizedViewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets information from a specified AuthorizedView.
      +     * 
      + */ + public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView( + com.google.bigtable.admin.v2.GetAuthorizedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates an AuthorizedView in a table.
      +     * 
      + */ + public com.google.longrunning.Operation updateAuthorizedView( + com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Permanently deletes a specified AuthorizedView.
      +     * 
      + */ + public com.google.protobuf.Empty deleteAuthorizedView( + com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAuthorizedViewMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Performs a series of column family modifications on the specified table.
      +     * Either all or none of the modifications will occur before this method
      +     * returns, but data requests received prior to that point may see a table
      +     * where only some modifications have taken effect.
      +     * 
      + */ + public com.google.bigtable.admin.v2.Table modifyColumnFamilies( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getModifyColumnFamiliesMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Permanently drop/delete a row range from a specified table. The request can
      +     * specify whether to delete all rows in a table, or only those that match a
      +     * particular prefix.
      +     * 
      + */ + public com.google.protobuf.Empty dropRowRange( + com.google.bigtable.admin.v2.DropRowRangeRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDropRowRangeMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Generates a consistency token for a Table, which can be used in
      +     * CheckConsistency to check whether mutations to the table that finished
      +     * before this call started have been replicated. The tokens will be available
      +     * for 90 days.
      +     * 
      + */ + public com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse generateConsistencyToken( + com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGenerateConsistencyTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Checks replication consistency based on a consistency token, that is, if
      +     * replication has caught up based on the conditions specified in the token
      +     * and the check request.
      +     * 
      + */ + public com.google.bigtable.admin.v2.CheckConsistencyResponse checkConsistency( + com.google.bigtable.admin.v2.CheckConsistencyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCheckConsistencyMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a new snapshot in the specified cluster from the specified
      +     * source table. The cluster and the table must be in the same instance.
      +     * Note: This is a private alpha release of Cloud Bigtable snapshots. This
      +     * feature is not currently available to most Cloud Bigtable customers. This
      +     * feature might be changed in backward-incompatible ways and is not
      +     * recommended for production use. It is not subject to any SLA or deprecation
      +     * policy.
      +     * 
      + */ + public com.google.longrunning.Operation snapshotTable( + com.google.bigtable.admin.v2.SnapshotTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSnapshotTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets metadata information about the specified snapshot.
      +     * Note: This is a private alpha release of Cloud Bigtable snapshots. This
      +     * feature is not currently available to most Cloud Bigtable customers. This
      +     * feature might be changed in backward-incompatible ways and is not
      +     * recommended for production use. It is not subject to any SLA or deprecation
      +     * policy.
      +     * 
      + */ + public com.google.bigtable.admin.v2.Snapshot getSnapshot( + com.google.bigtable.admin.v2.GetSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSnapshotMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists all snapshots associated with the specified cluster.
      +     * Note: This is a private alpha release of Cloud Bigtable snapshots. This
      +     * feature is not currently available to most Cloud Bigtable customers. This
      +     * feature might be changed in backward-incompatible ways and is not
      +     * recommended for production use. It is not subject to any SLA or deprecation
      +     * policy.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListSnapshotsResponse listSnapshots( + com.google.bigtable.admin.v2.ListSnapshotsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSnapshotsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Permanently deletes the specified snapshot.
      +     * Note: This is a private alpha release of Cloud Bigtable snapshots. This
      +     * feature is not currently available to most Cloud Bigtable customers. This
      +     * feature might be changed in backward-incompatible ways and is not
      +     * recommended for production use. It is not subject to any SLA or deprecation
      +     * policy.
      +     * 
      + */ + public com.google.protobuf.Empty deleteSnapshot( + com.google.bigtable.admin.v2.DeleteSnapshotRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSnapshotMethod(), getCallOptions(), request); } /** @@ -2321,13 +3222,10 @@ public void deleteSnapshot( * returned operation will stop the creation and delete the backup. * */ - public void createBackup( - com.google.bigtable.admin.v2.CreateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateBackupMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation createBackup( + com.google.bigtable.admin.v2.CreateBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); } /** @@ -2337,11 +3235,10 @@ public void createBackup( * Gets metadata on a pending or completed Cloud Bigtable Backup. * */ - public void getBackup( - com.google.bigtable.admin.v2.GetBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + public com.google.bigtable.admin.v2.Backup getBackup( + com.google.bigtable.admin.v2.GetBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); } /** @@ -2351,13 +3248,10 @@ public void getBackup( * Updates a pending or completed Cloud Bigtable Backup. * */ - public void updateBackup( - com.google.bigtable.admin.v2.UpdateBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.Backup updateBackup( + com.google.bigtable.admin.v2.UpdateBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBackupMethod(), getCallOptions(), request); } /** @@ -2367,13 +3261,10 @@ public void updateBackup( * Deletes a pending or completed Cloud Bigtable backup. * */ - public void deleteBackup( - com.google.bigtable.admin.v2.DeleteBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), - request, - responseObserver); + public com.google.protobuf.Empty deleteBackup( + com.google.bigtable.admin.v2.DeleteBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); } /** @@ -2384,14 +3275,10 @@ public void deleteBackup( * backups. * */ - public void listBackups( - com.google.bigtable.admin.v2.ListBackupsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListBackupsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.bigtable.admin.v2.ListBackupsResponse listBackups( + com.google.bigtable.admin.v2.ListBackupsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); } /** @@ -2407,13 +3294,10 @@ public void listBackups( * [Table][google.bigtable.admin.v2.Table], if successful. * */ - public void restoreTable( - com.google.bigtable.admin.v2.RestoreTableRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreTableMethod(), getCallOptions()), - request, - responseObserver); + public com.google.longrunning.Operation restoreTable( + com.google.bigtable.admin.v2.RestoreTableRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRestoreTableMethod(), getCallOptions(), request); } /** @@ -2424,69 +3308,128 @@ public void restoreTable( * located in the destination instance and project. * */ - public void copyBackup( - com.google.bigtable.admin.v2.CopyBackupRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCopyBackupMethod(), getCallOptions()), request, responseObserver); + public com.google.longrunning.Operation copyBackup( + com.google.bigtable.admin.v2.CopyBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCopyBackupMethod(), getCallOptions(), request); } /** * * *
      -     * Gets the access control policy for a Table or Backup resource.
      +     * Gets the access control policy for a Bigtable resource.
            * Returns an empty policy if the resource exists but does not have a policy
            * set.
            * 
      */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); + 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); } /** * * *
      -     * Sets the access control policy on a Table or Backup resource.
      +     * Sets the access control policy on a Bigtable resource.
            * Replaces any existing policy.
            * 
      */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), - request, - responseObserver); + 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); } /** * * *
      -     * Returns permissions that the caller has on the specified Table or Backup
      +     * Returns permissions that the caller has on the specified Bigtable
            * resource.
            * 
      */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), - request, - responseObserver); + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Creates a new schema bundle in the specified table.
      +     * 
      + */ + public com.google.longrunning.Operation createSchemaBundle( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a schema bundle in the specified table.
      +     * 
      + */ + public com.google.longrunning.Operation updateSchemaBundle( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets metadata information about the specified schema bundle.
      +     * 
      + */ + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle( + com.google.bigtable.admin.v2.GetSchemaBundleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists all schema bundles associated with the specified table.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListSchemaBundlesResponse listSchemaBundles( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSchemaBundlesMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Deletes a schema bundle in the specified table.
      +     * 
      + */ + public com.google.protobuf.Empty deleteSchemaBundle( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSchemaBundleMethod(), getCallOptions(), request); } } /** - * A stub to allow clients to do synchronous rpc calls to service BigtableTableAdmin. + * A stub to allow clients to do limited synchronous rpc calls to service BigtableTableAdmin. * *
          * Service for creating, configuring, and deleting Cloud Bigtable tables.
      @@ -2916,7 +3859,7 @@ public com.google.longrunning.Operation copyBackup(
            *
            *
            * 
      -     * Gets the access control policy for a Table or Backup resource.
      +     * Gets the access control policy for a Bigtable resource.
            * Returns an empty policy if the resource exists but does not have a policy
            * set.
            * 
      @@ -2930,7 +3873,7 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque * * *
      -     * Sets the access control policy on a Table or Backup resource.
      +     * Sets the access control policy on a Bigtable resource.
            * Replaces any existing policy.
            * 
      */ @@ -2943,7 +3886,7 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque * * *
      -     * Returns permissions that the caller has on the specified Table or Backup
      +     * Returns permissions that the caller has on the specified Bigtable
            * resource.
            * 
      */ @@ -2952,6 +3895,71 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); } + + /** + * + * + *
      +     * Creates a new schema bundle in the specified table.
      +     * 
      + */ + public com.google.longrunning.Operation createSchemaBundle( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Updates a schema bundle in the specified table.
      +     * 
      + */ + public com.google.longrunning.Operation updateSchemaBundle( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Gets metadata information about the specified schema bundle.
      +     * 
      + */ + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle( + com.google.bigtable.admin.v2.GetSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSchemaBundleMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Lists all schema bundles associated with the specified table.
      +     * 
      + */ + public com.google.bigtable.admin.v2.ListSchemaBundlesResponse listSchemaBundles( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSchemaBundlesMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Deletes a schema bundle in the specified table.
      +     * 
      + */ + public com.google.protobuf.Empty deleteSchemaBundle( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSchemaBundleMethod(), getCallOptions(), request); + } } /** @@ -3393,7 +4401,7 @@ protected BigtableTableAdminFutureStub build( * * *
      -     * Gets the access control policy for a Table or Backup resource.
      +     * Gets the access control policy for a Bigtable resource.
            * Returns an empty policy if the resource exists but does not have a policy
            * set.
            * 
      @@ -3408,7 +4416,7 @@ protected BigtableTableAdminFutureStub build( * * *
      -     * Sets the access control policy on a Table or Backup resource.
      +     * Sets the access control policy on a Bigtable resource.
            * Replaces any existing policy.
            * 
      */ @@ -3422,7 +4430,7 @@ protected BigtableTableAdminFutureStub build( * * *
      -     * Returns permissions that the caller has on the specified Table or Backup
      +     * Returns permissions that the caller has on the specified Bigtable
            * resource.
            * 
      */ @@ -3432,6 +4440,73 @@ protected BigtableTableAdminFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); } + + /** + * + * + *
      +     * Creates a new schema bundle in the specified table.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + createSchemaBundle(com.google.bigtable.admin.v2.CreateSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSchemaBundleMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Updates a schema bundle in the specified table.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + updateSchemaBundle(com.google.bigtable.admin.v2.UpdateSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSchemaBundleMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Gets metadata information about the specified schema bundle.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.SchemaBundle> + getSchemaBundle(com.google.bigtable.admin.v2.GetSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSchemaBundleMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Lists all schema bundles associated with the specified table.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.admin.v2.ListSchemaBundlesResponse> + listSchemaBundles(com.google.bigtable.admin.v2.ListSchemaBundlesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSchemaBundlesMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * Deletes a schema bundle in the specified table.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture + deleteSchemaBundle(com.google.bigtable.admin.v2.DeleteSchemaBundleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSchemaBundleMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_TABLE = 0; @@ -3464,6 +4539,11 @@ protected BigtableTableAdminFutureStub build( private static final int METHODID_GET_IAM_POLICY = 27; private static final int METHODID_SET_IAM_POLICY = 28; private static final int METHODID_TEST_IAM_PERMISSIONS = 29; + private static final int METHODID_CREATE_SCHEMA_BUNDLE = 30; + private static final int METHODID_UPDATE_SCHEMA_BUNDLE = 31; + private static final int METHODID_GET_SCHEMA_BUNDLE = 32; + private static final int METHODID_LIST_SCHEMA_BUNDLES = 33; + private static final int METHODID_DELETE_SCHEMA_BUNDLE = 34; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3643,6 +4723,33 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_SCHEMA_BUNDLE: + serviceImpl.createSchemaBundle( + (com.google.bigtable.admin.v2.CreateSchemaBundleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SCHEMA_BUNDLE: + serviceImpl.updateSchemaBundle( + (com.google.bigtable.admin.v2.UpdateSchemaBundleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SCHEMA_BUNDLE: + serviceImpl.getSchemaBundle( + (com.google.bigtable.admin.v2.GetSchemaBundleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SCHEMA_BUNDLES: + serviceImpl.listSchemaBundles( + (com.google.bigtable.admin.v2.ListSchemaBundlesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SCHEMA_BUNDLE: + serviceImpl.deleteSchemaBundle( + (com.google.bigtable.admin.v2.DeleteSchemaBundleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -3848,6 +4955,38 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.iam.v1.TestIamPermissionsRequest, com.google.iam.v1.TestIamPermissionsResponse>( service, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getCreateSchemaBundleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.CreateSchemaBundleRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SCHEMA_BUNDLE))) + .addMethod( + getUpdateSchemaBundleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SCHEMA_BUNDLE))) + .addMethod( + getGetSchemaBundleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.GetSchemaBundleRequest, + com.google.bigtable.admin.v2.SchemaBundle>( + service, METHODID_GET_SCHEMA_BUNDLE))) + .addMethod( + getListSchemaBundlesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.ListSchemaBundlesRequest, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse>( + service, METHODID_LIST_SCHEMA_BUNDLES))) + .addMethod( + getDeleteSchemaBundleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_SCHEMA_BUNDLE))) .build(); } @@ -3929,6 +5068,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetIamPolicyMethod()) .addMethod(getSetIamPolicyMethod()) .addMethod(getTestIamPermissionsMethod()) + .addMethod(getCreateSchemaBundleMethod()) + .addMethod(getUpdateSchemaBundleMethod()) + .addMethod(getGetSchemaBundleMethod()) + .addMethod(getListSchemaBundlesMethod()) + .addMethod(getDeleteSchemaBundleMethod()) .build(); } } diff --git a/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml b/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml index ee16d40221..142d0f217e 100644 --- a/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml +++ b/grpc-google-cloud-bigtable-v2/clirr-ignored-differences.xml @@ -5,6 +5,6 @@ 7012 com/google/bigtable/v2/BigtableGrpc$AsyncService - *executeQuery(* + *prepareQuery(* diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 2896ed724e..0752c94989 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import diff --git a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java index 6917926d9f..2dc40ecdec 100644 --- a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java +++ b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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 for reading from and writing to existing Bigtable tables. *
      */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/bigtable/v2/bigtable.proto") @io.grpc.stub.annotations.GrpcGenerated public final class BigtableGrpc { @@ -432,6 +429,47 @@ private BigtableGrpc() {} return getReadChangeStreamMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.PrepareQueryRequest, com.google.bigtable.v2.PrepareQueryResponse> + getPrepareQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PrepareQuery", + requestType = com.google.bigtable.v2.PrepareQueryRequest.class, + responseType = com.google.bigtable.v2.PrepareQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.PrepareQueryRequest, com.google.bigtable.v2.PrepareQueryResponse> + getPrepareQueryMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.PrepareQueryRequest, com.google.bigtable.v2.PrepareQueryResponse> + getPrepareQueryMethod; + if ((getPrepareQueryMethod = BigtableGrpc.getPrepareQueryMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getPrepareQueryMethod = BigtableGrpc.getPrepareQueryMethod) == null) { + BigtableGrpc.getPrepareQueryMethod = + getPrepareQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PrepareQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.PrepareQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.PrepareQueryResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigtableMethodDescriptorSupplier("PrepareQuery")) + .build(); + } + } + } + return getPrepareQueryMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.bigtable.v2.ExecuteQueryRequest, com.google.bigtable.v2.ExecuteQueryResponse> getExecuteQueryMethod; @@ -473,6 +511,180 @@ private BigtableGrpc() {} return getExecuteQueryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.GetClientConfigurationRequest, + com.google.bigtable.v2.ClientConfiguration> + getGetClientConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetClientConfiguration", + requestType = com.google.bigtable.v2.GetClientConfigurationRequest.class, + responseType = com.google.bigtable.v2.ClientConfiguration.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.GetClientConfigurationRequest, + com.google.bigtable.v2.ClientConfiguration> + getGetClientConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.GetClientConfigurationRequest, + com.google.bigtable.v2.ClientConfiguration> + getGetClientConfigurationMethod; + if ((getGetClientConfigurationMethod = BigtableGrpc.getGetClientConfigurationMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getGetClientConfigurationMethod = BigtableGrpc.getGetClientConfigurationMethod) + == null) { + BigtableGrpc.getGetClientConfigurationMethod = + getGetClientConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetClientConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.GetClientConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ClientConfiguration.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableMethodDescriptorSupplier("GetClientConfiguration")) + .build(); + } + } + } + return getGetClientConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenTableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "OpenTable", + requestType = com.google.bigtable.v2.SessionRequest.class, + responseType = com.google.bigtable.v2.SessionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenTableMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenTableMethod; + if ((getOpenTableMethod = BigtableGrpc.getOpenTableMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getOpenTableMethod = BigtableGrpc.getOpenTableMethod) == null) { + BigtableGrpc.getOpenTableMethod = + getOpenTableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "OpenTable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigtableMethodDescriptorSupplier("OpenTable")) + .build(); + } + } + } + return getOpenTableMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenAuthorizedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "OpenAuthorizedView", + requestType = com.google.bigtable.v2.SessionRequest.class, + responseType = com.google.bigtable.v2.SessionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenAuthorizedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenAuthorizedViewMethod; + if ((getOpenAuthorizedViewMethod = BigtableGrpc.getOpenAuthorizedViewMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getOpenAuthorizedViewMethod = BigtableGrpc.getOpenAuthorizedViewMethod) == null) { + BigtableGrpc.getOpenAuthorizedViewMethod = + getOpenAuthorizedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "OpenAuthorizedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableMethodDescriptorSupplier("OpenAuthorizedView")) + .build(); + } + } + } + return getOpenAuthorizedViewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenMaterializedViewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "OpenMaterializedView", + requestType = com.google.bigtable.v2.SessionRequest.class, + responseType = com.google.bigtable.v2.SessionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenMaterializedViewMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + getOpenMaterializedViewMethod; + if ((getOpenMaterializedViewMethod = BigtableGrpc.getOpenMaterializedViewMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getOpenMaterializedViewMethod = BigtableGrpc.getOpenMaterializedViewMethod) == null) { + BigtableGrpc.getOpenMaterializedViewMethod = + getOpenMaterializedViewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "OpenMaterializedView")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.SessionResponse.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableMethodDescriptorSupplier("OpenMaterializedView")) + .build(); + } + } + } + return getOpenMaterializedViewMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static BigtableStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -485,6 +697,19 @@ public BigtableStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOpt return BigtableStub.newStub(factory, channel); } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static BigtableBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BigtableBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableBlockingV2Stub(channel, callOptions); + } + }; + return BigtableBlockingV2Stub.newStub(factory, channel); + } + /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ @@ -639,10 +864,10 @@ default void readModifyWriteRow( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Returns the current list of partitions that make up the table's
            * change stream. The union of partitions will cover the entire keyspace.
            * Partitions can be read with `ReadChangeStream`.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ default void generateInitialChangeStreamPartitions( @@ -658,10 +883,10 @@ default void generateInitialChangeStreamPartitions( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Reads changes from a table's change stream. Changes will
            * reflect both user-initiated mutations and mutations that are caused by
            * garbage collection.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ default void readChangeStream( @@ -676,7 +901,21 @@ default void readChangeStream( * * *
      -     * Executes a BTQL query against a particular Cloud Bigtable instance.
      +     * Prepares a GoogleSQL query for execution on a particular Bigtable instance.
      +     * 
      + */ + default void prepareQuery( + com.google.bigtable.v2.PrepareQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPrepareQueryMethod(), responseObserver); + } + + /** + * + * + *
      +     * Executes a SQL query against a particular Bigtable instance.
            * 
      */ default void executeQuery( @@ -685,6 +924,67 @@ default void executeQuery( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getExecuteQueryMethod(), responseObserver); } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + default void getClientConfiguration( + com.google.bigtable.v2.GetClientConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetClientConfigurationMethod(), responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + default io.grpc.stub.StreamObserver openTable( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getOpenTableMethod(), responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + default io.grpc.stub.StreamObserver openAuthorizedView( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getOpenAuthorizedViewMethod(), responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + default io.grpc.stub.StreamObserver openMaterializedView( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getOpenMaterializedViewMethod(), responseObserver); + } } /** @@ -847,10 +1147,10 @@ public void readModifyWriteRow( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Returns the current list of partitions that make up the table's
            * change stream. The union of partitions will cover the entire keyspace.
            * Partitions can be read with `ReadChangeStream`.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ public void generateInitialChangeStreamPartitions( @@ -868,10 +1168,10 @@ public void generateInitialChangeStreamPartitions( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Reads changes from a table's change stream. Changes will
            * reflect both user-initiated mutations and mutations that are caused by
            * garbage collection.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ public void readChangeStream( @@ -888,7 +1188,23 @@ public void readChangeStream( * * *
      -     * Executes a BTQL query against a particular Cloud Bigtable instance.
      +     * Prepares a GoogleSQL query for execution on a particular Bigtable instance.
      +     * 
      + */ + public void prepareQuery( + com.google.bigtable.v2.PrepareQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPrepareQueryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * Executes a SQL query against a particular Bigtable instance.
            * 
      */ public void executeQuery( @@ -899,6 +1215,70 @@ public void executeQuery( request, responseObserver); } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public void getClientConfiguration( + com.google.bigtable.v2.GetClientConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClientConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public io.grpc.stub.StreamObserver openTable( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getOpenTableMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public io.grpc.stub.StreamObserver openAuthorizedView( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getOpenAuthorizedViewMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public io.grpc.stub.StreamObserver openMaterializedView( + io.grpc.stub.StreamObserver responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getOpenMaterializedViewMethod(), getCallOptions()), + responseObserver); + } } /** @@ -908,6 +1288,268 @@ public void executeQuery( * Service for reading from and writing to existing Bigtable tables. * */ + public static final class BigtableBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private BigtableBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BigtableBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BigtableBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
      +     * Streams back the contents of all requested rows in key order, optionally
      +     * applying the same Reader filter to each. Depending on their size,
      +     * rows and cells may be broken up across multiple responses, but
      +     * atomicity of each row will still be preserved. See the
      +     * ReadRowsResponse documentation for details.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall readRows( + com.google.bigtable.v2.ReadRowsRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getReadRowsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Returns a sample of row keys in the table. The returned row keys will
      +     * delimit contiguous sections of the table of approximately equal size,
      +     * which can be used to break up the data for distributed tasks like
      +     * mapreduces.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + sampleRowKeys(com.google.bigtable.v2.SampleRowKeysRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getSampleRowKeysMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Mutates a row atomically. Cells already present in the row are left
      +     * unchanged unless explicitly changed by `mutation`.
      +     * 
      + */ + public com.google.bigtable.v2.MutateRowResponse mutateRow( + com.google.bigtable.v2.MutateRowRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getMutateRowMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Mutates multiple rows in a batch. Each individual row is mutated
      +     * atomically as in MutateRow, but the entire batch is not executed
      +     * atomically.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall mutateRows( + com.google.bigtable.v2.MutateRowsRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getMutateRowsMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Mutates a row atomically based on the output of a predicate Reader filter.
      +     * 
      + */ + public com.google.bigtable.v2.CheckAndMutateRowResponse checkAndMutateRow( + com.google.bigtable.v2.CheckAndMutateRowRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCheckAndMutateRowMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Warm up associated instance metadata for this connection.
      +     * This call is not required but may be useful for connection keep-alive.
      +     * 
      + */ + public com.google.bigtable.v2.PingAndWarmResponse pingAndWarm( + com.google.bigtable.v2.PingAndWarmRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPingAndWarmMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Modifies a row atomically on the server. The method reads the latest
      +     * existing timestamp and value from the specified columns and writes a new
      +     * entry based on pre-defined read/modify/write rules. The new value for the
      +     * timestamp is the greater of the existing timestamp or the current server
      +     * time. The method returns the new contents of all modified cells.
      +     * 
      + */ + public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( + com.google.bigtable.v2.ReadModifyWriteRowRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getReadModifyWriteRowMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Returns the current list of partitions that make up the table's
      +     * change stream. The union of partitions will cover the entire keyspace.
      +     * Partitions can be read with `ReadChangeStream`.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + ?, com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitions( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), + getGenerateInitialChangeStreamPartitionsMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
      +     * Reads changes from a table's change stream. Changes will
      +     * reflect both user-initiated mutations and mutations that are caused by
      +     * garbage collection.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + readChangeStream(com.google.bigtable.v2.ReadChangeStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getReadChangeStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Prepares a GoogleSQL query for execution on a particular Bigtable instance.
      +     * 
      + */ + public com.google.bigtable.v2.PrepareQueryResponse prepareQuery( + com.google.bigtable.v2.PrepareQueryRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPrepareQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Executes a SQL query against a particular Bigtable instance.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall + executeQuery(com.google.bigtable.v2.ExecuteQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getExecuteQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public com.google.bigtable.v2.ClientConfiguration getClientConfiguration( + com.google.bigtable.v2.GetClientConfigurationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetClientConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + openTable() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getOpenTableMethod(), getCallOptions()); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + openAuthorizedView() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getOpenAuthorizedViewMethod(), getCallOptions()); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse> + openMaterializedView() { + return io.grpc.stub.ClientCalls.blockingBidiStreamingCall( + getChannel(), getOpenMaterializedViewMethod(), getCallOptions()); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service Bigtable. + * + *
      +   * Service for reading from and writing to existing Bigtable tables.
      +   * 
      + */ public static final class BigtableBlockingStub extends io.grpc.stub.AbstractBlockingStub { private BigtableBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { @@ -1029,10 +1671,10 @@ public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Returns the current list of partitions that make up the table's
            * change stream. The union of partitions will cover the entire keyspace.
            * Partitions can be read with `ReadChangeStream`.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ public java.util.Iterator @@ -1049,10 +1691,10 @@ public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( * * *
      -     * NOTE: This API is intended to be used by Apache Beam BigtableIO.
            * Reads changes from a table's change stream. Changes will
            * reflect both user-initiated mutations and mutations that are caused by
            * garbage collection.
      +     * NOTE: This API is only intended to be used by Apache Beam BigtableIO.
            * 
      */ public java.util.Iterator readChangeStream( @@ -1065,7 +1707,20 @@ public java.util.Iterator readC * * *
      -     * Executes a BTQL query against a particular Cloud Bigtable instance.
      +     * Prepares a GoogleSQL query for execution on a particular Bigtable instance.
      +     * 
      + */ + public com.google.bigtable.v2.PrepareQueryResponse prepareQuery( + com.google.bigtable.v2.PrepareQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPrepareQueryMethod(), getCallOptions(), request); + } + + /** + * + * + *
      +     * Executes a SQL query against a particular Bigtable instance.
            * 
      */ public java.util.Iterator executeQuery( @@ -1073,6 +1728,21 @@ public java.util.Iterator executeQu return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getExecuteQueryMethod(), getCallOptions(), request); } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public com.google.bigtable.v2.ClientConfiguration getClientConfiguration( + com.google.bigtable.v2.GetClientConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClientConfigurationMethod(), getCallOptions(), request); + } } /** @@ -1154,6 +1824,36 @@ protected BigtableFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReadModifyWriteRowMethod(), getCallOptions()), request); } + + /** + * + * + *
      +     * Prepares a GoogleSQL query for execution on a particular Bigtable instance.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.v2.PrepareQueryResponse> + prepareQuery(com.google.bigtable.v2.PrepareQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPrepareQueryMethod(), getCallOptions()), request); + } + + /** + * + * + *
      +     * This RPC is only intended to be used by the official Cloud Bigtable client
      +     * libraries to implement the Bigtable Session based protocol. It is subject
      +     * to change without notice.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.bigtable.v2.ClientConfiguration> + getClientConfiguration(com.google.bigtable.v2.GetClientConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClientConfigurationMethod(), getCallOptions()), request); + } } private static final int METHODID_READ_ROWS = 0; @@ -1165,7 +1865,12 @@ protected BigtableFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_READ_MODIFY_WRITE_ROW = 6; private static final int METHODID_GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS = 7; private static final int METHODID_READ_CHANGE_STREAM = 8; - private static final int METHODID_EXECUTE_QUERY = 9; + private static final int METHODID_PREPARE_QUERY = 9; + private static final int METHODID_EXECUTE_QUERY = 10; + private static final int METHODID_GET_CLIENT_CONFIGURATION = 11; + private static final int METHODID_OPEN_TABLE = 12; + private static final int METHODID_OPEN_AUTHORIZED_VIEW = 13; + private static final int METHODID_OPEN_MATERIALIZED_VIEW = 14; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1239,12 +1944,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_PREPARE_QUERY: + serviceImpl.prepareQuery( + (com.google.bigtable.v2.PrepareQueryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_EXECUTE_QUERY: serviceImpl.executeQuery( (com.google.bigtable.v2.ExecuteQueryRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_CLIENT_CONFIGURATION: + serviceImpl.getClientConfiguration( + (com.google.bigtable.v2.GetClientConfigurationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1255,6 +1972,21 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_OPEN_TABLE: + return (io.grpc.stub.StreamObserver) + serviceImpl.openTable( + (io.grpc.stub.StreamObserver) + responseObserver); + case METHODID_OPEN_AUTHORIZED_VIEW: + return (io.grpc.stub.StreamObserver) + serviceImpl.openAuthorizedView( + (io.grpc.stub.StreamObserver) + responseObserver); + case METHODID_OPEN_MATERIALIZED_VIEW: + return (io.grpc.stub.StreamObserver) + serviceImpl.openMaterializedView( + (io.grpc.stub.StreamObserver) + responseObserver); default: throw new AssertionError(); } @@ -1322,12 +2054,43 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.bigtable.v2.ReadChangeStreamRequest, com.google.bigtable.v2.ReadChangeStreamResponse>( service, METHODID_READ_CHANGE_STREAM))) + .addMethod( + getPrepareQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.v2.PrepareQueryRequest, + com.google.bigtable.v2.PrepareQueryResponse>(service, METHODID_PREPARE_QUERY))) .addMethod( getExecuteQueryMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< com.google.bigtable.v2.ExecuteQueryRequest, com.google.bigtable.v2.ExecuteQueryResponse>(service, METHODID_EXECUTE_QUERY))) + .addMethod( + getGetClientConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.v2.GetClientConfigurationRequest, + com.google.bigtable.v2.ClientConfiguration>( + service, METHODID_GET_CLIENT_CONFIGURATION))) + .addMethod( + getOpenTableMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse>( + service, METHODID_OPEN_TABLE))) + .addMethod( + getOpenAuthorizedViewMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse>( + service, METHODID_OPEN_AUTHORIZED_VIEW))) + .addMethod( + getOpenMaterializedViewMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.bigtable.v2.SessionRequest, com.google.bigtable.v2.SessionResponse>( + service, METHODID_OPEN_MATERIALIZED_VIEW))) .build(); } @@ -1386,7 +2149,12 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getReadModifyWriteRowMethod()) .addMethod(getGenerateInitialChangeStreamPartitionsMethod()) .addMethod(getReadChangeStreamMethod()) + .addMethod(getPrepareQueryMethod()) .addMethod(getExecuteQueryMethod()) + .addMethod(getGetClientConfigurationMethod()) + .addMethod(getOpenTableMethod()) + .addMethod(getOpenAuthorizedViewMethod()) + .addMethod(getOpenMaterializedViewMethod()) .build(); } } diff --git a/owlbot.py b/owlbot.py index c9aac4e206..f3f71fd2aa 100644 --- a/owlbot.py +++ b/owlbot.py @@ -28,20 +28,6 @@ "owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java", ] -# Paths are relative to the destination, which is the current working directory -admin_internal_only = [ - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java', - 'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java', -] - # TODO: try to move the GAPIC surface hiding to the gapic-generator: # https://github.com/googleapis/gapic-generator/issues/2742 def make_internal_only(sources): @@ -64,15 +50,6 @@ def make_internal_only(sources): # put any special-case replacements here make_internal_only(data_internal_only) - # Generate admin client - #todo: fix in synthtool removing comments with method - java.remove_method(f'owl-bot-staging/v2/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java', "public UnaryCallSettings updateInstanceSettings()") - java.remove_method(f'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java', "/** Returns the builder for the settings used for calls to updateInstance. */") - java.remove_method(f'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java', "public UnaryCallSettings.Builder updateInstanceSettings()") - java.remove_method(f'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java', "/** Returns the object with the settings used for calls to updateInstance. */") - java.remove_method(f'owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java', "public UnaryCallSettings updateInstanceSettings()") - make_internal_only(admin_internal_only) - # googleapis-gen copy of bigtable has some files that are not part of the existing library. # owlbot copies them over. If you don't want to keep them, uncomment the deletions below. if os.path.exists("owl-bot-staging/v2/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClient.java"): diff --git a/pom.xml b/pom.xml index 320ceed9e2..a965324c32 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.42.0 + 2.76.1-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.33.0 + 3.59.0 @@ -144,6 +144,9 @@ github google-cloud-bigtable-parent https://googleapis.dev/java/google-api-grpc/latest + + + 2.38.0 @@ -153,27 +156,27 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.42.0 + 2.76.1-SNAPSHOT @@ -190,7 +193,6 @@ com.google.truth.extensions truth-proto-extension 1.4.4 - test @@ -206,8 +208,11 @@ org.mockito - mockito-core + mockito-bom + 4.11.0 + pom + import @@ -259,18 +264,8 @@ **/com/google/cloud/bigtable/admin/v2/internal/** - **/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java - **/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java - **/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java - **/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java - **/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java - **/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java - **/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java - **/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java - **/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java - **/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java **/com/google/cloud/bigtable/admin/v2/stub/EnhancedBigtableTableAdminStub.java @@ -327,7 +322,7 @@ - -excludeclasses com\.google\.cloud\.bigtable\.admin\.v2\.(internal\.|(Base.*).*|stub\.(?!Bigtable.*StubSettings).*):com\.google\.cloud\.bigtable\.data\.v2\.(internal\.|(Base.*).*|stub\.(?!Enhanced.*StubSettings).*) + -excludeclasses com\.google\.cloud\.bigtable\.admin\.v2\.internal\..*:com\.google\.cloud\.bigtable\.data\.v2\.(internal\.|(Base.*).*|stub\.(?!Enhanced.*StubSettings).*) + + 7006 + com/google/bigtable/admin/v2/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/bigtable/admin/v2/** + * addRepeatedField(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * clear() + ** + + + 7006 + com/google/bigtable/admin/v2/** + * clearField(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * clearOneof(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * clone() + ** + + + 7006 + com/google/bigtable/admin/v2/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * setField(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * setRepeatedField(*) + ** + + + 7006 + com/google/bigtable/admin/v2/** + * setUnknownFields(*) + ** + \ No newline at end of file diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index 10804671be..3210344cd3 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.42.0 + 2.76.1-SNAPSHOT proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java index 1e1e179bed..bb01b15b95 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.AppProfile} */ -public final class AppProfile extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AppProfile extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile) AppProfileOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AppProfile"); + } + // Use AppProfile.newBuilder() to construct. - private AppProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AppProfile(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private AppProfile() { description_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AppProfile(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable @@ -97,6 +104,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"); + } + /** * * @@ -107,10 +124,13 @@ public enum Priority implements com.google.protobuf.ProtocolMessageEnum { * PRIORITY_UNSPECIFIED = 0; */ public static final int PRIORITY_UNSPECIFIED_VALUE = 0; + /** PRIORITY_LOW = 1; */ public static final int PRIORITY_LOW_VALUE = 1; + /** PRIORITY_MEDIUM = 2; */ public static final int PRIORITY_MEDIUM_VALUE = 2; + /** PRIORITY_HIGH = 3; */ public static final int PRIORITY_HIGH_VALUE = 3; @@ -174,7 +194,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.bigtable.admin.v2.AppProfile.getDescriptor().getEnumTypes().get(0); } @@ -217,6 +237,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return A list containing the clusterIds. */ java.util.List getClusterIdsList(); + /** * * @@ -230,6 +251,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return The count of clusterIds. */ int getClusterIdsCount(); + /** * * @@ -244,6 +266,7 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return The clusterIds at the given index. */ java.lang.String getClusterIds(int index); + /** * * @@ -258,7 +281,58 @@ public interface MultiClusterRoutingUseAnyOrBuilder * @return The bytes of the clusterIds at the given index. */ com.google.protobuf.ByteString getClusterIdsBytes(int index); + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return Whether the rowAffinity field is set. + */ + boolean hasRowAffinity(); + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return The rowAffinity. + */ + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity getRowAffinity(); + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinityOrBuilder + getRowAffinityOrBuilder(); + + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.AffinityCase + getAffinityCase(); } + /** * * @@ -272,13 +346,24 @@ public interface MultiClusterRoutingUseAnyOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} */ - public static final class MultiClusterRoutingUseAny extends com.google.protobuf.GeneratedMessageV3 + public static final class MultiClusterRoutingUseAny extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) MultiClusterRoutingUseAnyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MultiClusterRoutingUseAny"); + } + // Use MultiClusterRoutingUseAny.newBuilder() to construct. - private MultiClusterRoutingUseAny(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MultiClusterRoutingUseAny(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -286,19 +371,13 @@ private MultiClusterRoutingUseAny() { clusterIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MultiClusterRoutingUseAny(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable @@ -307,11 +386,491 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder.class); } + public interface RowAffinityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
      +     * If enabled, Bigtable will route the request based on the row key of the
      +     * request, rather than randomly. Instead, each row key will be assigned
      +     * to a cluster, and will stick to that cluster. If clusters are added or
      +     * removed, then this may affect which row keys stick to which clusters.
      +     * To avoid this, users can use a cluster group to specify which clusters
      +     * are to be used. In this case, new clusters that are not a part of the
      +     * cluster group will not be routed to, and routing will be unaffected by
      +     * the new cluster. Moreover, clusters specified in the cluster group cannot
      +     * be deleted unless removed from the cluster group.
      +     * 
      + * + * Protobuf type {@code + * google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} + */ + public static final class RowAffinity extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + RowAffinityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RowAffinity"); + } + + // Use RowAffinity.newBuilder() to construct. + private RowAffinity(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RowAffinity() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.class, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity other = + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity 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; + } + + /** + * + * + *
      +       * If enabled, Bigtable will route the request based on the row key of the
      +       * request, rather than randomly. Instead, each row key will be assigned
      +       * to a cluster, and will stick to that cluster. If clusters are added or
      +       * removed, then this may affect which row keys stick to which clusters.
      +       * To avoid this, users can use a cluster group to specify which clusters
      +       * are to be used. In this case, new clusters that are not a part of the
      +       * cluster group will not be routed to, and routing will be unaffected by
      +       * the new cluster. Moreover, clusters specified in the cluster group cannot
      +       * be deleted unless removed from the cluster group.
      +       * 
      + * + * Protobuf type {@code + * google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .class, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .Builder.class); + } + + // Construct using + // com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + build() { + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + buildPartial() { + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity result = + new com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity( + this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) { + return mergeFrom( + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity other) { + if (other + == com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + private static final com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity(); + } + + public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RowAffinity 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int affinityCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object affinity_; + + public enum AffinityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ROW_AFFINITY(3), + AFFINITY_NOT_SET(0); + private final int value; + + private AffinityCase(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 AffinityCase valueOf(int value) { + return forNumber(value); + } + + public static AffinityCase forNumber(int value) { + switch (value) { + case 3: + return ROW_AFFINITY; + case 0: + return AFFINITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AffinityCase getAffinityCase() { + return AffinityCase.forNumber(affinityCase_); + } + public static final int CLUSTER_IDS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList clusterIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -327,6 +886,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public com.google.protobuf.ProtocolStringList getClusterIdsList() { return clusterIds_; } + /** * * @@ -342,6 +902,7 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { public int getClusterIdsCount() { return clusterIds_.size(); } + /** * * @@ -358,6 +919,7 @@ public int getClusterIdsCount() { public java.lang.String getClusterIds(int index) { return clusterIds_.get(index); } + /** * * @@ -375,6 +937,75 @@ public com.google.protobuf.ByteString getClusterIdsBytes(int index) { return clusterIds_.getByteString(index); } + public static final int ROW_AFFINITY_FIELD_NUMBER = 3; + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return Whether the rowAffinity field is set. + */ + @java.lang.Override + public boolean hasRowAffinity() { + return affinityCase_ == 3; + } + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return The rowAffinity. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + getRowAffinity() { + if (affinityCase_ == 3) { + return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_; + } + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + + /** + * + * + *
      +     * Row affinity sticky routing based on the row key of the request.
      +     * Requests that span multiple rows are routed non-deterministically.
      +     * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinityOrBuilder + getRowAffinityOrBuilder() { + if (affinityCase_ == 3) { + return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_; + } + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -390,7 +1021,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < clusterIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterIds_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterIds_.getRaw(i)); + } + if (affinityCase_ == 3) { + output.writeMessage( + 3, + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_); } getUnknownFields().writeTo(output); } @@ -409,6 +1046,13 @@ public int getSerializedSize() { size += dataSize; size += 1 * getClusterIdsList().size(); } + if (affinityCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -426,6 +1070,14 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) obj; if (!getClusterIdsList().equals(other.getClusterIdsList())) return false; + if (!getAffinityCase().equals(other.getAffinityCase())) return false; + switch (affinityCase_) { + case 3: + if (!getRowAffinity().equals(other.getRowAffinity())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,6 +1093,14 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_IDS_FIELD_NUMBER; hash = (53 * hash) + getClusterIdsList().hashCode(); } + switch (affinityCase_) { + case 3: + hash = (37 * hash) + ROW_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + getRowAffinity().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -483,39 +1143,39 @@ public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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); } @@ -539,11 +1199,11 @@ 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; } + /** * * @@ -557,8 +1217,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny} */ - 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder { @@ -568,7 +1227,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable @@ -581,7 +1240,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -590,6 +1249,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; clusterIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (rowAffinityBuilder_ != null) { + rowAffinityBuilder_.clear(); + } + affinityCase_ = 0; + affinity_ = null; return this; } @@ -622,6 +1286,7 @@ public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny buildPa if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -635,39 +1300,13 @@ 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); + private void buildPartialOneofs( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny result) { + result.affinityCase_ = affinityCase_; + result.affinity_ = this.affinity_; + if (affinityCase_ == 3 && rowAffinityBuilder_ != null) { + result.affinity_ = rowAffinityBuilder_.build(); + } } @java.lang.Override @@ -696,6 +1335,17 @@ public Builder mergeFrom( } onChanged(); } + switch (other.getAffinityCase()) { + case ROW_AFFINITY: + { + mergeRowAffinity(other.getRowAffinity()); + break; + } + case AFFINITY_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -729,6 +1379,13 @@ public Builder mergeFrom( clusterIds_.add(s); break; } // case 10 + case 26: + { + input.readMessage( + internalGetRowAffinityFieldBuilder().getBuilder(), extensionRegistry); + affinityCase_ = 3; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -746,6 +1403,20 @@ public Builder mergeFrom( return this; } + private int affinityCase_ = 0; + private java.lang.Object affinity_; + + public AffinityCase getAffinityCase() { + return AffinityCase.forNumber(affinityCase_); + } + + public Builder clearAffinity() { + affinityCase_ = 0; + affinity_ = null; + onChanged(); + return this; + } + private int bitField0_; private com.google.protobuf.LazyStringArrayList clusterIds_ = @@ -757,6 +1428,7 @@ private void ensureClusterIdsIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -773,6 +1445,7 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { clusterIds_.makeImmutable(); return clusterIds_; } + /** * * @@ -788,6 +1461,7 @@ public com.google.protobuf.ProtocolStringList getClusterIdsList() { public int getClusterIdsCount() { return clusterIds_.size(); } + /** * * @@ -804,6 +1478,7 @@ public int getClusterIdsCount() { public java.lang.String getClusterIds(int index) { return clusterIds_.get(index); } + /** * * @@ -820,6 +1495,7 @@ public java.lang.String getClusterIds(int index) { public com.google.protobuf.ByteString getClusterIdsBytes(int index) { return clusterIds_.getByteString(index); } + /** * * @@ -844,6 +1520,7 @@ public Builder setClusterIds(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -867,6 +1544,7 @@ public Builder addClusterIds(java.lang.String value) { onChanged(); return this; } + /** * * @@ -887,6 +1565,7 @@ public Builder addAllClusterIds(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -906,6 +1585,7 @@ public Builder clearClusterIds() { onChanged(); return this; } + /** * * @@ -931,16 +1611,272 @@ public Builder addClusterIdsBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.Builder, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinityOrBuilder> + rowAffinityBuilder_; + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return Whether the rowAffinity field is set. + */ + @java.lang.Override + public boolean hasRowAffinity() { + return affinityCase_ == 3; + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + * + * @return The rowAffinity. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + getRowAffinity() { + if (rowAffinityBuilder_ == null) { + if (affinityCase_ == 3) { + return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_; + } + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } else { + if (affinityCase_ == 3) { + return rowAffinityBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + public Builder setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity value) { + if (rowAffinityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + affinity_ = value; + onChanged(); + } else { + rowAffinityBuilder_.setMessage(value); + } + affinityCase_ = 3; + return this; + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + public Builder setRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.Builder + builderForValue) { + if (rowAffinityBuilder_ == null) { + affinity_ = builderForValue.build(); + onChanged(); + } else { + rowAffinityBuilder_.setMessage(builderForValue.build()); + } + affinityCase_ = 3; + return this; + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + public Builder mergeRowAffinity( + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity value) { + if (rowAffinityBuilder_ == null) { + if (affinityCase_ == 3 + && affinity_ + != com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance()) { + affinity_ = + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .newBuilder( + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinity) + affinity_) + .mergeFrom(value) + .buildPartial(); + } else { + affinity_ = value; + } + onChanged(); + } else { + if (affinityCase_ == 3) { + rowAffinityBuilder_.mergeFrom(value); + } else { + rowAffinityBuilder_.setMessage(value); + } + } + affinityCase_ = 3; + return this; + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + public Builder clearRowAffinity() { + if (rowAffinityBuilder_ == null) { + if (affinityCase_ == 3) { + affinityCase_ = 0; + affinity_ = null; + onChanged(); + } + } else { + if (affinityCase_ == 3) { + affinityCase_ = 0; + affinity_ = null; + } + rowAffinityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.Builder + getRowAffinityBuilder() { + return internalGetRowAffinityFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinityOrBuilder + getRowAffinityOrBuilder() { + if ((affinityCase_ == 3) && (rowAffinityBuilder_ != null)) { + return rowAffinityBuilder_.getMessageOrBuilder(); + } else { + if (affinityCase_ == 3) { + return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_; + } + return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
      +       * Row affinity sticky routing based on the row key of the request.
      +       * Requests that span multiple rows are routed non-deterministically.
      +       * 
      + * + * + * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity row_affinity = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity.Builder, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinityOrBuilder> + internalGetRowAffinityFieldBuilder() { + if (rowAffinityBuilder_ == null) { + if (!(affinityCase_ == 3)) { + affinity_ = + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .getDefaultInstance(); + } + rowAffinityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity + .Builder, + com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny + .RowAffinityOrBuilder>( + (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity) + affinity_, + getParentForChildren(), + isClean()); + affinity_ = null; + } + affinityCase_ = 3; + onChanged(); + return rowAffinityBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) @@ -1015,6 +1951,7 @@ public interface SingleClusterRoutingOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * @@ -1043,6 +1980,7 @@ public interface SingleClusterRoutingOrBuilder */ boolean getAllowTransactionalWrites(); } + /** * * @@ -1054,13 +1992,24 @@ public interface SingleClusterRoutingOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.SingleClusterRouting} */ - public static final class SingleClusterRouting extends com.google.protobuf.GeneratedMessageV3 + public static final class SingleClusterRouting extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.SingleClusterRouting) SingleClusterRoutingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SingleClusterRouting"); + } + // Use SingleClusterRouting.newBuilder() to construct. - private SingleClusterRouting(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SingleClusterRouting(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1068,19 +2017,13 @@ private SingleClusterRouting() { clusterId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SingleClusterRouting(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable @@ -1093,6 +2036,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -1116,6 +2060,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -1142,6 +2087,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { public static final int ALLOW_TRANSACTIONAL_WRITES_FIELD_NUMBER = 2; private boolean allowTransactionalWrites_ = false; + /** * * @@ -1174,8 +2120,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(clusterId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterId_); } if (allowTransactionalWrites_ != false) { output.writeBool(2, allowTransactionalWrites_); @@ -1189,8 +2135,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clusterId_); } if (allowTransactionalWrites_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowTransactionalWrites_); @@ -1270,38 +2216,38 @@ public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parse public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting 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); } @@ -1325,11 +2271,11 @@ 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; } + /** * * @@ -1341,8 +2287,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.SingleClusterRouting} */ - 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.bigtable.admin.v2.AppProfile.SingleClusterRouting) com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder { @@ -1352,7 +2297,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable @@ -1364,7 +2309,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1420,41 +2365,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.bigtable.admin.v2.AppProfile.SingleClusterRouting) { @@ -1535,6 +2445,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object clusterId_ = ""; + /** * * @@ -1557,6 +2468,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -1579,6 +2491,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1600,6 +2513,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1617,6 +2531,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * @@ -1641,6 +2556,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { } private boolean allowTransactionalWrites_; + /** * * @@ -1658,6 +2574,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { public boolean getAllowTransactionalWrites() { return allowTransactionalWrites_; } + /** * * @@ -1679,6 +2596,7 @@ public Builder setAllowTransactionalWrites(boolean value) { onChanged(); return this; } + /** * * @@ -1699,18 +2617,6 @@ public Builder clearAllowTransactionalWrites() { 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.bigtable.admin.v2.AppProfile.SingleClusterRouting) } @@ -1783,6 +2689,7 @@ public interface StandardIsolationOrBuilder * @return The enum numeric value on the wire for priority. */ int getPriorityValue(); + /** * * @@ -1796,6 +2703,7 @@ public interface StandardIsolationOrBuilder */ com.google.bigtable.admin.v2.AppProfile.Priority getPriority(); } + /** * * @@ -1806,13 +2714,24 @@ public interface StandardIsolationOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.StandardIsolation} */ - public static final class StandardIsolation extends com.google.protobuf.GeneratedMessageV3 + public static final class StandardIsolation extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.StandardIsolation) StandardIsolationOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StandardIsolation"); + } + // Use StandardIsolation.newBuilder() to construct. - private StandardIsolation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StandardIsolation(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1820,19 +2739,13 @@ private StandardIsolation() { priority_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StandardIsolation(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_fieldAccessorTable @@ -1843,6 +2756,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int PRIORITY_FIELD_NUMBER = 1; private int priority_ = 0; + /** * * @@ -1858,6 +2772,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public int getPriorityValue() { return priority_; } + /** * * @@ -1981,38 +2896,38 @@ public static com.google.bigtable.admin.v2.AppProfile.StandardIsolation parseFro public static com.google.bigtable.admin.v2.AppProfile.StandardIsolation 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.bigtable.admin.v2.AppProfile.StandardIsolation 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.bigtable.admin.v2.AppProfile.StandardIsolation 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.bigtable.admin.v2.AppProfile.StandardIsolation 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.bigtable.admin.v2.AppProfile.StandardIsolation 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.bigtable.admin.v2.AppProfile.StandardIsolation 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); } @@ -2036,11 +2951,11 @@ 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; } + /** * * @@ -2051,8 +2966,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.StandardIsolation} */ - 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.bigtable.admin.v2.AppProfile.StandardIsolation) com.google.bigtable.admin.v2.AppProfile.StandardIsolationOrBuilder { @@ -2062,7 +2976,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_fieldAccessorTable @@ -2074,7 +2988,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AppProfile.StandardIsolation.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2124,41 +3038,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.AppProfile.StandardIsola } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.AppProfile.StandardIsolation) { @@ -2227,6 +3106,7 @@ public Builder mergeFrom( private int bitField0_; private int priority_ = 0; + /** * * @@ -2242,6 +3122,7 @@ public Builder mergeFrom( public int getPriorityValue() { return priority_; } + /** * * @@ -2260,6 +3141,7 @@ public Builder setPriorityValue(int value) { onChanged(); return this; } + /** * * @@ -2279,6 +3161,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { ? com.google.bigtable.admin.v2.AppProfile.Priority.UNRECOGNIZED : result; } + /** * * @@ -2300,6 +3183,7 @@ public Builder setPriority(com.google.bigtable.admin.v2.AppProfile.Priority valu onChanged(); return this; } + /** * * @@ -2318,18 +3202,6 @@ public Builder clearPriority() { 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.bigtable.admin.v2.AppProfile.StandardIsolation) } @@ -2401,6 +3273,7 @@ public interface DataBoostIsolationReadOnlyOrBuilder * @return Whether the computeBillingOwner field is set. */ boolean hasComputeBillingOwner(); + /** * * @@ -2415,6 +3288,7 @@ public interface DataBoostIsolationReadOnlyOrBuilder * @return The enum numeric value on the wire for computeBillingOwner. */ int getComputeBillingOwnerValue(); + /** * * @@ -2431,34 +3305,38 @@ public interface DataBoostIsolationReadOnlyOrBuilder com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner getComputeBillingOwner(); } + /** * * *
          * Data Boost is a serverless compute capability that lets you run
      -   * high-throughput read jobs on your Bigtable data, without impacting the
      -   * performance of the clusters that handle your application traffic.
      -   * Currently, Data Boost exclusively supports read-only use-cases with
      -   * single-cluster routing.
      -   *
      -   * Data Boost reads are only guaranteed to see the results of writes that
      -   * were written at least 30 minutes ago. This means newly written values may
      -   * not become visible for up to 30m, and also means that old values may
      -   * remain visible for up to 30m after being deleted or overwritten. To
      -   * mitigate the staleness of the data, users may either wait 30m, or use
      -   * CheckConsistency.
      +   * high-throughput read jobs and queries on your Bigtable data, without
      +   * impacting the performance of the clusters that handle your application
      +   * traffic. Data Boost supports read-only use cases with single-cluster
      +   * routing.
          * 
      * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} */ - public static final class DataBoostIsolationReadOnly - extends com.google.protobuf.GeneratedMessageV3 + public static final class DataBoostIsolationReadOnly extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) DataBoostIsolationReadOnlyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataBoostIsolationReadOnly"); + } + // Use DataBoostIsolationReadOnly.newBuilder() to construct. - private DataBoostIsolationReadOnly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DataBoostIsolationReadOnly(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2466,19 +3344,13 @@ private DataBoostIsolationReadOnly() { computeBillingOwner_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataBoostIsolationReadOnly(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_fieldAccessorTable @@ -2524,6 +3396,16 @@ public enum ComputeBillingOwner implements com.google.protobuf.ProtocolMessageEn UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ComputeBillingOwner"); + } + /** * * @@ -2534,6 +3416,7 @@ public enum ComputeBillingOwner implements com.google.protobuf.ProtocolMessageEn * COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; */ public static final int COMPUTE_BILLING_OWNER_UNSPECIFIED_VALUE = 0; + /** * * @@ -2604,7 +3487,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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.getDescriptor() .getEnumTypes() .get(0); @@ -2635,6 +3518,7 @@ private ComputeBillingOwner(int value) { private int bitField0_; public static final int COMPUTE_BILLING_OWNER_FIELD_NUMBER = 1; private int computeBillingOwner_ = 0; + /** * * @@ -2652,6 +3536,7 @@ private ComputeBillingOwner(int value) { public boolean hasComputeBillingOwner() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2669,6 +3554,7 @@ public boolean hasComputeBillingOwner() { public int getComputeBillingOwnerValue() { return computeBillingOwner_; } + /** * * @@ -2801,39 +3687,39 @@ public static com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly public static com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly 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); } @@ -2857,33 +3743,25 @@ 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; } + /** * * *
            * Data Boost is a serverless compute capability that lets you run
      -     * high-throughput read jobs on your Bigtable data, without impacting the
      -     * performance of the clusters that handle your application traffic.
      -     * Currently, Data Boost exclusively supports read-only use-cases with
      -     * single-cluster routing.
      -     *
      -     * Data Boost reads are only guaranteed to see the results of writes that
      -     * were written at least 30 minutes ago. This means newly written values may
      -     * not become visible for up to 30m, and also means that old values may
      -     * remain visible for up to 30m after being deleted or overwritten. To
      -     * mitigate the staleness of the data, users may either wait 30m, or use
      -     * CheckConsistency.
      +     * high-throughput read jobs and queries on your Bigtable data, without
      +     * impacting the performance of the clusters that handle your application
      +     * traffic. Data Boost supports read-only use cases with single-cluster
      +     * routing.
            * 
      * * Protobuf type {@code google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly} */ - 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnlyOrBuilder { @@ -2893,7 +3771,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_fieldAccessorTable @@ -2906,7 +3784,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2962,41 +3840,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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) { @@ -3014,7 +3857,7 @@ public Builder mergeFrom( == com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly .getDefaultInstance()) return this; if (other.hasComputeBillingOwner()) { - setComputeBillingOwner(other.getComputeBillingOwner()); + setComputeBillingOwnerValue(other.getComputeBillingOwnerValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -3068,6 +3911,7 @@ public Builder mergeFrom( private int bitField0_; private int computeBillingOwner_ = 0; + /** * * @@ -3085,6 +3929,7 @@ public Builder mergeFrom( public boolean hasComputeBillingOwner() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3102,6 +3947,7 @@ public boolean hasComputeBillingOwner() { public int getComputeBillingOwnerValue() { return computeBillingOwner_; } + /** * * @@ -3122,6 +3968,7 @@ public Builder setComputeBillingOwnerValue(int value) { onChanged(); return this; } + /** * * @@ -3147,6 +3994,7 @@ public Builder setComputeBillingOwnerValue(int value) { .UNRECOGNIZED : result; } + /** * * @@ -3172,6 +4020,7 @@ public Builder setComputeBillingOwner( onChanged(); return this; } + /** * * @@ -3192,18 +4041,6 @@ public Builder clearComputeBillingOwner() { 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.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly) } @@ -3276,6 +4113,7 @@ public enum RoutingPolicyCase private RoutingPolicyCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -3327,6 +4165,7 @@ public enum IsolationCase private IsolationCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -3365,6 +4204,7 @@ public IsolationCase getIsolationCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3389,6 +4229,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3418,6 +4259,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -3448,6 +4290,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -3483,6 +4326,7 @@ public com.google.protobuf.ByteString getEtagBytes() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -3506,6 +4350,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -3531,6 +4376,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } public static final int MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER = 5; + /** * * @@ -3548,6 +4394,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { public boolean hasMultiClusterRoutingUseAny() { return routingPolicyCase_ == 5; } + /** * * @@ -3569,6 +4416,7 @@ public boolean hasMultiClusterRoutingUseAny() { } return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance(); } + /** * * @@ -3590,6 +4438,7 @@ public boolean hasMultiClusterRoutingUseAny() { } public static final int SINGLE_CLUSTER_ROUTING_FIELD_NUMBER = 6; + /** * * @@ -3606,6 +4455,7 @@ public boolean hasMultiClusterRoutingUseAny() { public boolean hasSingleClusterRouting() { return routingPolicyCase_ == 6; } + /** * * @@ -3625,6 +4475,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu } return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } + /** * * @@ -3645,6 +4496,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu } public static final int PRIORITY_FIELD_NUMBER = 7; + /** * * @@ -3658,13 +4510,14 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return Whether the priority field is set. */ @java.lang.Deprecated public boolean hasPriority() { return isolationCase_ == 7; } + /** * * @@ -3678,7 +4531,7 @@ public boolean hasPriority() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The enum numeric value on the wire for priority. */ @java.lang.Deprecated @@ -3688,6 +4541,7 @@ public int getPriorityValue() { } return 0; } + /** * * @@ -3701,7 +4555,7 @@ public int getPriorityValue() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The priority. */ @java.lang.Deprecated @@ -3718,6 +4572,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { } public static final int STANDARD_ISOLATION_FIELD_NUMBER = 11; + /** * * @@ -3734,6 +4589,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { public boolean hasStandardIsolation() { return isolationCase_ == 11; } + /** * * @@ -3753,6 +4609,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol } return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } + /** * * @@ -3773,6 +4630,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol } public static final int DATA_BOOST_ISOLATION_READ_ONLY_FIELD_NUMBER = 10; + /** * * @@ -3791,6 +4649,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol public boolean hasDataBoostIsolationReadOnly() { return isolationCase_ == 10; } + /** * * @@ -3813,6 +4672,7 @@ public boolean hasDataBoostIsolationReadOnly() { } return com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.getDefaultInstance(); } + /** * * @@ -3848,14 +4708,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(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); } if (routingPolicyCase_ == 5) { output.writeMessage( @@ -3885,14 +4745,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(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); } if (routingPolicyCase_ == 5) { size += @@ -4052,38 +4912,38 @@ public static com.google.bigtable.admin.v2.AppProfile parseFrom( public static com.google.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile 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); } @@ -4106,10 +4966,11 @@ 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; } + /** * * @@ -4120,7 +4981,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.AppProfile} */ - 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.bigtable.admin.v2.AppProfile) com.google.bigtable.admin.v2.AppProfileOrBuilder { @@ -4130,7 +4991,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable @@ -4142,7 +5003,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AppProfile.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -4236,39 +5097,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile) { @@ -4380,14 +5208,15 @@ public Builder mergeFrom( case 42: { input.readMessage( - getMultiClusterRoutingUseAnyFieldBuilder().getBuilder(), extensionRegistry); + internalGetMultiClusterRoutingUseAnyFieldBuilder().getBuilder(), + extensionRegistry); routingPolicyCase_ = 5; break; } // case 42 case 50: { input.readMessage( - getSingleClusterRoutingFieldBuilder().getBuilder(), extensionRegistry); + internalGetSingleClusterRoutingFieldBuilder().getBuilder(), extensionRegistry); routingPolicyCase_ = 6; break; } // case 50 @@ -4401,14 +5230,15 @@ public Builder mergeFrom( case 82: { input.readMessage( - getDataBoostIsolationReadOnlyFieldBuilder().getBuilder(), extensionRegistry); + internalGetDataBoostIsolationReadOnlyFieldBuilder().getBuilder(), + extensionRegistry); isolationCase_ = 10; break; } // case 82 case 90: { input.readMessage( - getStandardIsolationFieldBuilder().getBuilder(), extensionRegistry); + internalGetStandardIsolationFieldBuilder().getBuilder(), extensionRegistry); isolationCase_ = 11; break; } // case 90 @@ -4460,6 +5290,7 @@ public Builder clearIsolation() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -4483,6 +5314,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -4506,6 +5338,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4528,6 +5361,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4546,6 +5380,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -4571,6 +5406,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object etag_ = ""; + /** * * @@ -4600,6 +5436,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -4629,6 +5466,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4657,6 +5495,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4681,6 +5520,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * @@ -4712,6 +5552,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } private java.lang.Object description_ = ""; + /** * * @@ -4734,6 +5575,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -4756,6 +5598,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4777,6 +5620,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4794,6 +5638,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * @@ -4817,11 +5662,12 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder> multiClusterRoutingUseAnyBuilder_; + /** * * @@ -4839,6 +5685,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { public boolean hasMultiClusterRoutingUseAny() { return routingPolicyCase_ == 5; } + /** * * @@ -4869,6 +5716,7 @@ public boolean hasMultiClusterRoutingUseAny() { .getDefaultInstance(); } } + /** * * @@ -4894,6 +5742,7 @@ public Builder setMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4916,6 +5765,7 @@ public Builder setMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4954,6 +5804,7 @@ public Builder mergeMultiClusterRoutingUseAny( routingPolicyCase_ = 5; return this; } + /** * * @@ -4981,6 +5832,7 @@ public Builder clearMultiClusterRoutingUseAny() { } return this; } + /** * * @@ -4994,8 +5846,9 @@ public Builder clearMultiClusterRoutingUseAny() { */ public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder getMultiClusterRoutingUseAnyBuilder() { - return getMultiClusterRoutingUseAnyFieldBuilder().getBuilder(); + return internalGetMultiClusterRoutingUseAnyFieldBuilder().getBuilder(); } + /** * * @@ -5020,6 +5873,7 @@ public Builder clearMultiClusterRoutingUseAny() { .getDefaultInstance(); } } + /** * * @@ -5031,11 +5885,11 @@ public Builder clearMultiClusterRoutingUseAny() { * .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; *
      */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder> - getMultiClusterRoutingUseAnyFieldBuilder() { + internalGetMultiClusterRoutingUseAnyFieldBuilder() { if (multiClusterRoutingUseAnyBuilder_ == null) { if (!(routingPolicyCase_ == 5)) { routingPolicy_ = @@ -5043,7 +5897,7 @@ public Builder clearMultiClusterRoutingUseAny() { .getDefaultInstance(); } multiClusterRoutingUseAnyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder>( @@ -5057,11 +5911,12 @@ public Builder clearMultiClusterRoutingUseAny() { return multiClusterRoutingUseAnyBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder> singleClusterRoutingBuilder_; + /** * * @@ -5078,6 +5933,7 @@ public Builder clearMultiClusterRoutingUseAny() { public boolean hasSingleClusterRouting() { return routingPolicyCase_ == 6; } + /** * * @@ -5104,6 +5960,7 @@ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClu return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } } + /** * * @@ -5128,6 +5985,7 @@ public Builder setSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5149,6 +6007,7 @@ public Builder setSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5185,6 +6044,7 @@ public Builder mergeSingleClusterRouting( routingPolicyCase_ = 6; return this; } + /** * * @@ -5211,6 +6071,7 @@ public Builder clearSingleClusterRouting() { } return this; } + /** * * @@ -5223,8 +6084,9 @@ public Builder clearSingleClusterRouting() { */ public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder getSingleClusterRoutingBuilder() { - return getSingleClusterRoutingFieldBuilder().getBuilder(); + return internalGetSingleClusterRoutingFieldBuilder().getBuilder(); } + /** * * @@ -5247,6 +6109,7 @@ public Builder clearSingleClusterRouting() { return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } } + /** * * @@ -5257,18 +6120,18 @@ public Builder clearSingleClusterRouting() { * .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder> - getSingleClusterRoutingFieldBuilder() { + internalGetSingleClusterRoutingFieldBuilder() { if (singleClusterRoutingBuilder_ == null) { if (!(routingPolicyCase_ == 6)) { routingPolicy_ = com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance(); } singleClusterRoutingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder>( @@ -5295,7 +6158,7 @@ public Builder clearSingleClusterRouting() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return Whether the priority field is set. */ @java.lang.Override @@ -5303,6 +6166,7 @@ public Builder clearSingleClusterRouting() { public boolean hasPriority() { return isolationCase_ == 7; } + /** * * @@ -5316,7 +6180,7 @@ public boolean hasPriority() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The enum numeric value on the wire for priority. */ @java.lang.Override @@ -5327,6 +6191,7 @@ public int getPriorityValue() { } return 0; } + /** * * @@ -5340,7 +6205,7 @@ public int getPriorityValue() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @param value The enum numeric value on the wire for priority to set. * @return This builder for chaining. */ @@ -5351,6 +6216,7 @@ public Builder setPriorityValue(int value) { onChanged(); return this; } + /** * * @@ -5364,7 +6230,7 @@ public Builder setPriorityValue(int value) { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The priority. */ @java.lang.Override @@ -5380,6 +6246,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { } return com.google.bigtable.admin.v2.AppProfile.Priority.PRIORITY_UNSPECIFIED; } + /** * * @@ -5393,7 +6260,7 @@ public com.google.bigtable.admin.v2.AppProfile.Priority getPriority() { * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @param value The priority to set. * @return This builder for chaining. */ @@ -5407,6 +6274,7 @@ public Builder setPriority(com.google.bigtable.admin.v2.AppProfile.Priority valu onChanged(); return this; } + /** * * @@ -5420,7 +6288,7 @@ public Builder setPriority(com.google.bigtable.admin.v2.AppProfile.Priority valu * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return This builder for chaining. */ @java.lang.Deprecated @@ -5433,11 +6301,12 @@ public Builder clearPriority() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.StandardIsolation, com.google.bigtable.admin.v2.AppProfile.StandardIsolation.Builder, com.google.bigtable.admin.v2.AppProfile.StandardIsolationOrBuilder> standardIsolationBuilder_; + /** * * @@ -5454,6 +6323,7 @@ public Builder clearPriority() { public boolean hasStandardIsolation() { return isolationCase_ == 11; } + /** * * @@ -5480,6 +6350,7 @@ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsol return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } } + /** * * @@ -5504,6 +6375,7 @@ public Builder setStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5525,6 +6397,7 @@ public Builder setStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5560,6 +6433,7 @@ public Builder mergeStandardIsolation( isolationCase_ = 11; return this; } + /** * * @@ -5586,6 +6460,7 @@ public Builder clearStandardIsolation() { } return this; } + /** * * @@ -5598,8 +6473,9 @@ public Builder clearStandardIsolation() { */ public com.google.bigtable.admin.v2.AppProfile.StandardIsolation.Builder getStandardIsolationBuilder() { - return getStandardIsolationFieldBuilder().getBuilder(); + return internalGetStandardIsolationFieldBuilder().getBuilder(); } + /** * * @@ -5622,6 +6498,7 @@ public Builder clearStandardIsolation() { return com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } } + /** * * @@ -5632,18 +6509,18 @@ public Builder clearStandardIsolation() { * * .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.StandardIsolation, com.google.bigtable.admin.v2.AppProfile.StandardIsolation.Builder, com.google.bigtable.admin.v2.AppProfile.StandardIsolationOrBuilder> - getStandardIsolationFieldBuilder() { + internalGetStandardIsolationFieldBuilder() { if (standardIsolationBuilder_ == null) { if (!(isolationCase_ == 11)) { isolation_ = com.google.bigtable.admin.v2.AppProfile.StandardIsolation.getDefaultInstance(); } standardIsolationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.StandardIsolation, com.google.bigtable.admin.v2.AppProfile.StandardIsolation.Builder, com.google.bigtable.admin.v2.AppProfile.StandardIsolationOrBuilder>( @@ -5657,11 +6534,12 @@ public Builder clearStandardIsolation() { return standardIsolationBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.Builder, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnlyOrBuilder> dataBoostIsolationReadOnlyBuilder_; + /** * * @@ -5680,6 +6558,7 @@ public Builder clearStandardIsolation() { public boolean hasDataBoostIsolationReadOnly() { return isolationCase_ == 10; } + /** * * @@ -5711,6 +6590,7 @@ public boolean hasDataBoostIsolationReadOnly() { .getDefaultInstance(); } } + /** * * @@ -5737,6 +6617,7 @@ public Builder setDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5761,6 +6642,7 @@ public Builder setDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5800,6 +6682,7 @@ public Builder mergeDataBoostIsolationReadOnly( isolationCase_ = 10; return this; } + /** * * @@ -5828,6 +6711,7 @@ public Builder clearDataBoostIsolationReadOnly() { } return this; } + /** * * @@ -5842,8 +6726,9 @@ public Builder clearDataBoostIsolationReadOnly() { */ public com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.Builder getDataBoostIsolationReadOnlyBuilder() { - return getDataBoostIsolationReadOnlyFieldBuilder().getBuilder(); + return internalGetDataBoostIsolationReadOnlyFieldBuilder().getBuilder(); } + /** * * @@ -5869,6 +6754,7 @@ public Builder clearDataBoostIsolationReadOnly() { .getDefaultInstance(); } } + /** * * @@ -5881,11 +6767,11 @@ public Builder clearDataBoostIsolationReadOnly() { * .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.Builder, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnlyOrBuilder> - getDataBoostIsolationReadOnlyFieldBuilder() { + internalGetDataBoostIsolationReadOnlyFieldBuilder() { if (dataBoostIsolationReadOnlyBuilder_ == null) { if (!(isolationCase_ == 10)) { isolation_ = @@ -5893,7 +6779,7 @@ public Builder clearDataBoostIsolationReadOnly() { .getDefaultInstance(); } dataBoostIsolationReadOnlyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.Builder, com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnlyOrBuilder>( @@ -5907,17 +6793,6 @@ public Builder clearDataBoostIsolationReadOnly() { return dataBoostIsolationReadOnlyBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileName.java index 4e4eb28823..4bf12b0cc8 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileOrBuilder.java index 0b617a9219..cc859c4516 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface AppProfileOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AppProfile) @@ -37,6 +39,7 @@ public interface AppProfileOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +73,7 @@ public interface AppProfileOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * @@ -102,6 +106,7 @@ public interface AppProfileOrBuilder * @return The description. */ java.lang.String getDescription(); + /** * * @@ -129,6 +134,7 @@ public interface AppProfileOrBuilder * @return Whether the multiClusterRoutingUseAny field is set. */ boolean hasMultiClusterRoutingUseAny(); + /** * * @@ -143,6 +149,7 @@ public interface AppProfileOrBuilder * @return The multiClusterRoutingUseAny. */ com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getMultiClusterRoutingUseAny(); + /** * * @@ -170,6 +177,7 @@ public interface AppProfileOrBuilder * @return Whether the singleClusterRouting field is set. */ boolean hasSingleClusterRouting(); + /** * * @@ -183,6 +191,7 @@ public interface AppProfileOrBuilder * @return The singleClusterRouting. */ com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClusterRouting(); + /** * * @@ -209,11 +218,12 @@ public interface AppProfileOrBuilder * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return Whether the priority field is set. */ @java.lang.Deprecated boolean hasPriority(); + /** * * @@ -227,11 +237,12 @@ public interface AppProfileOrBuilder * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The enum numeric value on the wire for priority. */ @java.lang.Deprecated int getPriorityValue(); + /** * * @@ -245,7 +256,7 @@ public interface AppProfileOrBuilder * .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; * * @deprecated google.bigtable.admin.v2.AppProfile.priority is deprecated. See - * google/bigtable/admin/v2/instance.proto;l=361 + * google/bigtable/admin/v2/instance.proto;l=421 * @return The priority. */ @java.lang.Deprecated @@ -264,6 +275,7 @@ public interface AppProfileOrBuilder * @return Whether the standardIsolation field is set. */ boolean hasStandardIsolation(); + /** * * @@ -277,6 +289,7 @@ public interface AppProfileOrBuilder * @return The standardIsolation. */ com.google.bigtable.admin.v2.AppProfile.StandardIsolation getStandardIsolation(); + /** * * @@ -305,6 +318,7 @@ public interface AppProfileOrBuilder * @return Whether the dataBoostIsolationReadOnly field is set. */ boolean hasDataBoostIsolationReadOnly(); + /** * * @@ -321,6 +335,7 @@ public interface AppProfileOrBuilder */ com.google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly getDataBoostIsolationReadOnly(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedView.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedView.java index 1f5941a8ad..585753b1e9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedView.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedView.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -30,13 +31,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView} */ -public final class AuthorizedView extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AuthorizedView extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView) AuthorizedViewOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuthorizedView"); + } + // Use AuthorizedView.newBuilder() to construct. - private AuthorizedView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AuthorizedView(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private AuthorizedView() { etag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AuthorizedView(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_fieldAccessorTable @@ -120,6 +127,16 @@ public enum ResponseView 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= */ "", + "ResponseView"); + } + /** * * @@ -130,6 +147,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * RESPONSE_VIEW_UNSPECIFIED = 0; */ public static final int RESPONSE_VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -140,6 +158,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * NAME_ONLY = 1; */ public static final int NAME_ONLY_VALUE = 1; + /** * * @@ -151,6 +170,7 @@ public enum ResponseView implements com.google.protobuf.ProtocolMessageEnum { * BASIC = 2; */ public static final int BASIC_VALUE = 2; + /** * * @@ -222,7 +242,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.bigtable.admin.v2.AuthorizedView.getDescriptor().getEnumTypes().get(0); } @@ -264,6 +284,7 @@ public interface FamilySubsetsOrBuilder * @return A list containing the qualifiers. */ java.util.List getQualifiersList(); + /** * * @@ -276,6 +297,7 @@ public interface FamilySubsetsOrBuilder * @return The count of qualifiers. */ int getQualifiersCount(); + /** * * @@ -306,6 +328,7 @@ public interface FamilySubsetsOrBuilder * @return A list containing the qualifierPrefixes. */ java.util.List getQualifierPrefixesList(); + /** * * @@ -322,6 +345,7 @@ public interface FamilySubsetsOrBuilder * @return The count of qualifierPrefixes. */ int getQualifierPrefixesCount(); + /** * * @@ -340,6 +364,7 @@ public interface FamilySubsetsOrBuilder */ com.google.protobuf.ByteString getQualifierPrefixes(int index); } + /** * * @@ -349,13 +374,24 @@ public interface FamilySubsetsOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView.FamilySubsets} */ - public static final class FamilySubsets extends com.google.protobuf.GeneratedMessageV3 + public static final class FamilySubsets extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView.FamilySubsets) FamilySubsetsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FamilySubsets"); + } + // Use FamilySubsets.newBuilder() to construct. - private FamilySubsets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FamilySubsets(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -364,19 +400,13 @@ private FamilySubsets() { qualifierPrefixes_ = emptyList(com.google.protobuf.ByteString.class); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FamilySubsets(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_fieldAccessorTable @@ -390,6 +420,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.Internal.ProtobufList qualifiers_ = emptyList(com.google.protobuf.ByteString.class); + /** * * @@ -405,6 +436,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getQualifiersList() { return qualifiers_; } + /** * * @@ -419,6 +451,7 @@ public java.util.List getQualifiersList() { public int getQualifiersCount() { return qualifiers_.size(); } + /** * * @@ -440,6 +473,7 @@ public com.google.protobuf.ByteString getQualifiers(int index) { @SuppressWarnings("serial") private com.google.protobuf.Internal.ProtobufList qualifierPrefixes_ = emptyList(com.google.protobuf.ByteString.class); + /** * * @@ -459,6 +493,7 @@ public com.google.protobuf.ByteString getQualifiers(int index) { public java.util.List getQualifierPrefixesList() { return qualifierPrefixes_; } + /** * * @@ -477,6 +512,7 @@ public java.util.List getQualifierPrefixesList() public int getQualifierPrefixesCount() { return qualifierPrefixes_.size(); } + /** * * @@ -624,38 +660,38 @@ public static com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets parseFro public static com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets 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.bigtable.admin.v2.AuthorizedView.FamilySubsets 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.bigtable.admin.v2.AuthorizedView.FamilySubsets 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.bigtable.admin.v2.AuthorizedView.FamilySubsets 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.bigtable.admin.v2.AuthorizedView.FamilySubsets 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.bigtable.admin.v2.AuthorizedView.FamilySubsets 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); } @@ -679,11 +715,11 @@ 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; } + /** * * @@ -693,8 +729,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView.FamilySubsets} */ - 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.bigtable.admin.v2.AuthorizedView.FamilySubsets) com.google.bigtable.admin.v2.AuthorizedView.FamilySubsetsOrBuilder { @@ -704,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_fieldAccessorTable @@ -716,7 +751,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -772,41 +807,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.AuthorizedView.FamilySub } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets) { @@ -910,6 +910,7 @@ private void ensureQualifiersIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -925,6 +926,7 @@ public java.util.List getQualifiersList() { qualifiers_.makeImmutable(); return qualifiers_; } + /** * * @@ -939,6 +941,7 @@ public java.util.List getQualifiersList() { public int getQualifiersCount() { return qualifiers_.size(); } + /** * * @@ -954,6 +957,7 @@ public int getQualifiersCount() { public com.google.protobuf.ByteString getQualifiers(int index) { return qualifiers_.get(index); } + /** * * @@ -977,6 +981,7 @@ public Builder setQualifiers(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -999,6 +1004,7 @@ public Builder addQualifiers(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1019,6 +1025,7 @@ public Builder addAllQualifiers( onChanged(); return this; } + /** * * @@ -1046,6 +1053,7 @@ private void ensureQualifierPrefixesIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1065,6 +1073,7 @@ public java.util.List getQualifierPrefixesList() qualifierPrefixes_.makeImmutable(); return qualifierPrefixes_; } + /** * * @@ -1083,6 +1092,7 @@ public java.util.List getQualifierPrefixesList() public int getQualifierPrefixesCount() { return qualifierPrefixes_.size(); } + /** * * @@ -1102,6 +1112,7 @@ public int getQualifierPrefixesCount() { public com.google.protobuf.ByteString getQualifierPrefixes(int index) { return qualifierPrefixes_.get(index); } + /** * * @@ -1129,6 +1140,7 @@ public Builder setQualifierPrefixes(int index, com.google.protobuf.ByteString va onChanged(); return this; } + /** * * @@ -1155,6 +1167,7 @@ public Builder addQualifierPrefixes(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1179,6 +1192,7 @@ public Builder addAllQualifierPrefixes( onChanged(); return this; } + /** * * @@ -1201,18 +1215,6 @@ public Builder clearQualifierPrefixes() { 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.bigtable.admin.v2.AuthorizedView.FamilySubsets) } @@ -1283,6 +1285,7 @@ public interface SubsetViewOrBuilder * @return A list containing the rowPrefixes. */ java.util.List getRowPrefixesList(); + /** * * @@ -1296,6 +1299,7 @@ public interface SubsetViewOrBuilder * @return The count of rowPrefixes. */ int getRowPrefixesCount(); + /** * * @@ -1324,6 +1328,7 @@ public interface SubsetViewOrBuilder * */ int getFamilySubsetsCount(); + /** * * @@ -1337,10 +1342,12 @@ public interface SubsetViewOrBuilder * */ boolean containsFamilySubsets(java.lang.String key); + /** Use {@link #getFamilySubsetsMap()} instead. */ @java.lang.Deprecated java.util.Map getFamilySubsets(); + /** * * @@ -1355,6 +1362,7 @@ public interface SubsetViewOrBuilder */ java.util.Map getFamilySubsetsMap(); + /** * * @@ -1372,6 +1380,7 @@ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrDefa java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets defaultValue); + /** * * @@ -1387,6 +1396,7 @@ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrDefa com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrThrow( java.lang.String key); } + /** * * @@ -1396,13 +1406,24 @@ com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets getFamilySubsetsOrThro * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView.SubsetView} */ - public static final class SubsetView extends com.google.protobuf.GeneratedMessageV3 + public static final class SubsetView extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AuthorizedView.SubsetView) SubsetViewOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SubsetView"); + } + // Use SubsetView.newBuilder() to construct. - private SubsetView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SubsetView(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1410,12 +1431,6 @@ private SubsetView() { rowPrefixes_ = emptyList(com.google.protobuf.ByteString.class); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubsetView(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor; @@ -1434,7 +1449,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_fieldAccessorTable @@ -1448,6 +1463,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private com.google.protobuf.Internal.ProtobufList rowPrefixes_ = emptyList(com.google.protobuf.ByteString.class); + /** * * @@ -1464,6 +1480,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl public java.util.List getRowPrefixesList() { return rowPrefixes_; } + /** * * @@ -1479,6 +1496,7 @@ public java.util.List getRowPrefixesList() { public int getRowPrefixesCount() { return rowPrefixes_.size(); } + /** * * @@ -1532,6 +1550,7 @@ private static final class FamilySubsetsDefaultEntryHolder { public int getFamilySubsetsCount() { return internalGetFamilySubsets().getMap().size(); } + /** * * @@ -1551,6 +1570,7 @@ public boolean containsFamilySubsets(java.lang.String key) { } return internalGetFamilySubsets().getMap().containsKey(key); } + /** Use {@link #getFamilySubsetsMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -1559,6 +1579,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsets() { return getFamilySubsetsMap(); } + /** * * @@ -1577,6 +1598,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsetsMap() { return internalGetFamilySubsets().getMap(); } + /** * * @@ -1602,6 +1624,7 @@ public boolean containsFamilySubsets(java.lang.String key) { map = internalGetFamilySubsets().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1645,7 +1668,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rowPrefixes_.size(); i++) { output.writeBytes(1, rowPrefixes_.get(i)); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetFamilySubsets(), FamilySubsetsDefaultEntryHolder.defaultEntry, 2); getUnknownFields().writeTo(output); } @@ -1757,38 +1780,38 @@ public static com.google.bigtable.admin.v2.AuthorizedView.SubsetView parseFrom( public static com.google.bigtable.admin.v2.AuthorizedView.SubsetView 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.bigtable.admin.v2.AuthorizedView.SubsetView 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.bigtable.admin.v2.AuthorizedView.SubsetView 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.bigtable.admin.v2.AuthorizedView.SubsetView 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.bigtable.admin.v2.AuthorizedView.SubsetView 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.bigtable.admin.v2.AuthorizedView.SubsetView 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); } @@ -1812,11 +1835,11 @@ 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; } + /** * * @@ -1826,8 +1849,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView.SubsetView} */ - 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.bigtable.admin.v2.AuthorizedView.SubsetView) com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder { @@ -1859,7 +1881,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_fieldAccessorTable @@ -1871,7 +1893,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.bigtable.admin.v2.AuthorizedView.SubsetView.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1927,41 +1949,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.AuthorizedView.SubsetVie } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.AuthorizedView.SubsetView) { @@ -2064,6 +2051,7 @@ private void ensureRowPrefixesIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -2080,6 +2068,7 @@ public java.util.List getRowPrefixesList() { rowPrefixes_.makeImmutable(); return rowPrefixes_; } + /** * * @@ -2095,6 +2084,7 @@ public java.util.List getRowPrefixesList() { public int getRowPrefixesCount() { return rowPrefixes_.size(); } + /** * * @@ -2111,6 +2101,7 @@ public int getRowPrefixesCount() { public com.google.protobuf.ByteString getRowPrefixes(int index) { return rowPrefixes_.get(index); } + /** * * @@ -2135,6 +2126,7 @@ public Builder setRowPrefixes(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2158,6 +2150,7 @@ public Builder addRowPrefixes(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2179,6 +2172,7 @@ public Builder addAllRowPrefixes( onChanged(); return this; } + /** * * @@ -2218,7 +2212,8 @@ public com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets build( defaultEntry() { return FamilySubsetsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final FamilySubsetsConverter familySubsetsConverter = new FamilySubsetsConverter(); @@ -2259,6 +2254,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets build( public int getFamilySubsetsCount() { return internalGetFamilySubsets().ensureBuilderMap().size(); } + /** * * @@ -2278,6 +2274,7 @@ public boolean containsFamilySubsets(java.lang.String key) { } return internalGetFamilySubsets().ensureBuilderMap().containsKey(key); } + /** Use {@link #getFamilySubsetsMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -2286,6 +2283,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsets() { return getFamilySubsetsMap(); } + /** * * @@ -2304,6 +2302,7 @@ public boolean containsFamilySubsets(java.lang.String key) { getFamilySubsetsMap() { return internalGetFamilySubsets().getImmutableMap(); } + /** * * @@ -2331,6 +2330,7 @@ public boolean containsFamilySubsets(java.lang.String key) { map = internalGetMutableFamilySubsets().ensureBuilderMap(); return map.containsKey(key) ? familySubsetsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -2364,6 +2364,7 @@ public Builder clearFamilySubsets() { internalGetMutableFamilySubsets().clear(); return this; } + /** * * @@ -2383,6 +2384,7 @@ public Builder removeFamilySubsets(java.lang.String key) { internalGetMutableFamilySubsets().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map< @@ -2391,6 +2393,7 @@ public Builder removeFamilySubsets(java.lang.String key) { bitField0_ |= 0x00000002; return internalGetMutableFamilySubsets().ensureMessageMap(); } + /** * * @@ -2415,6 +2418,7 @@ public Builder putFamilySubsets( bitField0_ |= 0x00000002; return this; } + /** * * @@ -2441,6 +2445,7 @@ public Builder putAllFamilySubsets( bitField0_ |= 0x00000002; return this; } + /** * * @@ -2472,18 +2477,6 @@ public Builder putAllFamilySubsets( return (com.google.bigtable.admin.v2.AuthorizedView.FamilySubsets.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.bigtable.admin.v2.AuthorizedView.SubsetView) } @@ -2552,6 +2545,7 @@ public enum AuthorizedViewCase private AuthorizedViewCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2586,6 +2580,7 @@ public AuthorizedViewCase getAuthorizedViewCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -2611,6 +2606,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -2638,6 +2634,7 @@ public com.google.protobuf.ByteString getNameBytes() { } public static final int SUBSET_VIEW_FIELD_NUMBER = 2; + /** * * @@ -2653,6 +2650,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSubsetView() { return authorizedViewCase_ == 2; } + /** * * @@ -2671,6 +2669,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView() { } return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } + /** * * @@ -2692,6 +2691,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder getSubset @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -2717,6 +2717,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -2745,6 +2746,7 @@ public com.google.protobuf.ByteString getEtagBytes() { public static final int DELETION_PROTECTION_FIELD_NUMBER = 4; private boolean deletionProtection_ = false; + /** * * @@ -2777,15 +2779,15 @@ 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 (authorizedViewCase_ == 2) { output.writeMessage( 2, (com.google.bigtable.admin.v2.AuthorizedView.SubsetView) authorizedView_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); } if (deletionProtection_ != false) { output.writeBool(4, deletionProtection_); @@ -2799,16 +2801,16 @@ 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 (authorizedViewCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.bigtable.admin.v2.AuthorizedView.SubsetView) authorizedView_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, etag_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); } if (deletionProtection_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, deletionProtection_); @@ -2907,38 +2909,38 @@ public static com.google.bigtable.admin.v2.AuthorizedView parseFrom( public static com.google.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView 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); } @@ -2961,10 +2963,11 @@ 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; } + /** * * @@ -2976,7 +2979,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.AuthorizedView} */ - 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.bigtable.admin.v2.AuthorizedView) com.google.bigtable.admin.v2.AuthorizedViewOrBuilder { @@ -2986,7 +2989,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_AuthorizedView_fieldAccessorTable @@ -2998,7 +3001,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AuthorizedView.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3070,39 +3073,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.AuthorizedView 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.bigtable.admin.v2.AuthorizedView) { @@ -3173,7 +3143,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSubsetViewFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSubsetViewFieldBuilder().getBuilder(), extensionRegistry); authorizedViewCase_ = 2; break; } // case 18 @@ -3223,6 +3194,7 @@ public Builder clearAuthorizedView() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -3247,6 +3219,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -3271,6 +3244,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3294,6 +3268,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3313,6 +3288,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -3338,11 +3314,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView.SubsetView, com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder, com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder> subsetViewBuilder_; + /** * * @@ -3358,6 +3335,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSubsetView() { return authorizedViewCase_ == 2; } + /** * * @@ -3383,6 +3361,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView() { return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } } + /** * * @@ -3405,6 +3384,7 @@ public Builder setSubsetView(com.google.bigtable.admin.v2.AuthorizedView.SubsetV authorizedViewCase_ = 2; return this; } + /** * * @@ -3425,6 +3405,7 @@ public Builder setSubsetView( authorizedViewCase_ = 2; return this; } + /** * * @@ -3458,6 +3439,7 @@ public Builder mergeSubsetView(com.google.bigtable.admin.v2.AuthorizedView.Subse authorizedViewCase_ = 2; return this; } + /** * * @@ -3483,6 +3465,7 @@ public Builder clearSubsetView() { } return this; } + /** * * @@ -3493,8 +3476,9 @@ public Builder clearSubsetView() { * .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; */ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetViewBuilder() { - return getSubsetViewFieldBuilder().getBuilder(); + return internalGetSubsetViewFieldBuilder().getBuilder(); } + /** * * @@ -3516,6 +3500,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetV return com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } } + /** * * @@ -3525,18 +3510,18 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetV * * .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView.SubsetView, com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder, com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder> - getSubsetViewFieldBuilder() { + internalGetSubsetViewFieldBuilder() { if (subsetViewBuilder_ == null) { if (!(authorizedViewCase_ == 2)) { authorizedView_ = com.google.bigtable.admin.v2.AuthorizedView.SubsetView.getDefaultInstance(); } subsetViewBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView.SubsetView, com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder, com.google.bigtable.admin.v2.AuthorizedView.SubsetViewOrBuilder>( @@ -3551,6 +3536,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.SubsetView.Builder getSubsetV } private java.lang.Object etag_ = ""; + /** * * @@ -3575,6 +3561,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -3599,6 +3586,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3622,6 +3610,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3641,6 +3630,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * @@ -3667,6 +3657,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } private boolean deletionProtection_; + /** * * @@ -3684,6 +3675,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { public boolean getDeletionProtection() { return deletionProtection_; } + /** * * @@ -3705,6 +3697,7 @@ public Builder setDeletionProtection(boolean value) { onChanged(); return this; } + /** * * @@ -3725,17 +3718,6 @@ public Builder clearDeletionProtection() { 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.bigtable.admin.v2.AuthorizedView) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewName.java index 3cb203204a..47c2d1a75b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewOrBuilder.java index b25f377879..ba46de74aa 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface AuthorizedViewOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AuthorizedView) @@ -38,6 +40,7 @@ public interface AuthorizedViewOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +68,7 @@ public interface AuthorizedViewOrBuilder * @return Whether the subsetView field is set. */ boolean hasSubsetView(); + /** * * @@ -77,6 +81,7 @@ public interface AuthorizedViewOrBuilder * @return The subsetView. */ com.google.bigtable.admin.v2.AuthorizedView.SubsetView getSubsetView(); + /** * * @@ -102,6 +107,7 @@ public interface AuthorizedViewOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java index d772c22b63..2bda6d07ff 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.AutoscalingLimits} */ -public final class AutoscalingLimits extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AutoscalingLimits extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingLimits_fieldAccessorTable @@ -63,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int MIN_SERVE_NODES_FIELD_NUMBER = 1; private int minServeNodes_ = 0; + /** * * @@ -81,6 +89,7 @@ public int getMinServeNodes() { public static final int MAX_SERVE_NODES_FIELD_NUMBER = 2; private int maxServeNodes_ = 0; + /** * * @@ -207,38 +216,38 @@ public static com.google.bigtable.admin.v2.AutoscalingLimits parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.AutoscalingLimits 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); } @@ -261,10 +270,11 @@ 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; } + /** * * @@ -274,7 +284,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.AutoscalingLimits) com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder { @@ -284,7 +294,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingLimits_fieldAccessorTable @@ -296,7 +306,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AutoscalingLimits.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -350,39 +360,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.AutoscalingLimits 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.bigtable.admin.v2.AutoscalingLimits) { @@ -459,6 +436,7 @@ public Builder mergeFrom( private int bitField0_; private int minServeNodes_; + /** * * @@ -474,6 +452,7 @@ public Builder mergeFrom( public int getMinServeNodes() { return minServeNodes_; } + /** * * @@ -493,6 +472,7 @@ public Builder setMinServeNodes(int value) { onChanged(); return this; } + /** * * @@ -512,6 +492,7 @@ public Builder clearMinServeNodes() { } private int maxServeNodes_; + /** * * @@ -527,6 +508,7 @@ public Builder clearMinServeNodes() { public int getMaxServeNodes() { return maxServeNodes_; } + /** * * @@ -546,6 +528,7 @@ public Builder setMaxServeNodes(int value) { onChanged(); return this; } + /** * * @@ -564,17 +547,6 @@ public Builder clearMaxServeNodes() { 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.bigtable.admin.v2.AutoscalingLimits) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimitsOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimitsOrBuilder.java index 827ea967f9..b68006991a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimitsOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimitsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface AutoscalingLimitsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AutoscalingLimits) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java index d59b08f600..c002885620 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.AutoscalingTargets} */ -public final class AutoscalingTargets extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class AutoscalingTargets extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingTargets_fieldAccessorTable @@ -63,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int CPU_UTILIZATION_PERCENT_FIELD_NUMBER = 2; private int cpuUtilizationPercent_ = 0; + /** * * @@ -84,6 +92,7 @@ public int getCpuUtilizationPercent() { public static final int STORAGE_UTILIZATION_GIB_PER_NODE_FIELD_NUMBER = 3; private int storageUtilizationGibPerNode_ = 0; + /** * * @@ -216,38 +225,38 @@ public static com.google.bigtable.admin.v2.AutoscalingTargets parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.AutoscalingTargets 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); } @@ -270,10 +279,11 @@ 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; } + /** * * @@ -283,7 +293,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.AutoscalingTargets) com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder { @@ -293,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingTargets_fieldAccessorTable @@ -305,7 +315,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.AutoscalingTargets.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -359,39 +369,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.AutoscalingTargets resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.AutoscalingTargets) { @@ -469,6 +446,7 @@ public Builder mergeFrom( private int bitField0_; private int cpuUtilizationPercent_; + /** * * @@ -487,6 +465,7 @@ public Builder mergeFrom( public int getCpuUtilizationPercent() { return cpuUtilizationPercent_; } + /** * * @@ -509,6 +488,7 @@ public Builder setCpuUtilizationPercent(int value) { onChanged(); return this; } + /** * * @@ -531,6 +511,7 @@ public Builder clearCpuUtilizationPercent() { } private int storageUtilizationGibPerNode_; + /** * * @@ -551,6 +532,7 @@ public Builder clearCpuUtilizationPercent() { public int getStorageUtilizationGibPerNode() { return storageUtilizationGibPerNode_; } + /** * * @@ -575,6 +557,7 @@ public Builder setStorageUtilizationGibPerNode(int value) { onChanged(); return this; } + /** * * @@ -598,17 +581,6 @@ public Builder clearStorageUtilizationGibPerNode() { 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.bigtable.admin.v2.AutoscalingTargets) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java index c7c1d13724..d0f15adb8b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargetsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface AutoscalingTargetsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AutoscalingTargets) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java index 428505de48..c77f088df5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -46,19 +59,13 @@ private Backup() { backupType_ = 0; } - @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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Backup_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Backup_fieldAccessorTable @@ -111,6 +118,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"); + } + /** * * @@ -121,6 +138,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -132,6 +150,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 1; */ public static final int CREATING_VALUE = 1; + /** * * @@ -201,7 +220,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.bigtable.admin.v2.Backup.getDescriptor().getEnumTypes().get(0); } @@ -274,6 +293,16 @@ public enum BackupType 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= */ "", + "BackupType"); + } + /** * * @@ -284,6 +313,7 @@ public enum BackupType implements com.google.protobuf.ProtocolMessageEnum { * BACKUP_TYPE_UNSPECIFIED = 0; */ public static final int BACKUP_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -296,6 +326,7 @@ public enum BackupType implements com.google.protobuf.ProtocolMessageEnum { * STANDARD = 1; */ public static final int STANDARD_VALUE = 1; + /** * * @@ -368,7 +399,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.bigtable.admin.v2.Backup.getDescriptor().getEnumTypes().get(1); } @@ -398,6 +429,7 @@ private BackupType(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -405,7 +437,7 @@ private BackupType(int value) { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -430,6 +462,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -437,7 +470,7 @@ public java.lang.String getName() { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -467,6 +500,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -494,6 +528,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -526,6 +561,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * @@ -552,6 +588,7 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * @@ -581,6 +618,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public static final int EXPIRE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp expireTime_; + /** * * @@ -603,6 +641,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -625,6 +664,7 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * @@ -648,6 +688,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public static final int START_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -668,6 +709,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -688,6 +730,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -709,6 +752,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -726,6 +770,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -743,6 +788,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -761,6 +807,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int SIZE_BYTES_FIELD_NUMBER = 6; private long sizeBytes_ = 0L; + /** * * @@ -779,6 +826,7 @@ public long getSizeBytes() { public static final int STATE_FIELD_NUMBER = 7; private int state_ = 0; + /** * * @@ -796,6 +844,7 @@ public long getSizeBytes() { public int getStateValue() { return state_; } + /** * * @@ -818,6 +867,7 @@ public com.google.bigtable.admin.v2.Backup.State getState() { public static final int ENCRYPTION_INFO_FIELD_NUMBER = 9; private com.google.bigtable.admin.v2.EncryptionInfo encryptionInfo_; + /** * * @@ -835,6 +885,7 @@ public com.google.bigtable.admin.v2.Backup.State getState() { public boolean hasEncryptionInfo() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -854,6 +905,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo() { ? com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance() : encryptionInfo_; } + /** * * @@ -874,6 +926,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB public static final int BACKUP_TYPE_FIELD_NUMBER = 11; private int backupType_ = 0; + /** * * @@ -889,6 +942,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB public int getBackupTypeValue() { return backupType_; } + /** * * @@ -909,6 +963,7 @@ public com.google.bigtable.admin.v2.Backup.BackupType getBackupType() { public static final int HOT_TO_STANDARD_TIME_FIELD_NUMBER = 12; private com.google.protobuf.Timestamp hotToStandardTime_; + /** * * @@ -931,6 +986,7 @@ public com.google.bigtable.admin.v2.Backup.BackupType getBackupType() { public boolean hasHotToStandardTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -955,6 +1011,7 @@ public com.google.protobuf.Timestamp getHotToStandardTime() { ? com.google.protobuf.Timestamp.getDefaultInstance() : hotToStandardTime_; } + /** * * @@ -992,11 +1049,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(sourceTable_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceTable_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getExpireTime()); @@ -1016,8 +1073,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(9, getEncryptionInfo()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, sourceBackup_); } if (backupType_ != com.google.bigtable.admin.v2.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { @@ -1035,11 +1092,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(sourceTable_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceTable_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExpireTime()); @@ -1059,8 +1116,8 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEncryptionInfo()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, sourceBackup_); } if (backupType_ != com.google.bigtable.admin.v2.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { @@ -1194,38 +1251,38 @@ public static com.google.bigtable.admin.v2.Backup parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -1248,10 +1305,11 @@ 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; } + /** * * @@ -1261,7 +1319,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.Backup) com.google.bigtable.admin.v2.BackupOrBuilder { @@ -1271,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Backup_fieldAccessorTable @@ -1285,18 +1343,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) { - getExpireTimeFieldBuilder(); - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); - getEncryptionInfoFieldBuilder(); - getHotToStandardTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExpireTimeFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEncryptionInfoFieldBuilder(); + internalGetHotToStandardTimeFieldBuilder(); } } @@ -1416,39 +1474,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.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.bigtable.admin.v2.Backup) { @@ -1540,19 +1565,21 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 34: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 34 case 42: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 42 @@ -1570,7 +1597,8 @@ public Builder mergeFrom( } // case 56 case 74: { - input.readMessage(getEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 74 @@ -1589,7 +1617,7 @@ public Builder mergeFrom( case 98: { input.readMessage( - getHotToStandardTimeFieldBuilder().getBuilder(), extensionRegistry); + internalGetHotToStandardTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 98 @@ -1613,6 +1641,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1620,7 +1649,7 @@ public Builder mergeFrom( * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -1644,6 +1673,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1651,7 +1681,7 @@ public java.lang.String getName() { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -1675,6 +1705,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1682,7 +1713,7 @@ public com.google.protobuf.ByteString getNameBytes() { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -1705,6 +1736,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1712,7 +1744,7 @@ public Builder setName(java.lang.String value) { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -1731,6 +1763,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1738,7 +1771,7 @@ public Builder clearName() { * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -1764,6 +1797,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -1790,6 +1824,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -1816,6 +1851,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1841,6 +1877,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1862,6 +1899,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1890,6 +1928,7 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * @@ -1915,6 +1954,7 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * @@ -1940,6 +1980,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1964,6 +2005,7 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1984,6 +2026,7 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * @@ -2011,11 +2054,12 @@ 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> expireTimeBuilder_; + /** * * @@ -2037,6 +2081,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { public boolean hasExpireTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -2064,6 +2109,7 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * @@ -2093,6 +2139,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2119,6 +2166,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -2153,6 +2201,7 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2179,6 +2228,7 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * @@ -2198,8 +2248,9 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } + /** * * @@ -2225,6 +2276,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * @@ -2241,14 +2293,14 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * .google.protobuf.Timestamp expire_time = 3 [(.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>( @@ -2259,11 +2311,12 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { } 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> startTimeBuilder_; + /** * * @@ -2283,6 +2336,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { public boolean hasStartTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -2306,6 +2360,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -2333,6 +2388,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2357,6 +2413,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -2389,6 +2446,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2413,6 +2471,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -2430,8 +2489,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -2453,6 +2513,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -2467,14 +2528,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * .google.protobuf.Timestamp start_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> - 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>( @@ -2485,11 +2546,12 @@ 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> endTimeBuilder_; + /** * * @@ -2506,6 +2568,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2526,6 +2589,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -2550,6 +2614,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2571,6 +2636,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -2600,6 +2666,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2621,6 +2688,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -2635,8 +2703,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -2655,6 +2724,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -2666,14 +2736,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * .google.protobuf.Timestamp end_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> - 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>( @@ -2684,6 +2754,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private long sizeBytes_; + /** * * @@ -2699,6 +2770,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public long getSizeBytes() { return sizeBytes_; } + /** * * @@ -2718,6 +2790,7 @@ public Builder setSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -2737,6 +2810,7 @@ public Builder clearSizeBytes() { } private int state_ = 0; + /** * * @@ -2754,6 +2828,7 @@ public Builder clearSizeBytes() { public int getStateValue() { return state_; } + /** * * @@ -2774,6 +2849,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -2793,6 +2869,7 @@ public com.google.bigtable.admin.v2.Backup.State getState() { com.google.bigtable.admin.v2.Backup.State.forNumber(state_); return result == null ? com.google.bigtable.admin.v2.Backup.State.UNRECOGNIZED : result; } + /** * * @@ -2816,6 +2893,7 @@ public Builder setState(com.google.bigtable.admin.v2.Backup.State value) { onChanged(); return this; } + /** * * @@ -2837,11 +2915,12 @@ public Builder clearState() { } private com.google.bigtable.admin.v2.EncryptionInfo encryptionInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder> encryptionInfoBuilder_; + /** * * @@ -2858,6 +2937,7 @@ public Builder clearState() { public boolean hasEncryptionInfo() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -2880,6 +2960,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo() { return encryptionInfoBuilder_.getMessage(); } } + /** * * @@ -2904,6 +2985,7 @@ public Builder setEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo val onChanged(); return this; } + /** * * @@ -2926,6 +3008,7 @@ public Builder setEncryptionInfo( onChanged(); return this; } + /** * * @@ -2956,6 +3039,7 @@ public Builder mergeEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo v } return this; } + /** * * @@ -2977,6 +3061,7 @@ public Builder clearEncryptionInfo() { onChanged(); return this; } + /** * * @@ -2991,8 +3076,9 @@ public Builder clearEncryptionInfo() { public com.google.bigtable.admin.v2.EncryptionInfo.Builder getEncryptionInfoBuilder() { bitField0_ |= 0x00000100; onChanged(); - return getEncryptionInfoFieldBuilder().getBuilder(); + return internalGetEncryptionInfoFieldBuilder().getBuilder(); } + /** * * @@ -3013,6 +3099,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB : encryptionInfo_; } } + /** * * @@ -3024,14 +3111,14 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB * .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder> - getEncryptionInfoFieldBuilder() { + internalGetEncryptionInfoFieldBuilder() { if (encryptionInfoBuilder_ == null) { encryptionInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder>( @@ -3042,6 +3129,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB } private int backupType_ = 0; + /** * * @@ -3057,6 +3145,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB public int getBackupTypeValue() { return backupType_; } + /** * * @@ -3075,6 +3164,7 @@ public Builder setBackupTypeValue(int value) { onChanged(); return this; } + /** * * @@ -3092,6 +3182,7 @@ public com.google.bigtable.admin.v2.Backup.BackupType getBackupType() { com.google.bigtable.admin.v2.Backup.BackupType.forNumber(backupType_); return result == null ? com.google.bigtable.admin.v2.Backup.BackupType.UNRECOGNIZED : result; } + /** * * @@ -3113,6 +3204,7 @@ public Builder setBackupType(com.google.bigtable.admin.v2.Backup.BackupType valu onChanged(); return this; } + /** * * @@ -3132,11 +3224,12 @@ public Builder clearBackupType() { } private com.google.protobuf.Timestamp hotToStandardTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> hotToStandardTimeBuilder_; + /** * * @@ -3158,6 +3251,7 @@ public Builder clearBackupType() { public boolean hasHotToStandardTime() { return ((bitField0_ & 0x00000400) != 0); } + /** * * @@ -3185,6 +3279,7 @@ public com.google.protobuf.Timestamp getHotToStandardTime() { return hotToStandardTimeBuilder_.getMessage(); } } + /** * * @@ -3214,6 +3309,7 @@ public Builder setHotToStandardTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -3240,6 +3336,7 @@ public Builder setHotToStandardTime(com.google.protobuf.Timestamp.Builder builde onChanged(); return this; } + /** * * @@ -3274,6 +3371,7 @@ public Builder mergeHotToStandardTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -3300,6 +3398,7 @@ public Builder clearHotToStandardTime() { onChanged(); return this; } + /** * * @@ -3319,8 +3418,9 @@ public Builder clearHotToStandardTime() { public com.google.protobuf.Timestamp.Builder getHotToStandardTimeBuilder() { bitField0_ |= 0x00000400; onChanged(); - return getHotToStandardTimeFieldBuilder().getBuilder(); + return internalGetHotToStandardTimeFieldBuilder().getBuilder(); } + /** * * @@ -3346,6 +3446,7 @@ public com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder() { : hotToStandardTime_; } } + /** * * @@ -3362,14 +3463,14 @@ public com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder() { * * .google.protobuf.Timestamp hot_to_standard_time = 12; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getHotToStandardTimeFieldBuilder() { + internalGetHotToStandardTimeFieldBuilder() { if (hotToStandardTimeBuilder_ == null) { hotToStandardTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -3379,17 +3480,6 @@ public com.google.protobuf.TimestampOrBuilder getHotToStandardTimeOrBuilder() { return hotToStandardTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Backup) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java index 39c98ad78b..070bffc478 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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 +57,13 @@ private BackupInfo() { sourceBackup_ = ""; } - @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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_BackupInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_BackupInfo_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object backup_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -119,6 +128,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -136,6 +146,7 @@ public com.google.protobuf.ByteString getBackupBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -153,6 +164,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -171,6 +183,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -188,6 +201,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -205,6 +219,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -225,6 +240,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -248,6 +264,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -276,6 +293,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * @@ -302,6 +320,7 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * @@ -343,8 +362,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(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_ & 0x00000001) != 0)) { output.writeMessage(2, getStartTime()); @@ -352,11 +371,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getEndTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, sourceTable_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, sourceBackup_); } getUnknownFields().writeTo(output); } @@ -367,8 +386,8 @@ 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_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); @@ -376,11 +395,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, sourceTable_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceBackup_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceBackup_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBackup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, sourceBackup_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -475,38 +494,38 @@ public static com.google.bigtable.admin.v2.BackupInfo parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -529,10 +548,11 @@ 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; } + /** * * @@ -542,7 +562,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.BackupInfo) com.google.bigtable.admin.v2.BackupInfoOrBuilder { @@ -552,7 +572,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_BackupInfo_fieldAccessorTable @@ -566,15 +586,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(); } } @@ -652,39 +672,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.BackupInfo 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.bigtable.admin.v2.BackupInfo) { @@ -752,13 +739,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 @@ -794,6 +782,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object backup_ = ""; + /** * * @@ -816,6 +805,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -838,6 +828,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -859,6 +850,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -876,6 +868,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -900,11 +893,12 @@ public Builder setBackupBytes(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> startTimeBuilder_; + /** * * @@ -921,6 +915,7 @@ public Builder setBackupBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -941,6 +936,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -965,6 +961,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -986,6 +983,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1015,6 +1013,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1036,6 +1035,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1050,8 +1050,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1070,6 +1071,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1081,14 +1083,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * .google.protobuf.Timestamp start_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> - 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>( @@ -1099,11 +1101,12 @@ 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> endTimeBuilder_; + /** * * @@ -1120,6 +1123,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1140,6 +1144,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1164,6 +1169,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1185,6 +1191,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1214,6 +1221,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1235,6 +1243,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1249,8 +1258,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1269,6 +1279,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1280,14 +1291,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * .google.protobuf.Timestamp end_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> - 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>( @@ -1298,6 +1309,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -1320,6 +1332,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -1342,6 +1355,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1363,6 +1377,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1380,6 +1395,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1404,6 +1420,7 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * @@ -1429,6 +1446,7 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * @@ -1454,6 +1472,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1478,6 +1497,7 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1498,6 +1518,7 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * @@ -1524,17 +1545,6 @@ public Builder setSourceBackupBytes(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.bigtable.admin.v2.BackupInfo) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfoOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfoOrBuilder.java index ff3349eea5..740dc7228f 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfoOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface BackupInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.BackupInfo) @@ -36,6 +38,7 @@ public interface BackupInfoOrBuilder * @return The backup. */ java.lang.String getBackup(); + /** * * @@ -63,6 +66,7 @@ public interface BackupInfoOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -77,6 +81,7 @@ public interface BackupInfoOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -104,6 +109,7 @@ public interface BackupInfoOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -118,6 +124,7 @@ public interface BackupInfoOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -143,6 +150,7 @@ public interface BackupInfoOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -171,6 +179,7 @@ public interface BackupInfoOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupName.java index 7e3c83907d..9899f0aad2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupOrBuilder.java index 3ef01fdc1e..d41f103a66 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface BackupOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Backup) @@ -31,7 +33,7 @@ public interface BackupOrBuilder * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -45,6 +47,7 @@ public interface BackupOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -52,7 +55,7 @@ public interface BackupOrBuilder * A globally unique identifier for the backup which cannot be * changed. Values are of the form * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` + * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * The final segment of the name must be between 1 and 50 characters * in length. * @@ -83,6 +86,7 @@ public interface BackupOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -115,6 +119,7 @@ public interface BackupOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * @@ -150,6 +155,7 @@ public interface BackupOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * @@ -169,6 +175,7 @@ public interface BackupOrBuilder * @return The expireTime. */ com.google.protobuf.Timestamp getExpireTime(); + /** * * @@ -204,6 +211,7 @@ public interface BackupOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -221,6 +229,7 @@ public interface BackupOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -251,6 +260,7 @@ public interface BackupOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -265,6 +275,7 @@ public interface BackupOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -305,6 +316,7 @@ public interface BackupOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -334,6 +346,7 @@ public interface BackupOrBuilder * @return Whether the encryptionInfo field is set. */ boolean hasEncryptionInfo(); + /** * * @@ -348,6 +361,7 @@ public interface BackupOrBuilder * @return The encryptionInfo. */ com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(); + /** * * @@ -373,6 +387,7 @@ public interface BackupOrBuilder * @return The enum numeric value on the wire for backupType. */ int getBackupTypeValue(); + /** * * @@ -405,6 +420,7 @@ public interface BackupOrBuilder * @return Whether the hotToStandardTime field is set. */ boolean hasHotToStandardTime(); + /** * * @@ -424,6 +440,7 @@ public interface BackupOrBuilder * @return The hotToStandardTime. */ com.google.protobuf.Timestamp getHotToStandardTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminProto.java index 6666160ca0..7d1bf5db90 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -public final class BigtableInstanceAdminProto { +@com.google.protobuf.Generated +public final class BigtableInstanceAdminProto extends com.google.protobuf.GeneratedFile { private BigtableInstanceAdminProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigtableInstanceAdminProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,120 +42,184 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateInstanceRequest_ClustersEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateInstanceRequest_ClustersEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListInstancesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListInstancesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListInstancesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListInstancesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateClusterRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetClusterRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListClustersRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListClustersRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListClustersResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListClustersResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteClusterRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateClusterMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TablesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetAppProfileRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetAppProfileRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -270,121 +346,251 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "amp\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001" + "(\t\"k\n\026ListHotTabletsResponse\0228\n\013hot_tabl" + "ets\030\001 \003(\0132#.google.bigtable.admin.v2.Hot" - + "Tablet\022\027\n\017next_page_token\030\002 \001(\t2\313!\n\025Bigt" - + "ableInstanceAdmin\022\332\001\n\016CreateInstance\022/.g" - + "oogle.bigtable.admin.v2.CreateInstanceRe" - + "quest\032\035.google.longrunning.Operation\"x\312A" - + "\"\n\010Instance\022\026CreateInstanceMetadata\332A$pa" - + "rent,instance_id,instance,clusters\202\323\344\223\002&" - + "\"!/v2/{parent=projects/*}/instances:\001*\022\221" - + "\001\n\013GetInstance\022,.google.bigtable.admin.v" - + "2.GetInstanceRequest\032\".google.bigtable.a" - + "dmin.v2.Instance\"0\332A\004name\202\323\344\223\002#\022!/v2/{na" - + "me=projects/*/instances/*}\022\244\001\n\rListInsta" - + "nces\022..google.bigtable.admin.v2.ListInst" - + "ancesRequest\032/.google.bigtable.admin.v2." - + "ListInstancesResponse\"2\332A\006parent\202\323\344\223\002#\022!" - + "/v2/{parent=projects/*}/instances\022\206\001\n\016Up" - + "dateInstance\022\".google.bigtable.admin.v2." - + "Instance\032\".google.bigtable.admin.v2.Inst" - + "ance\",\202\323\344\223\002&\032!/v2/{name=projects/*/insta" - + "nces/*}:\001*\022\350\001\n\025PartialUpdateInstance\0226.g" - + "oogle.bigtable.admin.v2.PartialUpdateIns" - + "tanceRequest\032\035.google.longrunning.Operat" - + "ion\"x\312A\"\n\010Instance\022\026UpdateInstanceMetada" - + "ta\332A\024instance,update_mask\202\323\344\223\00262*/v2/{in" - + "stance.name=projects/*/instances/*}:\010ins" - + "tance\022\213\001\n\016DeleteInstance\022/.google.bigtab" - + "le.admin.v2.DeleteInstanceRequest\032\026.goog" - + "le.protobuf.Empty\"0\332A\004name\202\323\344\223\002#*!/v2/{n" - + "ame=projects/*/instances/*}\022\334\001\n\rCreateCl" - + "uster\022..google.bigtable.admin.v2.CreateC" - + "lusterRequest\032\035.google.longrunning.Opera" - + "tion\"|\312A \n\007Cluster\022\025CreateClusterMetadat" - + "a\332A\031parent,cluster_id,cluster\202\323\344\223\0027\",/v2" - + "/{parent=projects/*/instances/*}/cluster" - + "s:\007cluster\022\231\001\n\nGetCluster\022+.google.bigta" - + "ble.admin.v2.GetClusterRequest\032!.google." - + "bigtable.admin.v2.Cluster\";\332A\004name\202\323\344\223\002." - + "\022,/v2/{name=projects/*/instances/*/clust" - + "ers/*}\022\254\001\n\014ListClusters\022-.google.bigtabl" - + "e.admin.v2.ListClustersRequest\032..google." - + "bigtable.admin.v2.ListClustersResponse\"=" - + "\332A\006parent\202\323\344\223\002.\022,/v2/{parent=projects/*/" - + "instances/*}/clusters\022\255\001\n\rUpdateCluster\022" - + "!.google.bigtable.admin.v2.Cluster\032\035.goo" - + "gle.longrunning.Operation\"Z\312A \n\007Cluster\022" - + "\025UpdateClusterMetadata\202\323\344\223\0021\032,/v2/{name=" - + "projects/*/instances/*/clusters/*}:\001*\022\364\001" - + "\n\024PartialUpdateCluster\0225.google.bigtable" - + ".admin.v2.PartialUpdateClusterRequest\032\035." - + "google.longrunning.Operation\"\205\001\312A\'\n\007Clus" - + "ter\022\034PartialUpdateClusterMetadata\332A\023clus" - + "ter,update_mask\202\323\344\223\002?24/v2/{cluster.name" - + "=projects/*/instances/*/clusters/*}:\007clu" - + "ster\022\224\001\n\rDeleteCluster\022..google.bigtable" - + ".admin.v2.DeleteClusterRequest\032\026.google." - + "protobuf.Empty\";\332A\004name\202\323\344\223\002.*,/v2/{name" - + "=projects/*/instances/*/clusters/*}\022\325\001\n\020" - + "CreateAppProfile\0221.google.bigtable.admin" - + ".v2.CreateAppProfileRequest\032$.google.big" - + "table.admin.v2.AppProfile\"h\332A!parent,app" - + "_profile_id,app_profile\202\323\344\223\002>\"//v2/{pare" - + "nt=projects/*/instances/*}/appProfiles:\013" - + "app_profile\022\245\001\n\rGetAppProfile\022..google.b" - + "igtable.admin.v2.GetAppProfileRequest\032$." - + "google.bigtable.admin.v2.AppProfile\">\332A\004" - + "name\202\323\344\223\0021\022//v2/{name=projects/*/instanc" - + "es/*/appProfiles/*}\022\270\001\n\017ListAppProfiles\022" - + "0.google.bigtable.admin.v2.ListAppProfil" - + "esRequest\0321.google.bigtable.admin.v2.Lis" - + "tAppProfilesResponse\"@\332A\006parent\202\323\344\223\0021\022//" - + "v2/{parent=projects/*/instances/*}/appPr" - + "ofiles\022\372\001\n\020UpdateAppProfile\0221.google.big" - + "table.admin.v2.UpdateAppProfileRequest\032\035" - + ".google.longrunning.Operation\"\223\001\312A&\n\nApp" - + "Profile\022\030UpdateAppProfileMetadata\332A\027app_" - + "profile,update_mask\202\323\344\223\002J2;/v2/{app_prof" - + "ile.name=projects/*/instances/*/appProfi" - + "les/*}:\013app_profile\022\235\001\n\020DeleteAppProfile" - + "\0221.google.bigtable.admin.v2.DeleteAppPro" - + "fileRequest\032\026.google.protobuf.Empty\">\332A\004" - + "name\202\323\344\223\0021*//v2/{name=projects/*/instanc" - + "es/*/appProfiles/*}\022\223\001\n\014GetIamPolicy\022\".g" - + "oogle.iam.v1.GetIamPolicyRequest\032\025.googl" - + "e.iam.v1.Policy\"H\332A\010resource\202\323\344\223\0027\"2/v2/" - + "{resource=projects/*/instances/*}:getIam" - + "Policy:\001*\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/v2/{re" - + "source=projects/*/instances/*}:setIamPol" - + "icy:\001*\022\305\001\n\022TestIamPermissions\022(.google.i" - + "am.v1.TestIamPermissionsRequest\032).google" - + ".iam.v1.TestIamPermissionsResponse\"Z\332A\024r" - + "esource,permissions\202\323\344\223\002=\"8/v2/{resource" - + "=projects/*/instances/*}:testIamPermissi" - + "ons:\001*\022\277\001\n\016ListHotTablets\022/.google.bigta" - + "ble.admin.v2.ListHotTabletsRequest\0320.goo" - + "gle.bigtable.admin.v2.ListHotTabletsResp" - + "onse\"J\332A\006parent\202\323\344\223\002;\0229/v2/{parent=proje" - + "cts/*/instances/*/clusters/*}/hotTablets" - + "\032\232\003\312A\034bigtableadmin.googleapis.com\322A\367\002ht" - + "tps://www.googleapis.com/auth/bigtable.a" - + "dmin,https://www.googleapis.com/auth/big" - + "table.admin.cluster,https://www.googleap" - + "is.com/auth/bigtable.admin.instance,http" - + "s://www.googleapis.com/auth/cloud-bigtab" - + "le.admin,https://www.googleapis.com/auth" - + "/cloud-bigtable.admin.cluster,https://ww" - + "w.googleapis.com/auth/cloud-platform,htt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "orm.read-onlyB\335\001\n\034com.google.bigtable.ad" - + "min.v2B\032BigtableInstanceAdminProtoP\001Z8cl" - + "oud.google.com/go/bigtable/admin/apiv2/a" - + "dminpb;adminpb\252\002\036Google.Cloud.Bigtable.A" - + "dmin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2" - + "\352\002\"Google::Cloud::Bigtable::Admin::V2b\006p" - + "roto3" + + "Tablet\022\027\n\017next_page_token\030\002 \001(\t\"\271\001\n\030Crea" + + "teLogicalViewRequest\022=\n\006parent\030\001 \001(\tB-\340A" + + "\002\372A\'\n%bigtableadmin.googleapis.com/Insta" + + "nce\022\034\n\017logical_view_id\030\002 \001(\tB\003\340A\002\022@\n\014log" + + "ical_view\030\003 \001(\0132%.google.bigtable.admin." + + "v2.LogicalViewB\003\340A\002\"\307\001\n\031CreateLogicalVie" + + "wMetadata\022L\n\020original_request\030\001 \001(\01322.go" + + "ogle.bigtable.admin.v2.CreateLogicalView" + + "Request\022.\n\nstart_time\030\002 \001(\0132\032.google.pro" + + "tobuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032.goog" + + "le.protobuf.Timestamp\"W\n\025GetLogicalViewR" + + "equest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(bigtablead" + + "min.googleapis.com/LogicalView\"\214\001\n\027ListL" + + "ogicalViewsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372" + + "A*\022(bigtableadmin.googleapis.com/Logical" + + "View\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_tok" + + "en\030\003 \001(\tB\003\340A\001\"q\n\030ListLogicalViewsRespons" + + "e\022<\n\rlogical_views\030\001 \003(\0132%.google.bigtab" + + "le.admin.v2.LogicalView\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\222\001\n\030UpdateLogicalViewRequest\022@\n" + + "\014logical_view\030\001 \001(\0132%.google.bigtable.ad" + + "min.v2.LogicalViewB\003\340A\002\0224\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\307\001" + + "\n\031UpdateLogicalViewMetadata\022L\n\020original_" + + "request\030\001 \001(\01322.google.bigtable.admin.v2" + + ".UpdateLogicalViewRequest\022.\n\nstart_time\030" + + "\002 \001(\0132\032.google.protobuf.Timestamp\022,\n\010end" + + "_time\030\003 \001(\0132\032.google.protobuf.Timestamp\"" + + "m\n\030DeleteLogicalViewRequest\022>\n\004name\030\001 \001(" + + "\tB0\340A\002\372A*\n(bigtableadmin.googleapis.com/" + + "LogicalView\022\021\n\004etag\030\002 \001(\tB\003\340A\001\"\315\001\n\035Creat" + + "eMaterializedViewRequest\022=\n\006parent\030\001 \001(\t" + + "B-\340A\002\372A\'\n%bigtableadmin.googleapis.com/I" + + "nstance\022!\n\024materialized_view_id\030\002 \001(\tB\003\340" + + "A\002\022J\n\021materialized_view\030\003 \001(\0132*.google.b" + + "igtable.admin.v2.MaterializedViewB\003\340A\002\"\321" + + "\001\n\036CreateMaterializedViewMetadata\022Q\n\020ori" + + "ginal_request\030\001 \001(\01327.google.bigtable.ad" + + "min.v2.CreateMaterializedViewRequest\022.\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf" + + ".Timestamp\"a\n\032GetMaterializedViewRequest" + + "\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-bigtableadmin.go" + + "ogleapis.com/MaterializedView\"\226\001\n\034ListMa" + + "terializedViewsRequest\022E\n\006parent\030\001 \001(\tB5" + + "\340A\002\372A/\022-bigtableadmin.googleapis.com/Mat" + + "erializedView\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\"\200\001\n\035ListMateriali" + + "zedViewsResponse\022F\n\022materialized_views\030\001" + + " \003(\0132*.google.bigtable.admin.v2.Material" + + "izedView\022\027\n\017next_page_token\030\002 \001(\t\"\241\001\n\035Up" + + "dateMaterializedViewRequest\022J\n\021materiali" + + "zed_view\030\001 \001(\0132*.google.bigtable.admin.v" + + "2.MaterializedViewB\003\340A\002\0224\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\321\001" + + "\n\036UpdateMaterializedViewMetadata\022Q\n\020orig" + + "inal_request\030\001 \001(\01327.google.bigtable.adm" + + "in.v2.UpdateMaterializedViewRequest\022.\n\ns" + + "tart_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\"w\n\035DeleteMaterializedViewReque" + + "st\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-bigtableadmin." + + "googleapis.com/MaterializedView\022\021\n\004etag\030" + + "\002 \001(\tB\003\340A\0012\3466\n\025BigtableInstanceAdmin\022\332\001\n" + + "\016CreateInstance\022/.google.bigtable.admin." + + "v2.CreateInstanceRequest\032\035.google.longru" + + "nning.Operation\"x\312A\"\n\010Instance\022\026CreateIn" + + "stanceMetadata\332A$parent,instance_id,inst" + + "ance,clusters\202\323\344\223\002&\"!/v2/{parent=project" + + "s/*}/instances:\001*\022\221\001\n\013GetInstance\022,.goog" + + "le.bigtable.admin.v2.GetInstanceRequest\032" + + "\".google.bigtable.admin.v2.Instance\"0\332A\004" + + "name\202\323\344\223\002#\022!/v2/{name=projects/*/instanc" + + "es/*}\022\244\001\n\rListInstances\022..google.bigtabl" + + "e.admin.v2.ListInstancesRequest\032/.google" + + ".bigtable.admin.v2.ListInstancesResponse" + + "\"2\332A\006parent\202\323\344\223\002#\022!/v2/{parent=projects/" + + "*}/instances\022\206\001\n\016UpdateInstance\022\".google" + + ".bigtable.admin.v2.Instance\032\".google.big" + + "table.admin.v2.Instance\",\202\323\344\223\002&\032!/v2/{na" + + "me=projects/*/instances/*}:\001*\022\350\001\n\025Partia" + + "lUpdateInstance\0226.google.bigtable.admin." + + "v2.PartialUpdateInstanceRequest\032\035.google" + + ".longrunning.Operation\"x\312A\"\n\010Instance\022\026U" + + "pdateInstanceMetadata\332A\024instance,update_" + + "mask\202\323\344\223\00262*/v2/{instance.name=projects/" + + "*/instances/*}:\010instance\022\213\001\n\016DeleteInsta" + + "nce\022/.google.bigtable.admin.v2.DeleteIns" + + "tanceRequest\032\026.google.protobuf.Empty\"0\332A" + + "\004name\202\323\344\223\002#*!/v2/{name=projects/*/instan" + + "ces/*}\022\334\001\n\rCreateCluster\022..google.bigtab" + + "le.admin.v2.CreateClusterRequest\032\035.googl" + + "e.longrunning.Operation\"|\312A \n\007Cluster\022\025C" + + "reateClusterMetadata\332A\031parent,cluster_id" + + ",cluster\202\323\344\223\0027\",/v2/{parent=projects/*/i" + + "nstances/*}/clusters:\007cluster\022\231\001\n\nGetClu" + + "ster\022+.google.bigtable.admin.v2.GetClust" + + "erRequest\032!.google.bigtable.admin.v2.Clu" + + "ster\";\332A\004name\202\323\344\223\002.\022,/v2/{name=projects/" + + "*/instances/*/clusters/*}\022\254\001\n\014ListCluste" + + "rs\022-.google.bigtable.admin.v2.ListCluste" + + "rsRequest\032..google.bigtable.admin.v2.Lis" + + "tClustersResponse\"=\332A\006parent\202\323\344\223\002.\022,/v2/" + + "{parent=projects/*/instances/*}/clusters" + + "\022\255\001\n\rUpdateCluster\022!.google.bigtable.adm" + + "in.v2.Cluster\032\035.google.longrunning.Opera" + + "tion\"Z\312A \n\007Cluster\022\025UpdateClusterMetadat" + + "a\202\323\344\223\0021\032,/v2/{name=projects/*/instances/" + + "*/clusters/*}:\001*\022\364\001\n\024PartialUpdateCluste" + + "r\0225.google.bigtable.admin.v2.PartialUpda" + + "teClusterRequest\032\035.google.longrunning.Op" + + "eration\"\205\001\312A\'\n\007Cluster\022\034PartialUpdateClu" + + "sterMetadata\332A\023cluster,update_mask\202\323\344\223\002?" + + "24/v2/{cluster.name=projects/*/instances" + + "/*/clusters/*}:\007cluster\022\224\001\n\rDeleteCluste" + + "r\022..google.bigtable.admin.v2.DeleteClust" + + "erRequest\032\026.google.protobuf.Empty\";\332A\004na" + + "me\202\323\344\223\002.*,/v2/{name=projects/*/instances" + + "/*/clusters/*}\022\325\001\n\020CreateAppProfile\0221.go" + + "ogle.bigtable.admin.v2.CreateAppProfileR" + + "equest\032$.google.bigtable.admin.v2.AppPro" + + "file\"h\332A!parent,app_profile_id,app_profi" + + "le\202\323\344\223\002>\"//v2/{parent=projects/*/instanc" + + "es/*}/appProfiles:\013app_profile\022\245\001\n\rGetAp" + + "pProfile\022..google.bigtable.admin.v2.GetA" + + "ppProfileRequest\032$.google.bigtable.admin" + + ".v2.AppProfile\">\332A\004name\202\323\344\223\0021\022//v2/{name" + + "=projects/*/instances/*/appProfiles/*}\022\270" + + "\001\n\017ListAppProfiles\0220.google.bigtable.adm" + + "in.v2.ListAppProfilesRequest\0321.google.bi" + + "gtable.admin.v2.ListAppProfilesResponse\"" + + "@\332A\006parent\202\323\344\223\0021\022//v2/{parent=projects/*" + + "/instances/*}/appProfiles\022\372\001\n\020UpdateAppP" + + "rofile\0221.google.bigtable.admin.v2.Update" + + "AppProfileRequest\032\035.google.longrunning.O" + + "peration\"\223\001\312A&\n\nAppProfile\022\030UpdateAppPro" + + "fileMetadata\332A\027app_profile,update_mask\202\323" + + "\344\223\002J2;/v2/{app_profile.name=projects/*/i" + + "nstances/*/appProfiles/*}:\013app_profile\022\264" + + "\001\n\020DeleteAppProfile\0221.google.bigtable.ad" + + "min.v2.DeleteAppProfileRequest\032\026.google." + + "protobuf.Empty\"U\332A\004name\332A\024name,ignore_wa" + + "rnings\202\323\344\223\0021*//v2/{name=projects/*/insta" + + "nces/*/appProfiles/*}\022\252\002\n\014GetIamPolicy\022\"" + + ".google.iam.v1.GetIamPolicyRequest\032\025.goo" + + "gle.iam.v1.Policy\"\336\001\332A\010resource\202\323\344\223\002\314\001\"2" + + "/v2/{resource=projects/*/instances/*}:ge" + + "tIamPolicy:\001*ZK\"F/v2/{resource=projects/" + + "*/instances/*/materializedViews/*}:getIa" + + "mPolicy:\001*ZF\"A/v2/{resource=projects/*/i" + + "nstances/*/logicalViews/*}:getIamPolicy:" + + "\001*\022\261\002\n\014SetIamPolicy\022\".google.iam.v1.SetI" + + "amPolicyRequest\032\025.google.iam.v1.Policy\"\345" + + "\001\332A\017resource,policy\202\323\344\223\002\314\001\"2/v2/{resourc" + + "e=projects/*/instances/*}:setIamPolicy:\001" + + "*ZK\"F/v2/{resource=projects/*/instances/" + + "*/materializedViews/*}:setIamPolicy:\001*ZF" + + "\"A/v2/{resource=projects/*/instances/*/l" + + "ogicalViews/*}:setIamPolicy:\001*\022\350\002\n\022TestI" + + "amPermissions\022(.google.iam.v1.TestIamPer" + + "missionsRequest\032).google.iam.v1.TestIamP" + + "ermissionsResponse\"\374\001\332A\024resource,permiss" + + "ions\202\323\344\223\002\336\001\"8/v2/{resource=projects/*/in" + + "stances/*}:testIamPermissions:\001*ZQ\"L/v2/" + + "{resource=projects/*/instances/*/materia" + + "lizedViews/*}:testIamPermissions:\001*ZL\"G/" + + "v2/{resource=projects/*/instances/*/logi" + + "calViews/*}:testIamPermissions:\001*\022\277\001\n\016Li" + + "stHotTablets\022/.google.bigtable.admin.v2." + + "ListHotTabletsRequest\0320.google.bigtable." + + "admin.v2.ListHotTabletsResponse\"J\332A\006pare" + + "nt\202\323\344\223\002;\0229/v2/{parent=projects/*/instanc" + + "es/*/clusters/*}/hotTablets\022\200\002\n\021CreateLo" + + "gicalView\0222.google.bigtable.admin.v2.Cre" + + "ateLogicalViewRequest\032\035.google.longrunni" + + "ng.Operation\"\227\001\312A(\n\013LogicalView\022\031CreateL" + + "ogicalViewMetadata\332A#parent,logical_view" + + ",logical_view_id\202\323\344\223\002@\"0/v2/{parent=proj" + + "ects/*/instances/*}/logicalViews:\014logica" + + "l_view\022\251\001\n\016GetLogicalView\022/.google.bigta" + + "ble.admin.v2.GetLogicalViewRequest\032%.goo" + + "gle.bigtable.admin.v2.LogicalView\"?\332A\004na" + + "me\202\323\344\223\0022\0220/v2/{name=projects/*/instances" + + "/*/logicalViews/*}\022\274\001\n\020ListLogicalViews\022" + + "1.google.bigtable.admin.v2.ListLogicalVi" + + "ewsRequest\0322.google.bigtable.admin.v2.Li" + + "stLogicalViewsResponse\"A\332A\006parent\202\323\344\223\0022\022" + + "0/v2/{parent=projects/*/instances/*}/log" + + "icalViews\022\202\002\n\021UpdateLogicalView\0222.google" + + ".bigtable.admin.v2.UpdateLogicalViewRequ" + + "est\032\035.google.longrunning.Operation\"\231\001\312A(" + + "\n\013LogicalView\022\031UpdateLogicalViewMetadata" + + "\332A\030logical_view,update_mask\202\323\344\223\002M2=/v2/{" + + "logical_view.name=projects/*/instances/*" + + "/logicalViews/*}:\014logical_view\022\240\001\n\021Delet" + + "eLogicalView\0222.google.bigtable.admin.v2." + + "DeleteLogicalViewRequest\032\026.google.protob" + + "uf.Empty\"?\332A\004name\202\323\344\223\0022*0/v2/{name=proje" + + "cts/*/instances/*/logicalViews/*}\022\250\002\n\026Cr" + + "eateMaterializedView\0227.google.bigtable.a" + + "dmin.v2.CreateMaterializedViewRequest\032\035." + + "google.longrunning.Operation\"\265\001\312A2\n\020Mate" + + "rializedView\022\036CreateMaterializedViewMeta" + + "data\332A-parent,materialized_view,material" + + "ized_view_id\202\323\344\223\002J\"5/v2/{parent=projects" + + "/*/instances/*}/materializedViews:\021mater" + + "ialized_view\022\275\001\n\023GetMaterializedView\0224.g" + + "oogle.bigtable.admin.v2.GetMaterializedV" + + "iewRequest\032*.google.bigtable.admin.v2.Ma" + + "terializedView\"D\332A\004name\202\323\344\223\0027\0225/v2/{name" + + "=projects/*/instances/*/materializedView" + + "s/*}\022\320\001\n\025ListMaterializedViews\0226.google." + + "bigtable.admin.v2.ListMaterializedViewsR" + + "equest\0327.google.bigtable.admin.v2.ListMa" + + "terializedViewsResponse\"F\332A\006parent\202\323\344\223\0027" + + "\0225/v2/{parent=projects/*/instances/*}/ma" + + "terializedViews\022\252\002\n\026UpdateMaterializedVi" + + "ew\0227.google.bigtable.admin.v2.UpdateMate" + + "rializedViewRequest\032\035.google.longrunning" + + ".Operation\"\267\001\312A2\n\020MaterializedView\022\036Upda" + + "teMaterializedViewMetadata\332A\035materialize" + + "d_view,update_mask\202\323\344\223\002\\2G/v2/{materiali" + + "zed_view.name=projects/*/instances/*/mat" + + "erializedViews/*}:\021materialized_view\022\257\001\n" + + "\026DeleteMaterializedView\0227.google.bigtabl" + + "e.admin.v2.DeleteMaterializedViewRequest" + + "\032\026.google.protobuf.Empty\"D\332A\004name\202\323\344\223\0027*" + + "5/v2/{name=projects/*/instances/*/materi" + + "alizedViews/*}\032\232\003\312A\034bigtableadmin.google" + + "apis.com\322A\367\002https://www.googleapis.com/a" + + "uth/bigtable.admin,https://www.googleapi" + + "s.com/auth/bigtable.admin.cluster,https:" + + "//www.googleapis.com/auth/bigtable.admin" + + ".instance,https://www.googleapis.com/aut" + + "h/cloud-bigtable.admin,https://www.googl" + + "eapis.com/auth/cloud-bigtable.admin.clus" + + "ter,https://www.googleapis.com/auth/clou" + + "d-platform,https://www.googleapis.com/au" + + "th/cloud-platform.read-onlyB\335\001\n\034com.goog" + + "le.bigtable.admin.v2B\032BigtableInstanceAd" + + "minProtoP\001Z8cloud.google.com/go/bigtable" + + "/admin/apiv2/adminpb;adminpb\252\002\036Google.Cl" + + "oud.Bigtable.Admin.V2\312\002\036Google\\Cloud\\Big" + + "table\\Admin\\V2\352\002\"Google::Cloud::Bigtable" + + "::Admin::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -403,252 +609,364 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_admin_v2_CreateInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor, new java.lang.String[] { "Parent", "InstanceId", "Instance", "Clusters", }); internal_static_google_bigtable_admin_v2_CreateInstanceRequest_ClustersEntry_descriptor = - internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_CreateInstanceRequest_ClustersEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateInstanceRequest_ClustersEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_admin_v2_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_bigtable_admin_v2_GetInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetInstanceRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_bigtable_admin_v2_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_bigtable_admin_v2_ListInstancesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListInstancesRequest_descriptor, new java.lang.String[] { "Parent", "PageToken", }); internal_static_google_bigtable_admin_v2_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_bigtable_admin_v2_ListInstancesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListInstancesResponse_descriptor, new java.lang.String[] { "Instances", "FailedLocations", "NextPageToken", }); internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_descriptor, new java.lang.String[] { "Instance", "UpdateMask", }); internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_bigtable_admin_v2_CreateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_bigtable_admin_v2_CreateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateClusterRequest_descriptor, new java.lang.String[] { "Parent", "ClusterId", "Cluster", }); internal_static_google_bigtable_admin_v2_GetClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_bigtable_admin_v2_GetClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetClusterRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_bigtable_admin_v2_ListClustersRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageType(8); internal_static_google_bigtable_admin_v2_ListClustersRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListClustersRequest_descriptor, new java.lang.String[] { "Parent", "PageToken", }); internal_static_google_bigtable_admin_v2_ListClustersResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_bigtable_admin_v2_ListClustersResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListClustersResponse_descriptor, new java.lang.String[] { "Clusters", "FailedLocations", "NextPageToken", }); internal_static_google_bigtable_admin_v2_DeleteClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_bigtable_admin_v2_DeleteClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteClusterRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_descriptor, new java.lang.String[] { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_descriptor, new java.lang.String[] { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor, new java.lang.String[] { "OriginalRequest", "RequestTime", "FinishTime", "Tables", }); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_descriptor = - internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_descriptor, new java.lang.String[] { "EstimatedSizeBytes", "EstimatedCopiedBytes", "State", }); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TablesEntry_descriptor = - internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor - .getNestedTypes() - .get(1); + internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TablesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_descriptor, new java.lang.String[] { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_descriptor, new java.lang.String[] { "RequestTime", "FinishTime", "OriginalRequest", }); internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_descriptor, new java.lang.String[] { "Cluster", "UpdateMask", }); internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(17); internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_descriptor, new java.lang.String[] { "Parent", "AppProfileId", "AppProfile", "IgnoreWarnings", }); internal_static_google_bigtable_admin_v2_GetAppProfileRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(18); internal_static_google_bigtable_admin_v2_GetAppProfileRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetAppProfileRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(19); internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_descriptor, new java.lang.String[] { "Parent", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageType(20); internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_descriptor, new java.lang.String[] { "AppProfiles", "NextPageToken", "FailedLocations", }); internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageType(21); internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_descriptor, new java.lang.String[] { "AppProfile", "UpdateMask", "IgnoreWarnings", }); internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageType(22); internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_descriptor, new java.lang.String[] { "Name", "IgnoreWarnings", }); internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageType(23); internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageType(24); internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_descriptor, new java.lang.String[] { "Parent", "StartTime", "EndTime", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageType(25); internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor, new java.lang.String[] { "HotTablets", "NextPageToken", }); - 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.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor, + new java.lang.String[] { + "Parent", "LogicalViewId", "LogicalView", + }); + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor, + new java.lang.String[] { + "OriginalRequest", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor, + new java.lang.String[] { + "LogicalViews", "NextPageToken", + }); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor, + new java.lang.String[] { + "LogicalView", "UpdateMask", + }); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor, + new java.lang.String[] { + "OriginalRequest", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor, + new java.lang.String[] { + "Parent", "MaterializedViewId", "MaterializedView", + }); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor = + getDescriptor().getMessageType(35); + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor, + new java.lang.String[] { + "OriginalRequest", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor = + getDescriptor().getMessageType(36); + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor = + getDescriptor().getMessageType(37); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor = + getDescriptor().getMessageType(38); + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor, + new java.lang.String[] { + "MaterializedViews", "NextPageToken", + }); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor = + getDescriptor().getMessageType(39); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor, + new java.lang.String[] { + "MaterializedView", "UpdateMask", + }); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor = + getDescriptor().getMessageType(40); + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor, + new java.lang.String[] { + "OriginalRequest", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor = + getDescriptor().getMessageType(41); + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); @@ -660,6 +978,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.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.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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java index 5cea686449..dad424b055 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -public final class BigtableTableAdminProto { +@com.google.protobuf.Generated +public final class BigtableTableAdminProto extends com.google.protobuf.GeneratedFile { private BigtableTableAdminProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigtableTableAdminProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,192 +42,224 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_RestoreTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_RestoreTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_RestoreTableMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_RestoreTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DropRowRangeRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DropRowRangeRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListTablesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListTablesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListTablesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListTablesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_StandardReadRemoteWrites_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_StandardReadRemoteWrites_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DataBoostReadLocalWrites_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DataBoostReadLocalWrites_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_SnapshotTableRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateBackupMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListBackupsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListBackupsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CopyBackupRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CopyBackupRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CopyBackupMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CopyBackupMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateAuthorizedViewRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateAuthorizedViewRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_CreateAuthorizedViewMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_CreateAuthorizedViewMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListAuthorizedViewsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListAuthorizedViewsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ListAuthorizedViewsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ListAuthorizedViewsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GetAuthorizedViewRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetAuthorizedViewRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -225,7 +269,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n3google/bigtable/admin/v2/bigtable_tabl" + "\n" + + "3google/bigtable/admin/v2/bigtable_tabl" + "e_admin.proto\022\030google.bigtable.admin.v2\032" + "\034google/api/annotations.proto\032\027google/ap" + "i/client.proto\032\037google/api/field_behavio" @@ -234,354 +279,430 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/bigtable/admin/v2/table.proto\032\036google/" + "iam/v1/iam_policy.proto\032\032google/iam/v1/p" + "olicy.proto\032#google/longrunning/operatio" - + "ns.proto\032\036google/protobuf/duration.proto" - + "\032\033google/protobuf/empty.proto\032 google/pr" - + "otobuf/field_mask.proto\032\037google/protobuf" - + "/timestamp.proto\"\261\001\n\023RestoreTableRequest" - + "\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin." - + "googleapis.com/Instance\022\025\n\010table_id\030\002 \001(" - + "\tB\003\340A\002\022:\n\006backup\030\003 \001(\tB(\372A%\n#bigtableadm" - + "in.googleapis.com/BackupH\000B\010\n\006source\"\230\002\n" - + "\024RestoreTableMetadata\022\014\n\004name\030\001 \001(\t\022@\n\013s" - + "ource_type\030\002 \001(\0162+.google.bigtable.admin" - + ".v2.RestoreSourceType\022;\n\013backup_info\030\003 \001" - + "(\0132$.google.bigtable.admin.v2.BackupInfo" - + "H\000\022%\n\035optimize_table_operation_name\030\004 \001(" - + "\t\022=\n\010progress\030\005 \001(\0132+.google.bigtable.ad" - + "min.v2.OperationProgressB\r\n\013source_info\"" - + "l\n\035OptimizeRestoredTableMetadata\022\014\n\004name" - + "\030\001 \001(\t\022=\n\010progress\030\002 \001(\0132+.google.bigtab" - + "le.admin.v2.OperationProgress\"\201\002\n\022Create" - + "TableRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%bi" - + "gtableadmin.googleapis.com/Instance\022\025\n\010t" - + "able_id\030\002 \001(\tB\003\340A\002\0223\n\005table\030\003 \001(\0132\037.goog" - + "le.bigtable.admin.v2.TableB\003\340A\002\022J\n\016initi" - + "al_splits\030\004 \003(\01322.google.bigtable.admin." - + "v2.CreateTableRequest.Split\032\024\n\005Split\022\013\n\003" - + "key\030\001 \001(\014\"\276\001\n\036CreateTableFromSnapshotReq" - + "uest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%bigtablead" - + "min.googleapis.com/Instance\022\025\n\010table_id\030" - + "\002 \001(\tB\003\340A\002\022F\n\017source_snapshot\030\003 \001(\tB-\340A\002" - + "\372A\'\n%bigtableadmin.googleapis.com/Snapsh" - + "ot\"\231\001\n\023DropRowRangeRequest\0228\n\004name\030\001 \001(\t" - + "B*\340A\002\372A$\n\"bigtableadmin.googleapis.com/T" - + "able\022\030\n\016row_key_prefix\030\002 \001(\014H\000\022$\n\032delete" - + "_all_data_from_table\030\003 \001(\010H\000B\010\n\006target\"\255" - + "\001\n\021ListTablesRequest\022=\n\006parent\030\001 \001(\tB-\340A" - + "\002\372A\'\n%bigtableadmin.googleapis.com/Insta" - + "nce\0222\n\004view\030\002 \001(\0162$.google.bigtable.admi" - + "n.v2.Table.View\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npa" - + "ge_token\030\003 \001(\t\"^\n\022ListTablesResponse\022/\n\006" - + "tables\030\001 \003(\0132\037.google.bigtable.admin.v2." - + "Table\022\027\n\017next_page_token\030\002 \001(\t\"\177\n\017GetTab" - + "leRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtabl" - + "eadmin.googleapis.com/Table\0222\n\004view\030\002 \001(" - + "\0162$.google.bigtable.admin.v2.Table.View\"" - + "\177\n\022UpdateTableRequest\0223\n\005table\030\001 \001(\0132\037.g" - + "oogle.bigtable.admin.v2.TableB\003\340A\002\0224\n\013up" - + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" - + "askB\003\340A\002\"\201\001\n\023UpdateTableMetadata\022\014\n\004name" - + "\030\001 \001(\t\022.\n\nstart_time\030\002 \001(\0132\032.google.prot" - + "obuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032.googl" - + "e.protobuf.Timestamp\"N\n\022DeleteTableReque" - + "st\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin." - + "googleapis.com/Table\"P\n\024UndeleteTableReq" - + "uest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmi" - + "n.googleapis.com/Table\"\203\001\n\025UndeleteTable" - + "Metadata\022\014\n\004name\030\001 \001(\t\022.\n\nstart_time\030\002 \001" - + "(\0132\032.google.protobuf.Timestamp\022,\n\010end_ti" - + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\"\263\003\n" - + "\033ModifyColumnFamiliesRequest\0228\n\004name\030\001 \001" - + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" - + "/Table\022^\n\rmodifications\030\002 \003(\0132B.google.b" - + "igtable.admin.v2.ModifyColumnFamiliesReq" - + "uest.ModificationB\003\340A\002\022\034\n\017ignore_warning" - + "s\030\003 \001(\010B\003\340A\001\032\333\001\n\014Modification\022\n\n\002id\030\001 \001(" - + "\t\0228\n\006create\030\002 \001(\0132&.google.bigtable.admi" - + "n.v2.ColumnFamilyH\000\0228\n\006update\030\003 \001(\0132&.go" - + "ogle.bigtable.admin.v2.ColumnFamilyH\000\022\016\n" - + "\004drop\030\004 \001(\010H\000\0224\n\013update_mask\030\006 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\001B\005\n\003mod\"[\n\037Ge" - + "nerateConsistencyTokenRequest\0228\n\004name\030\001 " - + "\001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.co" - + "m/Table\"=\n GenerateConsistencyTokenRespo" - + "nse\022\031\n\021consistency_token\030\001 \001(\t\"\262\002\n\027Check" - + "ConsistencyRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$" - + "\n\"bigtableadmin.googleapis.com/Table\022\036\n\021" - + "consistency_token\030\002 \001(\tB\003\340A\002\022Y\n\033standard" - + "_read_remote_writes\030\003 \001(\01322.google.bigta" - + "ble.admin.v2.StandardReadRemoteWritesH\000\022" - + "Z\n\034data_boost_read_local_writes\030\004 \001(\01322." - + "google.bigtable.admin.v2.DataBoostReadLo" - + "calWritesH\000B\006\n\004mode\"\032\n\030StandardReadRemot" - + "eWrites\"\032\n\030DataBoostReadLocalWrites\".\n\030C" - + "heckConsistencyResponse\022\022\n\nconsistent\030\001 " - + "\001(\010\"\346\001\n\024SnapshotTableRequest\0228\n\004name\030\001 \001" - + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" - + "/Table\022=\n\007cluster\030\002 \001(\tB,\340A\002\372A&\n$bigtabl" - + "eadmin.googleapis.com/Cluster\022\030\n\013snapsho" - + "t_id\030\003 \001(\tB\003\340A\002\022&\n\003ttl\030\004 \001(\0132\031.google.pr" - + "otobuf.Duration\022\023\n\013description\030\005 \001(\t\"Q\n\022" - + "GetSnapshotRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'" - + "\n%bigtableadmin.googleapis.com/Snapshot\"" - + "{\n\024ListSnapshotsRequest\022<\n\006parent\030\001 \001(\tB" - + ",\340A\002\372A&\n$bigtableadmin.googleapis.com/Cl" - + "uster\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\"g\n\025ListSnapshotsResponse\0225\n\tsnapsho" - + "ts\030\001 \003(\0132\".google.bigtable.admin.v2.Snap" - + "shot\022\027\n\017next_page_token\030\002 \001(\t\"T\n\025DeleteS" - + "napshotRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bi" - + "gtableadmin.googleapis.com/Snapshot\"\304\001\n\025" - + "SnapshotTableMetadata\022H\n\020original_reques" - + "t\030\001 \001(\0132..google.bigtable.admin.v2.Snaps" - + "hotTableRequest\0220\n\014request_time\030\002 \001(\0132\032." - + "google.protobuf.Timestamp\022/\n\013finish_time" - + "\030\003 \001(\0132\032.google.protobuf.Timestamp\"\330\001\n\037C" - + "reateTableFromSnapshotMetadata\022R\n\020origin" - + "al_request\030\001 \001(\01328.google.bigtable.admin" - + ".v2.CreateTableFromSnapshotRequest\0220\n\014re" - + "quest_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tamp\022/\n\013finish_time\030\003 \001(\0132\032.google.proto" - + "buf.Timestamp\"\242\001\n\023CreateBackupRequest\022<\n" - + "\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigtableadmin.goo" - + "gleapis.com/Cluster\022\026\n\tbackup_id\030\002 \001(\tB\003" - + "\340A\002\0225\n\006backup\030\003 \001(\0132 .google.bigtable.ad" - + "min.v2.BackupB\003\340A\002\"\230\001\n\024CreateBackupMetad" - + "ata\022\014\n\004name\030\001 \001(\t\022\024\n\014source_table\030\002 \001(\t\022" - + ".\n\nstart_time\030\003 \001(\0132\032.google.protobuf.Ti" - + "mestamp\022,\n\010end_time\030\004 \001(\0132\032.google.proto" - + "buf.Timestamp\"\202\001\n\023UpdateBackupRequest\0225\n" - + "\006backup\030\001 \001(\0132 .google.bigtable.admin.v2" - + ".BackupB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" - + "le.protobuf.FieldMaskB\003\340A\002\"M\n\020GetBackupR" - + "equest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#bigtablead" - + "min.googleapis.com/Backup\"P\n\023DeleteBacku" - + "pRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#bigtable" - + "admin.googleapis.com/Backup\"\233\001\n\022ListBack" - + "upsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigt" - + "ableadmin.googleapis.com/Cluster\022\016\n\006filt" - + "er\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022\021\n\tpage_size\030" - + "\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"a\n\023ListBackups" - + "Response\0221\n\007backups\030\001 \003(\0132 .google.bigta" - + "ble.admin.v2.Backup\022\027\n\017next_page_token\030\002" - + " \001(\t\"\343\001\n\021CopyBackupRequest\022<\n\006parent\030\001 \001" - + "(\tB,\340A\002\372A&\n$bigtableadmin.googleapis.com" - + "/Cluster\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\022B\n\rsour" - + "ce_backup\030\003 \001(\tB+\340A\002\372A%\n#bigtableadmin.g" - + "oogleapis.com/Backup\0224\n\013expire_time\030\004 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\002\"\315\001\n\022C" - + "opyBackupMetadata\0226\n\004name\030\001 \001(\tB(\372A%\n#bi" - + "gtableadmin.googleapis.com/Backup\022@\n\022sou" - + "rce_backup_info\030\002 \001(\0132$.google.bigtable." - + "admin.v2.BackupInfo\022=\n\010progress\030\003 \001(\0132+." - + "google.bigtable.admin.v2.OperationProgre" - + "ss\"\313\001\n\033CreateAuthorizedViewRequest\022C\n\006pa" - + "rent\030\001 \001(\tB3\340A\002\372A-\022+bigtableadmin.google" - + "apis.com/AuthorizedView\022\037\n\022authorized_vi" - + "ew_id\030\002 \001(\tB\003\340A\002\022F\n\017authorized_view\030\003 \001(" - + "\0132(.google.bigtable.admin.v2.AuthorizedV" - + "iewB\003\340A\002\"\322\001\n\034CreateAuthorizedViewMetadat" - + "a\022O\n\020original_request\030\001 \001(\01325.google.big" - + "table.admin.v2.CreateAuthorizedViewReque" - + "st\0220\n\014request_time\030\002 \001(\0132\032.google.protob" - + "uf.Timestamp\022/\n\013finish_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\"\334\001\n\032ListAuthorized" - + "ViewsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+bi" - + "gtableadmin.googleapis.com/AuthorizedVie" - + "w\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030" - + "\003 \001(\tB\003\340A\001\022H\n\004view\030\004 \001(\01625.google.bigtab" - + "le.admin.v2.AuthorizedView.ResponseViewB" - + "\003\340A\001\"z\n\033ListAuthorizedViewsResponse\022B\n\020a" - + "uthorized_views\030\001 \003(\0132(.google.bigtable." - + "admin.v2.AuthorizedView\022\027\n\017next_page_tok" - + "en\030\002 \001(\t\"\247\001\n\030GetAuthorizedViewRequest\022A\n" - + "\004name\030\001 \001(\tB3\340A\002\372A-\n+bigtableadmin.googl" - + "eapis.com/AuthorizedView\022H\n\004view\030\002 \001(\01625" - + ".google.bigtable.admin.v2.AuthorizedView" - + ".ResponseViewB\003\340A\001\"\271\001\n\033UpdateAuthorizedV" - + "iewRequest\022F\n\017authorized_view\030\001 \001(\0132(.go" - + "ogle.bigtable.admin.v2.AuthorizedViewB\003\340" - + "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" - + "f.FieldMaskB\003\340A\001\022\034\n\017ignore_warnings\030\003 \001(" - + "\010B\003\340A\001\"\322\001\n\034UpdateAuthorizedViewMetadata\022" - + "O\n\020original_request\030\001 \001(\01325.google.bigta" - + "ble.admin.v2.UpdateAuthorizedViewRequest" - + "\0220\n\014request_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013finish_time\030\003 \001(\0132\032.google" - + ".protobuf.Timestamp\"s\n\033DeleteAuthorizedV" - + "iewRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+bigtab" - + "leadmin.googleapis.com/AuthorizedView\022\021\n" - + "\004etag\030\002 \001(\tB\003\340A\0012\2663\n\022BigtableTableAdmin\022" - + "\253\001\n\013CreateTable\022,.google.bigtable.admin." - + "v2.CreateTableRequest\032\037.google.bigtable." - + "admin.v2.Table\"M\332A\025parent,table_id,table" - + "\202\323\344\223\002/\"*/v2/{parent=projects/*/instances" - + "/*}/tables:\001*\022\212\002\n\027CreateTableFromSnapsho" - + "t\0228.google.bigtable.admin.v2.CreateTable" - + "FromSnapshotRequest\032\035.google.longrunning" - + ".Operation\"\225\001\312A(\n\005Table\022\037CreateTableFrom" - + "SnapshotMetadata\332A\037parent,table_id,sourc" - + "e_snapshot\202\323\344\223\002B\"=/v2/{parent=projects/*" - + "/instances/*}/tables:createFromSnapshot:" - + "\001*\022\244\001\n\nListTables\022+.google.bigtable.admi" - + "n.v2.ListTablesRequest\032,.google.bigtable" - + ".admin.v2.ListTablesResponse\";\332A\006parent\202" - + "\323\344\223\002,\022*/v2/{parent=projects/*/instances/" - + "*}/tables\022\221\001\n\010GetTable\022).google.bigtable" - + ".admin.v2.GetTableRequest\032\037.google.bigta" - + "ble.admin.v2.Table\"9\332A\004name\202\323\344\223\002,\022*/v2/{" - + "name=projects/*/instances/*/tables/*}\022\316\001" - + "\n\013UpdateTable\022,.google.bigtable.admin.v2" - + ".UpdateTableRequest\032\035.google.longrunning" - + ".Operation\"r\312A\034\n\005Table\022\023UpdateTableMetad" - + "ata\332A\021table,update_mask\202\323\344\223\002920/v2/{tabl" - + "e.name=projects/*/instances/*/tables/*}:" - + "\005table\022\216\001\n\013DeleteTable\022,.google.bigtable" - + ".admin.v2.DeleteTableRequest\032\026.google.pr" - + "otobuf.Empty\"9\332A\004name\202\323\344\223\002,**/v2/{name=p" - + "rojects/*/instances/*/tables/*}\022\306\001\n\rUnde" - + "leteTable\022..google.bigtable.admin.v2.Und" - + "eleteTableRequest\032\035.google.longrunning.O" - + "peration\"f\312A\036\n\005Table\022\025UndeleteTableMetad" - + "ata\332A\004name\202\323\344\223\0028\"3/v2/{name=projects/*/i" - + "nstances/*/tables/*}:undelete:\001*\022\241\002\n\024Cre" - + "ateAuthorizedView\0225.google.bigtable.admi" - + "n.v2.CreateAuthorizedViewRequest\032\035.googl" - + "e.longrunning.Operation\"\262\001\312A.\n\016Authorize" - + "dView\022\034CreateAuthorizedViewMetadata\332A)pa" - + "rent,authorized_view,authorized_view_id\202" - + "\323\344\223\002O\"\022\022*\n" + + "\016schema_bundles\030\001 \003(\0132&.google.bigtable.admin.v2.SchemaBundle\022\027\n" + + "\017next_page_token\030\002 \001(\t\"o\n" + + "\031DeleteSchemaBundleRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")bigtableadmin.googleapis.com/SchemaBundle\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\0012\222@\n" + + "\022BigtableTableAdmin\022\253\001\n" + + "\013CreateTable\022,.google.bigtable.admin.v2.CreateTableRequest\032\037" + + ".google.bigtable.admin.v2.Table\"M\332A\025pare" + + "nt,table_id,table\202\323\344\223\002/\"*/v2/{parent=projects/*/instances/*}/tables:\001*\022\212\002\n" + + "\027CreateTableFromSnapshot\0228.google.bigtable.adm" + + "in.v2.CreateTableFromSnapshotRequest\032\035.google.longrunning.Operation\"\225\001\312A(\n" + + "\005Table\022\037CreateTableFromSnapshotMetadata\332A\037pare" + + "nt,table_id,source_snapshot\202\323\344\223\002B\"=/v2/{" + + "parent=projects/*/instances/*}/tables:createFromSnapshot:\001*\022\244\001\n\n" + + "ListTables\022+.google.bigtable.admin.v2.ListTablesRequest\032" + + ",.google.bigtable.admin.v2.ListTablesRes" + + "ponse\";\332A\006parent\202\323\344\223\002,\022*/v2/{parent=projects/*/instances/*}/tables\022\221\001\n" + + "\010GetTable\022).google.bigtable.admin.v2.GetTableReque" + + "st\032\037.google.bigtable.admin.v2.Table\"9\332A\004" + + "name\202\323\344\223\002,\022*/v2/{name=projects/*/instances/*/tables/*}\022\316\001\n" + + "\013UpdateTable\022,.google." + + "bigtable.admin.v2.UpdateTableRequest\032\035.google.longrunning.Operation\"r\312A\034\n" + + "\005Table\022\023UpdateTableMetadata\332A\021table,update_mask" + + "\202\323\344\223\002920/v2/{table.name=projects/*/instances/*/tables/*}:\005table\022\216\001\n" + + "\013DeleteTable\022,.google.bigtable.admin.v2.DeleteTableRe" + + "quest\032\026.google.protobuf.Empty\"9\332A\004name\202\323" + + "\344\223\002,**/v2/{name=projects/*/instances/*/tables/*}\022\306\001\n\r" + + "UndeleteTable\022..google.bigt" + + "able.admin.v2.UndeleteTableRequest\032\035.google.longrunning.Operation\"f\312A\036\n" + + "\005Table\022\025UndeleteTableMetadata\332A\004name\202\323\344\223\0028\"3/v2/{" + + "name=projects/*/instances/*/tables/*}:undelete:\001*\022\241\002\n" + + "\024CreateAuthorizedView\0225.google.bigtable.admin.v2.CreateAuthorizedVi" + + "ewRequest\032\035.google.longrunning.Operation\"\262\001\312A.\n" + + "\016AuthorizedView\022\034CreateAuthorizedViewMetadata\332A)parent,authorized_view,au" + + "thorized_view_id\202\323\344\223\002O\"\022\022*" + + " builder) { + private ChangeStreamConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ChangeStreamConfig() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ChangeStreamConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ChangeStreamConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ChangeStreamConfig_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int RETENTION_PERIOD_FIELD_NUMBER = 1; private com.google.protobuf.Duration retentionPeriod_; + /** * * @@ -83,6 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +113,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { ? com.google.protobuf.Duration.getDefaultInstance() : retentionPeriod_; } + /** * * @@ -230,38 +240,38 @@ public static com.google.bigtable.admin.v2.ChangeStreamConfig parseFrom( public static com.google.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig 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); } @@ -284,10 +294,11 @@ 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 +308,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ChangeStreamConfig} */ - 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.bigtable.admin.v2.ChangeStreamConfig) com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder { @@ -307,7 +318,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ChangeStreamConfig_fieldAccessorTable @@ -321,14 +332,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) { - getRetentionPeriodFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRetentionPeriodFieldBuilder(); } } @@ -386,39 +397,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ChangeStreamConfig 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.bigtable.admin.v2.ChangeStreamConfig) { @@ -463,7 +441,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -487,11 +466,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration retentionPeriod_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionPeriodBuilder_; + /** * * @@ -510,6 +490,7 @@ public Builder mergeFrom( public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -534,6 +515,7 @@ public com.google.protobuf.Duration getRetentionPeriod() { return retentionPeriodBuilder_.getMessage(); } } + /** * * @@ -560,6 +542,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -583,6 +566,7 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration.Builder builderFo onChanged(); return this; } + /** * * @@ -614,6 +598,7 @@ public Builder mergeRetentionPeriod(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -637,6 +622,7 @@ public Builder clearRetentionPeriod() { onChanged(); return this; } + /** * * @@ -653,8 +639,9 @@ public Builder clearRetentionPeriod() { public com.google.protobuf.Duration.Builder getRetentionPeriodBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRetentionPeriodFieldBuilder().getBuilder(); + return internalGetRetentionPeriodFieldBuilder().getBuilder(); } + /** * * @@ -677,6 +664,7 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { : retentionPeriod_; } } + /** * * @@ -690,14 +678,14 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { * * .google.protobuf.Duration retention_period = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getRetentionPeriodFieldBuilder() { + internalGetRetentionPeriodFieldBuilder() { if (retentionPeriodBuilder_ == null) { retentionPeriodBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -707,17 +695,6 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { return retentionPeriodBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ChangeStreamConfig) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ChangeStreamConfigOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ChangeStreamConfigOrBuilder.java index e9e84f2735..bac5676174 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ChangeStreamConfigOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ChangeStreamConfigOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ChangeStreamConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ChangeStreamConfig) @@ -40,6 +42,7 @@ public interface ChangeStreamConfigOrBuilder * @return Whether the retentionPeriod field is set. */ boolean hasRetentionPeriod(); + /** * * @@ -56,6 +59,7 @@ public interface ChangeStreamConfigOrBuilder * @return The retentionPeriod. */ com.google.protobuf.Duration getRetentionPeriod(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java index 33c0eaeeae..716d13ce6c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CheckConsistencyRequest} */ -public final class CheckConsistencyRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CheckConsistencyRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CheckConsistencyRequest) CheckConsistencyRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckConsistencyRequest"); + } + // Use CheckConsistencyRequest.newBuilder() to construct. - private CheckConsistencyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CheckConsistencyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private CheckConsistencyRequest() { consistencyToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CheckConsistencyRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_fieldAccessorTable @@ -82,6 +89,7 @@ public enum ModeCase private ModeCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -118,6 +126,7 @@ public ModeCase getModeCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -145,6 +154,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -177,6 +187,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object consistencyToken_ = ""; + /** * * @@ -200,6 +211,7 @@ public java.lang.String getConsistencyToken() { return s; } } + /** * * @@ -225,6 +237,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { } public static final int STANDARD_READ_REMOTE_WRITES_FIELD_NUMBER = 3; + /** * * @@ -243,6 +256,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { public boolean hasStandardReadRemoteWrites() { return modeCase_ == 3; } + /** * * @@ -264,6 +278,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo } return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } + /** * * @@ -286,6 +301,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo } public static final int DATA_BOOST_READ_LOCAL_WRITES_FIELD_NUMBER = 4; + /** * * @@ -304,6 +320,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo public boolean hasDataBoostReadLocalWrites() { return modeCase_ == 4; } + /** * * @@ -325,6 +342,7 @@ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites getDataBoostReadLoc } return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } + /** * * @@ -360,11 +378,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(consistencyToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consistencyToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consistencyToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, consistencyToken_); } if (modeCase_ == 3) { output.writeMessage(3, (com.google.bigtable.admin.v2.StandardReadRemoteWrites) mode_); @@ -381,11 +399,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(consistencyToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consistencyToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consistencyToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, consistencyToken_); } if (modeCase_ == 3) { size += @@ -497,38 +515,38 @@ public static com.google.bigtable.admin.v2.CheckConsistencyRequest parseFrom( public static com.google.bigtable.admin.v2.CheckConsistencyRequest 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.bigtable.admin.v2.CheckConsistencyRequest 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.bigtable.admin.v2.CheckConsistencyRequest 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.bigtable.admin.v2.CheckConsistencyRequest 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.bigtable.admin.v2.CheckConsistencyRequest 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.bigtable.admin.v2.CheckConsistencyRequest 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,10 +569,11 @@ 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 +584,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CheckConsistencyRequest} */ - 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.bigtable.admin.v2.CheckConsistencyRequest) com.google.bigtable.admin.v2.CheckConsistencyRequestOrBuilder { @@ -575,7 +594,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_fieldAccessorTable @@ -587,7 +606,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.CheckConsistencyRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -661,39 +680,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.CheckConsistencyReq } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.CheckConsistencyRequest) { @@ -774,14 +760,16 @@ public Builder mergeFrom( case 26: { input.readMessage( - getStandardReadRemoteWritesFieldBuilder().getBuilder(), extensionRegistry); + internalGetStandardReadRemoteWritesFieldBuilder().getBuilder(), + extensionRegistry); modeCase_ = 3; break; } // case 26 case 34: { input.readMessage( - getDataBoostReadLocalWritesFieldBuilder().getBuilder(), extensionRegistry); + internalGetDataBoostReadLocalWritesFieldBuilder().getBuilder(), + extensionRegistry); modeCase_ = 4; break; } // case 34 @@ -819,6 +807,7 @@ public Builder clearMode() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -845,6 +834,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -871,6 +861,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -896,6 +887,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -917,6 +909,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -945,6 +938,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object consistencyToken_ = ""; + /** * * @@ -967,6 +961,7 @@ public java.lang.String getConsistencyToken() { return (java.lang.String) ref; } } + /** * * @@ -989,6 +984,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1010,6 +1006,7 @@ public Builder setConsistencyToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1027,6 +1024,7 @@ public Builder clearConsistencyToken() { onChanged(); return this; } + /** * * @@ -1050,11 +1048,12 @@ public Builder setConsistencyTokenBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.StandardReadRemoteWrites, com.google.bigtable.admin.v2.StandardReadRemoteWrites.Builder, com.google.bigtable.admin.v2.StandardReadRemoteWritesOrBuilder> standardReadRemoteWritesBuilder_; + /** * * @@ -1073,6 +1072,7 @@ public Builder setConsistencyTokenBytes(com.google.protobuf.ByteString value) { public boolean hasStandardReadRemoteWrites() { return modeCase_ == 3; } + /** * * @@ -1101,6 +1101,7 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemo return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } } + /** * * @@ -1127,6 +1128,7 @@ public Builder setStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1150,6 +1152,7 @@ public Builder setStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1187,6 +1190,7 @@ public Builder mergeStandardReadRemoteWrites( modeCase_ = 3; return this; } + /** * * @@ -1215,6 +1219,7 @@ public Builder clearStandardReadRemoteWrites() { } return this; } + /** * * @@ -1229,8 +1234,9 @@ public Builder clearStandardReadRemoteWrites() { */ public com.google.bigtable.admin.v2.StandardReadRemoteWrites.Builder getStandardReadRemoteWritesBuilder() { - return getStandardReadRemoteWritesFieldBuilder().getBuilder(); + return internalGetStandardReadRemoteWritesFieldBuilder().getBuilder(); } + /** * * @@ -1255,6 +1261,7 @@ public Builder clearStandardReadRemoteWrites() { return com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } } + /** * * @@ -1267,17 +1274,17 @@ public Builder clearStandardReadRemoteWrites() { * .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.StandardReadRemoteWrites, com.google.bigtable.admin.v2.StandardReadRemoteWrites.Builder, com.google.bigtable.admin.v2.StandardReadRemoteWritesOrBuilder> - getStandardReadRemoteWritesFieldBuilder() { + internalGetStandardReadRemoteWritesFieldBuilder() { if (standardReadRemoteWritesBuilder_ == null) { if (!(modeCase_ == 3)) { mode_ = com.google.bigtable.admin.v2.StandardReadRemoteWrites.getDefaultInstance(); } standardReadRemoteWritesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.StandardReadRemoteWrites, com.google.bigtable.admin.v2.StandardReadRemoteWrites.Builder, com.google.bigtable.admin.v2.StandardReadRemoteWritesOrBuilder>( @@ -1291,11 +1298,12 @@ public Builder clearStandardReadRemoteWrites() { return standardReadRemoteWritesBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.DataBoostReadLocalWrites, com.google.bigtable.admin.v2.DataBoostReadLocalWrites.Builder, com.google.bigtable.admin.v2.DataBoostReadLocalWritesOrBuilder> dataBoostReadLocalWritesBuilder_; + /** * * @@ -1314,6 +1322,7 @@ public Builder clearStandardReadRemoteWrites() { public boolean hasDataBoostReadLocalWrites() { return modeCase_ == 4; } + /** * * @@ -1342,6 +1351,7 @@ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites getDataBoostReadLoc return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } } + /** * * @@ -1368,6 +1378,7 @@ public Builder setDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1391,6 +1402,7 @@ public Builder setDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1428,6 +1440,7 @@ public Builder mergeDataBoostReadLocalWrites( modeCase_ = 4; return this; } + /** * * @@ -1456,6 +1469,7 @@ public Builder clearDataBoostReadLocalWrites() { } return this; } + /** * * @@ -1470,8 +1484,9 @@ public Builder clearDataBoostReadLocalWrites() { */ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites.Builder getDataBoostReadLocalWritesBuilder() { - return getDataBoostReadLocalWritesFieldBuilder().getBuilder(); + return internalGetDataBoostReadLocalWritesFieldBuilder().getBuilder(); } + /** * * @@ -1496,6 +1511,7 @@ public Builder clearDataBoostReadLocalWrites() { return com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } } + /** * * @@ -1508,17 +1524,17 @@ public Builder clearDataBoostReadLocalWrites() { * .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.DataBoostReadLocalWrites, com.google.bigtable.admin.v2.DataBoostReadLocalWrites.Builder, com.google.bigtable.admin.v2.DataBoostReadLocalWritesOrBuilder> - getDataBoostReadLocalWritesFieldBuilder() { + internalGetDataBoostReadLocalWritesFieldBuilder() { if (dataBoostReadLocalWritesBuilder_ == null) { if (!(modeCase_ == 4)) { mode_ = com.google.bigtable.admin.v2.DataBoostReadLocalWrites.getDefaultInstance(); } dataBoostReadLocalWritesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.DataBoostReadLocalWrites, com.google.bigtable.admin.v2.DataBoostReadLocalWrites.Builder, com.google.bigtable.admin.v2.DataBoostReadLocalWritesOrBuilder>( @@ -1532,17 +1548,6 @@ public Builder clearDataBoostReadLocalWrites() { return dataBoostReadLocalWritesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CheckConsistencyRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequestOrBuilder.java index fab133d837..95dbad6897 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CheckConsistencyRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CheckConsistencyRequest) @@ -40,6 +42,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +72,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The consistencyToken. */ java.lang.String getConsistencyToken(); + /** * * @@ -97,6 +101,7 @@ public interface CheckConsistencyRequestOrBuilder * @return Whether the standardReadRemoteWrites field is set. */ boolean hasStandardReadRemoteWrites(); + /** * * @@ -112,6 +117,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The standardReadRemoteWrites. */ com.google.bigtable.admin.v2.StandardReadRemoteWrites getStandardReadRemoteWrites(); + /** * * @@ -142,6 +148,7 @@ public interface CheckConsistencyRequestOrBuilder * @return Whether the dataBoostReadLocalWrites field is set. */ boolean hasDataBoostReadLocalWrites(); + /** * * @@ -157,6 +164,7 @@ public interface CheckConsistencyRequestOrBuilder * @return The dataBoostReadLocalWrites. */ com.google.bigtable.admin.v2.DataBoostReadLocalWrites getDataBoostReadLocalWrites(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java index 2a4db77dc9..aa27ddf035 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.CheckConsistencyResponse} */ -public final class CheckConsistencyResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CheckConsistencyResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CheckConsistencyResponse) CheckConsistencyResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckConsistencyResponse"); + } + // Use CheckConsistencyResponse.newBuilder() to construct. - private CheckConsistencyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CheckConsistencyResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CheckConsistencyResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CheckConsistencyResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int CONSISTENT_FIELD_NUMBER = 1; private boolean consistent_ = false; + /** * * @@ -182,38 +190,38 @@ public static com.google.bigtable.admin.v2.CheckConsistencyResponse parseFrom( public static com.google.bigtable.admin.v2.CheckConsistencyResponse 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.bigtable.admin.v2.CheckConsistencyResponse 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.bigtable.admin.v2.CheckConsistencyResponse 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.bigtable.admin.v2.CheckConsistencyResponse 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.bigtable.admin.v2.CheckConsistencyResponse 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.bigtable.admin.v2.CheckConsistencyResponse 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,10 +245,11 @@ 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 +260,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CheckConsistencyResponse} */ - 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.bigtable.admin.v2.CheckConsistencyResponse) com.google.bigtable.admin.v2.CheckConsistencyResponseOrBuilder { @@ -261,7 +270,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_fieldAccessorTable @@ -273,7 +282,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.CheckConsistencyResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -323,39 +332,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CheckConsistencyResponse } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.CheckConsistencyResponse) { @@ -424,6 +400,7 @@ public Builder mergeFrom( private int bitField0_; private boolean consistent_; + /** * * @@ -440,6 +417,7 @@ public Builder mergeFrom( public boolean getConsistent() { return consistent_; } + /** * * @@ -460,6 +438,7 @@ public Builder setConsistent(boolean value) { onChanged(); return this; } + /** * * @@ -479,17 +458,6 @@ public Builder clearConsistent() { 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.bigtable.admin.v2.CheckConsistencyResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponseOrBuilder.java index 88386c93b7..c3c94a6805 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CheckConsistencyResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CheckConsistencyResponse) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java index e1434f9632..a82c231f2d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -30,13 +31,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.Cluster} */ -public final class Cluster extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Cluster extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster) ClusterOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Cluster"); + } + // Use Cluster.newBuilder() to construct. - private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Cluster(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,22 +57,17 @@ private Cluster() { name_ = ""; location_ = ""; state_ = 0; + nodeScalingFactor_ = 0; defaultStorageType_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Cluster(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_fieldAccessorTable @@ -138,6 +146,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"); + } + /** * * @@ -148,6 +166,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -158,6 +177,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -170,6 +190,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * CREATING = 2; */ public static final int CREATING_VALUE = 2; + /** * * @@ -184,6 +205,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * RESIZING = 3; */ public static final int RESIZING_VALUE = 3; + /** * * @@ -258,7 +280,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.bigtable.admin.v2.Cluster.getDescriptor().getEnumTypes().get(0); } @@ -283,6 +305,183 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Cluster.State) } + /** + * + * + *
      +   * Possible node scaling factors of the clusters. Node scaling delivers better
      +   * latency and more throughput by removing node boundaries.
      +   * 
      + * + * Protobuf enum {@code google.bigtable.admin.v2.Cluster.NodeScalingFactor} + */ + public enum NodeScalingFactor implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
      +     * No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
      +     * 
      + * + * NODE_SCALING_FACTOR_UNSPECIFIED = 0; + */ + NODE_SCALING_FACTOR_UNSPECIFIED(0), + /** + * + * + *
      +     * The cluster is running with a scaling factor of 1.
      +     * 
      + * + * NODE_SCALING_FACTOR_1X = 1; + */ + NODE_SCALING_FACTOR_1X(1), + /** + * + * + *
      +     * The cluster is running with a scaling factor of 2.
      +     * All node count values must be in increments of 2 with this scaling factor
      +     * enabled, otherwise an INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * NODE_SCALING_FACTOR_2X = 2; + */ + NODE_SCALING_FACTOR_2X(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NodeScalingFactor"); + } + + /** + * + * + *
      +     * No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
      +     * 
      + * + * NODE_SCALING_FACTOR_UNSPECIFIED = 0; + */ + public static final int NODE_SCALING_FACTOR_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
      +     * The cluster is running with a scaling factor of 1.
      +     * 
      + * + * NODE_SCALING_FACTOR_1X = 1; + */ + public static final int NODE_SCALING_FACTOR_1X_VALUE = 1; + + /** + * + * + *
      +     * The cluster is running with a scaling factor of 2.
      +     * All node count values must be in increments of 2 with this scaling factor
      +     * enabled, otherwise an INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * NODE_SCALING_FACTOR_2X = 2; + */ + public static final int NODE_SCALING_FACTOR_2X_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 NodeScalingFactor 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 NodeScalingFactor forNumber(int value) { + switch (value) { + case 0: + return NODE_SCALING_FACTOR_UNSPECIFIED; + case 1: + return NODE_SCALING_FACTOR_1X; + case 2: + return NODE_SCALING_FACTOR_2X; + 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 NodeScalingFactor findValueByNumber(int number) { + return NodeScalingFactor.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.bigtable.admin.v2.Cluster.getDescriptor().getEnumTypes().get(1); + } + + private static final NodeScalingFactor[] VALUES = values(); + + public static NodeScalingFactor 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 NodeScalingFactor(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Cluster.NodeScalingFactor) + } + public interface ClusterAutoscalingConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) @@ -302,6 +501,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return Whether the autoscalingLimits field is set. */ boolean hasAutoscalingLimits(); + /** * * @@ -316,6 +516,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return The autoscalingLimits. */ com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits(); + /** * * @@ -343,6 +544,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return Whether the autoscalingTargets field is set. */ boolean hasAutoscalingTargets(); + /** * * @@ -357,6 +559,7 @@ public interface ClusterAutoscalingConfigOrBuilder * @return The autoscalingTargets. */ com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets(); + /** * * @@ -370,6 +573,7 @@ public interface ClusterAutoscalingConfigOrBuilder */ com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder getAutoscalingTargetsOrBuilder(); } + /** * * @@ -379,31 +583,36 @@ public interface ClusterAutoscalingConfigOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} */ - public static final class ClusterAutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class ClusterAutoscalingConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) ClusterAutoscalingConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClusterAutoscalingConfig"); + } + // Use ClusterAutoscalingConfig.newBuilder() to construct. - private ClusterAutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ClusterAutoscalingConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ClusterAutoscalingConfig() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterAutoscalingConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_fieldAccessorTable @@ -415,6 +624,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int AUTOSCALING_LIMITS_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.AutoscalingLimits autoscalingLimits_; + /** * * @@ -432,6 +642,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasAutoscalingLimits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -451,6 +662,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits() { ? com.google.bigtable.admin.v2.AutoscalingLimits.getDefaultInstance() : autoscalingLimits_; } + /** * * @@ -471,6 +683,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder getAutoscalingLim public static final int AUTOSCALING_TARGETS_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.AutoscalingTargets autoscalingTargets_; + /** * * @@ -488,6 +701,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder getAutoscalingLim public boolean hasAutoscalingTargets() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -507,6 +721,7 @@ public com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets() { ? com.google.bigtable.admin.v2.AutoscalingTargets.getDefaultInstance() : autoscalingTargets_; } + /** * * @@ -647,38 +862,38 @@ public static com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig pars public static com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig 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); } @@ -702,11 +917,11 @@ 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; } + /** * * @@ -716,8 +931,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} */ - 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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder { @@ -727,7 +941,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_fieldAccessorTable @@ -741,15 +955,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) { - getAutoscalingLimitsFieldBuilder(); - getAutoscalingTargetsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoscalingLimitsFieldBuilder(); + internalGetAutoscalingTargetsFieldBuilder(); } } @@ -823,41 +1037,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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) { @@ -908,14 +1087,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 @@ -939,11 +1118,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.AutoscalingLimits autoscalingLimits_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingLimits, com.google.bigtable.admin.v2.AutoscalingLimits.Builder, com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder> autoscalingLimitsBuilder_; + /** * * @@ -960,6 +1140,7 @@ public Builder mergeFrom( public boolean hasAutoscalingLimits() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -982,6 +1163,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits getAutoscalingLimits() { return autoscalingLimitsBuilder_.getMessage(); } } + /** * * @@ -1006,6 +1188,7 @@ public Builder setAutoscalingLimits(com.google.bigtable.admin.v2.AutoscalingLimi onChanged(); return this; } + /** * * @@ -1028,6 +1211,7 @@ public Builder setAutoscalingLimits( onChanged(); return this; } + /** * * @@ -1058,6 +1242,7 @@ public Builder mergeAutoscalingLimits(com.google.bigtable.admin.v2.AutoscalingLi } return this; } + /** * * @@ -1079,6 +1264,7 @@ public Builder clearAutoscalingLimits() { onChanged(); return this; } + /** * * @@ -1093,8 +1279,9 @@ public Builder clearAutoscalingLimits() { public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimitsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getAutoscalingLimitsFieldBuilder().getBuilder(); + return internalGetAutoscalingLimitsFieldBuilder().getBuilder(); } + /** * * @@ -1116,6 +1303,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi : autoscalingLimits_; } } + /** * * @@ -1127,14 +1315,14 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi * .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingLimits, com.google.bigtable.admin.v2.AutoscalingLimits.Builder, com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder> - getAutoscalingLimitsFieldBuilder() { + internalGetAutoscalingLimitsFieldBuilder() { if (autoscalingLimitsBuilder_ == null) { autoscalingLimitsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingLimits, com.google.bigtable.admin.v2.AutoscalingLimits.Builder, com.google.bigtable.admin.v2.AutoscalingLimitsOrBuilder>( @@ -1145,11 +1333,12 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi } private com.google.bigtable.admin.v2.AutoscalingTargets autoscalingTargets_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingTargets, com.google.bigtable.admin.v2.AutoscalingTargets.Builder, com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder> autoscalingTargetsBuilder_; + /** * * @@ -1166,6 +1355,7 @@ public com.google.bigtable.admin.v2.AutoscalingLimits.Builder getAutoscalingLimi public boolean hasAutoscalingTargets() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1188,6 +1378,7 @@ public com.google.bigtable.admin.v2.AutoscalingTargets getAutoscalingTargets() { return autoscalingTargetsBuilder_.getMessage(); } } + /** * * @@ -1212,6 +1403,7 @@ public Builder setAutoscalingTargets(com.google.bigtable.admin.v2.AutoscalingTar onChanged(); return this; } + /** * * @@ -1234,6 +1426,7 @@ public Builder setAutoscalingTargets( onChanged(); return this; } + /** * * @@ -1265,6 +1458,7 @@ public Builder mergeAutoscalingTargets( } return this; } + /** * * @@ -1286,6 +1480,7 @@ public Builder clearAutoscalingTargets() { onChanged(); return this; } + /** * * @@ -1301,8 +1496,9 @@ public Builder clearAutoscalingTargets() { getAutoscalingTargetsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getAutoscalingTargetsFieldBuilder().getBuilder(); + return internalGetAutoscalingTargetsFieldBuilder().getBuilder(); } + /** * * @@ -1324,6 +1520,7 @@ public Builder clearAutoscalingTargets() { : autoscalingTargets_; } } + /** * * @@ -1335,14 +1532,14 @@ public Builder clearAutoscalingTargets() { * .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingTargets, com.google.bigtable.admin.v2.AutoscalingTargets.Builder, com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder> - getAutoscalingTargetsFieldBuilder() { + internalGetAutoscalingTargetsFieldBuilder() { if (autoscalingTargetsBuilder_ == null) { autoscalingTargetsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AutoscalingTargets, com.google.bigtable.admin.v2.AutoscalingTargets.Builder, com.google.bigtable.admin.v2.AutoscalingTargetsOrBuilder>( @@ -1352,18 +1549,6 @@ public Builder clearAutoscalingTargets() { return autoscalingTargetsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) } @@ -1438,6 +1623,7 @@ public interface ClusterConfigOrBuilder * @return Whether the clusterAutoscalingConfig field is set. */ boolean hasClusterAutoscalingConfig(); + /** * * @@ -1452,6 +1638,7 @@ public interface ClusterConfigOrBuilder * @return The clusterAutoscalingConfig. */ com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig getClusterAutoscalingConfig(); + /** * * @@ -1466,6 +1653,7 @@ public interface ClusterConfigOrBuilder com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder getClusterAutoscalingConfigOrBuilder(); } + /** * * @@ -1475,31 +1663,36 @@ public interface ClusterConfigOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Cluster.ClusterConfig} */ - public static final class ClusterConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class ClusterConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.ClusterConfig) ClusterConfigOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClusterConfig"); + } + // Use ClusterConfig.newBuilder() to construct. - private ClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ClusterConfig(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ClusterConfig() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterConfig(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_fieldAccessorTable @@ -1511,6 +1704,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int CLUSTER_AUTOSCALING_CONFIG_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig clusterAutoscalingConfig_; + /** * * @@ -1528,6 +1722,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasClusterAutoscalingConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1548,6 +1743,7 @@ public boolean hasClusterAutoscalingConfig() { ? com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.getDefaultInstance() : clusterAutoscalingConfig_; } + /** * * @@ -1676,38 +1872,38 @@ public static com.google.bigtable.admin.v2.Cluster.ClusterConfig parseFrom( public static com.google.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig 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); } @@ -1730,11 +1926,11 @@ 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; } + /** * * @@ -1744,8 +1940,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Cluster.ClusterConfig} */ - 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.bigtable.admin.v2.Cluster.ClusterConfig) com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder { @@ -1755,7 +1950,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_fieldAccessorTable @@ -1769,14 +1964,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) { - getClusterAutoscalingConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClusterAutoscalingConfigFieldBuilder(); } } @@ -1836,41 +2031,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Cluster.ClusterConfig 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.bigtable.admin.v2.Cluster.ClusterConfig) { @@ -1916,7 +2076,8 @@ public Builder mergeFrom( case 10: { input.readMessage( - getClusterAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetClusterAutoscalingConfigFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -1941,11 +2102,12 @@ public Builder mergeFrom( private com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig clusterAutoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder> clusterAutoscalingConfigBuilder_; + /** * * @@ -1962,6 +2124,7 @@ public Builder mergeFrom( public boolean hasClusterAutoscalingConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1985,6 +2148,7 @@ public boolean hasClusterAutoscalingConfig() { return clusterAutoscalingConfigBuilder_.getMessage(); } } + /** * * @@ -2010,6 +2174,7 @@ public Builder setClusterAutoscalingConfig( onChanged(); return this; } + /** * * @@ -2032,6 +2197,7 @@ public Builder setClusterAutoscalingConfig( onChanged(); return this; } + /** * * @@ -2064,6 +2230,7 @@ public Builder mergeClusterAutoscalingConfig( } return this; } + /** * * @@ -2085,6 +2252,7 @@ public Builder clearClusterAutoscalingConfig() { onChanged(); return this; } + /** * * @@ -2100,8 +2268,9 @@ public Builder clearClusterAutoscalingConfig() { getClusterAutoscalingConfigBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getClusterAutoscalingConfigFieldBuilder().getBuilder(); + return internalGetClusterAutoscalingConfigFieldBuilder().getBuilder(); } + /** * * @@ -2123,6 +2292,7 @@ public Builder clearClusterAutoscalingConfig() { : clusterAutoscalingConfig_; } } + /** * * @@ -2134,14 +2304,14 @@ public Builder clearClusterAutoscalingConfig() { * .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder> - getClusterAutoscalingConfigFieldBuilder() { + internalGetClusterAutoscalingConfigFieldBuilder() { if (clusterAutoscalingConfigBuilder_ == null) { clusterAutoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfigOrBuilder>( @@ -2151,18 +2321,6 @@ public Builder clearClusterAutoscalingConfig() { return clusterAutoscalingConfigBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Cluster.ClusterConfig) } @@ -2226,12 +2384,11 @@ public interface EncryptionConfigOrBuilder *
            * Describes the Cloud KMS encryption key that will be used to protect the
            * destination Bigtable cluster. The requirements for this key are:
      -     *  1) The Cloud Bigtable service account associated with the project that
      -     *  contains this cluster must be granted the
      -     *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -     *  2) Only regional keys can be used and the region of the CMEK key must
      -     *  match the region of the cluster.
      -     *  3) All clusters within an instance must use the same CMEK key.
      +     * 1) The Cloud Bigtable service account associated with the project that
      +     * contains this cluster must be granted the
      +     * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +     * 2) Only regional keys can be used and the region of the CMEK key must
      +     * match the region of the cluster.
            * Values are of the form
            * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
            * 
      @@ -2241,18 +2398,18 @@ public interface EncryptionConfigOrBuilder * @return The kmsKeyName. */ java.lang.String getKmsKeyName(); + /** * * *
            * Describes the Cloud KMS encryption key that will be used to protect the
            * destination Bigtable cluster. The requirements for this key are:
      -     *  1) The Cloud Bigtable service account associated with the project that
      -     *  contains this cluster must be granted the
      -     *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -     *  2) Only regional keys can be used and the region of the CMEK key must
      -     *  match the region of the cluster.
      -     *  3) All clusters within an instance must use the same CMEK key.
      +     * 1) The Cloud Bigtable service account associated with the project that
      +     * contains this cluster must be granted the
      +     * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +     * 2) Only regional keys can be used and the region of the CMEK key must
      +     * match the region of the cluster.
            * Values are of the form
            * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
            * 
      @@ -2263,6 +2420,7 @@ public interface EncryptionConfigOrBuilder */ com.google.protobuf.ByteString getKmsKeyNameBytes(); } + /** * * @@ -2273,13 +2431,24 @@ public interface EncryptionConfigOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Cluster.EncryptionConfig} */ - public static final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + public static final class EncryptionConfig extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Cluster.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); } @@ -2287,19 +2456,13 @@ private EncryptionConfig() { kmsKeyName_ = ""; } - @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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_fieldAccessorTable @@ -2312,18 +2475,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object kmsKeyName_ = ""; + /** * * *
            * Describes the Cloud KMS encryption key that will be used to protect the
            * destination Bigtable cluster. The requirements for this key are:
      -     *  1) The Cloud Bigtable service account associated with the project that
      -     *  contains this cluster must be granted the
      -     *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -     *  2) Only regional keys can be used and the region of the CMEK key must
      -     *  match the region of the cluster.
      -     *  3) All clusters within an instance must use the same CMEK key.
      +     * 1) The Cloud Bigtable service account associated with the project that
      +     * contains this cluster must be granted the
      +     * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +     * 2) Only regional keys can be used and the region of the CMEK key must
      +     * match the region of the cluster.
            * Values are of the form
            * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
            * 
      @@ -2344,18 +2507,18 @@ public java.lang.String getKmsKeyName() { return s; } } + /** * * *
            * Describes the Cloud KMS encryption key that will be used to protect the
            * destination Bigtable cluster. The requirements for this key are:
      -     *  1) The Cloud Bigtable service account associated with the project that
      -     *  contains this cluster must be granted the
      -     *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -     *  2) Only regional keys can be used and the region of the CMEK key must
      -     *  match the region of the cluster.
      -     *  3) All clusters within an instance must use the same CMEK key.
      +     * 1) The Cloud Bigtable service account associated with the project that
      +     * contains this cluster must be granted the
      +     * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +     * 2) Only regional keys can be used and the region of the CMEK key must
      +     * match the region of the cluster.
            * Values are of the form
            * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
            * 
      @@ -2391,8 +2554,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(kmsKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kmsKeyName_); } getUnknownFields().writeTo(output); } @@ -2403,8 +2566,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kmsKeyName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2478,38 +2641,38 @@ public static com.google.bigtable.admin.v2.Cluster.EncryptionConfig parseFrom( public static com.google.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.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); } @@ -2533,11 +2696,11 @@ 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; } + /** * * @@ -2548,8 +2711,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.EncryptionConfig) com.google.bigtable.admin.v2.Cluster.EncryptionConfigOrBuilder { @@ -2559,7 +2721,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_fieldAccessorTable @@ -2571,7 +2733,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Cluster.EncryptionConfig.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2621,41 +2783,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.Cluster.EncryptionConfig) { @@ -2726,18 +2853,18 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object kmsKeyName_ = ""; + /** * * *
              * Describes the Cloud KMS encryption key that will be used to protect the
              * destination Bigtable cluster. The requirements for this key are:
      -       *  1) The Cloud Bigtable service account associated with the project that
      -       *  contains this cluster must be granted the
      -       *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -       *  2) Only regional keys can be used and the region of the CMEK key must
      -       *  match the region of the cluster.
      -       *  3) All clusters within an instance must use the same CMEK key.
      +       * 1) The Cloud Bigtable service account associated with the project that
      +       * contains this cluster must be granted the
      +       * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +       * 2) Only regional keys can be used and the region of the CMEK key must
      +       * match the region of the cluster.
              * Values are of the form
              * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
              * 
      @@ -2757,18 +2884,18 @@ public java.lang.String getKmsKeyName() { return (java.lang.String) ref; } } + /** * * *
              * Describes the Cloud KMS encryption key that will be used to protect the
              * destination Bigtable cluster. The requirements for this key are:
      -       *  1) The Cloud Bigtable service account associated with the project that
      -       *  contains this cluster must be granted the
      -       *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -       *  2) Only regional keys can be used and the region of the CMEK key must
      -       *  match the region of the cluster.
      -       *  3) All clusters within an instance must use the same CMEK key.
      +       * 1) The Cloud Bigtable service account associated with the project that
      +       * contains this cluster must be granted the
      +       * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +       * 2) Only regional keys can be used and the region of the CMEK key must
      +       * match the region of the cluster.
              * Values are of the form
              * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
              * 
      @@ -2788,18 +2915,18 @@ public com.google.protobuf.ByteString getKmsKeyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
              * Describes the Cloud KMS encryption key that will be used to protect the
              * destination Bigtable cluster. The requirements for this key are:
      -       *  1) The Cloud Bigtable service account associated with the project that
      -       *  contains this cluster must be granted the
      -       *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -       *  2) Only regional keys can be used and the region of the CMEK key must
      -       *  match the region of the cluster.
      -       *  3) All clusters within an instance must use the same CMEK key.
      +       * 1) The Cloud Bigtable service account associated with the project that
      +       * contains this cluster must be granted the
      +       * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +       * 2) Only regional keys can be used and the region of the CMEK key must
      +       * match the region of the cluster.
              * Values are of the form
              * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
              * 
      @@ -2818,18 +2945,18 @@ public Builder setKmsKeyName(java.lang.String value) { onChanged(); return this; } + /** * * *
              * Describes the Cloud KMS encryption key that will be used to protect the
              * destination Bigtable cluster. The requirements for this key are:
      -       *  1) The Cloud Bigtable service account associated with the project that
      -       *  contains this cluster must be granted the
      -       *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -       *  2) Only regional keys can be used and the region of the CMEK key must
      -       *  match the region of the cluster.
      -       *  3) All clusters within an instance must use the same CMEK key.
      +       * 1) The Cloud Bigtable service account associated with the project that
      +       * contains this cluster must be granted the
      +       * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +       * 2) Only regional keys can be used and the region of the CMEK key must
      +       * match the region of the cluster.
              * Values are of the form
              * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
              * 
      @@ -2844,18 +2971,18 @@ public Builder clearKmsKeyName() { onChanged(); return this; } + /** * * *
              * Describes the Cloud KMS encryption key that will be used to protect the
              * destination Bigtable cluster. The requirements for this key are:
      -       *  1) The Cloud Bigtable service account associated with the project that
      -       *  contains this cluster must be granted the
      -       *  `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      -       *  2) Only regional keys can be used and the region of the CMEK key must
      -       *  match the region of the cluster.
      -       *  3) All clusters within an instance must use the same CMEK key.
      +       * 1) The Cloud Bigtable service account associated with the project that
      +       * contains this cluster must be granted the
      +       * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
      +       * 2) Only regional keys can be used and the region of the CMEK key must
      +       * match the region of the cluster.
              * Values are of the form
              * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
              * 
      @@ -2876,18 +3003,6 @@ public Builder setKmsKeyNameBytes(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.bigtable.admin.v2.Cluster.EncryptionConfig) } @@ -2957,6 +3072,7 @@ public enum ConfigCase private ConfigCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2991,6 +3107,7 @@ public ConfigCase getConfigCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3015,6 +3132,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3044,6 +3162,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object location_ = ""; + /** * * @@ -3072,6 +3191,7 @@ public java.lang.String getLocation() { return s; } } + /** * * @@ -3103,6 +3223,7 @@ public com.google.protobuf.ByteString getLocationBytes() { public static final int STATE_FIELD_NUMBER = 3; private int state_ = 0; + /** * * @@ -3120,6 +3241,7 @@ public com.google.protobuf.ByteString getLocationBytes() { public int getStateValue() { return state_; } + /** * * @@ -3142,12 +3264,14 @@ public com.google.bigtable.admin.v2.Cluster.State getState() { public static final int SERVE_NODES_FIELD_NUMBER = 4; private int serveNodes_ = 0; + /** * * *
      -   * The number of nodes allocated to this cluster. More nodes enable higher
      -   * throughput and more consistent performance.
      +   * The number of nodes in the cluster. If no value is set,
      +   * Cloud Bigtable automatically allocates nodes based on your data footprint
      +   * and optimized for 50% storage utilization.
          * 
      * * int32 serve_nodes = 4; @@ -3159,7 +3283,51 @@ public int getServeNodes() { return serveNodes_; } + public static final int NODE_SCALING_FACTOR_FIELD_NUMBER = 9; + private int nodeScalingFactor_ = 0; + + /** + * + * + *
      +   * Immutable. The node scaling factor of this cluster.
      +   * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for nodeScalingFactor. + */ + @java.lang.Override + public int getNodeScalingFactorValue() { + return nodeScalingFactor_; + } + + /** + * + * + *
      +   * Immutable. The node scaling factor of this cluster.
      +   * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nodeScalingFactor. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Cluster.NodeScalingFactor getNodeScalingFactor() { + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor result = + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.forNumber(nodeScalingFactor_); + return result == null + ? com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.UNRECOGNIZED + : result; + } + public static final int CLUSTER_CONFIG_FIELD_NUMBER = 7; + /** * * @@ -3175,6 +3343,7 @@ public int getServeNodes() { public boolean hasClusterConfig() { return configCase_ == 7; } + /** * * @@ -3193,6 +3362,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig() { } return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } + /** * * @@ -3212,6 +3382,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon public static final int DEFAULT_STORAGE_TYPE_FIELD_NUMBER = 5; private int defaultStorageType_ = 0; + /** * * @@ -3230,6 +3401,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon public int getDefaultStorageTypeValue() { return defaultStorageType_; } + /** * * @@ -3253,6 +3425,7 @@ public com.google.bigtable.admin.v2.StorageType getDefaultStorageType() { public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 6; private com.google.bigtable.admin.v2.Cluster.EncryptionConfig encryptionConfig_; + /** * * @@ -3270,6 +3443,7 @@ public com.google.bigtable.admin.v2.StorageType getDefaultStorageType() { public boolean hasEncryptionConfig() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3289,6 +3463,7 @@ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig getEncryptionConfig ? com.google.bigtable.admin.v2.Cluster.EncryptionConfig.getDefaultInstance() : encryptionConfig_; } + /** * * @@ -3322,11 +3497,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(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, location_); } if (state_ != com.google.bigtable.admin.v2.Cluster.State.STATE_NOT_KNOWN.getNumber()) { output.writeEnum(3, state_); @@ -3344,6 +3519,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (configCase_ == 7) { output.writeMessage(7, (com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_); } + if (nodeScalingFactor_ + != com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.NODE_SCALING_FACTOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, nodeScalingFactor_); + } getUnknownFields().writeTo(output); } @@ -3353,11 +3533,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(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, location_); } if (state_ != com.google.bigtable.admin.v2.Cluster.State.STATE_NOT_KNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); @@ -3377,6 +3557,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_); } + if (nodeScalingFactor_ + != com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.NODE_SCALING_FACTOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, nodeScalingFactor_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3396,6 +3581,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLocation().equals(other.getLocation())) return false; if (state_ != other.state_) return false; if (getServeNodes() != other.getServeNodes()) return false; + if (nodeScalingFactor_ != other.nodeScalingFactor_) return false; if (defaultStorageType_ != other.defaultStorageType_) return false; if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; if (hasEncryptionConfig()) { @@ -3428,6 +3614,8 @@ public int hashCode() { hash = (53 * hash) + state_; hash = (37 * hash) + SERVE_NODES_FIELD_NUMBER; hash = (53 * hash) + getServeNodes(); + hash = (37 * hash) + NODE_SCALING_FACTOR_FIELD_NUMBER; + hash = (53 * hash) + nodeScalingFactor_; hash = (37 * hash) + DEFAULT_STORAGE_TYPE_FIELD_NUMBER; hash = (53 * hash) + defaultStorageType_; if (hasEncryptionConfig()) { @@ -3483,38 +3671,38 @@ public static com.google.bigtable.admin.v2.Cluster parseFrom( public static com.google.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster 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); } @@ -3537,10 +3725,11 @@ 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; } + /** * * @@ -3552,7 +3741,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.Cluster} */ - 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.bigtable.admin.v2.Cluster) com.google.bigtable.admin.v2.ClusterOrBuilder { @@ -3562,7 +3751,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_fieldAccessorTable @@ -3576,14 +3765,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(); } } @@ -3595,6 +3784,7 @@ public Builder clear() { location_ = ""; state_ = 0; serveNodes_ = 0; + nodeScalingFactor_ = 0; if (clusterConfigBuilder_ != null) { clusterConfigBuilder_.clear(); } @@ -3654,11 +3844,14 @@ private void buildPartial0(com.google.bigtable.admin.v2.Cluster result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.serveNodes_ = serveNodes_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nodeScalingFactor_ = nodeScalingFactor_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { result.defaultStorageType_ = defaultStorageType_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.encryptionConfig_ = encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); to_bitField0_ |= 0x00000001; @@ -3674,39 +3867,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.Cluster 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.bigtable.admin.v2.Cluster) { @@ -3735,6 +3895,9 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster other) { if (other.getServeNodes() != 0) { setServeNodes(other.getServeNodes()); } + if (other.nodeScalingFactor_ != 0) { + setNodeScalingFactorValue(other.getNodeScalingFactorValue()); + } if (other.defaultStorageType_ != 0) { setDefaultStorageTypeValue(other.getDefaultStorageTypeValue()); } @@ -3805,22 +3968,29 @@ public Builder mergeFrom( case 40: { defaultStorageType_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 40 case 50: { input.readMessage( - getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; break; } // case 50 case 58: { - input.readMessage(getClusterConfigFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetClusterConfigFieldBuilder().getBuilder(), extensionRegistry); configCase_ = 7; break; } // case 58 + case 72: + { + nodeScalingFactor_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 72 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3855,6 +4025,7 @@ public Builder clearConfig() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -3878,6 +4049,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -3901,6 +4073,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3923,6 +4096,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3941,6 +4115,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -3966,6 +4141,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object location_ = ""; + /** * * @@ -3993,6 +4169,7 @@ public java.lang.String getLocation() { return (java.lang.String) ref; } } + /** * * @@ -4020,6 +4197,7 @@ public com.google.protobuf.ByteString getLocationBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4046,6 +4224,7 @@ public Builder setLocation(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4068,6 +4247,7 @@ public Builder clearLocation() { onChanged(); return this; } + /** * * @@ -4097,6 +4277,7 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { } private int state_ = 0; + /** * * @@ -4114,6 +4295,7 @@ public Builder setLocationBytes(com.google.protobuf.ByteString value) { public int getStateValue() { return state_; } + /** * * @@ -4134,6 +4316,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -4153,6 +4336,7 @@ public com.google.bigtable.admin.v2.Cluster.State getState() { com.google.bigtable.admin.v2.Cluster.State.forNumber(state_); return result == null ? com.google.bigtable.admin.v2.Cluster.State.UNRECOGNIZED : result; } + /** * * @@ -4176,6 +4360,7 @@ public Builder setState(com.google.bigtable.admin.v2.Cluster.State value) { onChanged(); return this; } + /** * * @@ -4197,12 +4382,14 @@ public Builder clearState() { } private int serveNodes_; + /** * * *
      -     * The number of nodes allocated to this cluster. More nodes enable higher
      -     * throughput and more consistent performance.
      +     * The number of nodes in the cluster. If no value is set,
      +     * Cloud Bigtable automatically allocates nodes based on your data footprint
      +     * and optimized for 50% storage utilization.
            * 
      * * int32 serve_nodes = 4; @@ -4213,12 +4400,14 @@ public Builder clearState() { public int getServeNodes() { return serveNodes_; } + /** * * *
      -     * The number of nodes allocated to this cluster. More nodes enable higher
      -     * throughput and more consistent performance.
      +     * The number of nodes in the cluster. If no value is set,
      +     * Cloud Bigtable automatically allocates nodes based on your data footprint
      +     * and optimized for 50% storage utilization.
            * 
      * * int32 serve_nodes = 4; @@ -4233,12 +4422,14 @@ public Builder setServeNodes(int value) { onChanged(); return this; } + /** * * *
      -     * The number of nodes allocated to this cluster. More nodes enable higher
      -     * throughput and more consistent performance.
      +     * The number of nodes in the cluster. If no value is set,
      +     * Cloud Bigtable automatically allocates nodes based on your data footprint
      +     * and optimized for 50% storage utilization.
            * 
      * * int32 serve_nodes = 4; @@ -4252,11 +4443,120 @@ public Builder clearServeNodes() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private int nodeScalingFactor_ = 0; + + /** + * + * + *
      +     * Immutable. The node scaling factor of this cluster.
      +     * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for nodeScalingFactor. + */ + @java.lang.Override + public int getNodeScalingFactorValue() { + return nodeScalingFactor_; + } + + /** + * + * + *
      +     * Immutable. The node scaling factor of this cluster.
      +     * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for nodeScalingFactor to set. + * @return This builder for chaining. + */ + public Builder setNodeScalingFactorValue(int value) { + nodeScalingFactor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Immutable. The node scaling factor of this cluster.
      +     * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nodeScalingFactor. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Cluster.NodeScalingFactor getNodeScalingFactor() { + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor result = + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.forNumber(nodeScalingFactor_); + return result == null + ? com.google.bigtable.admin.v2.Cluster.NodeScalingFactor.UNRECOGNIZED + : result; + } + + /** + * + * + *
      +     * Immutable. The node scaling factor of this cluster.
      +     * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The nodeScalingFactor to set. + * @return This builder for chaining. + */ + public Builder setNodeScalingFactor( + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + nodeScalingFactor_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Immutable. The node scaling factor of this cluster.
      +     * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearNodeScalingFactor() { + bitField0_ = (bitField0_ & ~0x00000010); + nodeScalingFactor_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterConfig, com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder> clusterConfigBuilder_; + /** * * @@ -4272,6 +4572,7 @@ public Builder clearServeNodes() { public boolean hasClusterConfig() { return configCase_ == 7; } + /** * * @@ -4297,6 +4598,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig() { return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } } + /** * * @@ -4319,6 +4621,7 @@ public Builder setClusterConfig(com.google.bigtable.admin.v2.Cluster.ClusterConf configCase_ = 7; return this; } + /** * * @@ -4339,6 +4642,7 @@ public Builder setClusterConfig( configCase_ = 7; return this; } + /** * * @@ -4371,6 +4675,7 @@ public Builder mergeClusterConfig(com.google.bigtable.admin.v2.Cluster.ClusterCo configCase_ = 7; return this; } + /** * * @@ -4396,6 +4701,7 @@ public Builder clearClusterConfig() { } return this; } + /** * * @@ -4406,8 +4712,9 @@ public Builder clearClusterConfig() { * .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; */ public com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder getClusterConfigBuilder() { - return getClusterConfigFieldBuilder().getBuilder(); + return internalGetClusterConfigFieldBuilder().getBuilder(); } + /** * * @@ -4428,6 +4735,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon return com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } } + /** * * @@ -4437,17 +4745,17 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon * * .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterConfig, com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder> - getClusterConfigFieldBuilder() { + internalGetClusterConfigFieldBuilder() { if (clusterConfigBuilder_ == null) { if (!(configCase_ == 7)) { config_ = com.google.bigtable.admin.v2.Cluster.ClusterConfig.getDefaultInstance(); } clusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.ClusterConfig, com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder, com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder>( @@ -4462,6 +4770,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon } private int defaultStorageType_ = 0; + /** * * @@ -4480,6 +4789,7 @@ public com.google.bigtable.admin.v2.Cluster.ClusterConfigOrBuilder getClusterCon public int getDefaultStorageTypeValue() { return defaultStorageType_; } + /** * * @@ -4497,10 +4807,11 @@ public int getDefaultStorageTypeValue() { */ public Builder setDefaultStorageTypeValue(int value) { defaultStorageType_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } + /** * * @@ -4521,6 +4832,7 @@ public com.google.bigtable.admin.v2.StorageType getDefaultStorageType() { com.google.bigtable.admin.v2.StorageType.forNumber(defaultStorageType_); return result == null ? com.google.bigtable.admin.v2.StorageType.UNRECOGNIZED : result; } + /** * * @@ -4540,11 +4852,12 @@ public Builder setDefaultStorageType(com.google.bigtable.admin.v2.StorageType va if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; defaultStorageType_ = value.getNumber(); onChanged(); return this; } + /** * * @@ -4560,18 +4873,19 @@ public Builder setDefaultStorageType(com.google.bigtable.admin.v2.StorageType va * @return This builder for chaining. */ public Builder clearDefaultStorageType() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); defaultStorageType_ = 0; onChanged(); return this; } private com.google.bigtable.admin.v2.Cluster.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.EncryptionConfig, com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder, com.google.bigtable.admin.v2.Cluster.EncryptionConfigOrBuilder> encryptionConfigBuilder_; + /** * * @@ -4586,8 +4900,9 @@ public Builder clearDefaultStorageType() { * @return Whether the encryptionConfig field is set. */ public boolean hasEncryptionConfig() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } + /** * * @@ -4610,6 +4925,7 @@ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig getEncryptionConfig return encryptionConfigBuilder_.getMessage(); } } + /** * * @@ -4631,10 +4947,11 @@ public Builder setEncryptionConfig( } else { encryptionConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -4653,10 +4970,11 @@ public Builder setEncryptionConfig( } else { encryptionConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -4671,7 +4989,7 @@ public Builder setEncryptionConfig( public Builder mergeEncryptionConfig( com.google.bigtable.admin.v2.Cluster.EncryptionConfig value) { if (encryptionConfigBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && encryptionConfig_ != null && encryptionConfig_ != com.google.bigtable.admin.v2.Cluster.EncryptionConfig.getDefaultInstance()) { @@ -4683,11 +5001,12 @@ public Builder mergeEncryptionConfig( encryptionConfigBuilder_.mergeFrom(value); } if (encryptionConfig_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; } + /** * * @@ -4700,7 +5019,7 @@ public Builder mergeEncryptionConfig( * */ public Builder clearEncryptionConfig() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); encryptionConfig_ = null; if (encryptionConfigBuilder_ != null) { encryptionConfigBuilder_.dispose(); @@ -4709,6 +5028,7 @@ public Builder clearEncryptionConfig() { onChanged(); return this; } + /** * * @@ -4722,10 +5042,11 @@ public Builder clearEncryptionConfig() { */ public com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder getEncryptionConfigBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); } + /** * * @@ -4747,6 +5068,7 @@ public Builder clearEncryptionConfig() { : encryptionConfig_; } } + /** * * @@ -4758,14 +5080,14 @@ public Builder clearEncryptionConfig() { * .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.EncryptionConfig, com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder, com.google.bigtable.admin.v2.Cluster.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { + internalGetEncryptionConfigFieldBuilder() { if (encryptionConfigBuilder_ == null) { encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster.EncryptionConfig, com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder, com.google.bigtable.admin.v2.Cluster.EncryptionConfigOrBuilder>( @@ -4775,17 +5097,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.bigtable.admin.v2.Cluster) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterName.java index 1b19c7d04f..52f98c06f4 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterOrBuilder.java index e5fe55a267..627d2af276 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ClusterOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Cluster) @@ -37,6 +39,7 @@ public interface ClusterOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -68,6 +71,7 @@ public interface ClusterOrBuilder * @return The location. */ java.lang.String getLocation(); + /** * * @@ -100,6 +104,7 @@ public interface ClusterOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -119,8 +124,9 @@ public interface ClusterOrBuilder * * *
      -   * The number of nodes allocated to this cluster. More nodes enable higher
      -   * throughput and more consistent performance.
      +   * The number of nodes in the cluster. If no value is set,
      +   * Cloud Bigtable automatically allocates nodes based on your data footprint
      +   * and optimized for 50% storage utilization.
          * 
      * * int32 serve_nodes = 4; @@ -129,6 +135,36 @@ public interface ClusterOrBuilder */ int getServeNodes(); + /** + * + * + *
      +   * Immutable. The node scaling factor of this cluster.
      +   * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for nodeScalingFactor. + */ + int getNodeScalingFactorValue(); + + /** + * + * + *
      +   * Immutable. The node scaling factor of this cluster.
      +   * 
      + * + * + * .google.bigtable.admin.v2.Cluster.NodeScalingFactor node_scaling_factor = 9 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nodeScalingFactor. + */ + com.google.bigtable.admin.v2.Cluster.NodeScalingFactor getNodeScalingFactor(); + /** * * @@ -141,6 +177,7 @@ public interface ClusterOrBuilder * @return Whether the clusterConfig field is set. */ boolean hasClusterConfig(); + /** * * @@ -153,6 +190,7 @@ public interface ClusterOrBuilder * @return The clusterConfig. */ com.google.bigtable.admin.v2.Cluster.ClusterConfig getClusterConfig(); + /** * * @@ -179,6 +217,7 @@ public interface ClusterOrBuilder * @return The enum numeric value on the wire for defaultStorageType. */ int getDefaultStorageTypeValue(); + /** * * @@ -209,6 +248,7 @@ public interface ClusterOrBuilder * @return Whether the encryptionConfig field is set. */ boolean hasEncryptionConfig(); + /** * * @@ -223,6 +263,7 @@ public interface ClusterOrBuilder * @return The encryptionConfig. */ com.google.bigtable.admin.v2.Cluster.EncryptionConfig getEncryptionConfig(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java index bf39ba320c..370ad98c49 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.ColumnFamily} */ -public final class ColumnFamily extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ColumnFamily extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ColumnFamily) ColumnFamilyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ColumnFamily"); + } + // Use ColumnFamily.newBuilder() to construct. - private ColumnFamily(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ColumnFamily(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ColumnFamily() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ColumnFamily(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ColumnFamily_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ColumnFamily_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int GC_RULE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.GcRule gcRule_; + /** * * @@ -84,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasGcRule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +113,7 @@ public boolean hasGcRule() { public com.google.bigtable.admin.v2.GcRule getGcRule() { return gcRule_ == null ? com.google.bigtable.admin.v2.GcRule.getDefaultInstance() : gcRule_; } + /** * * @@ -125,6 +135,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { public static final int VALUE_TYPE_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.Type valueType_; + /** * * @@ -138,7 +149,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -149,6 +160,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -162,7 +174,7 @@ public boolean hasValueType() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -173,6 +185,7 @@ public boolean hasValueType() { public com.google.bigtable.admin.v2.Type getValueType() { return valueType_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : valueType_; } + /** * * @@ -186,7 +199,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -316,38 +329,38 @@ public static com.google.bigtable.admin.v2.ColumnFamily parseFrom( public static com.google.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily 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); } @@ -370,10 +383,11 @@ 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 +397,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ColumnFamily} */ - 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.bigtable.admin.v2.ColumnFamily) com.google.bigtable.admin.v2.ColumnFamilyOrBuilder { @@ -393,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ColumnFamily_fieldAccessorTable @@ -407,15 +421,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) { - getGcRuleFieldBuilder(); - getValueTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetGcRuleFieldBuilder(); + internalGetValueTypeFieldBuilder(); } } @@ -481,39 +495,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ColumnFamily 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.bigtable.admin.v2.ColumnFamily) { @@ -560,13 +541,14 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getGcRuleFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetGcRuleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 26: { - input.readMessage(getValueTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetValueTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 26 @@ -590,11 +572,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.GcRule gcRule_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> gcRuleBuilder_; + /** * * @@ -614,6 +597,7 @@ public Builder mergeFrom( public boolean hasGcRule() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -637,6 +621,7 @@ public com.google.bigtable.admin.v2.GcRule getGcRule() { return gcRuleBuilder_.getMessage(); } } + /** * * @@ -664,6 +649,7 @@ public Builder setGcRule(com.google.bigtable.admin.v2.GcRule value) { onChanged(); return this; } + /** * * @@ -688,6 +674,7 @@ public Builder setGcRule(com.google.bigtable.admin.v2.GcRule.Builder builderForV onChanged(); return this; } + /** * * @@ -720,6 +707,7 @@ public Builder mergeGcRule(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -744,6 +732,7 @@ public Builder clearGcRule() { onChanged(); return this; } + /** * * @@ -761,8 +750,9 @@ public Builder clearGcRule() { public com.google.bigtable.admin.v2.GcRule.Builder getGcRuleBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getGcRuleFieldBuilder().getBuilder(); + return internalGetGcRuleFieldBuilder().getBuilder(); } + /** * * @@ -784,6 +774,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { return gcRule_ == null ? com.google.bigtable.admin.v2.GcRule.getDefaultInstance() : gcRule_; } } + /** * * @@ -798,14 +789,14 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { * * .google.bigtable.admin.v2.GcRule gc_rule = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> - getGcRuleFieldBuilder() { + internalGetGcRuleFieldBuilder() { if (gcRuleBuilder_ == null) { gcRuleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder>( @@ -816,11 +807,12 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { } private com.google.bigtable.admin.v2.Type valueType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> valueTypeBuilder_; + /** * * @@ -834,7 +826,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -844,6 +836,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getGcRuleOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -857,7 +850,7 @@ public boolean hasValueType() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -873,6 +866,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { return valueTypeBuilder_.getMessage(); } } + /** * * @@ -886,7 +880,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -904,6 +898,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -917,7 +912,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type value) { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -932,6 +927,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type.Builder builderFor onChanged(); return this; } + /** * * @@ -945,7 +941,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type.Builder builderFor * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -968,6 +964,7 @@ public Builder mergeValueType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -981,7 +978,7 @@ public Builder mergeValueType(com.google.bigtable.admin.v2.Type value) { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -996,6 +993,7 @@ public Builder clearValueType() { onChanged(); return this; } + /** * * @@ -1009,7 +1007,7 @@ public Builder clearValueType() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -1017,8 +1015,9 @@ public Builder clearValueType() { public com.google.bigtable.admin.v2.Type.Builder getValueTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getValueTypeFieldBuilder().getBuilder(); + return internalGetValueTypeFieldBuilder().getBuilder(); } + /** * * @@ -1032,7 +1031,7 @@ public com.google.bigtable.admin.v2.Type.Builder getValueTypeBuilder() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -1046,6 +1045,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { : valueType_; } } + /** * * @@ -1059,19 +1059,19 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getValueTypeFieldBuilder() { + internalGetValueTypeFieldBuilder() { if (valueTypeBuilder_ == null) { valueTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -1081,17 +1081,6 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { return valueTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ColumnFamily) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamilyOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamilyOrBuilder.java index 25a84a0e10..27e90d41e5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamilyOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamilyOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ColumnFamilyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ColumnFamily) @@ -41,6 +43,7 @@ public interface ColumnFamilyOrBuilder * @return Whether the gcRule field is set. */ boolean hasGcRule(); + /** * * @@ -58,6 +61,7 @@ public interface ColumnFamilyOrBuilder * @return The gcRule. */ com.google.bigtable.admin.v2.GcRule getGcRule(); + /** * * @@ -87,7 +91,7 @@ public interface ColumnFamilyOrBuilder * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -95,6 +99,7 @@ public interface ColumnFamilyOrBuilder * @return Whether the valueType field is set. */ boolean hasValueType(); + /** * * @@ -108,7 +113,7 @@ public interface ColumnFamilyOrBuilder * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; @@ -116,6 +121,7 @@ public interface ColumnFamilyOrBuilder * @return The valueType. */ com.google.bigtable.admin.v2.Type getValueType(); + /** * * @@ -129,7 +135,7 @@ public interface ColumnFamilyOrBuilder * * * If `value_type` is `Aggregate`, written data must be compatible with: - * * `value_type.input_type` for `AddInput` mutations + * * `value_type.input_type` for `AddInput` mutations * * * .google.bigtable.admin.v2.Type value_type = 3; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java index 2116b9f891..72e6d4f67e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CommonProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -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,7 +42,7 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_OperationProgress_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_OperationProgress_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -41,15 +53,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n%google/bigtable/admin/v2/common.proto\022" - + "\030google.bigtable.admin.v2\032\037google/protob" - + "uf/timestamp.proto\"\213\001\n\021OperationProgress" - + "\022\030\n\020progress_percent\030\001 \001(\005\022.\n\nstart_time" - + "\030\002 \001(\0132\032.google.protobuf.Timestamp\022,\n\010en" - + "d_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + "*=\n\013StorageType\022\034\n\030STORAGE_TYPE_UNSPECIF" - + "IED\020\000\022\007\n\003SSD\020\001\022\007\n\003HDD\020\002B\316\001\n\034com.google.b" - + "igtable.admin.v2B\013CommonProtoP\001Z8cloud.g" + "\n" + + "%google/bigtable/admin/v2/common.proto\022" + + "\030google.bigtable.admin.v2\032\037google/protobuf/timestamp.proto\"\213\001\n" + + "\021OperationProgress\022\030\n" + + "\020progress_percent\030\001 \001(\005\022.\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022,\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.Timestamp*=\n" + + "\013StorageType\022\034\n" + + "\030STORAGE_TYPE_UNSPECIFIED\020\000\022\007\n" + + "\003SSD\020\001\022\007\n" + + "\003HDD\020\002B\316\001\n" + + "\034com.google.bigtable.admin.v2B\013CommonProtoP\001Z8cloud.g" + "oogle.com/go/bigtable/admin/apiv2/adminp" + "b;adminpb\252\002\036Google.Cloud.Bigtable.Admin." + "V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Go" @@ -62,13 +77,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_bigtable_admin_v2_OperationProgress_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_admin_v2_OperationProgress_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_OperationProgress_descriptor, new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); + descriptor.resolveAllFeaturesImmutable(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadata.java index c4add1e3bf..9f79121053 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -43,19 +56,13 @@ private CopyBackupMetadata() { name_ = ""; } - @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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupMetadata_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -122,6 +131,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int SOURCE_BACKUP_INFO_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.BackupInfo sourceBackupInfo_; + /** * * @@ -137,6 +147,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSourceBackupInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -154,6 +165,7 @@ public com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo() { ? com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance() : sourceBackupInfo_; } + /** * * @@ -172,6 +184,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui public static final int PROGRESS_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.OperationProgress progress_; + /** * * @@ -189,6 +202,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui public boolean hasProgress() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -208,6 +222,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -240,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(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, getSourceBackupInfo()); @@ -258,8 +273,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, getSourceBackupInfo()); @@ -355,38 +370,38 @@ public static com.google.bigtable.admin.v2.CopyBackupMetadata parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -409,10 +424,11 @@ 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; } + /** * * @@ -423,7 +439,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CopyBackupMetadata) com.google.bigtable.admin.v2.CopyBackupMetadataOrBuilder { @@ -433,7 +449,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupMetadata_fieldAccessorTable @@ -447,15 +463,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) { - getSourceBackupInfoFieldBuilder(); - getProgressFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSourceBackupInfoFieldBuilder(); + internalGetProgressFieldBuilder(); } } @@ -526,39 +542,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CopyBackupMetadata 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.bigtable.admin.v2.CopyBackupMetadata) { @@ -618,13 +601,14 @@ public Builder mergeFrom( case 18: { input.readMessage( - getSourceBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + internalGetSourceBackupInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -648,6 +632,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -672,6 +657,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -696,6 +682,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -719,6 +706,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -738,6 +726,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -764,11 +753,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.BackupInfo sourceBackupInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> sourceBackupInfoBuilder_; + /** * * @@ -783,6 +773,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSourceBackupInfo() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -803,6 +794,7 @@ public com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo() { return sourceBackupInfoBuilder_.getMessage(); } } + /** * * @@ -825,6 +817,7 @@ public Builder setSourceBackupInfo(com.google.bigtable.admin.v2.BackupInfo value onChanged(); return this; } + /** * * @@ -845,6 +838,7 @@ public Builder setSourceBackupInfo( onChanged(); return this; } + /** * * @@ -872,6 +866,7 @@ public Builder mergeSourceBackupInfo(com.google.bigtable.admin.v2.BackupInfo val } return this; } + /** * * @@ -891,6 +886,7 @@ public Builder clearSourceBackupInfo() { onChanged(); return this; } + /** * * @@ -903,8 +899,9 @@ public Builder clearSourceBackupInfo() { public com.google.bigtable.admin.v2.BackupInfo.Builder getSourceBackupInfoBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSourceBackupInfoFieldBuilder().getBuilder(); + return internalGetSourceBackupInfoFieldBuilder().getBuilder(); } + /** * * @@ -923,6 +920,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui : sourceBackupInfo_; } } + /** * * @@ -932,14 +930,14 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui * * .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> - getSourceBackupInfoFieldBuilder() { + internalGetSourceBackupInfoFieldBuilder() { if (sourceBackupInfoBuilder_ == null) { sourceBackupInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder>( @@ -950,11 +948,12 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui } private com.google.bigtable.admin.v2.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -971,6 +970,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getSourceBackupInfoOrBui public boolean hasProgress() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -993,6 +993,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -1017,6 +1018,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -1039,6 +1041,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -1068,6 +1071,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -1089,6 +1093,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -1103,8 +1108,9 @@ public Builder clearProgress() { public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } + /** * * @@ -1125,6 +1131,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * @@ -1136,14 +1143,14 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil * * .google.bigtable.admin.v2.OperationProgress progress = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder>( @@ -1153,17 +1160,6 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil 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.bigtable.admin.v2.CopyBackupMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadataOrBuilder.java index f95b76d3f0..c0b21ff131 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CopyBackupMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CopyBackupMetadata) @@ -38,6 +40,7 @@ public interface CopyBackupMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +68,7 @@ public interface CopyBackupMetadataOrBuilder * @return Whether the sourceBackupInfo field is set. */ boolean hasSourceBackupInfo(); + /** * * @@ -77,6 +81,7 @@ public interface CopyBackupMetadataOrBuilder * @return The sourceBackupInfo. */ com.google.bigtable.admin.v2.BackupInfo getSourceBackupInfo(); + /** * * @@ -102,6 +107,7 @@ public interface CopyBackupMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -116,6 +122,7 @@ public interface CopyBackupMetadataOrBuilder * @return The progress. */ com.google.bigtable.admin.v2.OperationProgress getProgress(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequest.java index 37e5b666d0..318635e846 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -45,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupRequest_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -98,6 +106,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -130,6 +139,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backupId_ = ""; + /** * * @@ -158,6 +168,7 @@ public java.lang.String getBackupId() { return s; } } + /** * * @@ -191,6 +202,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceBackup_ = ""; + /** * * @@ -222,6 +234,7 @@ public java.lang.String getSourceBackup() { return s; } } + /** * * @@ -256,6 +269,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public static final int EXPIRE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp expireTime_; + /** * * @@ -276,6 +290,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { public boolean hasExpireTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -296,6 +311,7 @@ public boolean hasExpireTime() { public com.google.protobuf.Timestamp getExpireTime() { return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; } + /** * * @@ -329,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(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()); @@ -350,14 +366,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()); @@ -448,38 +464,38 @@ public static com.google.bigtable.admin.v2.CopyBackupRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -502,10 +518,11 @@ 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; } + /** * * @@ -516,7 +533,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CopyBackupRequest) com.google.bigtable.admin.v2.CopyBackupRequestOrBuilder { @@ -526,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CopyBackupRequest_fieldAccessorTable @@ -540,14 +557,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(); } } @@ -616,39 +633,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CopyBackupRequest 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.bigtable.admin.v2.CopyBackupRequest) { @@ -725,7 +709,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -749,6 +734,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -775,6 +761,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -801,6 +788,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -826,6 +814,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -847,6 +836,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -875,6 +865,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backupId_ = ""; + /** * * @@ -902,6 +893,7 @@ public java.lang.String getBackupId() { return (java.lang.String) ref; } } + /** * * @@ -929,6 +921,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -955,6 +948,7 @@ public Builder setBackupId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -977,6 +971,7 @@ public Builder clearBackupId() { onChanged(); return this; } + /** * * @@ -1006,6 +1001,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceBackup_ = ""; + /** * * @@ -1036,6 +1032,7 @@ public java.lang.String getSourceBackup() { return (java.lang.String) ref; } } + /** * * @@ -1066,6 +1063,7 @@ public com.google.protobuf.ByteString getSourceBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1095,6 +1093,7 @@ public Builder setSourceBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1120,6 +1119,7 @@ public Builder clearSourceBackup() { onChanged(); return this; } + /** * * @@ -1152,11 +1152,12 @@ 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> expireTimeBuilder_; + /** * * @@ -1176,6 +1177,7 @@ public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { public boolean hasExpireTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1201,6 +1203,7 @@ public com.google.protobuf.Timestamp getExpireTime() { return expireTimeBuilder_.getMessage(); } } + /** * * @@ -1228,6 +1231,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1252,6 +1256,7 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1284,6 +1289,7 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1308,6 +1314,7 @@ public Builder clearExpireTime() { onChanged(); return this; } + /** * * @@ -1325,8 +1332,9 @@ public Builder clearExpireTime() { public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getExpireTimeFieldBuilder().getBuilder(); + return internalGetExpireTimeFieldBuilder().getBuilder(); } + /** * * @@ -1350,6 +1358,7 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { : expireTime_; } } + /** * * @@ -1364,14 +1373,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>( @@ -1381,17 +1390,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.bigtable.admin.v2.CopyBackupRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequestOrBuilder.java index 34c46b495c..489d954fae 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CopyBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CopyBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CopyBackupRequest) @@ -40,6 +42,7 @@ public interface CopyBackupRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -74,6 +77,7 @@ public interface CopyBackupRequestOrBuilder * @return The backupId. */ java.lang.String getBackupId(); + /** * * @@ -112,6 +116,7 @@ public interface CopyBackupRequestOrBuilder * @return The sourceBackup. */ java.lang.String getSourceBackup(); + /** * * @@ -150,6 +155,7 @@ public interface CopyBackupRequestOrBuilder * @return Whether the expireTime field is set. */ boolean hasExpireTime(); + /** * * @@ -167,6 +173,7 @@ public interface CopyBackupRequestOrBuilder * @return The expireTime. */ com.google.protobuf.Timestamp getExpireTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java index 274ee3ad44..afd6f44364 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateAppProfileRequest} */ -public final class CreateAppProfileRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateAppProfileRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAppProfileRequest) CreateAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateAppProfileRequest"); + } + // Use CreateAppProfileRequest.newBuilder() to construct. - private CreateAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateAppProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private CreateAppProfileRequest() { appProfileId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAppProfileRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -151,6 +161,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -179,6 +190,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int APP_PROFILE_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.AppProfile appProfile_; + /** * * @@ -197,6 +209,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -217,6 +230,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { ? com.google.bigtable.admin.v2.AppProfile.getDefaultInstance() : appProfile_; } + /** * * @@ -238,6 +252,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public static final int IGNORE_WARNINGS_FIELD_NUMBER = 4; private boolean ignoreWarnings_ = false; + /** * * @@ -268,11 +283,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(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getAppProfile()); @@ -289,11 +304,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(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAppProfile()); @@ -387,38 +402,38 @@ public static com.google.bigtable.admin.v2.CreateAppProfileRequest parseFrom( public static com.google.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest 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); } @@ -441,10 +456,11 @@ 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; } + /** * * @@ -454,7 +470,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateAppProfileRequest} */ - 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.bigtable.admin.v2.CreateAppProfileRequest) com.google.bigtable.admin.v2.CreateAppProfileRequestOrBuilder { @@ -464,7 +480,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_fieldAccessorTable @@ -478,14 +494,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) { - getAppProfileFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAppProfileFieldBuilder(); } } @@ -554,39 +570,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateAppProfileRequest 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.bigtable.admin.v2.CreateAppProfileRequest) { @@ -656,7 +639,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getAppProfileFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAppProfileFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -686,6 +670,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -711,6 +696,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -736,6 +722,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -760,6 +747,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -780,6 +768,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -807,6 +796,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -831,6 +821,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -855,6 +846,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -878,6 +870,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -897,6 +890,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -923,11 +917,12 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.AppProfile appProfile_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> appProfileBuilder_; + /** * * @@ -945,6 +940,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public boolean hasAppProfile() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -968,6 +964,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { return appProfileBuilder_.getMessage(); } } + /** * * @@ -993,6 +990,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile value) { onChanged(); return this; } + /** * * @@ -1015,6 +1013,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder bui onChanged(); return this; } + /** * * @@ -1045,6 +1044,7 @@ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -1067,6 +1067,7 @@ public Builder clearAppProfile() { onChanged(); return this; } + /** * * @@ -1082,8 +1083,9 @@ public Builder clearAppProfile() { public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfileBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getAppProfileFieldBuilder().getBuilder(); + return internalGetAppProfileFieldBuilder().getBuilder(); } + /** * * @@ -1105,6 +1107,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() : appProfile_; } } + /** * * @@ -1117,14 +1120,14 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() * .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> - getAppProfileFieldBuilder() { + internalGetAppProfileFieldBuilder() { if (appProfileBuilder_ == null) { appProfileBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder>( @@ -1135,6 +1138,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() } private boolean ignoreWarnings_; + /** * * @@ -1150,6 +1154,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1169,6 +1174,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * @@ -1187,17 +1193,6 @@ public Builder clearIgnoreWarnings() { 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.bigtable.admin.v2.CreateAppProfileRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequestOrBuilder.java index 00064cd809..575ca88380 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateAppProfileRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateAppProfileRequest) @@ -39,6 +41,7 @@ public interface CreateAppProfileRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface CreateAppProfileRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -99,6 +103,7 @@ public interface CreateAppProfileRequestOrBuilder * @return Whether the appProfile field is set. */ boolean hasAppProfile(); + /** * * @@ -114,6 +119,7 @@ public interface CreateAppProfileRequestOrBuilder * @return The appProfile. */ com.google.bigtable.admin.v2.AppProfile getAppProfile(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadata.java index 08c4911c28..baca5f4496 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateAuthorizedViewMetadata} */ -public final class CreateAuthorizedViewMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateAuthorizedViewMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAuthorizedViewMetadata) CreateAuthorizedViewMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateAuthorizedViewMetadata"); + } + // Use CreateAuthorizedViewMetadata.newBuilder() to construct. - private CreateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CreateAuthorizedViewMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAuthorizedViewMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewMetadata_fieldAccessorTable @@ -64,11 +71,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.CreateAuthorizedViewRequest originalRequest_; + /** * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -79,11 +88,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -96,11 +107,13 @@ public com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalReque ? com.google.bigtable.admin.v2.CreateAuthorizedViewRequest.getDefaultInstance() : originalRequest_; } + /** * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -115,6 +128,7 @@ public com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalReque public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -130,6 +144,7 @@ public com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalReque public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -145,6 +160,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -161,6 +177,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -176,6 +193,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -191,6 +209,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -339,38 +358,38 @@ public static com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata parseFro public static com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata 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.bigtable.admin.v2.CreateAuthorizedViewMetadata 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.bigtable.admin.v2.CreateAuthorizedViewMetadata 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.bigtable.admin.v2.CreateAuthorizedViewMetadata 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.bigtable.admin.v2.CreateAuthorizedViewMetadata 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.bigtable.admin.v2.CreateAuthorizedViewMetadata 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); } @@ -394,10 +413,11 @@ 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; } + /** * * @@ -407,7 +427,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateAuthorizedViewMetadata} */ - 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.bigtable.admin.v2.CreateAuthorizedViewMetadata) com.google.bigtable.admin.v2.CreateAuthorizedViewMetadataOrBuilder { @@ -417,7 +437,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewMetadata_fieldAccessorTable @@ -431,16 +451,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -517,39 +537,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateAuthorizedViewMeta 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.bigtable.admin.v2.CreateAuthorizedViewMetadata) { @@ -600,19 +587,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -636,16 +626,18 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.CreateAuthorizedViewRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateAuthorizedViewRequest, com.google.bigtable.admin.v2.CreateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.CreateAuthorizedViewRequestOrBuilder> originalRequestBuilder_; + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -655,11 +647,13 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -675,11 +669,13 @@ public com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalReque return originalRequestBuilder_.getMessage(); } } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -698,11 +694,13 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -718,11 +716,13 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -747,11 +747,13 @@ public Builder mergeOriginalRequest( } return this; } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -766,11 +768,13 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -779,13 +783,15 @@ public Builder clearOriginalRequest() { getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -800,23 +806,25 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * *
      -     * The request that prompted the initiation of this CreateInstance operation.
      +     * The request that prompted the initiation of this CreateAuthorizedView
      +     * operation.
            * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateAuthorizedViewRequest, com.google.bigtable.admin.v2.CreateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.CreateAuthorizedViewRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateAuthorizedViewRequest, com.google.bigtable.admin.v2.CreateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.CreateAuthorizedViewRequestOrBuilder>( @@ -827,11 +835,12 @@ public Builder clearOriginalRequest() { } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -846,6 +855,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -866,6 +876,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -888,6 +899,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -907,6 +919,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -934,6 +947,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -953,6 +967,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -965,8 +980,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -985,6 +1001,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -994,14 +1011,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1012,11 +1029,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1031,6 +1049,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1051,6 +1070,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1073,6 +1093,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1092,6 +1113,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1119,6 +1141,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1138,6 +1161,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1150,8 +1174,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1170,6 +1195,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1179,14 +1205,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1196,17 +1222,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateAuthorizedViewMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadataOrBuilder.java index bd5638b9c8..5d8425dac5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateAuthorizedViewMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateAuthorizedViewMetadata) @@ -28,7 +30,8 @@ public interface CreateAuthorizedViewMetadataOrBuilder * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -36,11 +39,13 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -48,11 +53,13 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest getOriginalRequest(); + /** * * *
      -   * The request that prompted the initiation of this CreateInstance operation.
      +   * The request that prompted the initiation of this CreateAuthorizedView
      +   * operation.
          * 
      * * .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; @@ -71,6 +78,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +91,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +115,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +128,7 @@ public interface CreateAuthorizedViewMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequest.java index 10a0db36ca..28b9f673a2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateAuthorizedViewRequest} */ -public final class CreateAuthorizedViewRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateAuthorizedViewRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateAuthorizedViewRequest) CreateAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateAuthorizedViewRequest"); + } + // Use CreateAuthorizedViewRequest.newBuilder() to construct. - private CreateAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateAuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private CreateAuthorizedViewRequest() { authorizedViewId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAuthorizedViewRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewRequest_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +138,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewId_ = ""; + /** * * @@ -155,6 +165,7 @@ public java.lang.String getAuthorizedViewId() { return s; } } + /** * * @@ -184,6 +195,7 @@ public com.google.protobuf.ByteString getAuthorizedViewIdBytes() { public static final int AUTHORIZED_VIEW_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.AuthorizedView authorizedView_; + /** * * @@ -201,6 +213,7 @@ public com.google.protobuf.ByteString getAuthorizedViewIdBytes() { public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -220,6 +233,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { ? com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance() : authorizedView_; } + /** * * @@ -252,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(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(authorizedViewId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authorizedViewId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, authorizedViewId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getAuthorizedView()); @@ -270,11 +284,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(authorizedViewId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authorizedViewId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, authorizedViewId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAuthorizedView()); @@ -362,38 +376,38 @@ public static com.google.bigtable.admin.v2.CreateAuthorizedViewRequest parseFrom public static com.google.bigtable.admin.v2.CreateAuthorizedViewRequest 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.bigtable.admin.v2.CreateAuthorizedViewRequest 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.bigtable.admin.v2.CreateAuthorizedViewRequest 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.bigtable.admin.v2.CreateAuthorizedViewRequest 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.bigtable.admin.v2.CreateAuthorizedViewRequest 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.bigtable.admin.v2.CreateAuthorizedViewRequest 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); } @@ -417,10 +431,11 @@ 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; } + /** * * @@ -431,7 +446,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateAuthorizedViewRequest} */ - 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.bigtable.admin.v2.CreateAuthorizedViewRequest) com.google.bigtable.admin.v2.CreateAuthorizedViewRequestOrBuilder { @@ -441,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateAuthorizedViewRequest_fieldAccessorTable @@ -455,14 +470,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) { - getAuthorizedViewFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAuthorizedViewFieldBuilder(); } } @@ -528,39 +543,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateAuthorizedViewRequ 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.bigtable.admin.v2.CreateAuthorizedViewRequest) { @@ -627,7 +609,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getAuthorizedViewFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAuthorizedViewFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -651,6 +634,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -677,6 +661,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -703,6 +688,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -728,6 +714,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -749,6 +736,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -777,6 +765,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewId_ = ""; + /** * * @@ -802,6 +791,7 @@ public java.lang.String getAuthorizedViewId() { return (java.lang.String) ref; } } + /** * * @@ -827,6 +817,7 @@ public com.google.protobuf.ByteString getAuthorizedViewIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -851,6 +842,7 @@ public Builder setAuthorizedViewId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -871,6 +863,7 @@ public Builder clearAuthorizedViewId() { onChanged(); return this; } + /** * * @@ -898,11 +891,12 @@ public Builder setAuthorizedViewIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.AuthorizedView authorizedView_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> authorizedViewBuilder_; + /** * * @@ -919,6 +913,7 @@ public Builder setAuthorizedViewIdBytes(com.google.protobuf.ByteString value) { public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -941,6 +936,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { return authorizedViewBuilder_.getMessage(); } } + /** * * @@ -965,6 +961,7 @@ public Builder setAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView val onChanged(); return this; } + /** * * @@ -987,6 +984,7 @@ public Builder setAuthorizedView( onChanged(); return this; } + /** * * @@ -1017,6 +1015,7 @@ public Builder mergeAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView v } return this; } + /** * * @@ -1038,6 +1037,7 @@ public Builder clearAuthorizedView() { onChanged(); return this; } + /** * * @@ -1052,8 +1052,9 @@ public Builder clearAuthorizedView() { public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getAuthorizedViewFieldBuilder().getBuilder(); + return internalGetAuthorizedViewFieldBuilder().getBuilder(); } + /** * * @@ -1074,6 +1075,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB : authorizedView_; } } + /** * * @@ -1085,14 +1087,14 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB * .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> - getAuthorizedViewFieldBuilder() { + internalGetAuthorizedViewFieldBuilder() { if (authorizedViewBuilder_ == null) { authorizedViewBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder>( @@ -1102,17 +1104,6 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB return authorizedViewBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateAuthorizedViewRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequestOrBuilder.java index 8fa57ebc94..873ef940b3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateAuthorizedViewRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateAuthorizedViewRequest) @@ -40,6 +42,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -72,6 +75,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return The authorizedViewId. */ java.lang.String getAuthorizedViewId(); + /** * * @@ -102,6 +106,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return Whether the authorizedView field is set. */ boolean hasAuthorizedView(); + /** * * @@ -116,6 +121,7 @@ public interface CreateAuthorizedViewRequestOrBuilder * @return The authorizedView. */ com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java index 983d1753f5..bae564abc0 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -44,19 +57,13 @@ private CreateBackupMetadata() { sourceTable_ = ""; } - @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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupMetadata_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -121,6 +130,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceTable_ = ""; + /** * * @@ -144,6 +154,7 @@ public java.lang.String getSourceTable() { return s; } } + /** * * @@ -170,6 +181,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { public static final int START_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -185,6 +197,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -200,6 +213,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -216,6 +230,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -231,6 +246,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -246,6 +262,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -274,11 +291,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(sourceTable_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceTable_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getStartTime()); @@ -295,11 +312,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(sourceTable_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceTable_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceTable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceTable_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); @@ -398,38 +415,38 @@ public static com.google.bigtable.admin.v2.CreateBackupMetadata parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -452,10 +469,11 @@ 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; } + /** * * @@ -466,7 +484,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CreateBackupMetadata) com.google.bigtable.admin.v2.CreateBackupMetadataOrBuilder { @@ -476,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupMetadata_fieldAccessorTable @@ -490,15 +508,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(); } } @@ -572,39 +590,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateBackupMetadata 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.bigtable.admin.v2.CreateBackupMetadata) { @@ -674,13 +659,14 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -704,6 +690,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -726,6 +713,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -748,6 +736,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -769,6 +758,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -786,6 +776,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -810,6 +801,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceTable_ = ""; + /** * * @@ -832,6 +824,7 @@ public java.lang.String getSourceTable() { return (java.lang.String) ref; } } + /** * * @@ -854,6 +847,7 @@ public com.google.protobuf.ByteString getSourceTableBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -875,6 +869,7 @@ public Builder setSourceTable(java.lang.String value) { onChanged(); return this; } + /** * * @@ -892,6 +887,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -916,11 +912,12 @@ public Builder setSourceTableBytes(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> startTimeBuilder_; + /** * * @@ -935,6 +932,7 @@ public Builder setSourceTableBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -953,6 +951,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -975,6 +974,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -994,6 +994,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1021,6 +1022,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1040,6 +1042,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1052,8 +1055,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1070,6 +1074,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1079,14 +1084,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_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> - 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>( @@ -1097,11 +1102,12 @@ 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> endTimeBuilder_; + /** * * @@ -1116,6 +1122,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1134,6 +1141,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1156,6 +1164,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1175,6 +1184,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1202,6 +1212,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1221,6 +1232,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1233,8 +1245,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1251,6 +1264,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1260,14 +1274,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>( @@ -1277,17 +1291,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.bigtable.admin.v2.CreateBackupMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadataOrBuilder.java index 957e74f37d..f18184b8e1 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateBackupMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateBackupMetadata) @@ -36,6 +38,7 @@ public interface CreateBackupMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface CreateBackupMetadataOrBuilder * @return The sourceTable. */ java.lang.String getSourceTable(); + /** * * @@ -86,6 +90,7 @@ public interface CreateBackupMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -98,6 +103,7 @@ public interface CreateBackupMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -121,6 +127,7 @@ public interface CreateBackupMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -133,6 +140,7 @@ public interface CreateBackupMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java index e7bb2df01f..d051bfb93c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -44,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupRequest_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +138,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object backupId_ = ""; + /** * * @@ -157,6 +167,7 @@ public java.lang.String getBackupId() { return s; } } + /** * * @@ -188,6 +199,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { public static final int BACKUP_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.Backup backup_; + /** * * @@ -204,6 +216,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -220,6 +233,7 @@ public boolean hasBackup() { public com.google.bigtable.admin.v2.Backup getBackup() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } + /** * * @@ -249,11 +263,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()); @@ -267,11 +281,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()); @@ -359,38 +373,38 @@ public static com.google.bigtable.admin.v2.CreateBackupRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -413,10 +427,11 @@ 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 +442,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CreateBackupRequest) com.google.bigtable.admin.v2.CreateBackupRequestOrBuilder { @@ -437,7 +452,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupRequest_fieldAccessorTable @@ -451,14 +466,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) { - getBackupFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupFieldBuilder(); } } @@ -523,39 +538,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateBackupRequest 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.bigtable.admin.v2.CreateBackupRequest) { @@ -622,7 +604,7 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetBackupFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -646,6 +628,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -672,6 +655,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -698,6 +682,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -723,6 +708,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -744,6 +730,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -772,6 +759,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object backupId_ = ""; + /** * * @@ -799,6 +787,7 @@ public java.lang.String getBackupId() { return (java.lang.String) ref; } } + /** * * @@ -826,6 +815,7 @@ public com.google.protobuf.ByteString getBackupIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -852,6 +842,7 @@ public Builder setBackupId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -874,6 +865,7 @@ public Builder clearBackupId() { onChanged(); return this; } + /** * * @@ -903,11 +895,12 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> backupBuilder_; + /** * * @@ -923,6 +916,7 @@ public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { public boolean hasBackup() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -942,6 +936,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { return backupBuilder_.getMessage(); } } + /** * * @@ -965,6 +960,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup value) { onChanged(); return this; } + /** * * @@ -985,6 +981,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup.Builder builderForV onChanged(); return this; } + /** * * @@ -1013,6 +1010,7 @@ public Builder mergeBackup(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -1033,6 +1031,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -1046,8 +1045,9 @@ public Builder clearBackup() { public com.google.bigtable.admin.v2.Backup.Builder getBackupBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getBackupFieldBuilder().getBuilder(); + return internalGetBackupFieldBuilder().getBuilder(); } + /** * * @@ -1065,6 +1065,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } } + /** * * @@ -1075,14 +1076,14 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { * .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> - getBackupFieldBuilder() { + internalGetBackupFieldBuilder() { if (backupBuilder_ == null) { backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder>( @@ -1092,17 +1093,6 @@ public com.google.bigtable.admin.v2.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.bigtable.admin.v2.CreateBackupRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequestOrBuilder.java index dd609565a7..14c62ca752 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateBackupRequest) @@ -40,6 +42,7 @@ public interface CreateBackupRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -74,6 +77,7 @@ public interface CreateBackupRequestOrBuilder * @return The backupId. */ java.lang.String getBackupId(); + /** * * @@ -105,6 +109,7 @@ public interface CreateBackupRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -118,6 +123,7 @@ public interface CreateBackupRequestOrBuilder * @return The backup. */ com.google.bigtable.admin.v2.Backup getBackup(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java index 13a83f4358..3d5740ef22 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,24 +29,30 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterMetadata} */ -public final class CreateClusterMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateClusterMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterMetadata) CreateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateClusterMetadata"); + } + // Use CreateClusterMetadata.newBuilder() to construct. - private CreateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateClusterMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CreateClusterMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateClusterMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor; @@ -64,7 +71,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_fieldAccessorTable @@ -112,6 +119,7 @@ public interface TableProgressOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -119,6 +127,7 @@ public interface TableProgressOrBuilder */ com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State getState(); } + /** * * @@ -128,13 +137,24 @@ public interface TableProgressOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} */ - public static final class TableProgress extends com.google.protobuf.GeneratedMessageV3 + public static final class TableProgress extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) TableProgressOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TableProgress"); + } + // Use TableProgress.newBuilder() to construct. - private TableProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TableProgress(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -142,19 +162,13 @@ private TableProgress() { state_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TableProgress(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_fieldAccessorTable @@ -212,8 +226,19 @@ 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"); + } + /** STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; + /** * * @@ -224,6 +249,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * PENDING = 1; */ public static final int PENDING_VALUE = 1; + /** * * @@ -234,6 +260,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * COPYING = 2; */ public static final int COPYING_VALUE = 2; + /** * * @@ -244,6 +271,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * COMPLETED = 3; */ public static final int COMPLETED_VALUE = 3; + /** * * @@ -319,7 +347,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.bigtable.admin.v2.CreateClusterMetadata.TableProgress.getDescriptor() .getEnumTypes() .get(0); @@ -348,6 +376,7 @@ private State(int value) { public static final int ESTIMATED_SIZE_BYTES_FIELD_NUMBER = 2; private long estimatedSizeBytes_ = 0L; + /** * * @@ -366,6 +395,7 @@ public long getEstimatedSizeBytes() { public static final int ESTIMATED_COPIED_BYTES_FIELD_NUMBER = 3; private long estimatedCopiedBytes_ = 0L; + /** * * @@ -386,6 +416,7 @@ public long getEstimatedCopiedBytes() { public static final int STATE_FIELD_NUMBER = 4; private int state_ = 0; + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -395,6 +426,7 @@ public long getEstimatedCopiedBytes() { public int getStateValue() { return state_; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -534,39 +566,39 @@ public static com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress p public static com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress 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,11 +622,11 @@ 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,8 +636,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterMetadata.TableProgress} */ - 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress) com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgressOrBuilder { @@ -615,7 +646,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_fieldAccessorTable @@ -628,7 +659,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -689,41 +720,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.bigtable.admin.v2.CreateClusterMetadata.TableProgress) { @@ -813,6 +809,7 @@ public Builder mergeFrom( private int bitField0_; private long estimatedSizeBytes_; + /** * * @@ -828,6 +825,7 @@ public Builder mergeFrom( public long getEstimatedSizeBytes() { return estimatedSizeBytes_; } + /** * * @@ -847,6 +845,7 @@ public Builder setEstimatedSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -866,6 +865,7 @@ public Builder clearEstimatedSizeBytes() { } private long estimatedCopiedBytes_; + /** * * @@ -883,6 +883,7 @@ public Builder clearEstimatedSizeBytes() { public long getEstimatedCopiedBytes() { return estimatedCopiedBytes_; } + /** * * @@ -904,6 +905,7 @@ public Builder setEstimatedCopiedBytes(long value) { onChanged(); return this; } + /** * * @@ -925,6 +927,7 @@ public Builder clearEstimatedCopiedBytes() { } private int state_ = 0; + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -934,6 +937,7 @@ public Builder clearEstimatedCopiedBytes() { public int getStateValue() { return state_; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -946,6 +950,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -960,6 +965,7 @@ public com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State ge ? com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State.UNRECOGNIZED : result; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -976,6 +982,7 @@ public Builder setState( onChanged(); return this; } + /** * .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; * @@ -988,18 +995,6 @@ public Builder clearState() { 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.bigtable.admin.v2.CreateClusterMetadata.TableProgress) } @@ -1058,6 +1053,7 @@ public com.google.protobuf.Parser getParserForType() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.CreateClusterRequest originalRequest_; + /** * * @@ -1073,6 +1069,7 @@ public com.google.protobuf.Parser getParserForType() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1090,6 +1087,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.CreateClusterRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -1108,6 +1106,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder getOriginalReq public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -1123,6 +1122,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1138,6 +1138,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -1154,6 +1155,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -1169,6 +1171,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1184,6 +1187,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -1234,6 +1238,7 @@ private static final class TablesDefaultEntryHolder { public int getTablesCount() { return internalGetTables().getMap().size(); } + /** * * @@ -1259,6 +1264,7 @@ public boolean containsTables(java.lang.String key) { } return internalGetTables().getMap().containsKey(key); } + /** Use {@link #getTablesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -1267,6 +1273,7 @@ public boolean containsTables(java.lang.String key) { getTables() { return getTablesMap(); } + /** * * @@ -1291,6 +1298,7 @@ public boolean containsTables(java.lang.String key) { getTablesMap() { return internalGetTables().getMap(); } + /** * * @@ -1323,6 +1331,7 @@ public boolean containsTables(java.lang.String key) { map = internalGetTables().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1379,7 +1388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getFinishTime()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetTables(), TablesDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -1510,38 +1519,38 @@ public static com.google.bigtable.admin.v2.CreateClusterMetadata parseFrom( public static com.google.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata 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); } @@ -1564,10 +1573,11 @@ 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; } + /** * * @@ -1577,7 +1587,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterMetadata} */ - 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.bigtable.admin.v2.CreateClusterMetadata) com.google.bigtable.admin.v2.CreateClusterMetadataOrBuilder { @@ -1609,7 +1619,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_fieldAccessorTable @@ -1623,16 +1633,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -1713,39 +1723,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateClusterMetadata 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.bigtable.admin.v2.CreateClusterMetadata) { @@ -1798,19 +1775,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -1849,11 +1829,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.CreateClusterRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateClusterRequest, com.google.bigtable.admin.v2.CreateClusterRequest.Builder, com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -1868,6 +1849,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1888,6 +1870,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -1910,6 +1893,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.CreateClusterRequ onChanged(); return this; } + /** * * @@ -1930,6 +1914,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1958,6 +1943,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.CreateClusterRe } return this; } + /** * * @@ -1977,6 +1963,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -1989,8 +1976,9 @@ public Builder clearOriginalRequest() { public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -2010,6 +1998,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ : originalRequest_; } } + /** * * @@ -2019,14 +2008,14 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ * * .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateClusterRequest, com.google.bigtable.admin.v2.CreateClusterRequest.Builder, com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateClusterRequest, com.google.bigtable.admin.v2.CreateClusterRequest.Builder, com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder>( @@ -2037,11 +2026,12 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -2056,6 +2046,7 @@ public com.google.bigtable.admin.v2.CreateClusterRequest.Builder getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2076,6 +2067,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -2098,6 +2090,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2117,6 +2110,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -2144,6 +2138,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2163,6 +2158,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -2175,8 +2171,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -2195,6 +2192,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -2204,14 +2202,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2222,11 +2220,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -2241,6 +2240,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -2261,6 +2261,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -2283,6 +2284,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2302,6 +2304,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -2329,6 +2332,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2348,6 +2352,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -2360,8 +2365,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -2380,6 +2386,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -2389,14 +2396,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -2427,7 +2434,8 @@ public com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress build( defaultEntry() { return TablesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final TablesConverter tablesConverter = new TablesConverter(); @@ -2467,6 +2475,7 @@ public com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress build( public int getTablesCount() { return internalGetTables().ensureBuilderMap().size(); } + /** * * @@ -2492,6 +2501,7 @@ public boolean containsTables(java.lang.String key) { } return internalGetTables().ensureBuilderMap().containsKey(key); } + /** Use {@link #getTablesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -2500,6 +2510,7 @@ public boolean containsTables(java.lang.String key) { getTables() { return getTablesMap(); } + /** * * @@ -2524,6 +2535,7 @@ public boolean containsTables(java.lang.String key) { getTablesMap() { return internalGetTables().getImmutableMap(); } + /** * * @@ -2557,6 +2569,7 @@ public boolean containsTables(java.lang.String key) { map = internalGetMutableTables().ensureBuilderMap(); return map.containsKey(key) ? tablesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -2596,6 +2609,7 @@ public Builder clearTables() { internalGetMutableTables().clear(); return this; } + /** * * @@ -2621,6 +2635,7 @@ public Builder removeTables(java.lang.String key) { internalGetMutableTables().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map< @@ -2629,6 +2644,7 @@ public Builder removeTables(java.lang.String key) { bitField0_ |= 0x00000008; return internalGetMutableTables().ensureMessageMap(); } + /** * * @@ -2660,6 +2676,7 @@ public Builder putTables( bitField0_ |= 0x00000008; return this; } + /** * * @@ -2693,6 +2710,7 @@ public Builder putAllTables( bitField0_ |= 0x00000008; return this; } + /** * * @@ -2731,17 +2749,6 @@ public Builder putAllTables( return (com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.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.bigtable.admin.v2.CreateClusterMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadataOrBuilder.java index eb15a6df92..4f2690fc12 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateClusterMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateClusterMetadata) @@ -36,6 +38,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +51,7 @@ public interface CreateClusterMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateClusterRequest getOriginalRequest(); + /** * * @@ -71,6 +75,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +88,7 @@ public interface CreateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +112,7 @@ public interface CreateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +125,7 @@ public interface CreateClusterMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * @@ -148,6 +156,7 @@ public interface CreateClusterMetadataOrBuilder * */ int getTablesCount(); + /** * * @@ -167,10 +176,12 @@ public interface CreateClusterMetadataOrBuilder * */ boolean containsTables(java.lang.String key); + /** Use {@link #getTablesMap()} instead. */ @java.lang.Deprecated java.util.Map getTables(); + /** * * @@ -191,6 +202,7 @@ public interface CreateClusterMetadataOrBuilder */ java.util.Map getTablesMap(); + /** * * @@ -214,6 +226,7 @@ com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress getTablesOrDefa java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress defaultValue); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java index cd52a1bc9f..0faa4debd0 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterRequest} */ -public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateClusterRequest) CreateClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateClusterRequest"); + } + // Use CreateClusterRequest.newBuilder() to construct. - private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateClusterRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private CreateClusterRequest() { clusterId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateClusterRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -151,6 +161,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -179,6 +190,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { public static final int CLUSTER_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.Cluster cluster_; + /** * * @@ -196,6 +208,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -213,6 +226,7 @@ public boolean hasCluster() { public com.google.bigtable.admin.v2.Cluster getCluster() { return cluster_ == null ? com.google.bigtable.admin.v2.Cluster.getDefaultInstance() : cluster_; } + /** * * @@ -243,11 +257,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(clusterId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clusterId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getCluster()); @@ -261,11 +275,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(clusterId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clusterId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); @@ -353,38 +367,38 @@ public static com.google.bigtable.admin.v2.CreateClusterRequest parseFrom( public static com.google.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest 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,10 +421,11 @@ 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; } + /** * * @@ -420,7 +435,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateClusterRequest} */ - 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.bigtable.admin.v2.CreateClusterRequest) com.google.bigtable.admin.v2.CreateClusterRequestOrBuilder { @@ -430,7 +445,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterRequest_fieldAccessorTable @@ -444,14 +459,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) { - getClusterFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClusterFieldBuilder(); } } @@ -516,39 +531,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateClusterRequest 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.bigtable.admin.v2.CreateClusterRequest) { @@ -615,7 +597,7 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetClusterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -639,6 +621,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -664,6 +647,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -689,6 +673,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -713,6 +698,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -733,6 +719,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -760,6 +747,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object clusterId_ = ""; + /** * * @@ -784,6 +772,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -808,6 +797,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -831,6 +821,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -850,6 +841,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * @@ -876,11 +868,12 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> clusterBuilder_; + /** * * @@ -898,6 +891,7 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { public boolean hasCluster() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -921,6 +915,7 @@ public com.google.bigtable.admin.v2.Cluster getCluster() { return clusterBuilder_.getMessage(); } } + /** * * @@ -946,6 +941,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -968,6 +964,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster.Builder builderFo onChanged(); return this; } + /** * * @@ -998,6 +995,7 @@ public Builder mergeCluster(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -1020,6 +1018,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -1035,8 +1034,9 @@ public Builder clearCluster() { public com.google.bigtable.admin.v2.Cluster.Builder getClusterBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getClusterFieldBuilder().getBuilder(); + return internalGetClusterFieldBuilder().getBuilder(); } + /** * * @@ -1058,6 +1058,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { : cluster_; } } + /** * * @@ -1070,14 +1071,14 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { * .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> - getClusterFieldBuilder() { + internalGetClusterFieldBuilder() { if (clusterBuilder_ == null) { clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder>( @@ -1087,17 +1088,6 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { return clusterBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateClusterRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequestOrBuilder.java index d6f4eff925..c41839ef31 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateClusterRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateClusterRequest) @@ -39,6 +41,7 @@ public interface CreateClusterRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface CreateClusterRequestOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * @@ -98,6 +102,7 @@ public interface CreateClusterRequestOrBuilder * @return Whether the cluster field is set. */ boolean hasCluster(); + /** * * @@ -112,6 +117,7 @@ public interface CreateClusterRequestOrBuilder * @return The cluster. */ com.google.bigtable.admin.v2.Cluster getCluster(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java index 955de7de94..d3bd2e3bb5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } private CreateInstanceMetadata() {} - @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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.CreateInstanceRequest originalRequest_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +105,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.CreateInstanceRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -114,6 +124,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder getOriginalRe public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -129,6 +140,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder getOriginalRe public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -144,6 +156,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -160,6 +173,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -175,6 +189,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -190,6 +205,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -338,38 +354,38 @@ public static com.google.bigtable.admin.v2.CreateInstanceMetadata parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -392,10 +408,11 @@ 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; } + /** * * @@ -405,7 +422,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CreateInstanceMetadata) com.google.bigtable.admin.v2.CreateInstanceMetadataOrBuilder { @@ -415,7 +432,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_fieldAccessorTable @@ -429,16 +446,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -515,39 +532,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateInstanceMetadata 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.bigtable.admin.v2.CreateInstanceMetadata) { @@ -598,19 +582,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -634,11 +621,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.CreateInstanceRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.bigtable.admin.v2.CreateInstanceRequest.Builder, com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -653,6 +641,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -673,6 +662,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -695,6 +685,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.CreateInstanceReq onChanged(); return this; } + /** * * @@ -715,6 +706,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -743,6 +735,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.CreateInstanceR } return this; } + /** * * @@ -762,6 +755,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -774,8 +768,9 @@ public Builder clearOriginalRequest() { public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -795,6 +790,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq : originalRequest_; } } + /** * * @@ -804,14 +800,14 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq * * .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.bigtable.admin.v2.CreateInstanceRequest.Builder, com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.bigtable.admin.v2.CreateInstanceRequest.Builder, com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder>( @@ -822,11 +818,12 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -841,6 +838,7 @@ public com.google.bigtable.admin.v2.CreateInstanceRequest.Builder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -861,6 +859,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -883,6 +882,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -902,6 +902,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -929,6 +930,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -948,6 +950,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -960,8 +963,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -980,6 +984,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -989,14 +994,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1007,11 +1012,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1026,6 +1032,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1046,6 +1053,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1068,6 +1076,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1087,6 +1096,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1114,6 +1124,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1133,6 +1144,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1145,8 +1157,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1165,6 +1178,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1174,14 +1188,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1191,17 +1205,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateInstanceMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadataOrBuilder.java index 16e30570ca..8672010679 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateInstanceMetadata) @@ -36,6 +38,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +51,7 @@ public interface CreateInstanceMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateInstanceRequest getOriginalRequest(); + /** * * @@ -71,6 +75,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +88,7 @@ public interface CreateInstanceMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +112,7 @@ public interface CreateInstanceMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +125,7 @@ public interface CreateInstanceMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java index 8c647b399e..eceb4ce312 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -43,12 +56,6 @@ 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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor; @@ -67,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceRequest_fieldAccessorTable @@ -81,6 +88,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -107,6 +115,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -138,6 +147,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object instanceId_ = ""; + /** * * @@ -163,6 +173,7 @@ public java.lang.String getInstanceId() { return s; } } + /** * * @@ -191,6 +202,7 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { public static final int INSTANCE_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.Instance instance_; + /** * * @@ -209,6 +221,7 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -229,6 +242,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { ? com.google.bigtable.admin.v2.Instance.getDefaultInstance() : instance_; } + /** * * @@ -279,6 +293,7 @@ private static final class ClustersDefaultEntryHolder { public int getClustersCount() { return internalGetClusters().getMap().size(); } + /** * * @@ -287,7 +302,6 @@ public int getClustersCount() { * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -301,12 +315,14 @@ public boolean containsClusters(java.lang.String key) { } return internalGetClusters().getMap().containsKey(key); } + /** Use {@link #getClustersMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getClusters() { return getClustersMap(); } + /** * * @@ -315,7 +331,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -326,6 +341,7 @@ public java.util.Map get public java.util.Map getClustersMap() { return internalGetClusters().getMap(); } + /** * * @@ -334,7 +350,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -353,6 +368,7 @@ public java.util.Map get internalGetClusters().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -361,7 +377,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -395,16 +410,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(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()); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetClusters(), ClustersDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -415,11 +430,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()); @@ -523,38 +538,38 @@ public static com.google.bigtable.admin.v2.CreateInstanceRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -577,10 +592,11 @@ 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; } + /** * * @@ -590,7 +606,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.CreateInstanceRequest) com.google.bigtable.admin.v2.CreateInstanceRequestOrBuilder { @@ -622,7 +638,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceRequest_fieldAccessorTable @@ -636,14 +652,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(); } } @@ -712,39 +728,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateInstanceRequest 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.bigtable.admin.v2.CreateInstanceRequest) { @@ -813,7 +796,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInstanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -850,6 +834,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -875,6 +860,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -900,6 +886,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -924,6 +911,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -944,6 +932,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -971,6 +960,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object instanceId_ = ""; + /** * * @@ -995,6 +985,7 @@ public java.lang.String getInstanceId() { return (java.lang.String) ref; } } + /** * * @@ -1019,6 +1010,7 @@ public com.google.protobuf.ByteString getInstanceIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1042,6 +1034,7 @@ public Builder setInstanceId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1061,6 +1054,7 @@ public Builder clearInstanceId() { onChanged(); return this; } + /** * * @@ -1087,11 +1081,12 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> instanceBuilder_; + /** * * @@ -1109,6 +1104,7 @@ public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { public boolean hasInstance() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1132,6 +1128,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { return instanceBuilder_.getMessage(); } } + /** * * @@ -1157,6 +1154,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance value) { onChanged(); return this; } + /** * * @@ -1179,6 +1177,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance.Builder builder onChanged(); return this; } + /** * * @@ -1209,6 +1208,7 @@ public Builder mergeInstance(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -1231,6 +1231,7 @@ public Builder clearInstance() { onChanged(); return this; } + /** * * @@ -1246,8 +1247,9 @@ public Builder clearInstance() { public com.google.bigtable.admin.v2.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } + /** * * @@ -1269,6 +1271,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { : instance_; } } + /** * * @@ -1281,14 +1284,14 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { * .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder>( @@ -1317,7 +1320,8 @@ public com.google.bigtable.admin.v2.Cluster build( defaultEntry() { return ClustersDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ClustersConverter clustersConverter = new ClustersConverter(); @@ -1357,6 +1361,7 @@ public com.google.bigtable.admin.v2.Cluster build( public int getClustersCount() { return internalGetClusters().ensureBuilderMap().size(); } + /** * * @@ -1365,7 +1370,6 @@ public int getClustersCount() { * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1379,12 +1383,14 @@ public boolean containsClusters(java.lang.String key) { } return internalGetClusters().ensureBuilderMap().containsKey(key); } + /** Use {@link #getClustersMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getClusters() { return getClustersMap(); } + /** * * @@ -1393,7 +1399,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1404,6 +1409,7 @@ public java.util.Map get public java.util.Map getClustersMap() { return internalGetClusters().getImmutableMap(); } + /** * * @@ -1412,7 +1418,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1431,6 +1436,7 @@ public java.util.Map get internalGetMutableClusters().ensureBuilderMap(); return map.containsKey(key) ? clustersConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -1439,7 +1445,6 @@ public java.util.Map get * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1464,6 +1469,7 @@ public Builder clearClusters() { internalGetMutableClusters().clear(); return this; } + /** * * @@ -1472,7 +1478,6 @@ public Builder clearClusters() { * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1486,6 +1491,7 @@ public Builder removeClusters(java.lang.String key) { internalGetMutableClusters().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map @@ -1493,6 +1499,7 @@ public Builder removeClusters(java.lang.String key) { bitField0_ |= 0x00000008; return internalGetMutableClusters().ensureMessageMap(); } + /** * * @@ -1501,7 +1508,6 @@ public Builder removeClusters(java.lang.String key) { * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1519,6 +1525,7 @@ public Builder putClusters(java.lang.String key, com.google.bigtable.admin.v2.Cl bitField0_ |= 0x00000008; return this; } + /** * * @@ -1527,7 +1534,6 @@ public Builder putClusters(java.lang.String key, com.google.bigtable.admin.v2.Cl * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1546,6 +1552,7 @@ public Builder putAllClusters( bitField0_ |= 0x00000008; return this; } + /** * * @@ -1554,7 +1561,6 @@ public Builder putAllClusters( * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -1577,17 +1583,6 @@ public com.google.bigtable.admin.v2.Cluster.Builder putClustersBuilderIfAbsent( return (com.google.bigtable.admin.v2.Cluster.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.bigtable.admin.v2.CreateInstanceRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequestOrBuilder.java index a0e6b0de02..24b2fe6ea2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateInstanceRequest) @@ -39,6 +41,7 @@ public interface CreateInstanceRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface CreateInstanceRequestOrBuilder * @return The instanceId. */ java.lang.String getInstanceId(); + /** * * @@ -99,6 +103,7 @@ public interface CreateInstanceRequestOrBuilder * @return Whether the instance field is set. */ boolean hasInstance(); + /** * * @@ -114,6 +119,7 @@ public interface CreateInstanceRequestOrBuilder * @return The instance. */ com.google.bigtable.admin.v2.Instance getInstance(); + /** * * @@ -136,7 +142,6 @@ public interface CreateInstanceRequestOrBuilder * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -144,6 +149,7 @@ public interface CreateInstanceRequestOrBuilder * */ int getClustersCount(); + /** * * @@ -152,7 +158,6 @@ public interface CreateInstanceRequestOrBuilder * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -160,9 +165,11 @@ public interface CreateInstanceRequestOrBuilder * */ boolean containsClusters(java.lang.String key); + /** Use {@link #getClustersMap()} instead. */ @java.lang.Deprecated java.util.Map getClusters(); + /** * * @@ -171,7 +178,6 @@ public interface CreateInstanceRequestOrBuilder * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -179,6 +185,7 @@ public interface CreateInstanceRequestOrBuilder * */ java.util.Map getClustersMap(); + /** * * @@ -187,7 +194,6 @@ public interface CreateInstanceRequestOrBuilder * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * @@ -199,6 +205,7 @@ com.google.bigtable.admin.v2.Cluster getClustersOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.Cluster defaultValue); + /** * * @@ -207,7 +214,6 @@ com.google.bigtable.admin.v2.Cluster getClustersOrDefault( * cluster ID, e.g., just `mycluster` rather than * `projects/myproject/instances/myinstance/clusters/mycluster`. * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. * * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadata.java new file mode 100644 index 0000000000..c969095d51 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadata.java @@ -0,0 +1,1263 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by CreateLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewMetadata} + */ +@com.google.protobuf.Generated +public final class CreateLogicalViewMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateLogicalViewMetadata) + CreateLogicalViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateLogicalViewMetadata"); + } + + // Use CreateLogicalViewMetadata.newBuilder() to construct. + private CreateLogicalViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateLogicalViewMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateLogicalViewMetadata.class, + com.google.bigtable.admin.v2.CreateLogicalViewMetadata.Builder.class); + } + + private int bitField0_; + public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.CreateLogicalViewRequest originalRequest_; + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + @java.lang.Override + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewRequest getOriginalRequest() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder + getOriginalRequestOrBuilder() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.CreateLogicalViewMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateLogicalViewMetadata other = + (com.google.bigtable.admin.v2.CreateLogicalViewMetadata) obj; + + if (hasOriginalRequest() != other.hasOriginalRequest()) return false; + if (hasOriginalRequest()) { + if (!getOriginalRequest().equals(other.getOriginalRequest())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!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 (hasOriginalRequest()) { + hash = (37 * hash) + ORIGINAL_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getOriginalRequest().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata 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.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata 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.bigtable.admin.v2.CreateLogicalViewMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata 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.bigtable.admin.v2.CreateLogicalViewMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata 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.bigtable.admin.v2.CreateLogicalViewMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by CreateLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateLogicalViewMetadata) + com.google.bigtable.admin.v2.CreateLogicalViewMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateLogicalViewMetadata.class, + com.google.bigtable.admin.v2.CreateLogicalViewMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateLogicalViewMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateLogicalViewMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewMetadata build() { + com.google.bigtable.admin.v2.CreateLogicalViewMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewMetadata buildPartial() { + com.google.bigtable.admin.v2.CreateLogicalViewMetadata result = + new com.google.bigtable.admin.v2.CreateLogicalViewMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateLogicalViewMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.originalRequest_ = + originalRequestBuilder_ == null ? originalRequest_ : originalRequestBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateLogicalViewMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.CreateLogicalViewMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateLogicalViewMetadata other) { + if (other == com.google.bigtable.admin.v2.CreateLogicalViewMetadata.getDefaultInstance()) + return this; + if (other.hasOriginalRequest()) { + mergeOriginalRequest(other.getOriginalRequest()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.CreateLogicalViewRequest originalRequest_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder> + originalRequestBuilder_; + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + public com.google.bigtable.admin.v2.CreateLogicalViewRequest getOriginalRequest() { + if (originalRequestBuilder_ == null) { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } else { + return originalRequestBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public Builder setOriginalRequest(com.google.bigtable.admin.v2.CreateLogicalViewRequest value) { + if (originalRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalRequest_ = value; + } else { + originalRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder builderForValue) { + if (originalRequestBuilder_ == null) { + originalRequest_ = builderForValue.build(); + } else { + originalRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public Builder mergeOriginalRequest( + com.google.bigtable.admin.v2.CreateLogicalViewRequest value) { + if (originalRequestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && originalRequest_ != null + && originalRequest_ + != com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance()) { + getOriginalRequestBuilder().mergeFrom(value); + } else { + originalRequest_ = value; + } + } else { + originalRequestBuilder_.mergeFrom(value); + } + if (originalRequest_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public Builder clearOriginalRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder + getOriginalRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder + getOriginalRequestOrBuilder() { + if (originalRequestBuilder_ != null) { + return originalRequestBuilder_.getMessageOrBuilder(); + } else { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder> + internalGetOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateLogicalViewRequest, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder>( + getOriginalRequest(), getParentForChildren(), isClean()); + originalRequest_ = null; + } + return originalRequestBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateLogicalViewMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateLogicalViewMetadata) + private static final com.google.bigtable.admin.v2.CreateLogicalViewMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateLogicalViewMetadata(); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateLogicalViewMetadata 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.bigtable.admin.v2.CreateLogicalViewMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadataOrBuilder.java new file mode 100644 index 0000000000..ac35bb89f1 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewMetadataOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateLogicalViewMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateLogicalViewMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + boolean hasOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + com.google.bigtable.admin.v2.CreateLogicalViewRequest getOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateLogicalViewRequest original_request = 1; + */ + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder getOriginalRequestOrBuilder(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequest.java new file mode 100644 index 0000000000..7c2b721dbd --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequest.java @@ -0,0 +1,1132 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.CreateLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewRequest} + */ +@com.google.protobuf.Generated +public final class CreateLogicalViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateLogicalViewRequest) + CreateLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateLogicalViewRequest"); + } + + // Use CreateLogicalViewRequest.newBuilder() to construct. + private CreateLogicalViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateLogicalViewRequest() { + parent_ = ""; + logicalViewId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateLogicalViewRequest.class, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The parent instance where this logical view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The parent instance where this logical view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGICAL_VIEW_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object logicalViewId_ = ""; + + /** + * + * + *
      +   * Required. The ID to use for the logical view, which will become the final
      +   * component of the logical view's resource name.
      +   * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The logicalViewId. + */ + @java.lang.Override + public java.lang.String getLogicalViewId() { + java.lang.Object ref = logicalViewId_; + 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(); + logicalViewId_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The ID to use for the logical view, which will become the final
      +   * component of the logical view's resource name.
      +   * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for logicalViewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLogicalViewIdBytes() { + java.lang.Object ref = logicalViewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logicalViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGICAL_VIEW_FIELD_NUMBER = 3; + private com.google.bigtable.admin.v2.LogicalView logicalView_; + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + @java.lang.Override + public boolean hasLogicalView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView getLogicalView() { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder() { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logicalViewId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, logicalViewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLogicalView()); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logicalViewId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, logicalViewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLogicalView()); + } + 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.bigtable.admin.v2.CreateLogicalViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateLogicalViewRequest other = + (com.google.bigtable.admin.v2.CreateLogicalViewRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getLogicalViewId().equals(other.getLogicalViewId())) return false; + if (hasLogicalView() != other.hasLogicalView()) return false; + if (hasLogicalView()) { + if (!getLogicalView().equals(other.getLogicalView())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + LOGICAL_VIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getLogicalViewId().hashCode(); + if (hasLogicalView()) { + hash = (37 * hash) + LOGICAL_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getLogicalView().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest 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.bigtable.admin.v2.CreateLogicalViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest 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.bigtable.admin.v2.CreateLogicalViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest 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.bigtable.admin.v2.CreateLogicalViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest 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.bigtable.admin.v2.CreateLogicalViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.CreateLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateLogicalViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateLogicalViewRequest) + com.google.bigtable.admin.v2.CreateLogicalViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateLogicalViewRequest.class, + com.google.bigtable.admin.v2.CreateLogicalViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateLogicalViewRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLogicalViewFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + logicalViewId_ = ""; + logicalView_ = null; + if (logicalViewBuilder_ != null) { + logicalViewBuilder_.dispose(); + logicalViewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateLogicalViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewRequest build() { + com.google.bigtable.admin.v2.CreateLogicalViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateLogicalViewRequest buildPartial() { + com.google.bigtable.admin.v2.CreateLogicalViewRequest result = + new com.google.bigtable.admin.v2.CreateLogicalViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateLogicalViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logicalViewId_ = logicalViewId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.logicalView_ = + logicalViewBuilder_ == null ? logicalView_ : logicalViewBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateLogicalViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.CreateLogicalViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateLogicalViewRequest other) { + if (other == com.google.bigtable.admin.v2.CreateLogicalViewRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLogicalViewId().isEmpty()) { + logicalViewId_ = other.logicalViewId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLogicalView()) { + mergeLogicalView(other.getLogicalView()); + } + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + logicalViewId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLogicalViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The parent instance where this logical view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The parent instance where this logical view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The parent instance where this logical view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent instance where this logical view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent instance where this logical view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object logicalViewId_ = ""; + + /** + * + * + *
      +     * Required. The ID to use for the logical view, which will become the final
      +     * component of the logical view's resource name.
      +     * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The logicalViewId. + */ + public java.lang.String getLogicalViewId() { + java.lang.Object ref = logicalViewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logicalViewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The ID to use for the logical view, which will become the final
      +     * component of the logical view's resource name.
      +     * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for logicalViewId. + */ + public com.google.protobuf.ByteString getLogicalViewIdBytes() { + java.lang.Object ref = logicalViewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + logicalViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The ID to use for the logical view, which will become the final
      +     * component of the logical view's resource name.
      +     * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The logicalViewId to set. + * @return This builder for chaining. + */ + public Builder setLogicalViewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + logicalViewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The ID to use for the logical view, which will become the final
      +     * component of the logical view's resource name.
      +     * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLogicalViewId() { + logicalViewId_ = getDefaultInstance().getLogicalViewId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The ID to use for the logical view, which will become the final
      +     * component of the logical view's resource name.
      +     * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for logicalViewId to set. + * @return This builder for chaining. + */ + public Builder setLogicalViewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + logicalViewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.bigtable.admin.v2.LogicalView logicalView_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + logicalViewBuilder_; + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + public boolean hasLogicalView() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + public com.google.bigtable.admin.v2.LogicalView getLogicalView() { + if (logicalViewBuilder_ == null) { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } else { + return logicalViewBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLogicalView(com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logicalView_ = value; + } else { + logicalViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLogicalView( + com.google.bigtable.admin.v2.LogicalView.Builder builderForValue) { + if (logicalViewBuilder_ == null) { + logicalView_ = builderForValue.build(); + } else { + logicalViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLogicalView(com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && logicalView_ != null + && logicalView_ != com.google.bigtable.admin.v2.LogicalView.getDefaultInstance()) { + getLogicalViewBuilder().mergeFrom(value); + } else { + logicalView_ = value; + } + } else { + logicalViewBuilder_.mergeFrom(value); + } + if (logicalView_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLogicalView() { + bitField0_ = (bitField0_ & ~0x00000004); + logicalView_ = null; + if (logicalViewBuilder_ != null) { + logicalViewBuilder_.dispose(); + logicalViewBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.LogicalView.Builder getLogicalViewBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLogicalViewFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder() { + if (logicalViewBuilder_ != null) { + return logicalViewBuilder_.getMessageOrBuilder(); + } else { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + } + + /** + * + * + *
      +     * Required. The logical view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + internalGetLogicalViewFieldBuilder() { + if (logicalViewBuilder_ == null) { + logicalViewBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder>( + getLogicalView(), getParentForChildren(), isClean()); + logicalView_ = null; + } + return logicalViewBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateLogicalViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateLogicalViewRequest) + private static final com.google.bigtable.admin.v2.CreateLogicalViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateLogicalViewRequest(); + } + + public static com.google.bigtable.admin.v2.CreateLogicalViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateLogicalViewRequest 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.bigtable.admin.v2.CreateLogicalViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequestOrBuilder.java new file mode 100644 index 0000000000..0598ae6553 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateLogicalViewRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateLogicalViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateLogicalViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The parent instance where this logical view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The parent instance where this logical view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Required. The ID to use for the logical view, which will become the final
      +   * component of the logical view's resource name.
      +   * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The logicalViewId. + */ + java.lang.String getLogicalViewId(); + + /** + * + * + *
      +   * Required. The ID to use for the logical view, which will become the final
      +   * component of the logical view's resource name.
      +   * 
      + * + * string logical_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for logicalViewId. + */ + com.google.protobuf.ByteString getLogicalViewIdBytes(); + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + boolean hasLogicalView(); + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + com.google.bigtable.admin.v2.LogicalView getLogicalView(); + + /** + * + * + *
      +   * Required. The logical view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadata.java new file mode 100644 index 0000000000..bc3c2755a2 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadata.java @@ -0,0 +1,1265 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by CreateMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewMetadata} + */ +@com.google.protobuf.Generated +public final class CreateMaterializedViewMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + CreateMaterializedViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateMaterializedViewMetadata"); + } + + // Use CreateMaterializedViewMetadata.newBuilder() to construct. + private CreateMaterializedViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateMaterializedViewMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.class, + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.Builder.class); + } + + private int bitField0_; + public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.CreateMaterializedViewRequest originalRequest_; + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + @java.lang.Override + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest getOriginalRequest() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder + getOriginalRequestOrBuilder() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.CreateMaterializedViewMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata other = + (com.google.bigtable.admin.v2.CreateMaterializedViewMetadata) obj; + + if (hasOriginalRequest() != other.hasOriginalRequest()) return false; + if (hasOriginalRequest()) { + if (!getOriginalRequest().equals(other.getOriginalRequest())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!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 (hasOriginalRequest()) { + hash = (37 * hash) + ORIGINAL_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getOriginalRequest().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata 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.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata 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.bigtable.admin.v2.CreateMaterializedViewMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata 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.bigtable.admin.v2.CreateMaterializedViewMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata 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.bigtable.admin.v2.CreateMaterializedViewMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by CreateMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + com.google.bigtable.admin.v2.CreateMaterializedViewMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.class, + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewMetadata build() { + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewMetadata buildPartial() { + com.google.bigtable.admin.v2.CreateMaterializedViewMetadata result = + new com.google.bigtable.admin.v2.CreateMaterializedViewMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateMaterializedViewMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.originalRequest_ = + originalRequestBuilder_ == null ? originalRequest_ : originalRequestBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateMaterializedViewMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.CreateMaterializedViewMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateMaterializedViewMetadata other) { + if (other == com.google.bigtable.admin.v2.CreateMaterializedViewMetadata.getDefaultInstance()) + return this; + if (other.hasOriginalRequest()) { + mergeOriginalRequest(other.getOriginalRequest()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.CreateMaterializedViewRequest originalRequest_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder> + originalRequestBuilder_; + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest getOriginalRequest() { + if (originalRequestBuilder_ == null) { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } else { + return originalRequestBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest value) { + if (originalRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalRequest_ = value; + } else { + originalRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder builderForValue) { + if (originalRequestBuilder_ == null) { + originalRequest_ = builderForValue.build(); + } else { + originalRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public Builder mergeOriginalRequest( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest value) { + if (originalRequestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && originalRequest_ != null + && originalRequest_ + != com.google.bigtable.admin.v2.CreateMaterializedViewRequest + .getDefaultInstance()) { + getOriginalRequestBuilder().mergeFrom(value); + } else { + originalRequest_ = value; + } + } else { + originalRequestBuilder_.mergeFrom(value); + } + if (originalRequest_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public Builder clearOriginalRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder + getOriginalRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder + getOriginalRequestOrBuilder() { + if (originalRequestBuilder_ != null) { + return originalRequestBuilder_.getMessageOrBuilder(); + } else { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this CreateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder> + internalGetOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.CreateMaterializedViewRequest, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder>( + getOriginalRequest(), getParentForChildren(), isClean()); + originalRequest_ = null; + } + return originalRequestBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + private static final com.google.bigtable.admin.v2.CreateMaterializedViewMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateMaterializedViewMetadata(); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMaterializedViewMetadata 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.bigtable.admin.v2.CreateMaterializedViewMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadataOrBuilder.java new file mode 100644 index 0000000000..a3eb4ef1f6 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewMetadataOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateMaterializedViewMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateMaterializedViewMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + boolean hasOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + com.google.bigtable.admin.v2.CreateMaterializedViewRequest getOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this CreateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.CreateMaterializedViewRequest original_request = 1; + */ + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder getOriginalRequestOrBuilder(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequest.java new file mode 100644 index 0000000000..a2edab382b --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequest.java @@ -0,0 +1,1133 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.CreateMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class CreateMaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateMaterializedViewRequest) + CreateMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateMaterializedViewRequest"); + } + + // Use CreateMaterializedViewRequest.newBuilder() to construct. + private CreateMaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateMaterializedViewRequest() { + parent_ = ""; + materializedViewId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.class, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The parent instance where this materialized view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The parent instance where this materialized view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATERIALIZED_VIEW_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object materializedViewId_ = ""; + + /** + * + * + *
      +   * Required. The ID to use for the materialized view, which will become the
      +   * final component of the materialized view's resource name.
      +   * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The materializedViewId. + */ + @java.lang.Override + public java.lang.String getMaterializedViewId() { + java.lang.Object ref = materializedViewId_; + 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(); + materializedViewId_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The ID to use for the materialized view, which will become the
      +   * final component of the materialized view's resource name.
      +   * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for materializedViewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaterializedViewIdBytes() { + java.lang.Object ref = materializedViewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATERIALIZED_VIEW_FIELD_NUMBER = 3; + private com.google.bigtable.admin.v2.MaterializedView materializedView_; + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + @java.lang.Override + public boolean hasMaterializedView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView() { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder() { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, materializedViewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getMaterializedView()); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, materializedViewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMaterializedView()); + } + 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.bigtable.admin.v2.CreateMaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateMaterializedViewRequest other = + (com.google.bigtable.admin.v2.CreateMaterializedViewRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getMaterializedViewId().equals(other.getMaterializedViewId())) return false; + if (hasMaterializedView() != other.hasMaterializedView()) return false; + if (hasMaterializedView()) { + if (!getMaterializedView().equals(other.getMaterializedView())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + MATERIALIZED_VIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedViewId().hashCode(); + if (hasMaterializedView()) { + hash = (37 * hash) + MATERIALIZED_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedView().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest 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.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest 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.bigtable.admin.v2.CreateMaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest 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.bigtable.admin.v2.CreateMaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest 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.bigtable.admin.v2.CreateMaterializedViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.CreateMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateMaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateMaterializedViewRequest) + com.google.bigtable.admin.v2.CreateMaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.class, + com.google.bigtable.admin.v2.CreateMaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateMaterializedViewRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMaterializedViewFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + materializedViewId_ = ""; + materializedView_ = null; + if (materializedViewBuilder_ != null) { + materializedViewBuilder_.dispose(); + materializedViewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_CreateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest build() { + com.google.bigtable.admin.v2.CreateMaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateMaterializedViewRequest buildPartial() { + com.google.bigtable.admin.v2.CreateMaterializedViewRequest result = + new com.google.bigtable.admin.v2.CreateMaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateMaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.materializedViewId_ = materializedViewId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.materializedView_ = + materializedViewBuilder_ == null ? materializedView_ : materializedViewBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateMaterializedViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.CreateMaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateMaterializedViewRequest other) { + if (other == com.google.bigtable.admin.v2.CreateMaterializedViewRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMaterializedViewId().isEmpty()) { + materializedViewId_ = other.materializedViewId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMaterializedView()) { + mergeMaterializedView(other.getMaterializedView()); + } + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + materializedViewId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetMaterializedViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The parent instance where this materialized view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The parent instance where this materialized view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The parent instance where this materialized view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent instance where this materialized view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent instance where this materialized view will be created.
      +     * Format: `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object materializedViewId_ = ""; + + /** + * + * + *
      +     * Required. The ID to use for the materialized view, which will become the
      +     * final component of the materialized view's resource name.
      +     * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The materializedViewId. + */ + public java.lang.String getMaterializedViewId() { + java.lang.Object ref = materializedViewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + materializedViewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The ID to use for the materialized view, which will become the
      +     * final component of the materialized view's resource name.
      +     * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for materializedViewId. + */ + public com.google.protobuf.ByteString getMaterializedViewIdBytes() { + java.lang.Object ref = materializedViewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The ID to use for the materialized view, which will become the
      +     * final component of the materialized view's resource name.
      +     * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The materializedViewId to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + materializedViewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The ID to use for the materialized view, which will become the
      +     * final component of the materialized view's resource name.
      +     * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaterializedViewId() { + materializedViewId_ = getDefaultInstance().getMaterializedViewId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The ID to use for the materialized view, which will become the
      +     * final component of the materialized view's resource name.
      +     * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for materializedViewId to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + materializedViewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.bigtable.admin.v2.MaterializedView materializedView_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + materializedViewBuilder_; + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + public boolean hasMaterializedView() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView() { + if (materializedViewBuilder_ == null) { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } else { + return materializedViewBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaterializedView(com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + materializedView_ = value; + } else { + materializedViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.Builder builderForValue) { + if (materializedViewBuilder_ == null) { + materializedView_ = builderForValue.build(); + } else { + materializedViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMaterializedView(com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && materializedView_ != null + && materializedView_ + != com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance()) { + getMaterializedViewBuilder().mergeFrom(value); + } else { + materializedView_ = value; + } + } else { + materializedViewBuilder_.mergeFrom(value); + } + if (materializedView_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMaterializedView() { + bitField0_ = (bitField0_ & ~0x00000004); + materializedView_ = null; + if (materializedViewBuilder_ != null) { + materializedViewBuilder_.dispose(); + materializedViewBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.MaterializedView.Builder getMaterializedViewBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMaterializedViewFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder() { + if (materializedViewBuilder_ != null) { + return materializedViewBuilder_.getMessageOrBuilder(); + } else { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + } + + /** + * + * + *
      +     * Required. The materialized view to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + internalGetMaterializedViewFieldBuilder() { + if (materializedViewBuilder_ == null) { + materializedViewBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder>( + getMaterializedView(), getParentForChildren(), isClean()); + materializedView_ = null; + } + return materializedViewBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateMaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateMaterializedViewRequest) + private static final com.google.bigtable.admin.v2.CreateMaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateMaterializedViewRequest(); + } + + public static com.google.bigtable.admin.v2.CreateMaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMaterializedViewRequest 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.bigtable.admin.v2.CreateMaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..5de546a88e --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateMaterializedViewRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateMaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateMaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The parent instance where this materialized view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The parent instance where this materialized view will be created.
      +   * Format: `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Required. The ID to use for the materialized view, which will become the
      +   * final component of the materialized view's resource name.
      +   * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The materializedViewId. + */ + java.lang.String getMaterializedViewId(); + + /** + * + * + *
      +   * Required. The ID to use for the materialized view, which will become the
      +   * final component of the materialized view's resource name.
      +   * 
      + * + * string materialized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for materializedViewId. + */ + com.google.protobuf.ByteString getMaterializedViewIdBytes(); + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + boolean hasMaterializedView(); + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + com.google.bigtable.admin.v2.MaterializedView getMaterializedView(); + + /** + * + * + *
      +   * Required. The materialized view to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadata.java new file mode 100644 index 0000000000..761e5dbc72 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadata.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by
      + * [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateSchemaBundleMetadata} + */ +@com.google.protobuf.Generated +public final class CreateSchemaBundleMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + CreateSchemaBundleMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSchemaBundleMetadata"); + } + + // Use CreateSchemaBundleMetadata.newBuilder() to construct. + private CreateSchemaBundleMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateSchemaBundleMetadata() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.class, + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.CreateSchemaBundleMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata other = + (com.google.bigtable.admin.v2.CreateSchemaBundleMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata 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.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata 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.bigtable.admin.v2.CreateSchemaBundleMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata 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.bigtable.admin.v2.CreateSchemaBundleMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata 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.bigtable.admin.v2.CreateSchemaBundleMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by
      +   * [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateSchemaBundleMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + com.google.bigtable.admin.v2.CreateSchemaBundleMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.class, + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleMetadata build() { + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleMetadata buildPartial() { + com.google.bigtable.admin.v2.CreateSchemaBundleMetadata result = + new com.google.bigtable.admin.v2.CreateSchemaBundleMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateSchemaBundleMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateSchemaBundleMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.CreateSchemaBundleMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateSchemaBundleMetadata other) { + if (other == com.google.bigtable.admin.v2.CreateSchemaBundleMetadata.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + private static final com.google.bigtable.admin.v2.CreateSchemaBundleMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateSchemaBundleMetadata(); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSchemaBundleMetadata 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.bigtable.admin.v2.CreateSchemaBundleMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadataOrBuilder.java new file mode 100644 index 0000000000..1e4212e34a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleMetadataOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateSchemaBundleMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateSchemaBundleMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequest.java new file mode 100644 index 0000000000..7e6ec60c69 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequest.java @@ -0,0 +1,1141 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The request for
      + * [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateSchemaBundleRequest} + */ +@com.google.protobuf.Generated +public final class CreateSchemaBundleRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateSchemaBundleRequest) + CreateSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSchemaBundleRequest"); + } + + // Use CreateSchemaBundleRequest.newBuilder() to construct. + private CreateSchemaBundleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateSchemaBundleRequest() { + parent_ = ""; + schemaBundleId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.class, + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The parent resource where this schema bundle will be created.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The parent resource where this schema bundle will be created.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_BUNDLE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
      +   * Required. The unique ID to use for the schema bundle, which will become the
      +   * final component of the schema bundle's resource name.
      +   * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaBundleId. + */ + @java.lang.Override + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + 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(); + schemaBundleId_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique ID to use for the schema bundle, which will become the
      +   * final component of the schema bundle's resource name.
      +   * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaBundleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_BUNDLE_FIELD_NUMBER = 3; + private com.google.bigtable.admin.v2.SchemaBundle schemaBundle_; + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + @java.lang.Override + public boolean hasSchemaBundle() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle() { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder() { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + + 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(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, schemaBundleId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSchemaBundle()); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, schemaBundleId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSchemaBundle()); + } + 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.bigtable.admin.v2.CreateSchemaBundleRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.CreateSchemaBundleRequest other = + (com.google.bigtable.admin.v2.CreateSchemaBundleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (hasSchemaBundle() != other.hasSchemaBundle()) return false; + if (hasSchemaBundle()) { + if (!getSchemaBundle().equals(other.getSchemaBundle())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SCHEMA_BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundleId().hashCode(); + if (hasSchemaBundle()) { + hash = (37 * hash) + SCHEMA_BUNDLE_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundle().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest 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.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest 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.bigtable.admin.v2.CreateSchemaBundleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest 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.bigtable.admin.v2.CreateSchemaBundleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest 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.bigtable.admin.v2.CreateSchemaBundleRequest 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; + } + + /** + * + * + *
      +   * The request for
      +   * [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.CreateSchemaBundleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.CreateSchemaBundleRequest) + com.google.bigtable.admin.v2.CreateSchemaBundleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.class, + com.google.bigtable.admin.v2.CreateSchemaBundleRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.CreateSchemaBundleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaBundleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + schemaBundleId_ = ""; + schemaBundle_ = null; + if (schemaBundleBuilder_ != null) { + schemaBundleBuilder_.dispose(); + schemaBundleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_CreateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.CreateSchemaBundleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleRequest build() { + com.google.bigtable.admin.v2.CreateSchemaBundleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.CreateSchemaBundleRequest buildPartial() { + com.google.bigtable.admin.v2.CreateSchemaBundleRequest result = + new com.google.bigtable.admin.v2.CreateSchemaBundleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.CreateSchemaBundleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.schemaBundleId_ = schemaBundleId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.schemaBundle_ = + schemaBundleBuilder_ == null ? schemaBundle_ : schemaBundleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.CreateSchemaBundleRequest) { + return mergeFrom((com.google.bigtable.admin.v2.CreateSchemaBundleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.CreateSchemaBundleRequest other) { + if (other == com.google.bigtable.admin.v2.CreateSchemaBundleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSchemaBundleId().isEmpty()) { + schemaBundleId_ = other.schemaBundleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSchemaBundle()) { + mergeSchemaBundle(other.getSchemaBundle()); + } + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + schemaBundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetSchemaBundleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The parent resource where this schema bundle will be created.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The parent resource where this schema bundle will be created.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The parent resource where this schema bundle will be created.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent resource where this schema bundle will be created.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent resource where this schema bundle will be created.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
      +     * Required. The unique ID to use for the schema bundle, which will become the
      +     * final component of the schema bundle's resource name.
      +     * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaBundleId. + */ + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaBundleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique ID to use for the schema bundle, which will become the
      +     * final component of the schema bundle's resource name.
      +     * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaBundleId. + */ + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique ID to use for the schema bundle, which will become the
      +     * final component of the schema bundle's resource name.
      +     * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaBundleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique ID to use for the schema bundle, which will become the
      +     * final component of the schema bundle's resource name.
      +     * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSchemaBundleId() { + schemaBundleId_ = getDefaultInstance().getSchemaBundleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique ID to use for the schema bundle, which will become the
      +     * final component of the schema bundle's resource name.
      +     * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaBundleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.bigtable.admin.v2.SchemaBundle schemaBundle_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + schemaBundleBuilder_; + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + public boolean hasSchemaBundle() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle() { + if (schemaBundleBuilder_ == null) { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } else { + return schemaBundleBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchemaBundle(com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schemaBundle_ = value; + } else { + schemaBundleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.Builder builderForValue) { + if (schemaBundleBuilder_ == null) { + schemaBundle_ = builderForValue.build(); + } else { + schemaBundleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSchemaBundle(com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundleBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && schemaBundle_ != null + && schemaBundle_ != com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance()) { + getSchemaBundleBuilder().mergeFrom(value); + } else { + schemaBundle_ = value; + } + } else { + schemaBundleBuilder_.mergeFrom(value); + } + if (schemaBundle_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSchemaBundle() { + bitField0_ = (bitField0_ & ~0x00000004); + schemaBundle_ = null; + if (schemaBundleBuilder_ != null) { + schemaBundleBuilder_.dispose(); + schemaBundleBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.SchemaBundle.Builder getSchemaBundleBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSchemaBundleFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder() { + if (schemaBundleBuilder_ != null) { + return schemaBundleBuilder_.getMessageOrBuilder(); + } else { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + } + + /** + * + * + *
      +     * Required. The schema bundle to create.
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + internalGetSchemaBundleFieldBuilder() { + if (schemaBundleBuilder_ == null) { + schemaBundleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder>( + getSchemaBundle(), getParentForChildren(), isClean()); + schemaBundle_ = null; + } + return schemaBundleBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateSchemaBundleRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateSchemaBundleRequest) + private static final com.google.bigtable.admin.v2.CreateSchemaBundleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.CreateSchemaBundleRequest(); + } + + public static com.google.bigtable.admin.v2.CreateSchemaBundleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSchemaBundleRequest 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.bigtable.admin.v2.CreateSchemaBundleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequestOrBuilder.java new file mode 100644 index 0000000000..e8d1d6efe8 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateSchemaBundleRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface CreateSchemaBundleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateSchemaBundleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The parent resource where this schema bundle will be created.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The parent resource where this schema bundle will be created.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Required. The unique ID to use for the schema bundle, which will become the
      +   * final component of the schema bundle's resource name.
      +   * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The schemaBundleId. + */ + java.lang.String getSchemaBundleId(); + + /** + * + * + *
      +   * Required. The unique ID to use for the schema bundle, which will become the
      +   * final component of the schema bundle's resource name.
      +   * 
      + * + * string schema_bundle_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for schemaBundleId. + */ + com.google.protobuf.ByteString getSchemaBundleIdBytes(); + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + boolean hasSchemaBundle(); + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle(); + + /** + * + * + *
      +   * Required. The schema bundle to create.
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java index d42c2183a5..34d2b9d5c5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -33,32 +34,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} */ -public final class CreateTableFromSnapshotMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateTableFromSnapshotMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) CreateTableFromSnapshotMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateTableFromSnapshotMetadata"); + } + // Use CreateTableFromSnapshotMetadata.newBuilder() to construct. - private CreateTableFromSnapshotMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateTableFromSnapshotMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CreateTableFromSnapshotMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateTableFromSnapshotMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_fieldAccessorTable @@ -70,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest originalRequest_; + /** * * @@ -86,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +112,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe ? com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -124,6 +133,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -139,6 +149,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +165,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -170,6 +182,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -185,6 +198,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -200,6 +214,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -348,38 +363,38 @@ public static com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata parse public static com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata 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); } @@ -403,10 +418,11 @@ 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; } + /** * * @@ -421,7 +437,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateTableFromSnapshotMetadata} */ - 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.bigtable.admin.v2.CreateTableFromSnapshotMetadata) com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadataOrBuilder { @@ -431,7 +447,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_fieldAccessorTable @@ -445,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -533,39 +549,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.bigtable.admin.v2.CreateTableFromSnapshotMetadata) { @@ -617,19 +600,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -653,11 +639,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.Builder, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -673,6 +660,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -694,6 +682,7 @@ public com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRe return originalRequestBuilder_.getMessage(); } } + /** * * @@ -718,6 +707,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -739,6 +729,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -770,6 +761,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -790,6 +782,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -804,8 +797,9 @@ public Builder clearOriginalRequest() { getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -826,6 +820,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -836,14 +831,14 @@ public Builder clearOriginalRequest() { * * .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.Builder, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.Builder, com.google.bigtable.admin.v2.CreateTableFromSnapshotRequestOrBuilder>( @@ -854,11 +849,12 @@ public Builder clearOriginalRequest() { } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -873,6 +869,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -893,6 +890,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -915,6 +913,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -934,6 +933,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -961,6 +961,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -980,6 +981,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -992,8 +994,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -1012,6 +1015,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1021,14 +1025,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1039,11 +1043,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1058,6 +1063,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1078,6 +1084,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1100,6 +1107,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1119,6 +1127,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1146,6 +1155,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1165,6 +1175,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1177,8 +1188,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1197,6 +1209,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1206,14 +1219,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1223,17 +1236,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadataOrBuilder.java index 04ffe0e251..e8cbf1448f 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateTableFromSnapshotMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) @@ -37,6 +39,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -50,6 +53,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest getOriginalRequest(); + /** * * @@ -75,6 +79,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -87,6 +92,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -110,6 +116,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -122,6 +129,7 @@ public interface CreateTableFromSnapshotMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java index dffc37bb40..9dd2cb8598 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,14 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateTableFromSnapshotRequest} */ -public final class CreateTableFromSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateTableFromSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableFromSnapshotRequest) CreateTableFromSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateTableFromSnapshotRequest"); + } + // Use CreateTableFromSnapshotRequest.newBuilder() to construct. - private CreateTableFromSnapshotRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateTableFromSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -51,19 +63,13 @@ private CreateTableFromSnapshotRequest() { sourceSnapshot_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateTableFromSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_fieldAccessorTable @@ -76,6 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -102,6 +109,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -133,6 +141,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -157,6 +166,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -186,6 +196,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object sourceSnapshot_ = ""; + /** * * @@ -214,6 +225,7 @@ public java.lang.String getSourceSnapshot() { return s; } } + /** * * @@ -257,14 +269,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(tableId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tableId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceSnapshot_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceSnapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSnapshot_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sourceSnapshot_); } getUnknownFields().writeTo(output); } @@ -275,14 +287,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(tableId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tableId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceSnapshot_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceSnapshot_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSnapshot_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sourceSnapshot_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -362,38 +374,38 @@ public static com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest parseF public static com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest 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.bigtable.admin.v2.CreateTableFromSnapshotRequest 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.bigtable.admin.v2.CreateTableFromSnapshotRequest 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.bigtable.admin.v2.CreateTableFromSnapshotRequest 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.bigtable.admin.v2.CreateTableFromSnapshotRequest 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.bigtable.admin.v2.CreateTableFromSnapshotRequest 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); } @@ -417,10 +429,11 @@ 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; } + /** * * @@ -436,7 +449,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateTableFromSnapshotRequest} */ - 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.bigtable.admin.v2.CreateTableFromSnapshotRequest) com.google.bigtable.admin.v2.CreateTableFromSnapshotRequestOrBuilder { @@ -446,7 +459,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_fieldAccessorTable @@ -458,7 +471,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -516,39 +529,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateTableFromSnapshotR } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) { @@ -641,6 +621,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -666,6 +647,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -691,6 +673,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -715,6 +698,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -735,6 +719,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -762,6 +747,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -785,6 +771,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -808,6 +795,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -830,6 +818,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -848,6 +837,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -873,6 +863,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object sourceSnapshot_ = ""; + /** * * @@ -900,6 +891,7 @@ public java.lang.String getSourceSnapshot() { return (java.lang.String) ref; } } + /** * * @@ -927,6 +919,7 @@ public com.google.protobuf.ByteString getSourceSnapshotBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -953,6 +946,7 @@ public Builder setSourceSnapshot(java.lang.String value) { onChanged(); return this; } + /** * * @@ -975,6 +969,7 @@ public Builder clearSourceSnapshot() { onChanged(); return this; } + /** * * @@ -1003,17 +998,6 @@ public Builder setSourceSnapshotBytes(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.bigtable.admin.v2.CreateTableFromSnapshotRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequestOrBuilder.java index ba73cf6189..eace6ad477 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateTableFromSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateTableFromSnapshotRequest) @@ -39,6 +41,7 @@ public interface CreateTableFromSnapshotRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -68,6 +71,7 @@ public interface CreateTableFromSnapshotRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -99,6 +103,7 @@ public interface CreateTableFromSnapshotRequestOrBuilder * @return The sourceSnapshot. */ java.lang.String getSourceSnapshot(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java index e9e89466ae..4b94f3f406 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.CreateTableRequest} */ -public final class CreateTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CreateTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableRequest) CreateTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateTableRequest"); + } + // Use CreateTableRequest.newBuilder() to construct. - private CreateTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CreateTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private CreateTableRequest() { initialSplits_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_fieldAccessorTable @@ -84,6 +91,7 @@ public interface SplitOrBuilder */ com.google.protobuf.ByteString getKey(); } + /** * * @@ -93,13 +101,24 @@ public interface SplitOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.CreateTableRequest.Split} */ - public static final class Split extends com.google.protobuf.GeneratedMessageV3 + public static final class Split extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.CreateTableRequest.Split) SplitOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Split"); + } + // Use Split.newBuilder() to construct. - private Split(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Split(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -107,19 +126,13 @@ private Split() { key_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Split(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_fieldAccessorTable @@ -130,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -247,38 +261,38 @@ public static com.google.bigtable.admin.v2.CreateTableRequest.Split parseFrom( public static com.google.bigtable.admin.v2.CreateTableRequest.Split 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.bigtable.admin.v2.CreateTableRequest.Split 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.bigtable.admin.v2.CreateTableRequest.Split 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.bigtable.admin.v2.CreateTableRequest.Split 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.bigtable.admin.v2.CreateTableRequest.Split 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.bigtable.admin.v2.CreateTableRequest.Split 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); } @@ -302,11 +316,11 @@ 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; } + /** * * @@ -316,8 +330,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.CreateTableRequest.Split} */ - 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.bigtable.admin.v2.CreateTableRequest.Split) com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder { @@ -327,7 +340,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_fieldAccessorTable @@ -339,7 +352,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.CreateTableRequest.Split.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -389,41 +402,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateTableRequest.Split } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.CreateTableRequest.Split) { @@ -437,7 +415,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest.Split other) { if (other == com.google.bigtable.admin.v2.CreateTableRequest.Split.getDefaultInstance()) return this; - if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getKey().isEmpty()) { setKey(other.getKey()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -492,6 +470,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -507,6 +486,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getKey() { return key_; } + /** * * @@ -528,6 +508,7 @@ public Builder setKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -546,18 +527,6 @@ public Builder clearKey() { 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.bigtable.admin.v2.CreateTableRequest.Split) } @@ -615,6 +584,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getDefaultInstanceF @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -641,6 +611,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -672,6 +643,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -697,6 +669,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -725,6 +698,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { public static final int TABLE_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.Table table_; + /** * * @@ -741,6 +715,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -757,6 +732,7 @@ public boolean hasTable() { public com.google.bigtable.admin.v2.Table getTable() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } + /** * * @@ -776,6 +752,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { @SuppressWarnings("serial") private java.util.List initialSplits_; + /** * * @@ -788,14 +765,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -805,6 +782,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { getInitialSplitsList() { return initialSplits_; } + /** * * @@ -817,14 +795,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -834,6 +812,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { getInitialSplitsOrBuilderList() { return initialSplits_; } + /** * * @@ -846,14 +825,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -862,6 +841,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public int getInitialSplitsCount() { return initialSplits_.size(); } + /** * * @@ -874,14 +854,14 @@ public int getInitialSplitsCount() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -890,6 +870,7 @@ public int getInitialSplitsCount() { public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(int index) { return initialSplits_.get(index); } + /** * * @@ -902,14 +883,14 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(in * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -934,11 +915,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(tableId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tableId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getTable()); @@ -955,11 +936,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(tableId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tableId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTable()); @@ -1055,38 +1036,38 @@ public static com.google.bigtable.admin.v2.CreateTableRequest parseFrom( public static com.google.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest 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); } @@ -1109,10 +1090,11 @@ 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; } + /** * * @@ -1123,7 +1105,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.CreateTableRequest} */ - 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.bigtable.admin.v2.CreateTableRequest) com.google.bigtable.admin.v2.CreateTableRequestOrBuilder { @@ -1133,7 +1115,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_fieldAccessorTable @@ -1147,15 +1129,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) { - getTableFieldBuilder(); - getInitialSplitsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTableFieldBuilder(); + internalGetInitialSplitsFieldBuilder(); } } @@ -1241,39 +1223,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.CreateTableRequest 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.bigtable.admin.v2.CreateTableRequest) { @@ -1319,8 +1268,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest other) initialSplits_ = other.initialSplits_; bitField0_ = (bitField0_ & ~0x00000008); initialSplitsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInitialSplitsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInitialSplitsFieldBuilder() : null; } else { initialSplitsBuilder_.addAllMessages(other.initialSplits_); @@ -1367,7 +1316,7 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getTableFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTableFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -1405,6 +1354,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -1430,6 +1380,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -1455,6 +1406,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1479,6 +1431,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1499,6 +1452,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -1526,6 +1480,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -1550,6 +1505,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -1574,6 +1530,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1597,6 +1554,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1616,6 +1574,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -1642,11 +1601,12 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.Table table_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> tableBuilder_; + /** * * @@ -1662,6 +1622,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { public boolean hasTable() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1681,6 +1642,7 @@ public com.google.bigtable.admin.v2.Table getTable() { return tableBuilder_.getMessage(); } } + /** * * @@ -1704,6 +1666,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -1724,6 +1687,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table.Builder builderForVal onChanged(); return this; } + /** * * @@ -1752,6 +1716,7 @@ public Builder mergeTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -1772,6 +1737,7 @@ public Builder clearTable() { onChanged(); return this; } + /** * * @@ -1785,8 +1751,9 @@ public Builder clearTable() { public com.google.bigtable.admin.v2.Table.Builder getTableBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTableFieldBuilder().getBuilder(); + return internalGetTableFieldBuilder().getBuilder(); } + /** * * @@ -1804,6 +1771,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } } + /** * * @@ -1814,14 +1782,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> - getTableFieldBuilder() { + internalGetTableFieldBuilder() { if (tableBuilder_ == null) { tableBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder>( @@ -1843,7 +1811,7 @@ private void ensureInitialSplitsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.CreateTableRequest.Split, com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder, com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder> @@ -1861,14 +1829,14 @@ private void ensureInitialSplitsIsMutable() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -1881,6 +1849,7 @@ private void ensureInitialSplitsIsMutable() { return initialSplitsBuilder_.getMessageList(); } } + /** * * @@ -1893,14 +1862,14 @@ private void ensureInitialSplitsIsMutable() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -1912,6 +1881,7 @@ public int getInitialSplitsCount() { return initialSplitsBuilder_.getCount(); } } + /** * * @@ -1924,14 +1894,14 @@ public int getInitialSplitsCount() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -1943,6 +1913,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(in return initialSplitsBuilder_.getMessage(index); } } + /** * * @@ -1955,14 +1926,14 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(in * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -1981,6 +1952,7 @@ public Builder setInitialSplits( } return this; } + /** * * @@ -1993,14 +1965,14 @@ public Builder setInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2016,6 +1988,7 @@ public Builder setInitialSplits( } return this; } + /** * * @@ -2028,14 +2001,14 @@ public Builder setInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2053,6 +2026,7 @@ public Builder addInitialSplits(com.google.bigtable.admin.v2.CreateTableRequest. } return this; } + /** * * @@ -2065,14 +2039,14 @@ public Builder addInitialSplits(com.google.bigtable.admin.v2.CreateTableRequest. * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2091,6 +2065,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2103,14 +2078,14 @@ public Builder addInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2126,6 +2101,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2138,14 +2114,14 @@ public Builder addInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2161,6 +2137,7 @@ public Builder addInitialSplits( } return this; } + /** * * @@ -2173,14 +2150,14 @@ public Builder addInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2197,6 +2174,7 @@ public Builder addAllInitialSplits( } return this; } + /** * * @@ -2209,14 +2187,14 @@ public Builder addAllInitialSplits( * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2231,6 +2209,7 @@ public Builder clearInitialSplits() { } return this; } + /** * * @@ -2243,14 +2222,14 @@ public Builder clearInitialSplits() { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2265,6 +2244,7 @@ public Builder removeInitialSplits(int index) { } return this; } + /** * * @@ -2277,22 +2257,23 @@ public Builder removeInitialSplits(int index) { * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder getInitialSplitsBuilder( int index) { - return getInitialSplitsFieldBuilder().getBuilder(index); + return internalGetInitialSplitsFieldBuilder().getBuilder(index); } + /** * * @@ -2305,14 +2286,14 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder getInitialS * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2325,6 +2306,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial return initialSplitsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2337,14 +2319,14 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; @@ -2357,6 +2339,7 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial return java.util.Collections.unmodifiableList(initialSplits_); } } + /** * * @@ -2369,22 +2352,23 @@ public com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder getInitial * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialSplitsBuilder() { - return getInitialSplitsFieldBuilder() + return internalGetInitialSplitsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.CreateTableRequest.Split.getDefaultInstance()); } + /** * * @@ -2397,24 +2381,25 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialS * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialSplitsBuilder( int index) { - return getInitialSplitsFieldBuilder() + return internalGetInitialSplitsFieldBuilder() .addBuilder( index, com.google.bigtable.admin.v2.CreateTableRequest.Split.getDefaultInstance()); } + /** * * @@ -2427,31 +2412,31 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialS * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ public java.util.List getInitialSplitsBuilderList() { - return getInitialSplitsFieldBuilder().getBuilderList(); + return internalGetInitialSplitsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.CreateTableRequest.Split, com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder, com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder> - getInitialSplitsFieldBuilder() { + internalGetInitialSplitsFieldBuilder() { if (initialSplitsBuilder_ == null) { initialSplitsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.CreateTableRequest.Split, com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder, com.google.bigtable.admin.v2.CreateTableRequest.SplitOrBuilder>( @@ -2464,17 +2449,6 @@ public com.google.bigtable.admin.v2.CreateTableRequest.Split.Builder addInitialS return initialSplitsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.CreateTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequestOrBuilder.java index 9fa79b8f8b..2f7c55ecf5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface CreateTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.CreateTableRequest) @@ -39,6 +41,7 @@ public interface CreateTableRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -69,6 +72,7 @@ public interface CreateTableRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -97,6 +101,7 @@ public interface CreateTableRequestOrBuilder * @return Whether the table field is set. */ boolean hasTable(); + /** * * @@ -110,6 +115,7 @@ public interface CreateTableRequestOrBuilder * @return The table. */ com.google.bigtable.admin.v2.Table getTable(); + /** * * @@ -134,19 +140,20 @@ public interface CreateTableRequestOrBuilder * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ java.util.List getInitialSplitsList(); + /** * * @@ -159,19 +166,20 @@ public interface CreateTableRequestOrBuilder * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ com.google.bigtable.admin.v2.CreateTableRequest.Split getInitialSplits(int index); + /** * * @@ -184,19 +192,20 @@ public interface CreateTableRequestOrBuilder * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ int getInitialSplitsCount(); + /** * * @@ -209,20 +218,21 @@ public interface CreateTableRequestOrBuilder * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; */ java.util.List getInitialSplitsOrBuilderList(); + /** * * @@ -235,14 +245,14 @@ public interface CreateTableRequestOrBuilder * Example: * * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` + * `"other", "zz"]` * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` + * - Tablet 1 `[, apple) => {"a"}.` + * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` + * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` + * - Tablet 4 `[customer_2, other) => {"customer_2"}.` + * - Tablet 5 `[other, ) => {"other", "zz"}.` * * * repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWrites.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWrites.java index e5707e7d77..77e24428e6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWrites.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWrites.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.DataBoostReadLocalWrites} */ -public final class DataBoostReadLocalWrites extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DataBoostReadLocalWrites extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DataBoostReadLocalWrites) DataBoostReadLocalWritesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataBoostReadLocalWrites"); + } + // Use DataBoostReadLocalWrites.newBuilder() to construct. - private DataBoostReadLocalWrites(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DataBoostReadLocalWrites(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DataBoostReadLocalWrites() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataBoostReadLocalWrites(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DataBoostReadLocalWrites_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DataBoostReadLocalWrites_fieldAccessorTable @@ -154,38 +161,38 @@ public static com.google.bigtable.admin.v2.DataBoostReadLocalWrites parseFrom( public static com.google.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites 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); } @@ -209,10 +216,11 @@ 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; } + /** * * @@ -223,7 +231,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DataBoostReadLocalWrites} */ - 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.bigtable.admin.v2.DataBoostReadLocalWrites) com.google.bigtable.admin.v2.DataBoostReadLocalWritesOrBuilder { @@ -233,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DataBoostReadLocalWrites_fieldAccessorTable @@ -245,7 +253,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DataBoostReadLocalWrites.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -283,39 +291,6 @@ public com.google.bigtable.admin.v2.DataBoostReadLocalWrites 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.bigtable.admin.v2.DataBoostReadLocalWrites) { @@ -372,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.bigtable.admin.v2.DataBoostReadLocalWrites) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWritesOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWritesOrBuilder.java index f21551bd49..5fca3d815d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWritesOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DataBoostReadLocalWritesOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DataBoostReadLocalWritesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DataBoostReadLocalWrites) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java index 649dd84240..2c21eeab55 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DeleteAppProfileRequest} */ -public final class DeleteAppProfileRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteAppProfileRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteAppProfileRequest) DeleteAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteAppProfileRequest"); + } + // Use DeleteAppProfileRequest.newBuilder() to construct. - private DeleteAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteAppProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteAppProfileRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteAppProfileRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -124,6 +133,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 2; private boolean ignoreWarnings_ = false; + /** * * @@ -154,8 +164,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 (ignoreWarnings_ != false) { output.writeBool(2, ignoreWarnings_); @@ -169,8 +179,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 (ignoreWarnings_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, ignoreWarnings_); @@ -250,38 +260,38 @@ public static com.google.bigtable.admin.v2.DeleteAppProfileRequest parseFrom( public static com.google.bigtable.admin.v2.DeleteAppProfileRequest 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.bigtable.admin.v2.DeleteAppProfileRequest 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.bigtable.admin.v2.DeleteAppProfileRequest 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.bigtable.admin.v2.DeleteAppProfileRequest 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.bigtable.admin.v2.DeleteAppProfileRequest 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.bigtable.admin.v2.DeleteAppProfileRequest 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,10 +314,11 @@ 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 +328,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DeleteAppProfileRequest} */ - 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.bigtable.admin.v2.DeleteAppProfileRequest) com.google.bigtable.admin.v2.DeleteAppProfileRequestOrBuilder { @@ -327,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_fieldAccessorTable @@ -339,7 +350,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteAppProfileRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -393,39 +404,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteAppProfileRequest } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.DeleteAppProfileRequest) { @@ -505,6 +483,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -531,6 +510,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -557,6 +537,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -582,6 +563,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -603,6 +585,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -631,6 +614,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private boolean ignoreWarnings_; + /** * * @@ -646,6 +630,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -665,6 +650,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * @@ -683,17 +669,6 @@ public Builder clearIgnoreWarnings() { 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.bigtable.admin.v2.DeleteAppProfileRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequestOrBuilder.java index 38b89b3752..5a64645a06 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteAppProfileRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteAppProfileRequest) @@ -40,6 +42,7 @@ public interface DeleteAppProfileRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequest.java index 74b676af73..9c9bd001cb 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DeleteAuthorizedViewRequest} */ -public final class DeleteAuthorizedViewRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteAuthorizedViewRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteAuthorizedViewRequest) DeleteAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteAuthorizedViewRequest"); + } + // Use DeleteAuthorizedViewRequest.newBuilder() to construct. - private DeleteAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteAuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private DeleteAuthorizedViewRequest() { etag_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteAuthorizedViewRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object etag_ = ""; + /** * * @@ -154,6 +164,7 @@ public java.lang.String getEtag() { return s; } } + /** * * @@ -195,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); } @@ -210,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; @@ -291,38 +302,38 @@ public static com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest parseFrom public static com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest 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.bigtable.admin.v2.DeleteAuthorizedViewRequest 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.bigtable.admin.v2.DeleteAuthorizedViewRequest 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.bigtable.admin.v2.DeleteAuthorizedViewRequest 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.bigtable.admin.v2.DeleteAuthorizedViewRequest 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.bigtable.admin.v2.DeleteAuthorizedViewRequest 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,10 +357,11 @@ 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; } + /** * * @@ -360,7 +372,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DeleteAuthorizedViewRequest} */ - 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.bigtable.admin.v2.DeleteAuthorizedViewRequest) com.google.bigtable.admin.v2.DeleteAuthorizedViewRequestOrBuilder { @@ -370,7 +382,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteAuthorizedViewRequest_fieldAccessorTable @@ -382,7 +394,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -436,39 +448,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteAuthorizedViewRequ } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest) { @@ -550,6 +529,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -576,6 +556,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -602,6 +583,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -627,6 +609,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -648,6 +631,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -676,6 +660,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object etag_ = ""; + /** * * @@ -701,6 +686,7 @@ public java.lang.String getEtag() { return (java.lang.String) ref; } } + /** * * @@ -726,6 +712,7 @@ public com.google.protobuf.ByteString getEtagBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -750,6 +737,7 @@ public Builder setEtag(java.lang.String value) { onChanged(); return this; } + /** * * @@ -770,6 +758,7 @@ public Builder clearEtag() { onChanged(); return this; } + /** * * @@ -796,17 +785,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.bigtable.admin.v2.DeleteAuthorizedViewRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequestOrBuilder.java index 58791e55e0..ecce4aa278 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteAuthorizedViewRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteAuthorizedViewRequest) @@ -40,6 +42,7 @@ public interface DeleteAuthorizedViewRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -72,6 +75,7 @@ public interface DeleteAuthorizedViewRequestOrBuilder * @return The etag. */ java.lang.String getEtag(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java index 85bb5732ff..2ff3407d76 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -43,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteBackupRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -137,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); } @@ -149,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; @@ -224,38 +233,38 @@ public static com.google.bigtable.admin.v2.DeleteBackupRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -278,10 +287,11 @@ 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 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.DeleteBackupRequest) com.google.bigtable.admin.v2.DeleteBackupRequestOrBuilder { @@ -302,7 +312,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteBackupRequest_fieldAccessorTable @@ -314,7 +324,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteBackupRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -364,39 +374,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteBackupRequest 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.bigtable.admin.v2.DeleteBackupRequest) { @@ -467,6 +444,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +471,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +498,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +524,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +546,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -592,17 +574,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.bigtable.admin.v2.DeleteBackupRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequestOrBuilder.java index 024a381c98..354f00f56d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteBackupRequest) @@ -40,6 +42,7 @@ public interface DeleteBackupRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java index c3f1b15602..8496a9a7f7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DeleteClusterRequest} */ -public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteClusterRequest) DeleteClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteClusterRequest"); + } + // Use DeleteClusterRequest.newBuilder() to construct. - private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteClusterRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private DeleteClusterRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteClusterRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteClusterRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteClusterRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,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); } @@ -146,8 +155,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 +230,38 @@ public static com.google.bigtable.admin.v2.DeleteClusterRequest parseFrom( public static com.google.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest 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,10 +284,11 @@ 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; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DeleteClusterRequest} */ - 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.bigtable.admin.v2.DeleteClusterRequest) com.google.bigtable.admin.v2.DeleteClusterRequestOrBuilder { @@ -298,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteClusterRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteClusterRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteClusterRequest 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.bigtable.admin.v2.DeleteClusterRequest) { @@ -463,6 +440,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +466,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +492,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +517,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +538,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -583,17 +565,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.bigtable.admin.v2.DeleteClusterRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequestOrBuilder.java index 273f81864e..8028e5c716 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteClusterRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteClusterRequest) @@ -39,6 +41,7 @@ public interface DeleteClusterRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java index c2be704519..7b8e364075 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -42,19 +55,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,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); } @@ -146,8 +155,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 +230,38 @@ public static com.google.bigtable.admin.v2.DeleteInstanceRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -275,10 +284,11 @@ 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; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.DeleteInstanceRequest) com.google.bigtable.admin.v2.DeleteInstanceRequestOrBuilder { @@ -298,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteInstanceRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteInstanceRequest 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.bigtable.admin.v2.DeleteInstanceRequest) { @@ -463,6 +440,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +466,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +492,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +517,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +538,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -583,17 +565,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.bigtable.admin.v2.DeleteInstanceRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequestOrBuilder.java index 22ef239fb1..3d06b3fef6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteInstanceRequest) @@ -39,6 +41,7 @@ public interface DeleteInstanceRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequest.java new file mode 100644 index 0000000000..a57bf2c2c8 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.DeleteLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteLogicalViewRequest} + */ +@com.google.protobuf.Generated +public final class DeleteLogicalViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteLogicalViewRequest) + DeleteLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteLogicalViewRequest"); + } + + // Use DeleteLogicalViewRequest.newBuilder() to construct. + private DeleteLogicalViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteLogicalViewRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest.class, + com.google.bigtable.admin.v2.DeleteLogicalViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the logical view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the logical view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The current etag of the logical view.
      +   * If an etag is provided and does not match the current etag of the
      +   * logical view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The current etag of the logical view.
      +   * If an etag is provided and does not match the current etag of the
      +   * logical view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + 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.bigtable.admin.v2.DeleteLogicalViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.DeleteLogicalViewRequest other = + (com.google.bigtable.admin.v2.DeleteLogicalViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest 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.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest 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.bigtable.admin.v2.DeleteLogicalViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest 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.bigtable.admin.v2.DeleteLogicalViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest 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.bigtable.admin.v2.DeleteLogicalViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.DeleteLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteLogicalViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.DeleteLogicalViewRequest) + com.google.bigtable.admin.v2.DeleteLogicalViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteLogicalViewRequest.class, + com.google.bigtable.admin.v2.DeleteLogicalViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.DeleteLogicalViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteLogicalViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteLogicalViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.DeleteLogicalViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteLogicalViewRequest build() { + com.google.bigtable.admin.v2.DeleteLogicalViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteLogicalViewRequest buildPartial() { + com.google.bigtable.admin.v2.DeleteLogicalViewRequest result = + new com.google.bigtable.admin.v2.DeleteLogicalViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.DeleteLogicalViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.DeleteLogicalViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.DeleteLogicalViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteLogicalViewRequest other) { + if (other == com.google.bigtable.admin.v2.DeleteLogicalViewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the logical view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the logical view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the logical view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the logical view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the logical view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The current etag of the logical view.
      +     * If an etag is provided and does not match the current etag of the
      +     * logical view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The current etag of the logical view.
      +     * If an etag is provided and does not match the current etag of the
      +     * logical view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The current etag of the logical view.
      +     * If an etag is provided and does not match the current etag of the
      +     * logical view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The current etag of the logical view.
      +     * If an etag is provided and does not match the current etag of the
      +     * logical view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The current etag of the logical view.
      +     * If an etag is provided and does not match the current etag of the
      +     * logical view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.DeleteLogicalViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.DeleteLogicalViewRequest) + private static final com.google.bigtable.admin.v2.DeleteLogicalViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.DeleteLogicalViewRequest(); + } + + public static com.google.bigtable.admin.v2.DeleteLogicalViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteLogicalViewRequest 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.bigtable.admin.v2.DeleteLogicalViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequestOrBuilder.java new file mode 100644 index 0000000000..9b672fc9e4 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteLogicalViewRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface DeleteLogicalViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteLogicalViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the logical view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the logical view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Optional. The current etag of the logical view.
      +   * If an etag is provided and does not match the current etag of the
      +   * logical view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The current etag of the logical view.
      +   * If an etag is provided and does not match the current etag of the
      +   * logical view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequest.java new file mode 100644 index 0000000000..03c2a8ee31 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.DeleteMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteMaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class DeleteMaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + DeleteMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteMaterializedViewRequest"); + } + + // Use DeleteMaterializedViewRequest.newBuilder() to construct. + private DeleteMaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteMaterializedViewRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.class, + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the materialized view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the materialized view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The current etag of the materialized view.
      +   * If an etag is provided and does not match the current etag of the
      +   * materialized view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The current etag of the materialized view.
      +   * If an etag is provided and does not match the current etag of the
      +   * materialized view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + 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.bigtable.admin.v2.DeleteMaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest other = + (com.google.bigtable.admin.v2.DeleteMaterializedViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest 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.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest 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.bigtable.admin.v2.DeleteMaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest 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.bigtable.admin.v2.DeleteMaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest 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.bigtable.admin.v2.DeleteMaterializedViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.DeleteMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteMaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + com.google.bigtable.admin.v2.DeleteMaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.class, + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_DeleteMaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteMaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteMaterializedViewRequest build() { + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteMaterializedViewRequest buildPartial() { + com.google.bigtable.admin.v2.DeleteMaterializedViewRequest result = + new com.google.bigtable.admin.v2.DeleteMaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.DeleteMaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.DeleteMaterializedViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.DeleteMaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteMaterializedViewRequest other) { + if (other == com.google.bigtable.admin.v2.DeleteMaterializedViewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the materialized view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the materialized view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the materialized view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the materialized view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the materialized view to be deleted.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The current etag of the materialized view.
      +     * If an etag is provided and does not match the current etag of the
      +     * materialized view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The current etag of the materialized view.
      +     * If an etag is provided and does not match the current etag of the
      +     * materialized view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The current etag of the materialized view.
      +     * If an etag is provided and does not match the current etag of the
      +     * materialized view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The current etag of the materialized view.
      +     * If an etag is provided and does not match the current etag of the
      +     * materialized view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The current etag of the materialized view.
      +     * If an etag is provided and does not match the current etag of the
      +     * materialized view, deletion will be blocked and an ABORTED error will be
      +     * returned.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + private static final com.google.bigtable.admin.v2.DeleteMaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.DeleteMaterializedViewRequest(); + } + + public static com.google.bigtable.admin.v2.DeleteMaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMaterializedViewRequest 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.bigtable.admin.v2.DeleteMaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..eb02b9b9ad --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteMaterializedViewRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface DeleteMaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteMaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the materialized view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the materialized view to be deleted.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Optional. The current etag of the materialized view.
      +   * If an etag is provided and does not match the current etag of the
      +   * materialized view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The current etag of the materialized view.
      +   * If an etag is provided and does not match the current etag of the
      +   * materialized view, deletion will be blocked and an ABORTED error will be
      +   * returned.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequest.java new file mode 100644 index 0000000000..61110600df --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequest.java @@ -0,0 +1,830 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The request for
      + * [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteSchemaBundleRequest} + */ +@com.google.protobuf.Generated +public final class DeleteSchemaBundleRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + DeleteSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSchemaBundleRequest"); + } + + // Use DeleteSchemaBundleRequest.newBuilder() to construct. + private DeleteSchemaBundleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteSchemaBundleRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.class, + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to delete.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to delete.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The etag of the schema bundle.
      +   * If this is provided, it must match the server's etag. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The etag of the schema bundle.
      +   * If this is provided, it must match the server's etag. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + 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.bigtable.admin.v2.DeleteSchemaBundleRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest other = + (com.google.bigtable.admin.v2.DeleteSchemaBundleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest 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.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest 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.bigtable.admin.v2.DeleteSchemaBundleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest 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.bigtable.admin.v2.DeleteSchemaBundleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest 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.bigtable.admin.v2.DeleteSchemaBundleRequest 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; + } + + /** + * + * + *
      +   * The request for
      +   * [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.DeleteSchemaBundleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + com.google.bigtable.admin.v2.DeleteSchemaBundleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.class, + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_DeleteSchemaBundleRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteSchemaBundleRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteSchemaBundleRequest build() { + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.DeleteSchemaBundleRequest buildPartial() { + com.google.bigtable.admin.v2.DeleteSchemaBundleRequest result = + new com.google.bigtable.admin.v2.DeleteSchemaBundleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.DeleteSchemaBundleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.DeleteSchemaBundleRequest) { + return mergeFrom((com.google.bigtable.admin.v2.DeleteSchemaBundleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteSchemaBundleRequest other) { + if (other == com.google.bigtable.admin.v2.DeleteSchemaBundleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to delete.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to delete.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to delete.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to delete.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to delete.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The etag of the schema bundle.
      +     * If this is provided, it must match the server's etag. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag of the schema bundle.
      +     * If this is provided, it must match the server's etag. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag of the schema bundle.
      +     * If this is provided, it must match the server's etag. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag of the schema bundle.
      +     * If this is provided, it must match the server's etag. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag of the schema bundle.
      +     * If this is provided, it must match the server's etag. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + private static final com.google.bigtable.admin.v2.DeleteSchemaBundleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.DeleteSchemaBundleRequest(); + } + + public static com.google.bigtable.admin.v2.DeleteSchemaBundleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSchemaBundleRequest 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.bigtable.admin.v2.DeleteSchemaBundleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequestOrBuilder.java new file mode 100644 index 0000000000..40248b0a4b --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSchemaBundleRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface DeleteSchemaBundleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteSchemaBundleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to delete.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to delete.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Optional. The etag of the schema bundle.
      +   * If this is provided, it must match the server's etag. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The etag of the schema bundle.
      +   * If this is provided, it must match the server's etag. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java index 992d66b28f..c13b17330a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DeleteSnapshotRequest} */ -public final class DeleteSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteSnapshotRequest) DeleteSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSnapshotRequest"); + } + // Use DeleteSnapshotRequest.newBuilder() to construct. - private DeleteSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +61,13 @@ private DeleteSnapshotRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_fieldAccessorTable @@ -73,6 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -100,6 +108,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -142,8 +151,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); } @@ -154,8 +163,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; @@ -229,38 +238,38 @@ public static com.google.bigtable.admin.v2.DeleteSnapshotRequest parseFrom( public static com.google.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest 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); } @@ -283,10 +292,11 @@ 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; } + /** * * @@ -302,7 +312,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DeleteSnapshotRequest} */ - 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.bigtable.admin.v2.DeleteSnapshotRequest) com.google.bigtable.admin.v2.DeleteSnapshotRequestOrBuilder { @@ -312,7 +322,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_fieldAccessorTable @@ -324,7 +334,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -374,39 +384,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteSnapshotRequest 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.bigtable.admin.v2.DeleteSnapshotRequest) { @@ -477,6 +454,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -503,6 +481,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -529,6 +508,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -554,6 +534,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -575,6 +556,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -602,17 +584,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.bigtable.admin.v2.DeleteSnapshotRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequestOrBuilder.java index 56999bdd19..01c3a680e9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteSnapshotRequest) @@ -40,6 +42,7 @@ public interface DeleteSnapshotRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java index 06a6904a86..807389c9bc 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DeleteTableRequest} */ -public final class DeleteTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DeleteTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DeleteTableRequest) DeleteTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteTableRequest"); + } + // Use DeleteTableRequest.newBuilder() to construct. - private DeleteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private DeleteTableRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteTableRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -137,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); } @@ -149,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; @@ -224,38 +233,38 @@ public static com.google.bigtable.admin.v2.DeleteTableRequest parseFrom( public static com.google.bigtable.admin.v2.DeleteTableRequest 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.bigtable.admin.v2.DeleteTableRequest 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.bigtable.admin.v2.DeleteTableRequest 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.bigtable.admin.v2.DeleteTableRequest 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.bigtable.admin.v2.DeleteTableRequest 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.bigtable.admin.v2.DeleteTableRequest 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,10 +287,11 @@ 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 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DeleteTableRequest} */ - 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.bigtable.admin.v2.DeleteTableRequest) com.google.bigtable.admin.v2.DeleteTableRequestOrBuilder { @@ -302,7 +312,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteTableRequest_fieldAccessorTable @@ -314,7 +324,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DeleteTableRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -364,39 +374,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.DeleteTableRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.DeleteTableRequest) { @@ -467,6 +444,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +471,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +498,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +524,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +546,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -592,17 +574,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.bigtable.admin.v2.DeleteTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequestOrBuilder.java index 79c0487c76..8e5c51af17 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DeleteTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DeleteTableRequest) @@ -40,6 +42,7 @@ public interface DeleteTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java index f4dd85fcf1..9be56fcb01 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.DropRowRangeRequest} */ -public final class DropRowRangeRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class DropRowRangeRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.DropRowRangeRequest) DropRowRangeRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DropRowRangeRequest"); + } + // Use DropRowRangeRequest.newBuilder() to construct. - private DropRowRangeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DropRowRangeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private DropRowRangeRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DropRowRangeRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DropRowRangeRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DropRowRangeRequest_fieldAccessorTable @@ -81,6 +88,7 @@ public enum TargetCase 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. @@ -117,6 +125,7 @@ public TargetCase getTargetCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -144,6 +153,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -173,6 +183,7 @@ public com.google.protobuf.ByteString getNameBytes() { } public static final int ROW_KEY_PREFIX_FIELD_NUMBER = 2; + /** * * @@ -189,6 +200,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasRowKeyPrefix() { return targetCase_ == 2; } + /** * * @@ -210,6 +222,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { } public static final int DELETE_ALL_DATA_FROM_TABLE_FIELD_NUMBER = 3; + /** * * @@ -225,6 +238,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { public boolean hasDeleteAllDataFromTable() { return targetCase_ == 3; } + /** * * @@ -258,8 +272,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 (targetCase_ == 2) { output.writeBytes(2, (com.google.protobuf.ByteString) target_); @@ -276,8 +290,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 (targetCase_ == 2) { size += @@ -384,38 +398,38 @@ public static com.google.bigtable.admin.v2.DropRowRangeRequest parseFrom( public static com.google.bigtable.admin.v2.DropRowRangeRequest 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.bigtable.admin.v2.DropRowRangeRequest 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.bigtable.admin.v2.DropRowRangeRequest 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.bigtable.admin.v2.DropRowRangeRequest 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.bigtable.admin.v2.DropRowRangeRequest 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.bigtable.admin.v2.DropRowRangeRequest 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); } @@ -438,10 +452,11 @@ 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; } + /** * * @@ -452,7 +467,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.DropRowRangeRequest} */ - 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.bigtable.admin.v2.DropRowRangeRequest) com.google.bigtable.admin.v2.DropRowRangeRequestOrBuilder { @@ -462,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DropRowRangeRequest_fieldAccessorTable @@ -474,7 +489,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.DropRowRangeRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -532,39 +547,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.DropRowRangeRequest result.target_ = this.target_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.DropRowRangeRequest) { @@ -677,6 +659,7 @@ public Builder clearTarget() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -703,6 +686,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -729,6 +713,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -754,6 +739,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -775,6 +761,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -817,6 +804,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasRowKeyPrefix() { return targetCase_ == 2; } + /** * * @@ -835,6 +823,7 @@ public com.google.protobuf.ByteString getRowKeyPrefix() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -857,6 +846,7 @@ public Builder setRowKeyPrefix(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -892,6 +882,7 @@ public Builder clearRowKeyPrefix() { public boolean hasDeleteAllDataFromTable() { return targetCase_ == 3; } + /** * * @@ -909,6 +900,7 @@ public boolean getDeleteAllDataFromTable() { } return false; } + /** * * @@ -928,6 +920,7 @@ public Builder setDeleteAllDataFromTable(boolean value) { onChanged(); return this; } + /** * * @@ -948,17 +941,6 @@ public Builder clearDeleteAllDataFromTable() { 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.bigtable.admin.v2.DropRowRangeRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequestOrBuilder.java index fd42bcd1bb..f2e320121e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface DropRowRangeRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.DropRowRangeRequest) @@ -40,6 +42,7 @@ public interface DropRowRangeRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +73,7 @@ public interface DropRowRangeRequestOrBuilder * @return Whether the rowKeyPrefix field is set. */ boolean hasRowKeyPrefix(); + /** * * @@ -96,6 +100,7 @@ public interface DropRowRangeRequestOrBuilder * @return Whether the deleteAllDataFromTable field is set. */ boolean hasDeleteAllDataFromTable(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java index 6f22e413ce..37a7495ab7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -31,13 +32,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -46,19 +59,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_EncryptionInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_EncryptionInfo_fieldAccessorTable @@ -118,6 +125,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"); + } + /** * * @@ -128,6 +145,7 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { * ENCRYPTION_TYPE_UNSPECIFIED = 0; */ public static final int ENCRYPTION_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -140,6 +158,7 @@ public enum EncryptionType implements com.google.protobuf.ProtocolMessageEnum { * GOOGLE_DEFAULT_ENCRYPTION = 1; */ public static final int GOOGLE_DEFAULT_ENCRYPTION_VALUE = 1; + /** * * @@ -215,7 +234,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.bigtable.admin.v2.EncryptionInfo.getDescriptor().getEnumTypes().get(0); } @@ -243,6 +262,7 @@ private EncryptionType(int value) { private int bitField0_; public static final int ENCRYPTION_TYPE_FIELD_NUMBER = 3; private int encryptionType_ = 0; + /** * * @@ -260,6 +280,7 @@ private EncryptionType(int value) { public int getEncryptionTypeValue() { return encryptionType_; } + /** * * @@ -284,6 +305,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType getEncryptionT public static final int ENCRYPTION_STATUS_FIELD_NUMBER = 4; private com.google.rpc.Status encryptionStatus_; + /** * * @@ -302,6 +324,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType getEncryptionT public boolean hasEncryptionStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -322,6 +345,7 @@ public com.google.rpc.Status getEncryptionStatus() { ? com.google.rpc.Status.getDefaultInstance() : encryptionStatus_; } + /** * * @@ -345,6 +369,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object kmsKeyVersion_ = ""; + /** * * @@ -371,6 +396,7 @@ public java.lang.String getKmsKeyVersion() { return s; } } + /** * * @@ -412,8 +438,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.bigtable.admin.v2.EncryptionInfo.EncryptionType.ENCRYPTION_TYPE_UNSPECIFIED @@ -432,8 +458,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.bigtable.admin.v2.EncryptionInfo.EncryptionType.ENCRYPTION_TYPE_UNSPECIFIED @@ -526,38 +552,38 @@ public static com.google.bigtable.admin.v2.EncryptionInfo parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -580,10 +606,11 @@ 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 +623,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.EncryptionInfo) com.google.bigtable.admin.v2.EncryptionInfoOrBuilder { @@ -606,7 +633,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_EncryptionInfo_fieldAccessorTable @@ -620,14 +647,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(); } } @@ -693,39 +720,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.EncryptionInfo 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.bigtable.admin.v2.EncryptionInfo) { @@ -790,7 +784,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getEncryptionStatusFieldBuilder().getBuilder(), extensionRegistry); + internalGetEncryptionStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 34 @@ -814,6 +808,7 @@ public Builder mergeFrom( private int bitField0_; private int encryptionType_ = 0; + /** * * @@ -831,6 +826,7 @@ public Builder mergeFrom( public int getEncryptionTypeValue() { return encryptionType_; } + /** * * @@ -851,6 +847,7 @@ public Builder setEncryptionTypeValue(int value) { onChanged(); return this; } + /** * * @@ -872,6 +869,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType getEncryptionT ? com.google.bigtable.admin.v2.EncryptionInfo.EncryptionType.UNRECOGNIZED : result; } + /** * * @@ -896,6 +894,7 @@ public Builder setEncryptionType( onChanged(); return this; } + /** * * @@ -917,9 +916,10 @@ 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_; + /** * * @@ -937,6 +937,7 @@ public Builder clearEncryptionType() { public boolean hasEncryptionStatus() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -960,6 +961,7 @@ public com.google.rpc.Status getEncryptionStatus() { return encryptionStatusBuilder_.getMessage(); } } + /** * * @@ -985,6 +987,7 @@ public Builder setEncryptionStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -1007,6 +1010,7 @@ public Builder setEncryptionStatus(com.google.rpc.Status.Builder builderForValue onChanged(); return this; } + /** * * @@ -1037,6 +1041,7 @@ public Builder mergeEncryptionStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -1059,6 +1064,7 @@ public Builder clearEncryptionStatus() { onChanged(); return this; } + /** * * @@ -1074,8 +1080,9 @@ public Builder clearEncryptionStatus() { public com.google.rpc.Status.Builder getEncryptionStatusBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getEncryptionStatusFieldBuilder().getBuilder(); + return internalGetEncryptionStatusFieldBuilder().getBuilder(); } + /** * * @@ -1097,6 +1104,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { : encryptionStatus_; } } + /** * * @@ -1109,12 +1117,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>( @@ -1125,6 +1133,7 @@ public com.google.rpc.StatusOrBuilder getEncryptionStatusOrBuilder() { } private java.lang.Object kmsKeyVersion_ = ""; + /** * * @@ -1150,6 +1159,7 @@ public java.lang.String getKmsKeyVersion() { return (java.lang.String) ref; } } + /** * * @@ -1175,6 +1185,7 @@ public com.google.protobuf.ByteString getKmsKeyVersionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1199,6 +1210,7 @@ public Builder setKmsKeyVersion(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1219,6 +1231,7 @@ public Builder clearKmsKeyVersion() { onChanged(); return this; } + /** * * @@ -1245,17 +1258,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.bigtable.admin.v2.EncryptionInfo) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfoOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfoOrBuilder.java index df7b16252a..26020f6ba6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfoOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface EncryptionInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.EncryptionInfo) @@ -38,6 +40,7 @@ public interface EncryptionInfoOrBuilder * @return The enum numeric value on the wire for encryptionType. */ int getEncryptionTypeValue(); + /** * * @@ -68,6 +71,7 @@ public interface EncryptionInfoOrBuilder * @return Whether the encryptionStatus field is set. */ boolean hasEncryptionStatus(); + /** * * @@ -83,6 +87,7 @@ public interface EncryptionInfoOrBuilder * @return The encryptionStatus. */ com.google.rpc.Status getEncryptionStatus(); + /** * * @@ -112,6 +117,7 @@ public interface EncryptionInfoOrBuilder * @return The kmsKeyVersion. */ java.lang.String getKmsKeyVersion(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java index a668cdafac..c7f168078b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.GcRule} */ -public final class GcRule extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GcRule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule) GcRuleOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GcRule"); + } + // Use GcRule.newBuilder() to construct. - private GcRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GcRule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GcRule() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GcRule(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable @@ -76,6 +83,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesList(); + /** * * @@ -86,6 +94,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ com.google.bigtable.admin.v2.GcRule getRules(int index); + /** * * @@ -96,6 +105,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ int getRulesCount(); + /** * * @@ -106,6 +116,7 @@ public interface IntersectionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesOrBuilderList(); + /** * * @@ -117,6 +128,7 @@ public interface IntersectionOrBuilder */ com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index); } + /** * * @@ -126,13 +138,24 @@ public interface IntersectionOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.GcRule.Intersection} */ - public static final class Intersection extends com.google.protobuf.GeneratedMessageV3 + public static final class Intersection extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Intersection) IntersectionOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Intersection"); + } + // Use Intersection.newBuilder() to construct. - private Intersection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Intersection(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -140,19 +163,13 @@ private Intersection() { rules_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Intersection(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable @@ -165,6 +182,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List rules_; + /** * * @@ -178,6 +196,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRulesList() { return rules_; } + /** * * @@ -192,6 +211,7 @@ public java.util.List getRulesList() { getRulesOrBuilderList() { return rules_; } + /** * * @@ -205,6 +225,7 @@ public java.util.List getRulesList() { public int getRulesCount() { return rules_.size(); } + /** * * @@ -218,6 +239,7 @@ public int getRulesCount() { public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rules_.get(index); } + /** * * @@ -335,38 +357,38 @@ public static com.google.bigtable.admin.v2.GcRule.Intersection parseFrom( public static com.google.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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.bigtable.admin.v2.GcRule.Intersection 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); } @@ -389,11 +411,11 @@ 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,8 +425,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.GcRule.Intersection} */ - 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.bigtable.admin.v2.GcRule.Intersection) com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder { @@ -414,7 +435,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable @@ -426,7 +447,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GcRule.Intersection.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -493,41 +514,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GcRule.Intersection resu 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.bigtable.admin.v2.GcRule.Intersection) { @@ -560,8 +546,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Intersection other) rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000001); rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRulesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() : null; } else { rulesBuilder_.addAllMessages(other.rules_); @@ -636,7 +622,7 @@ private void ensureRulesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> @@ -658,6 +644,7 @@ public java.util.List getRulesList() { return rulesBuilder_.getMessageList(); } } + /** * * @@ -674,6 +661,7 @@ public int getRulesCount() { return rulesBuilder_.getCount(); } } + /** * * @@ -690,6 +678,7 @@ public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rulesBuilder_.getMessage(index); } } + /** * * @@ -712,6 +701,7 @@ public Builder setRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -732,6 +722,7 @@ public Builder setRules( } return this; } + /** * * @@ -754,6 +745,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -776,6 +768,7 @@ public Builder addRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -795,6 +788,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule.Builder builderForVa } return this; } + /** * * @@ -815,6 +809,7 @@ public Builder addRules( } return this; } + /** * * @@ -835,6 +830,7 @@ public Builder addAllRules( } return this; } + /** * * @@ -854,6 +850,7 @@ public Builder clearRules() { } return this; } + /** * * @@ -873,6 +870,7 @@ public Builder removeRules(int index) { } return this; } + /** * * @@ -883,8 +881,9 @@ public Builder removeRules(int index) { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(int index) { - return getRulesFieldBuilder().getBuilder(index); + return internalGetRulesFieldBuilder().getBuilder(index); } + /** * * @@ -901,6 +900,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return rulesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -918,6 +918,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return java.util.Collections.unmodifiableList(rules_); } } + /** * * @@ -928,9 +929,10 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -941,9 +943,10 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -954,17 +957,17 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public java.util.List getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); + return internalGetRulesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> - getRulesFieldBuilder() { + internalGetRulesFieldBuilder() { if (rulesBuilder_ == null) { rulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder>( @@ -974,18 +977,6 @@ public java.util.List getRulesBuild return rulesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule.Intersection) } @@ -1053,6 +1044,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesList(); + /** * * @@ -1063,6 +1055,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ com.google.bigtable.admin.v2.GcRule getRules(int index); + /** * * @@ -1073,6 +1066,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ int getRulesCount(); + /** * * @@ -1083,6 +1077,7 @@ public interface UnionOrBuilder * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ java.util.List getRulesOrBuilderList(); + /** * * @@ -1094,6 +1089,7 @@ public interface UnionOrBuilder */ com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index); } + /** * * @@ -1103,13 +1099,24 @@ public interface UnionOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.GcRule.Union} */ - public static final class Union extends com.google.protobuf.GeneratedMessageV3 + public static final class Union extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GcRule.Union) UnionOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Union"); + } + // Use Union.newBuilder() to construct. - private Union(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Union(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1117,19 +1124,13 @@ private Union() { rules_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Union(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable @@ -1142,6 +1143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List rules_; + /** * * @@ -1155,6 +1157,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRulesList() { return rules_; } + /** * * @@ -1169,6 +1172,7 @@ public java.util.List getRulesList() { getRulesOrBuilderList() { return rules_; } + /** * * @@ -1182,6 +1186,7 @@ public java.util.List getRulesList() { public int getRulesCount() { return rules_.size(); } + /** * * @@ -1195,6 +1200,7 @@ public int getRulesCount() { public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rules_.get(index); } + /** * * @@ -1312,38 +1318,38 @@ public static com.google.bigtable.admin.v2.GcRule.Union parseFrom( public static com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union 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); } @@ -1366,11 +1372,11 @@ 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; } + /** * * @@ -1380,8 +1386,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.GcRule.Union} */ - 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.bigtable.admin.v2.GcRule.Union) com.google.bigtable.admin.v2.GcRule.UnionOrBuilder { @@ -1391,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable @@ -1403,7 +1408,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GcRule.Union.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1469,41 +1474,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GcRule.Union 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.bigtable.admin.v2.GcRule.Union) { @@ -1535,8 +1505,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Union other) { rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000001); rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRulesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() : null; } else { rulesBuilder_.addAllMessages(other.rules_); @@ -1611,7 +1581,7 @@ private void ensureRulesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> @@ -1633,6 +1603,7 @@ public java.util.List getRulesList() { return rulesBuilder_.getMessageList(); } } + /** * * @@ -1649,6 +1620,7 @@ public int getRulesCount() { return rulesBuilder_.getCount(); } } + /** * * @@ -1665,6 +1637,7 @@ public com.google.bigtable.admin.v2.GcRule getRules(int index) { return rulesBuilder_.getMessage(index); } } + /** * * @@ -1687,6 +1660,7 @@ public Builder setRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1707,6 +1681,7 @@ public Builder setRules( } return this; } + /** * * @@ -1729,6 +1704,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1751,6 +1727,7 @@ public Builder addRules(int index, com.google.bigtable.admin.v2.GcRule value) { } return this; } + /** * * @@ -1770,6 +1747,7 @@ public Builder addRules(com.google.bigtable.admin.v2.GcRule.Builder builderForVa } return this; } + /** * * @@ -1790,6 +1768,7 @@ public Builder addRules( } return this; } + /** * * @@ -1810,6 +1789,7 @@ public Builder addAllRules( } return this; } + /** * * @@ -1829,6 +1809,7 @@ public Builder clearRules() { } return this; } + /** * * @@ -1848,6 +1829,7 @@ public Builder removeRules(int index) { } return this; } + /** * * @@ -1858,8 +1840,9 @@ public Builder removeRules(int index) { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder getRulesBuilder(int index) { - return getRulesFieldBuilder().getBuilder(index); + return internalGetRulesFieldBuilder().getBuilder(index); } + /** * * @@ -1876,6 +1859,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return rulesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1893,6 +1877,7 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) return java.util.Collections.unmodifiableList(rules_); } } + /** * * @@ -1903,9 +1888,10 @@ public com.google.bigtable.admin.v2.GcRuleOrBuilder getRulesOrBuilder(int index) * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -1916,9 +1902,10 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder() { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.GcRule.getDefaultInstance()); } + /** * * @@ -1929,17 +1916,17 @@ public com.google.bigtable.admin.v2.GcRule.Builder addRulesBuilder(int index) { * repeated .google.bigtable.admin.v2.GcRule rules = 1; */ public java.util.List getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); + return internalGetRulesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder> - getRulesFieldBuilder() { + internalGetRulesFieldBuilder() { if (rulesBuilder_ == null) { rulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.GcRule, com.google.bigtable.admin.v2.GcRule.Builder, com.google.bigtable.admin.v2.GcRuleOrBuilder>( @@ -1949,18 +1936,6 @@ public java.util.List getRulesBuild return rulesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule.Union) } @@ -2032,6 +2007,7 @@ public enum RuleCase private RuleCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -2069,6 +2045,7 @@ public RuleCase getRuleCase() { } public static final int MAX_NUM_VERSIONS_FIELD_NUMBER = 1; + /** * * @@ -2084,6 +2061,7 @@ public RuleCase getRuleCase() { public boolean hasMaxNumVersions() { return ruleCase_ == 1; } + /** * * @@ -2104,6 +2082,7 @@ public int getMaxNumVersions() { } public static final int MAX_AGE_FIELD_NUMBER = 2; + /** * * @@ -2121,6 +2100,7 @@ public int getMaxNumVersions() { public boolean hasMaxAge() { return ruleCase_ == 2; } + /** * * @@ -2141,6 +2121,7 @@ public com.google.protobuf.Duration getMaxAge() { } return com.google.protobuf.Duration.getDefaultInstance(); } + /** * * @@ -2161,6 +2142,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { } public static final int INTERSECTION_FIELD_NUMBER = 3; + /** * * @@ -2176,6 +2158,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { public boolean hasIntersection() { return ruleCase_ == 3; } + /** * * @@ -2194,6 +2177,7 @@ public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() { } return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } + /** * * @@ -2212,6 +2196,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection } public static final int UNION_FIELD_NUMBER = 4; + /** * * @@ -2227,6 +2212,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection public boolean hasUnion() { return ruleCase_ == 4; } + /** * * @@ -2245,6 +2231,7 @@ public com.google.bigtable.admin.v2.GcRule.Union getUnion() { } return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } + /** * * @@ -2421,38 +2408,38 @@ public static com.google.bigtable.admin.v2.GcRule parseFrom( public static com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule 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); } @@ -2475,10 +2462,11 @@ 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; } + /** * * @@ -2488,7 +2476,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GcRule} */ - 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.bigtable.admin.v2.GcRule) com.google.bigtable.admin.v2.GcRuleOrBuilder { @@ -2498,7 +2486,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable @@ -2510,7 +2498,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GcRule.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2581,39 +2569,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.GcRule 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.bigtable.admin.v2.GcRule) { @@ -2686,19 +2641,20 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getMaxAgeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMaxAgeFieldBuilder().getBuilder(), extensionRegistry); ruleCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getIntersectionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetIntersectionFieldBuilder().getBuilder(), extensionRegistry); ruleCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getUnionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetUnionFieldBuilder().getBuilder(), extensionRegistry); ruleCase_ = 4; break; } // case 34 @@ -2749,6 +2705,7 @@ public Builder clearRule() { public boolean hasMaxNumVersions() { return ruleCase_ == 1; } + /** * * @@ -2766,6 +2723,7 @@ public int getMaxNumVersions() { } return 0; } + /** * * @@ -2785,6 +2743,7 @@ public Builder setMaxNumVersions(int value) { onChanged(); return this; } + /** * * @@ -2805,11 +2764,12 @@ public Builder clearMaxNumVersions() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxAgeBuilder_; + /** * * @@ -2827,6 +2787,7 @@ public Builder clearMaxNumVersions() { public boolean hasMaxAge() { return ruleCase_ == 2; } + /** * * @@ -2854,6 +2815,7 @@ public com.google.protobuf.Duration getMaxAge() { return com.google.protobuf.Duration.getDefaultInstance(); } } + /** * * @@ -2878,6 +2840,7 @@ public Builder setMaxAge(com.google.protobuf.Duration value) { ruleCase_ = 2; return this; } + /** * * @@ -2899,6 +2862,7 @@ public Builder setMaxAge(com.google.protobuf.Duration.Builder builderForValue) { ruleCase_ = 2; return this; } + /** * * @@ -2931,6 +2895,7 @@ public Builder mergeMaxAge(com.google.protobuf.Duration value) { ruleCase_ = 2; return this; } + /** * * @@ -2958,6 +2923,7 @@ public Builder clearMaxAge() { } return this; } + /** * * @@ -2970,8 +2936,9 @@ public Builder clearMaxAge() { * .google.protobuf.Duration max_age = 2; */ public com.google.protobuf.Duration.Builder getMaxAgeBuilder() { - return getMaxAgeFieldBuilder().getBuilder(); + return internalGetMaxAgeFieldBuilder().getBuilder(); } + /** * * @@ -2994,6 +2961,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { return com.google.protobuf.Duration.getDefaultInstance(); } } + /** * * @@ -3005,17 +2973,17 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { * * .google.protobuf.Duration max_age = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getMaxAgeFieldBuilder() { + internalGetMaxAgeFieldBuilder() { if (maxAgeBuilder_ == null) { if (!(ruleCase_ == 2)) { rule_ = com.google.protobuf.Duration.getDefaultInstance(); } maxAgeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -3027,11 +2995,12 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { return maxAgeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder> intersectionBuilder_; + /** * * @@ -3047,6 +3016,7 @@ public com.google.protobuf.DurationOrBuilder getMaxAgeOrBuilder() { public boolean hasIntersection() { return ruleCase_ == 3; } + /** * * @@ -3072,6 +3042,7 @@ public com.google.bigtable.admin.v2.GcRule.Intersection getIntersection() { return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } } + /** * * @@ -3094,6 +3065,7 @@ public Builder setIntersection(com.google.bigtable.admin.v2.GcRule.Intersection ruleCase_ = 3; return this; } + /** * * @@ -3114,6 +3086,7 @@ public Builder setIntersection( ruleCase_ = 3; return this; } + /** * * @@ -3146,6 +3119,7 @@ public Builder mergeIntersection(com.google.bigtable.admin.v2.GcRule.Intersectio ruleCase_ = 3; return this; } + /** * * @@ -3171,6 +3145,7 @@ public Builder clearIntersection() { } return this; } + /** * * @@ -3181,8 +3156,9 @@ public Builder clearIntersection() { * .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; */ public com.google.bigtable.admin.v2.GcRule.Intersection.Builder getIntersectionBuilder() { - return getIntersectionFieldBuilder().getBuilder(); + return internalGetIntersectionFieldBuilder().getBuilder(); } + /** * * @@ -3203,6 +3179,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection return com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } } + /** * * @@ -3212,17 +3189,17 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection * * .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder> - getIntersectionFieldBuilder() { + internalGetIntersectionFieldBuilder() { if (intersectionBuilder_ == null) { if (!(ruleCase_ == 3)) { rule_ = com.google.bigtable.admin.v2.GcRule.Intersection.getDefaultInstance(); } intersectionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Intersection, com.google.bigtable.admin.v2.GcRule.Intersection.Builder, com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder>( @@ -3236,11 +3213,12 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection return intersectionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder> unionBuilder_; + /** * * @@ -3256,6 +3234,7 @@ public com.google.bigtable.admin.v2.GcRule.IntersectionOrBuilder getIntersection public boolean hasUnion() { return ruleCase_ == 4; } + /** * * @@ -3281,6 +3260,7 @@ public com.google.bigtable.admin.v2.GcRule.Union getUnion() { return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } } + /** * * @@ -3303,6 +3283,7 @@ public Builder setUnion(com.google.bigtable.admin.v2.GcRule.Union value) { ruleCase_ = 4; return this; } + /** * * @@ -3322,6 +3303,7 @@ public Builder setUnion(com.google.bigtable.admin.v2.GcRule.Union.Builder builde ruleCase_ = 4; return this; } + /** * * @@ -3354,6 +3336,7 @@ public Builder mergeUnion(com.google.bigtable.admin.v2.GcRule.Union value) { ruleCase_ = 4; return this; } + /** * * @@ -3379,6 +3362,7 @@ public Builder clearUnion() { } return this; } + /** * * @@ -3389,8 +3373,9 @@ public Builder clearUnion() { * .google.bigtable.admin.v2.GcRule.Union union = 4; */ public com.google.bigtable.admin.v2.GcRule.Union.Builder getUnionBuilder() { - return getUnionFieldBuilder().getBuilder(); + return internalGetUnionFieldBuilder().getBuilder(); } + /** * * @@ -3411,6 +3396,7 @@ public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() { return com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } } + /** * * @@ -3420,17 +3406,17 @@ public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() { * * .google.bigtable.admin.v2.GcRule.Union union = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder> - getUnionFieldBuilder() { + internalGetUnionFieldBuilder() { if (unionBuilder_ == null) { if (!(ruleCase_ == 4)) { rule_ = com.google.bigtable.admin.v2.GcRule.Union.getDefaultInstance(); } unionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.GcRule.Union, com.google.bigtable.admin.v2.GcRule.Union.Builder, com.google.bigtable.admin.v2.GcRule.UnionOrBuilder>( @@ -3444,17 +3430,6 @@ public com.google.bigtable.admin.v2.GcRule.UnionOrBuilder getUnionOrBuilder() { return unionBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GcRule) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRuleOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRuleOrBuilder.java index 92c65d466e..8c10f8e2c1 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRuleOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRuleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GcRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GcRule) @@ -36,6 +38,7 @@ public interface GcRuleOrBuilder * @return Whether the maxNumVersions field is set. */ boolean hasMaxNumVersions(); + /** * * @@ -63,6 +66,7 @@ public interface GcRuleOrBuilder * @return Whether the maxAge field is set. */ boolean hasMaxAge(); + /** * * @@ -77,6 +81,7 @@ public interface GcRuleOrBuilder * @return The maxAge. */ com.google.protobuf.Duration getMaxAge(); + /** * * @@ -102,6 +107,7 @@ public interface GcRuleOrBuilder * @return Whether the intersection field is set. */ boolean hasIntersection(); + /** * * @@ -114,6 +120,7 @@ public interface GcRuleOrBuilder * @return The intersection. */ com.google.bigtable.admin.v2.GcRule.Intersection getIntersection(); + /** * * @@ -137,6 +144,7 @@ public interface GcRuleOrBuilder * @return Whether the union field is set. */ boolean hasUnion(); + /** * * @@ -149,6 +157,7 @@ public interface GcRuleOrBuilder * @return The union. */ com.google.bigtable.admin.v2.GcRule.Union getUnion(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java index acf6d3ca17..8b5f016a17 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,14 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GenerateConsistencyTokenRequest} */ -public final class GenerateConsistencyTokenRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GenerateConsistencyTokenRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GenerateConsistencyTokenRequest) GenerateConsistencyTokenRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateConsistencyTokenRequest"); + } + // Use GenerateConsistencyTokenRequest.newBuilder() to construct. - private GenerateConsistencyTokenRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GenerateConsistencyTokenRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +56,13 @@ private GenerateConsistencyTokenRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GenerateConsistencyTokenRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_fieldAccessorTable @@ -69,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -138,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); } @@ -150,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; @@ -225,38 +233,38 @@ public static com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest parse public static com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest 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.bigtable.admin.v2.GenerateConsistencyTokenRequest 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.bigtable.admin.v2.GenerateConsistencyTokenRequest 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.bigtable.admin.v2.GenerateConsistencyTokenRequest 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.bigtable.admin.v2.GenerateConsistencyTokenRequest 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.bigtable.admin.v2.GenerateConsistencyTokenRequest 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,10 +288,11 @@ 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 +303,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GenerateConsistencyTokenRequest} */ - 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.bigtable.admin.v2.GenerateConsistencyTokenRequest) com.google.bigtable.admin.v2.GenerateConsistencyTokenRequestOrBuilder { @@ -304,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_fieldAccessorTable @@ -316,7 +325,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -368,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.bigtable.admin.v2.GenerateConsistencyTokenRequest) { @@ -472,6 +448,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -498,6 +475,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -524,6 +502,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -549,6 +528,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -570,6 +550,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -597,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.bigtable.admin.v2.GenerateConsistencyTokenRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequestOrBuilder.java index ba39358422..769965eba0 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GenerateConsistencyTokenRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GenerateConsistencyTokenRequest) @@ -40,6 +42,7 @@ public interface GenerateConsistencyTokenRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java index ac7d184dc3..75d75c0750 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,14 +30,26 @@ * * Protobuf type {@code google.bigtable.admin.v2.GenerateConsistencyTokenResponse} */ -public final class GenerateConsistencyTokenResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GenerateConsistencyTokenResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GenerateConsistencyTokenResponse) GenerateConsistencyTokenResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateConsistencyTokenResponse"); + } + // Use GenerateConsistencyTokenResponse.newBuilder() to construct. private GenerateConsistencyTokenResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private GenerateConsistencyTokenResponse() { consistencyToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GenerateConsistencyTokenResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object consistencyToken_ = ""; + /** * * @@ -92,6 +100,7 @@ public java.lang.String getConsistencyToken() { return s; } } + /** * * @@ -130,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(consistencyToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, consistencyToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consistencyToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, consistencyToken_); } getUnknownFields().writeTo(output); } @@ -142,8 +151,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, consistencyToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(consistencyToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, consistencyToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -217,38 +226,38 @@ public static com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse pars public static com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse 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.bigtable.admin.v2.GenerateConsistencyTokenResponse 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.bigtable.admin.v2.GenerateConsistencyTokenResponse 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.bigtable.admin.v2.GenerateConsistencyTokenResponse 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.bigtable.admin.v2.GenerateConsistencyTokenResponse 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.bigtable.admin.v2.GenerateConsistencyTokenResponse 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,10 +281,11 @@ 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 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GenerateConsistencyTokenResponse} */ - 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.bigtable.admin.v2.GenerateConsistencyTokenResponse) com.google.bigtable.admin.v2.GenerateConsistencyTokenResponseOrBuilder { @@ -296,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_fieldAccessorTable @@ -308,7 +318,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,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.bigtable.admin.v2.GenerateConsistencyTokenResponse) { @@ -464,6 +441,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object consistencyToken_ = ""; + /** * * @@ -486,6 +464,7 @@ public java.lang.String getConsistencyToken() { return (java.lang.String) ref; } } + /** * * @@ -508,6 +487,7 @@ public com.google.protobuf.ByteString getConsistencyTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -529,6 +509,7 @@ public Builder setConsistencyToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -546,6 +527,7 @@ public Builder clearConsistencyToken() { onChanged(); return this; } + /** * * @@ -569,17 +551,6 @@ public Builder setConsistencyTokenBytes(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.bigtable.admin.v2.GenerateConsistencyTokenResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponseOrBuilder.java index 2243768ad1..356129ca04 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GenerateConsistencyTokenResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GenerateConsistencyTokenResponse) @@ -36,6 +38,7 @@ public interface GenerateConsistencyTokenResponseOrBuilder * @return The consistencyToken. */ java.lang.String getConsistencyToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java index 3cd12e527c..a01e809fc3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GetAppProfileRequest} */ -public final class GetAppProfileRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetAppProfileRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetAppProfileRequest) GetAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAppProfileRequest"); + } + // Use GetAppProfileRequest.newBuilder() to construct. - private GetAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetAppProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private GetAppProfileRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetAppProfileRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetAppProfileRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetAppProfileRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,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); } @@ -146,8 +155,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 +230,38 @@ public static com.google.bigtable.admin.v2.GetAppProfileRequest parseFrom( public static com.google.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest 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,10 +284,11 @@ 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; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GetAppProfileRequest} */ - 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.bigtable.admin.v2.GetAppProfileRequest) com.google.bigtable.admin.v2.GetAppProfileRequestOrBuilder { @@ -298,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetAppProfileRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetAppProfileRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetAppProfileRequest 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.bigtable.admin.v2.GetAppProfileRequest) { @@ -463,6 +440,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +466,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +492,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +517,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +538,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -583,17 +565,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.bigtable.admin.v2.GetAppProfileRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequestOrBuilder.java index 7d859d7c1b..6da19167c3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetAppProfileRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetAppProfileRequest) @@ -39,6 +41,7 @@ public interface GetAppProfileRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequest.java index 21711a9a76..43a29c57e8 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GetAuthorizedViewRequest} */ -public final class GetAuthorizedViewRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetAuthorizedViewRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetAuthorizedViewRequest) GetAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAuthorizedViewRequest"); + } + // Use GetAuthorizedViewRequest.newBuilder() to construct. - private GetAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetAuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private GetAuthorizedViewRequest() { view_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetAuthorizedViewRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetAuthorizedViewRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetAuthorizedViewRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -144,6 +154,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -181,8 +192,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 (view_ != com.google.bigtable.admin.v2.AuthorizedView.ResponseView.RESPONSE_VIEW_UNSPECIFIED @@ -198,8 +209,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 (view_ != com.google.bigtable.admin.v2.AuthorizedView.ResponseView.RESPONSE_VIEW_UNSPECIFIED @@ -281,38 +292,38 @@ public static com.google.bigtable.admin.v2.GetAuthorizedViewRequest parseFrom( public static com.google.bigtable.admin.v2.GetAuthorizedViewRequest 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.bigtable.admin.v2.GetAuthorizedViewRequest 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.bigtable.admin.v2.GetAuthorizedViewRequest 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.bigtable.admin.v2.GetAuthorizedViewRequest 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.bigtable.admin.v2.GetAuthorizedViewRequest 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.bigtable.admin.v2.GetAuthorizedViewRequest 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,10 +347,11 @@ 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 +362,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GetAuthorizedViewRequest} */ - 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.bigtable.admin.v2.GetAuthorizedViewRequest) com.google.bigtable.admin.v2.GetAuthorizedViewRequestOrBuilder { @@ -360,7 +372,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetAuthorizedViewRequest_fieldAccessorTable @@ -372,7 +384,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetAuthorizedViewRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -426,39 +438,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetAuthorizedViewRequest } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.GetAuthorizedViewRequest) { @@ -538,6 +517,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -564,6 +544,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -590,6 +571,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -615,6 +597,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -636,6 +619,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -664,6 +648,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -682,6 +667,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -703,6 +689,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -725,6 +712,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.ResponseView getView() { ? com.google.bigtable.admin.v2.AuthorizedView.ResponseView.UNRECOGNIZED : result; } + /** * * @@ -749,6 +737,7 @@ public Builder setView(com.google.bigtable.admin.v2.AuthorizedView.ResponseView onChanged(); return this; } + /** * * @@ -770,17 +759,6 @@ public Builder clearView() { 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.bigtable.admin.v2.GetAuthorizedViewRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequestOrBuilder.java index 09abc6d4d1..2ac1f5b771 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetAuthorizedViewRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetAuthorizedViewRequest) @@ -40,6 +42,7 @@ public interface GetAuthorizedViewRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -72,6 +75,7 @@ public interface GetAuthorizedViewRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java index b835748ef7..df54cabb16 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -43,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetBackupRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -137,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); } @@ -149,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; @@ -224,38 +233,38 @@ public static com.google.bigtable.admin.v2.GetBackupRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -278,10 +287,11 @@ 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 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.GetBackupRequest) com.google.bigtable.admin.v2.GetBackupRequestOrBuilder { @@ -302,7 +312,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetBackupRequest_fieldAccessorTable @@ -314,7 +324,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetBackupRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -364,39 +374,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetBackupRequest 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.bigtable.admin.v2.GetBackupRequest) { @@ -466,6 +443,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -492,6 +470,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -518,6 +497,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -543,6 +523,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -564,6 +545,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -591,17 +573,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.bigtable.admin.v2.GetBackupRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequestOrBuilder.java index aea989c7a8..c16dfaf439 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetBackupRequest) @@ -40,6 +42,7 @@ public interface GetBackupRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java index d7cd8ae9b3..e578d83b52 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GetClusterRequest} */ -public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetClusterRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetClusterRequest) GetClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetClusterRequest"); + } + // Use GetClusterRequest.newBuilder() to construct. - private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetClusterRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private GetClusterRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetClusterRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetClusterRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetClusterRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,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); } @@ -146,8 +155,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 +230,38 @@ public static com.google.bigtable.admin.v2.GetClusterRequest parseFrom( public static com.google.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest 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,10 +284,11 @@ 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; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GetClusterRequest} */ - 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.bigtable.admin.v2.GetClusterRequest) com.google.bigtable.admin.v2.GetClusterRequestOrBuilder { @@ -298,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetClusterRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetClusterRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetClusterRequest 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.bigtable.admin.v2.GetClusterRequest) { @@ -462,6 +439,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -487,6 +465,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -512,6 +491,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -536,6 +516,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -556,6 +537,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -582,17 +564,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.bigtable.admin.v2.GetClusterRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequestOrBuilder.java index 2ef3de4a4c..0dea1d0b35 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetClusterRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetClusterRequest) @@ -39,6 +41,7 @@ public interface GetClusterRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java index 750de4cb9a..656370bf06 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -42,19 +55,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetInstanceRequest_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -93,6 +101,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -134,8 +143,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); } @@ -146,8 +155,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 +230,38 @@ public static com.google.bigtable.admin.v2.GetInstanceRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -275,10 +284,11 @@ 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; } + /** * * @@ -288,7 +298,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.GetInstanceRequest) com.google.bigtable.admin.v2.GetInstanceRequestOrBuilder { @@ -298,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetInstanceRequest_fieldAccessorTable @@ -310,7 +320,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -360,39 +370,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetInstanceRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.GetInstanceRequest) { @@ -463,6 +440,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -488,6 +466,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -513,6 +492,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -537,6 +517,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -557,6 +538,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -583,17 +565,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.bigtable.admin.v2.GetInstanceRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequestOrBuilder.java index fa8b371ed1..a5680ee546 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetInstanceRequest) @@ -39,6 +41,7 @@ public interface GetInstanceRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequest.java new file mode 100644 index 0000000000..32cfb8b327 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequest.java @@ -0,0 +1,617 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.GetLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetLogicalViewRequest} + */ +@com.google.protobuf.Generated +public final class GetLogicalViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetLogicalViewRequest) + GetLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetLogicalViewRequest"); + } + + // Use GetLogicalViewRequest.newBuilder() to construct. + private GetLogicalViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetLogicalViewRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetLogicalViewRequest.class, + com.google.bigtable.admin.v2.GetLogicalViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the requested logical view. Values are of the
      +   * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the requested logical view. Values are of the
      +   * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.bigtable.admin.v2.GetLogicalViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.GetLogicalViewRequest other = + (com.google.bigtable.admin.v2.GetLogicalViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest 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.bigtable.admin.v2.GetLogicalViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest 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.bigtable.admin.v2.GetLogicalViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest 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.bigtable.admin.v2.GetLogicalViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest 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.bigtable.admin.v2.GetLogicalViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.GetLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetLogicalViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GetLogicalViewRequest) + com.google.bigtable.admin.v2.GetLogicalViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetLogicalViewRequest.class, + com.google.bigtable.admin.v2.GetLogicalViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.GetLogicalViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetLogicalViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetLogicalViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.GetLogicalViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetLogicalViewRequest build() { + com.google.bigtable.admin.v2.GetLogicalViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetLogicalViewRequest buildPartial() { + com.google.bigtable.admin.v2.GetLogicalViewRequest result = + new com.google.bigtable.admin.v2.GetLogicalViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.GetLogicalViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.GetLogicalViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.GetLogicalViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.GetLogicalViewRequest other) { + if (other == com.google.bigtable.admin.v2.GetLogicalViewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the requested logical view. Values are of the
      +     * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the requested logical view. Values are of the
      +     * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the requested logical view. Values are of the
      +     * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the requested logical view. Values are of the
      +     * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the requested logical view. Values are of the
      +     * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GetLogicalViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GetLogicalViewRequest) + private static final com.google.bigtable.admin.v2.GetLogicalViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GetLogicalViewRequest(); + } + + public static com.google.bigtable.admin.v2.GetLogicalViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLogicalViewRequest 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.bigtable.admin.v2.GetLogicalViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequestOrBuilder.java new file mode 100644 index 0000000000..e7e6b8d012 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetLogicalViewRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface GetLogicalViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetLogicalViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the requested logical view. Values are of the
      +   * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the requested logical view. Values are of the
      +   * form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequest.java new file mode 100644 index 0000000000..d8db352ad5 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequest.java @@ -0,0 +1,625 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.GetMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetMaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class GetMaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetMaterializedViewRequest) + GetMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetMaterializedViewRequest"); + } + + // Use GetMaterializedViewRequest.newBuilder() to construct. + private GetMaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetMaterializedViewRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetMaterializedViewRequest.class, + com.google.bigtable.admin.v2.GetMaterializedViewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the requested materialized view. Values are of
      +   * the form
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the requested materialized view. Values are of
      +   * the form
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.bigtable.admin.v2.GetMaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.GetMaterializedViewRequest other = + (com.google.bigtable.admin.v2.GetMaterializedViewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest 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.bigtable.admin.v2.GetMaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest 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.bigtable.admin.v2.GetMaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest 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.bigtable.admin.v2.GetMaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest 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.bigtable.admin.v2.GetMaterializedViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.GetMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetMaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GetMaterializedViewRequest) + com.google.bigtable.admin.v2.GetMaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetMaterializedViewRequest.class, + com.google.bigtable.admin.v2.GetMaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.GetMaterializedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_GetMaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetMaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.GetMaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetMaterializedViewRequest build() { + com.google.bigtable.admin.v2.GetMaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetMaterializedViewRequest buildPartial() { + com.google.bigtable.admin.v2.GetMaterializedViewRequest result = + new com.google.bigtable.admin.v2.GetMaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.GetMaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.GetMaterializedViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.GetMaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.GetMaterializedViewRequest other) { + if (other == com.google.bigtable.admin.v2.GetMaterializedViewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the requested materialized view. Values are of
      +     * the form
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the requested materialized view. Values are of
      +     * the form
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the requested materialized view. Values are of
      +     * the form
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the requested materialized view. Values are of
      +     * the form
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the requested materialized view. Values are of
      +     * the form
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GetMaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GetMaterializedViewRequest) + private static final com.google.bigtable.admin.v2.GetMaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GetMaterializedViewRequest(); + } + + public static com.google.bigtable.admin.v2.GetMaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMaterializedViewRequest 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.bigtable.admin.v2.GetMaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..361a3fecfd --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetMaterializedViewRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface GetMaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetMaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the requested materialized view. Values are of
      +   * the form
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the requested materialized view. Values are of
      +   * the form
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequest.java new file mode 100644 index 0000000000..81c50f6493 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequest.java @@ -0,0 +1,626 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The request for
      + * [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetSchemaBundleRequest} + */ +@com.google.protobuf.Generated +public final class GetSchemaBundleRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetSchemaBundleRequest) + GetSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSchemaBundleRequest"); + } + + // Use GetSchemaBundleRequest.newBuilder() to construct. + private GetSchemaBundleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetSchemaBundleRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetSchemaBundleRequest.class, + com.google.bigtable.admin.v2.GetSchemaBundleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to retrieve.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to retrieve.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.bigtable.admin.v2.GetSchemaBundleRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.GetSchemaBundleRequest other = + (com.google.bigtable.admin.v2.GetSchemaBundleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest 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.bigtable.admin.v2.GetSchemaBundleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest 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.bigtable.admin.v2.GetSchemaBundleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest 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.bigtable.admin.v2.GetSchemaBundleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest 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.bigtable.admin.v2.GetSchemaBundleRequest 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; + } + + /** + * + * + *
      +   * The request for
      +   * [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.GetSchemaBundleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.GetSchemaBundleRequest) + com.google.bigtable.admin.v2.GetSchemaBundleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.GetSchemaBundleRequest.class, + com.google.bigtable.admin.v2.GetSchemaBundleRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.GetSchemaBundleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_GetSchemaBundleRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetSchemaBundleRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.GetSchemaBundleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetSchemaBundleRequest build() { + com.google.bigtable.admin.v2.GetSchemaBundleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.GetSchemaBundleRequest buildPartial() { + com.google.bigtable.admin.v2.GetSchemaBundleRequest result = + new com.google.bigtable.admin.v2.GetSchemaBundleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.GetSchemaBundleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.GetSchemaBundleRequest) { + return mergeFrom((com.google.bigtable.admin.v2.GetSchemaBundleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.GetSchemaBundleRequest other) { + if (other == com.google.bigtable.admin.v2.GetSchemaBundleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to retrieve.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to retrieve.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to retrieve.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to retrieve.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the schema bundle to retrieve.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.GetSchemaBundleRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GetSchemaBundleRequest) + private static final com.google.bigtable.admin.v2.GetSchemaBundleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.GetSchemaBundleRequest(); + } + + public static com.google.bigtable.admin.v2.GetSchemaBundleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSchemaBundleRequest 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.bigtable.admin.v2.GetSchemaBundleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequestOrBuilder.java new file mode 100644 index 0000000000..f8ab3b13b4 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSchemaBundleRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface GetSchemaBundleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetSchemaBundleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to retrieve.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Required. The unique name of the schema bundle to retrieve.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java index 8dec4d5679..c4cf6a9c05 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GetSnapshotRequest} */ -public final class GetSnapshotRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetSnapshotRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetSnapshotRequest) GetSnapshotRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSnapshotRequest"); + } + // Use GetSnapshotRequest.newBuilder() to construct. - private GetSnapshotRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -48,19 +61,13 @@ private GetSnapshotRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSnapshotRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetSnapshotRequest_fieldAccessorTable @@ -73,6 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -100,6 +108,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -142,8 +151,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); } @@ -154,8 +163,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; @@ -229,38 +238,38 @@ public static com.google.bigtable.admin.v2.GetSnapshotRequest parseFrom( public static com.google.bigtable.admin.v2.GetSnapshotRequest 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.bigtable.admin.v2.GetSnapshotRequest 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.bigtable.admin.v2.GetSnapshotRequest 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.bigtable.admin.v2.GetSnapshotRequest 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.bigtable.admin.v2.GetSnapshotRequest 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.bigtable.admin.v2.GetSnapshotRequest 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); } @@ -283,10 +292,11 @@ 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; } + /** * * @@ -302,7 +312,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GetSnapshotRequest} */ - 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.bigtable.admin.v2.GetSnapshotRequest) com.google.bigtable.admin.v2.GetSnapshotRequestOrBuilder { @@ -312,7 +322,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetSnapshotRequest_fieldAccessorTable @@ -324,7 +334,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetSnapshotRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -374,39 +384,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetSnapshotRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.GetSnapshotRequest) { @@ -477,6 +454,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -503,6 +481,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -529,6 +508,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -554,6 +534,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -575,6 +556,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -602,17 +584,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.bigtable.admin.v2.GetSnapshotRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequestOrBuilder.java index fbb9fd2b46..9959da4fe6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetSnapshotRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetSnapshotRequest) @@ -40,6 +42,7 @@ public interface GetSnapshotRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java index cf17846913..7db681eff6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.GetTableRequest} */ -public final class GetTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class GetTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.GetTableRequest) GetTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetTableRequest"); + } + // Use GetTableRequest.newBuilder() to construct. - private GetTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private GetTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private GetTableRequest() { view_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetTableRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -142,6 +152,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getViewValue() { return view_; } + /** * * @@ -175,8 +186,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 (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); @@ -190,8 +201,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 (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); @@ -271,38 +282,38 @@ public static com.google.bigtable.admin.v2.GetTableRequest parseFrom( public static com.google.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest 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); } @@ -325,10 +336,11 @@ 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; } + /** * * @@ -339,7 +351,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.GetTableRequest} */ - 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.bigtable.admin.v2.GetTableRequest) com.google.bigtable.admin.v2.GetTableRequestOrBuilder { @@ -349,7 +361,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetTableRequest_fieldAccessorTable @@ -361,7 +373,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.GetTableRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -415,39 +427,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.GetTableRequest 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.bigtable.admin.v2.GetTableRequest) { @@ -526,6 +505,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -552,6 +532,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -578,6 +559,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -603,6 +585,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -624,6 +607,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -652,6 +636,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -668,6 +653,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -687,6 +673,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -705,6 +692,7 @@ public com.google.bigtable.admin.v2.Table.View getView() { com.google.bigtable.admin.v2.Table.View.forNumber(view_); return result == null ? com.google.bigtable.admin.v2.Table.View.UNRECOGNIZED : result; } + /** * * @@ -727,6 +715,7 @@ public Builder setView(com.google.bigtable.admin.v2.Table.View value) { onChanged(); return this; } + /** * * @@ -746,17 +735,6 @@ public Builder clearView() { 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.bigtable.admin.v2.GetTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequestOrBuilder.java index bd1d715c25..55242a9071 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface GetTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.GetTableRequest) @@ -40,6 +42,7 @@ public interface GetTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +73,7 @@ public interface GetTableRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java index 2c1b68f643..1275e268e7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -32,13 +33,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.HotTablet} */ -public final class HotTablet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class HotTablet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.HotTablet) HotTabletOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HotTablet"); + } + // Use HotTablet.newBuilder() to construct. - private HotTablet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private HotTablet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -49,19 +62,13 @@ private HotTablet() { endKey_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HotTablet(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_HotTablet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_HotTablet_fieldAccessorTable @@ -75,6 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -99,6 +107,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -152,6 +162,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -179,6 +190,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { public static final int START_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -195,6 +207,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -211,6 +224,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -228,6 +242,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -244,6 +259,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -260,6 +276,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -279,6 +296,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object startKey_ = ""; + /** * * @@ -302,6 +320,7 @@ public java.lang.String getStartKey() { return s; } } + /** * * @@ -330,6 +349,7 @@ public com.google.protobuf.ByteString getStartKeyBytes() { @SuppressWarnings("serial") private volatile java.lang.Object endKey_ = ""; + /** * * @@ -353,6 +373,7 @@ public java.lang.String getEndKey() { return s; } } + /** * * @@ -379,6 +400,7 @@ public com.google.protobuf.ByteString getEndKeyBytes() { public static final int NODE_CPU_USAGE_PERCENT_FIELD_NUMBER = 7; private float nodeCpuUsagePercent_ = 0F; + /** * * @@ -412,11 +434,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getStartTime()); @@ -424,11 +446,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getEndTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, startKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(startKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, startKey_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, endKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, endKey_); } if (java.lang.Float.floatToRawIntBits(nodeCpuUsagePercent_) != 0) { output.writeFloat(7, nodeCpuUsagePercent_); @@ -442,11 +464,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(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); @@ -454,11 +476,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, startKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(startKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, startKey_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, endKey_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(endKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, endKey_); } if (java.lang.Float.floatToRawIntBits(nodeCpuUsagePercent_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, nodeCpuUsagePercent_); @@ -563,38 +585,38 @@ public static com.google.bigtable.admin.v2.HotTablet parseFrom( public static com.google.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet 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,10 +639,11 @@ 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; } + /** * * @@ -634,7 +657,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.HotTablet} */ - 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.bigtable.admin.v2.HotTablet) com.google.bigtable.admin.v2.HotTabletOrBuilder { @@ -644,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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_HotTablet_fieldAccessorTable @@ -658,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) { - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -752,39 +775,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.HotTablet 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.bigtable.admin.v2.HotTablet) { @@ -823,7 +813,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.HotTablet other) { bitField0_ |= 0x00000020; onChanged(); } - if (other.getNodeCpuUsagePercent() != 0F) { + if (java.lang.Float.floatToRawIntBits(other.getNodeCpuUsagePercent()) != 0) { setNodeCpuUsagePercent(other.getNodeCpuUsagePercent()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -866,13 +856,14 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -914,6 +905,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -937,6 +929,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -960,6 +953,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -982,6 +976,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1000,6 +995,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1025,6 +1021,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableName_ = ""; + /** * * @@ -1048,6 +1045,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1071,6 +1069,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1093,6 +1092,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1111,6 +1111,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1136,11 +1137,12 @@ public Builder setTableNameBytes(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> startTimeBuilder_; + /** * * @@ -1156,6 +1158,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1175,6 +1178,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -1198,6 +1202,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1218,6 +1223,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1246,6 +1252,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1266,6 +1273,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1279,8 +1287,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1298,6 +1307,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1308,14 +1318,14 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * .google.protobuf.Timestamp start_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> - 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>( @@ -1326,11 +1336,12 @@ 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> endTimeBuilder_; + /** * * @@ -1346,6 +1357,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1365,6 +1377,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1388,6 +1401,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1408,6 +1422,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1436,6 +1451,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1456,6 +1472,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1469,8 +1486,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1488,6 +1506,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1498,14 +1517,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * .google.protobuf.Timestamp end_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> - 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>( @@ -1516,6 +1535,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private java.lang.Object startKey_ = ""; + /** * * @@ -1538,6 +1558,7 @@ public java.lang.String getStartKey() { return (java.lang.String) ref; } } + /** * * @@ -1560,6 +1581,7 @@ public com.google.protobuf.ByteString getStartKeyBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1581,6 +1603,7 @@ public Builder setStartKey(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1598,6 +1621,7 @@ public Builder clearStartKey() { onChanged(); return this; } + /** * * @@ -1622,6 +1646,7 @@ public Builder setStartKeyBytes(com.google.protobuf.ByteString value) { } private java.lang.Object endKey_ = ""; + /** * * @@ -1644,6 +1669,7 @@ public java.lang.String getEndKey() { return (java.lang.String) ref; } } + /** * * @@ -1666,6 +1692,7 @@ public com.google.protobuf.ByteString getEndKeyBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1687,6 +1714,7 @@ public Builder setEndKey(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1704,6 +1732,7 @@ public Builder clearEndKey() { onChanged(); return this; } + /** * * @@ -1728,6 +1757,7 @@ public Builder setEndKeyBytes(com.google.protobuf.ByteString value) { } private float nodeCpuUsagePercent_; + /** * * @@ -1746,6 +1776,7 @@ public Builder setEndKeyBytes(com.google.protobuf.ByteString value) { public float getNodeCpuUsagePercent() { return nodeCpuUsagePercent_; } + /** * * @@ -1768,6 +1799,7 @@ public Builder setNodeCpuUsagePercent(float value) { onChanged(); return this; } + /** * * @@ -1789,17 +1821,6 @@ public Builder clearNodeCpuUsagePercent() { 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.bigtable.admin.v2.HotTablet) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTabletOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTabletOrBuilder.java index ca15277b94..077e8d2848 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTabletOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTabletOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface HotTabletOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.HotTablet) @@ -37,6 +39,7 @@ public interface HotTabletOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -64,6 +67,7 @@ public interface HotTabletOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -91,6 +95,7 @@ public interface HotTabletOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -104,6 +109,7 @@ public interface HotTabletOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -129,6 +135,7 @@ public interface HotTabletOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -142,6 +149,7 @@ public interface HotTabletOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -166,6 +174,7 @@ public interface HotTabletOrBuilder * @return The startKey. */ java.lang.String getStartKey(); + /** * * @@ -191,6 +200,7 @@ public interface HotTabletOrBuilder * @return The endKey. */ java.lang.String getEndKey(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java index a184192f53..f82d1ab9f7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -31,13 +32,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -48,12 +61,6 @@ private Instance() { type_ = 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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Instance_descriptor; @@ -66,13 +73,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 5: return internalGetLabels(); + case 12: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Instance_fieldAccessorTable @@ -126,6 +135,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"); + } + /** * * @@ -136,6 +155,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -147,6 +167,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -217,7 +238,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.bigtable.admin.v2.Instance.getDescriptor().getEnumTypes().get(0); } @@ -289,6 +310,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"); + } + /** * * @@ -301,6 +332,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -312,6 +344,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * PRODUCTION = 1; */ public static final int PRODUCTION_VALUE = 1; + /** * * @@ -382,7 +415,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.bigtable.admin.v2.Instance.getDescriptor().getEnumTypes().get(1); } @@ -412,6 +445,7 @@ private Type(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -436,6 +470,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -465,6 +500,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; + /** * * @@ -490,6 +526,7 @@ public java.lang.String getDisplayName() { return s; } } + /** * * @@ -518,15 +555,17 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { public static final int STATE_FIELD_NUMBER = 3; private int state_ = 0; + /** * * *
      -   * (`OutputOnly`)
      -   * The current state of the instance.
      +   * Output only. The current state of the instance.
          * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ @@ -534,15 +573,17 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { public int getStateValue() { return state_; } + /** * * *
      -   * (`OutputOnly`)
      -   * The current state of the instance.
      +   * Output only. The current state of the instance.
          * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ @@ -555,6 +596,7 @@ public com.google.bigtable.admin.v2.Instance.State getState() { public static final int TYPE_FIELD_NUMBER = 4; private int type_ = 0; + /** * * @@ -570,6 +612,7 @@ public com.google.bigtable.admin.v2.Instance.State getState() { public int getTypeValue() { return type_; } + /** * * @@ -614,6 +657,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -624,9 +668,9 @@ public int getLabelsCount() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -640,12 +684,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -656,9 +702,9 @@ public java.util.Map getLabels() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -669,6 +715,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -679,9 +726,9 @@ public java.util.Map getLabelsMap() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -699,6 +746,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -709,9 +757,9 @@ public java.util.Map getLabelsMap() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -732,13 +780,14 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public static final int CREATE_TIME_FIELD_NUMBER = 7; private com.google.protobuf.Timestamp createTime_; + /** * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -750,13 +799,14 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { public boolean hasCreateTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -768,13 +818,14 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -787,6 +838,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int SATISFIES_PZS_FIELD_NUMBER = 8; private boolean satisfiesPzs_ = false; + /** * * @@ -802,6 +854,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasSatisfiesPzs() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -818,6 +871,188 @@ public boolean getSatisfiesPzs() { return satisfiesPzs_; } + public static final int SATISFIES_PZI_FIELD_NUMBER = 11; + private boolean satisfiesPzi_ = false; + + /** + * + * + *
      +   * Output only. Reserved for future use.
      +   * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * Output only. Reserved for future use.
      +   * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + public static final int TAGS_FIELD_NUMBER = 12; + + private static final class TagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_Instance_TagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -832,11 +1067,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(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); } if (state_ != com.google.bigtable.admin.v2.Instance.State.STATE_NOT_KNOWN.getNumber()) { output.writeEnum(3, state_); @@ -844,7 +1079,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.bigtable.admin.v2.Instance.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, type_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(7, getCreateTime()); @@ -852,6 +1087,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(8, satisfiesPzs_); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(11, satisfiesPzi_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 12); getUnknownFields().writeTo(output); } @@ -861,11 +1101,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_); } if (state_ != com.google.bigtable.admin.v2.Instance.State.STATE_NOT_KNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); @@ -889,6 +1129,19 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, satisfiesPzs_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, satisfiesPzi_); + } + for (java.util.Map.Entry entry : + internalGetTags().getMap().entrySet()) { + com.google.protobuf.MapEntry tags__ = + TagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, tags__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -917,6 +1170,11 @@ public boolean equals(final java.lang.Object obj) { if (hasSatisfiesPzs()) { if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; } + if (hasSatisfiesPzi() != other.hasSatisfiesPzi()) return false; + if (hasSatisfiesPzi()) { + if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; + } + if (!internalGetTags().equals(other.internalGetTags())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -948,6 +1206,14 @@ public int hashCode() { hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); } + if (hasSatisfiesPzi()) { + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); + } + if (!internalGetTags().getMap().isEmpty()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTags().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -989,38 +1255,38 @@ public static com.google.bigtable.admin.v2.Instance parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -1043,10 +1309,11 @@ 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; } + /** * * @@ -1059,7 +1326,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.Instance) com.google.bigtable.admin.v2.InstanceOrBuilder { @@ -1074,6 +1341,8 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl switch (number) { case 5: return internalGetLabels(); + case 12: + return internalGetTags(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1085,13 +1354,15 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi switch (number) { case 5: return internalGetMutableLabels(); + case 12: + return internalGetMutableTags(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Instance_fieldAccessorTable @@ -1105,14 +1376,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) { - getCreateTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); } } @@ -1131,6 +1402,8 @@ public Builder clear() { createTimeBuilder_ = null; } satisfiesPzs_ = false; + satisfiesPzi_ = false; + internalGetMutableTags().clear(); return this; } @@ -1192,42 +1465,17 @@ private void buildPartial0(com.google.bigtable.admin.v2.Instance result) { result.satisfiesPzs_ = satisfiesPzs_; to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.tags_ = internalGetTags(); + result.tags_.makeImmutable(); + } result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.Instance) { @@ -1264,6 +1512,11 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Instance other) { if (other.hasSatisfiesPzs()) { setSatisfiesPzs(other.getSatisfiesPzs()); } + if (other.hasSatisfiesPzi()) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } + internalGetMutableTags().mergeFrom(other.internalGetTags()); + bitField0_ |= 0x00000100; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1328,7 +1581,8 @@ public Builder mergeFrom( } // case 42 case 58: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 58 @@ -1338,6 +1592,21 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 64 + case 88: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 88 + case 98: + { + com.google.protobuf.MapEntry tags__ = + input.readMessage( + TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableTags().getMutableMap().put(tags__.getKey(), tags__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1358,6 +1627,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1381,6 +1651,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1404,6 +1675,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1426,6 +1698,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1444,6 +1717,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1469,6 +1743,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object displayName_ = ""; + /** * * @@ -1493,6 +1768,7 @@ public java.lang.String getDisplayName() { return (java.lang.String) ref; } } + /** * * @@ -1517,6 +1793,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1540,6 +1817,7 @@ public Builder setDisplayName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1559,6 +1837,7 @@ public Builder clearDisplayName() { onChanged(); return this; } + /** * * @@ -1585,15 +1864,17 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { } private int state_ = 0; + /** * * *
      -     * (`OutputOnly`)
      -     * The current state of the instance.
      +     * Output only. The current state of the instance.
            * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ @@ -1601,15 +1882,17 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { public int getStateValue() { return state_; } + /** * * *
      -     * (`OutputOnly`)
      -     * The current state of the instance.
      +     * Output only. The current state of the instance.
            * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. @@ -1620,15 +1903,17 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * *
      -     * (`OutputOnly`)
      -     * The current state of the instance.
      +     * Output only. The current state of the instance.
            * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ @@ -1638,15 +1923,17 @@ public com.google.bigtable.admin.v2.Instance.State getState() { com.google.bigtable.admin.v2.Instance.State.forNumber(state_); return result == null ? com.google.bigtable.admin.v2.Instance.State.UNRECOGNIZED : result; } + /** * * *
      -     * (`OutputOnly`)
      -     * The current state of the instance.
      +     * Output only. The current state of the instance.
            * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @param value The state to set. * @return This builder for chaining. @@ -1660,15 +1947,17 @@ public Builder setState(com.google.bigtable.admin.v2.Instance.State value) { onChanged(); return this; } + /** * * *
      -     * (`OutputOnly`)
      -     * The current state of the instance.
      +     * Output only. The current state of the instance.
            * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return This builder for chaining. */ @@ -1680,6 +1969,7 @@ public Builder clearState() { } private int type_ = 0; + /** * * @@ -1695,6 +1985,7 @@ public Builder clearState() { public int getTypeValue() { return type_; } + /** * * @@ -1713,6 +2004,7 @@ public Builder setTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1730,6 +2022,7 @@ public com.google.bigtable.admin.v2.Instance.Type getType() { com.google.bigtable.admin.v2.Instance.Type.forNumber(type_); return result == null ? com.google.bigtable.admin.v2.Instance.Type.UNRECOGNIZED : result; } + /** * * @@ -1751,6 +2044,7 @@ public Builder setType(com.google.bigtable.admin.v2.Instance.Type value) { onChanged(); return this; } + /** * * @@ -1794,6 +2088,7 @@ private com.google.protobuf.MapField interna public int getLabelsCount() { return internalGetLabels().getMap().size(); } + /** * * @@ -1804,9 +2099,9 @@ public int getLabelsCount() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1820,12 +2115,14 @@ public boolean containsLabels(java.lang.String key) { } return internalGetLabels().getMap().containsKey(key); } + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } + /** * * @@ -1836,9 +2133,9 @@ public java.util.Map getLabels() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1849,6 +2146,7 @@ public java.util.Map getLabels() { public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } + /** * * @@ -1859,9 +2157,9 @@ public java.util.Map getLabelsMap() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1879,6 +2177,7 @@ public java.util.Map getLabelsMap() { java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -1889,9 +2188,9 @@ public java.util.Map getLabelsMap() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1915,6 +2214,7 @@ public Builder clearLabels() { internalGetMutableLabels().getMutableMap().clear(); return this; } + /** * * @@ -1925,9 +2225,9 @@ public Builder clearLabels() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1941,12 +2241,14 @@ public Builder removeLabels(java.lang.String key) { internalGetMutableLabels().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000010; return internalGetMutableLabels().getMutableMap(); } + /** * * @@ -1957,9 +2259,9 @@ public java.util.Map getMutableLabels() { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -1977,6 +2279,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { bitField0_ |= 0x00000010; return this; } + /** * * @@ -1987,9 +2290,9 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -2003,18 +2306,19 @@ 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> createTimeBuilder_; + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2026,13 +2330,14 @@ public Builder putAllLabels(java.util.Map va public boolean hasCreateTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2050,13 +2355,14 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2076,13 +2382,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2099,13 +2406,14 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2130,13 +2438,14 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2153,13 +2462,14 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2169,15 +2479,16 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * @@ -2193,27 +2504,28 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * *
      -     * Output only. A server-assigned timestamp representing when this Instance
      -     * was created. For instances created before this field was added (August
      -     * 2021), this value is `seconds: 0, nanos: 1`.
      +     * Output only. A commit timestamp representing when this Instance was
      +     * created. For instances created before this field was added (August 2021),
      +     * this value is `seconds: 0, nanos: 1`.
            * 
      * * * .google.protobuf.Timestamp create_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> - 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>( @@ -2224,6 +2536,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private boolean satisfiesPzs_; + /** * * @@ -2239,6 +2552,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasSatisfiesPzs() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -2254,6 +2568,7 @@ public boolean hasSatisfiesPzs() { public boolean getSatisfiesPzs() { return satisfiesPzs_; } + /** * * @@ -2273,6 +2588,7 @@ public Builder setSatisfiesPzs(boolean value) { onChanged(); return this; } + /** * * @@ -2291,15 +2607,318 @@ public Builder clearSatisfiesPzs() { return this; } + private boolean satisfiesPzi_; + + /** + * + * + *
      +     * Output only. Reserved for future use.
      +     * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
      +     * Output only. Reserved for future use.
      +     * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + /** + * + * + *
      +     * Output only. Reserved for future use.
      +     * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Output only. Reserved for future use.
      +     * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x00000080); + satisfiesPzi_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField tags_; + + private com.google.protobuf.MapField internalGetTags() { + if (tags_ == null) { + return com.google.protobuf.MapField.emptyMapField(TagsDefaultEntryHolder.defaultEntry); + } + return tags_; + } + + private com.google.protobuf.MapField + internalGetMutableTags() { + if (tags_ == null) { + tags_ = com.google.protobuf.MapField.newMapField(TagsDefaultEntryHolder.defaultEntry); + } + if (!tags_.isMutable()) { + tags_ = tags_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return tags_; + } + + public int getTagsCount() { + return internalGetTags().getMap().size(); + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTags().getMap().containsKey(key); + } + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTags() { + return getTagsMap(); + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getTagsMap() { + return internalGetTags().getMap(); + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public /* nullable */ java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public java.lang.String getTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTags() { + bitField0_ |= 0x00000100; + return internalGetMutableTags().getMutableMap(); + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
      +     * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +     * resource. For example:
      +     * - "123/environment": "production",
      +     * - "123/costCenter": "marketing"
      +     *
      +     * Tags and Labels (above) are both used to bind metadata to resources, with
      +     * different use-cases. See
      +     * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +     * in-depth overview on the difference between tags and labels.
      +     * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllTags(java.util.Map values) { + internalGetMutableTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Instance) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceName.java index 16b4648ff0..88cf05a3ed 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java index 568796bf12..031e1375c3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface InstanceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Instance) @@ -37,6 +39,7 @@ public interface InstanceOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -65,6 +68,7 @@ public interface InstanceOrBuilder * @return The displayName. */ java.lang.String getDisplayName(); + /** * * @@ -84,24 +88,27 @@ public interface InstanceOrBuilder * * *
      -   * (`OutputOnly`)
      -   * The current state of the instance.
      +   * Output only. The current state of the instance.
          * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * *
      -   * (`OutputOnly`)
      -   * The current state of the instance.
      +   * Output only. The current state of the instance.
          * 
      * - * .google.bigtable.admin.v2.Instance.State state = 3; + * + * .google.bigtable.admin.v2.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The state. */ @@ -119,6 +126,7 @@ public interface InstanceOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -142,9 +150,9 @@ public interface InstanceOrBuilder * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -152,6 +160,7 @@ public interface InstanceOrBuilder * map<string, string> labels = 5; */ int getLabelsCount(); + /** * * @@ -162,9 +171,9 @@ public interface InstanceOrBuilder * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -172,9 +181,11 @@ public interface InstanceOrBuilder * map<string, string> labels = 5; */ boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); + /** * * @@ -185,9 +196,9 @@ public interface InstanceOrBuilder * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -195,6 +206,7 @@ public interface InstanceOrBuilder * map<string, string> labels = 5; */ java.util.Map getLabelsMap(); + /** * * @@ -205,9 +217,9 @@ public interface InstanceOrBuilder * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -219,6 +231,7 @@ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); + /** * * @@ -229,9 +242,9 @@ java.lang.String getLabelsOrDefault( * metrics. * * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. + * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. * * No more than 64 labels can be associated with a given resource. * * Keys and values must both be under 128 bytes. * @@ -244,9 +257,9 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -255,13 +268,14 @@ java.lang.String getLabelsOrDefault( * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -270,13 +284,14 @@ java.lang.String getLabelsOrDefault( * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * *
      -   * Output only. A server-assigned timestamp representing when this Instance
      -   * was created. For instances created before this field was added (August
      -   * 2021), this value is `seconds: 0, nanos: 1`.
      +   * Output only. A commit timestamp representing when this Instance was
      +   * created. For instances created before this field was added (August 2021),
      +   * this value is `seconds: 0, nanos: 1`.
          * 
      * * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -296,6 +311,7 @@ java.lang.String getLabelsOrDefault( * @return Whether the satisfiesPzs field is set. */ boolean hasSatisfiesPzs(); + /** * * @@ -308,4 +324,143 @@ java.lang.String getLabelsOrDefault( * @return The satisfiesPzs. */ boolean getSatisfiesPzs(); + + /** + * + * + *
      +   * Output only. Reserved for future use.
      +   * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzi field is set. + */ + boolean hasSatisfiesPzi(); + + /** + * + * + *
      +   * Output only. Reserved for future use.
      +   * 
      + * + * optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + int getTagsCount(); + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsTags(java.lang.String key); + + /** Use {@link #getTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTags(); + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getTagsMap(); + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
      +   * Optional. Input only. Immutable. Tag keys/values directly bound to this
      +   * resource. For example:
      +   * - "123/environment": "production",
      +   * - "123/costCenter": "marketing"
      +   *
      +   * Tags and Labels (above) are both used to bind metadata to resources, with
      +   * different use-cases. See
      +   * https://cloud.google.com/resource-manager/docs/tags/tags-overview for an
      +   * in-depth overview on the difference between tags and labels.
      +   * 
      + * + * + * map<string, string> tags = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getTagsOrThrow(java.lang.String key); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java index 0464c4de6f..18e496bcc7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -public final class InstanceProto { +@com.google.protobuf.Generated +public final class InstanceProto extends com.google.protobuf.GeneratedFile { private InstanceProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InstanceProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,60 +42,76 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Instance_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Instance_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AutoscalingTargets_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AutoscalingLimits_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Cluster_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Cluster_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AppProfile_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_HotTablet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_HotTablet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_LogicalView_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_LogicalView_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_MaterializedView_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -93,104 +121,166 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n\'google/bigtable/admin/v2/instance.prot" + "\n" + + "\'google/bigtable/admin/v2/instance.prot" + "o\022\030google.bigtable.admin.v2\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" + "e.proto\032%google/bigtable/admin/v2/common" - + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\306\004\n\010Instance\022\014\n\004name\030\001 \001(\t\022\031\n\014display_na" - + "me\030\002 \001(\tB\003\340A\002\0227\n\005state\030\003 \001(\0162(.google.bi" - + "gtable.admin.v2.Instance.State\0225\n\004type\030\004" - + " \001(\0162\'.google.bigtable.admin.v2.Instance" - + ".Type\022>\n\006labels\030\005 \003(\0132..google.bigtable." - + "admin.v2.Instance.LabelsEntry\0224\n\013create_" - + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\022\037\n\rsatisfies_pzs\030\010 \001(\010B\003\340A\003H\000\210\001\001\032-\n\013" - + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"5\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005REA" - + "DY\020\001\022\014\n\010CREATING\020\002\"=\n\004Type\022\024\n\020TYPE_UNSPE" - + "CIFIED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVELOPMENT\020" - + "\002:S\352AP\n%bigtableadmin.googleapis.com/Ins" - + "tance\022\'projects/{project}/instances/{ins" - + "tance}B\020\n\016_satisfies_pzs\"_\n\022AutoscalingT" - + "argets\022\037\n\027cpu_utilization_percent\030\002 \001(\005\022" - + "(\n storage_utilization_gib_per_node\030\003 \001(" - + "\005\"O\n\021AutoscalingLimits\022\034\n\017min_serve_node" - + "s\030\001 \001(\005B\003\340A\002\022\034\n\017max_serve_nodes\030\002 \001(\005B\003\340" - + "A\002\"\321\007\n\007Cluster\022\014\n\004name\030\001 \001(\t\022;\n\010location" - + "\030\002 \001(\tB)\340A\005\372A#\n!locations.googleapis.com" - + "/Location\022;\n\005state\030\003 \001(\0162\'.google.bigtab" - + "le.admin.v2.Cluster.StateB\003\340A\003\022\023\n\013serve_" - + "nodes\030\004 \001(\005\022I\n\016cluster_config\030\007 \001(\0132/.go" - + "ogle.bigtable.admin.v2.Cluster.ClusterCo" - + "nfigH\000\022H\n\024default_storage_type\030\005 \001(\0162%.g" - + "oogle.bigtable.admin.v2.StorageTypeB\003\340A\005" - + "\022R\n\021encryption_config\030\006 \001(\01322.google.big" - + "table.admin.v2.Cluster.EncryptionConfigB" - + "\003\340A\005\032\270\001\n\030ClusterAutoscalingConfig\022L\n\022aut" - + "oscaling_limits\030\001 \001(\0132+.google.bigtable." - + "admin.v2.AutoscalingLimitsB\003\340A\002\022N\n\023autos" - + "caling_targets\030\002 \001(\0132,.google.bigtable.a" - + "dmin.v2.AutoscalingTargetsB\003\340A\002\032o\n\rClust" - + "erConfig\022^\n\032cluster_autoscaling_config\030\001" - + " \001(\0132:.google.bigtable.admin.v2.Cluster." - + "ClusterAutoscalingConfig\032P\n\020EncryptionCo" - + "nfig\022<\n\014kms_key_name\030\001 \001(\tB&\372A#\n!cloudkm" - + "s.googleapis.com/CryptoKey\"Q\n\005State\022\023\n\017S" - + "TATE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020" - + "\002\022\014\n\010RESIZING\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigt" - + "ableadmin.googleapis.com/Cluster\022:projec" - + "ts/{project}/instances/{instance}/cluste" - + "rs/{cluster}B\010\n\006config\"\322\t\n\nAppProfile\022\014\n" - + "\004name\030\001 \001(\t\022\014\n\004etag\030\002 \001(\t\022\023\n\013description" - + "\030\003 \001(\t\022g\n\035multi_cluster_routing_use_any\030" - + "\005 \001(\0132>.google.bigtable.admin.v2.AppProf" - + "ile.MultiClusterRoutingUseAnyH\000\022[\n\026singl" - + "e_cluster_routing\030\006 \001(\01329.google.bigtabl" - + "e.admin.v2.AppProfile.SingleClusterRouti" - + "ngH\000\022E\n\010priority\030\007 \001(\0162-.google.bigtable" - + ".admin.v2.AppProfile.PriorityB\002\030\001H\001\022T\n\022s" - + "tandard_isolation\030\013 \001(\01326.google.bigtabl" - + "e.admin.v2.AppProfile.StandardIsolationH" - + "\001\022i\n\036data_boost_isolation_read_only\030\n \001(" - + "\0132?.google.bigtable.admin.v2.AppProfile." - + "DataBoostIsolationReadOnlyH\001\0320\n\031MultiClu" - + "sterRoutingUseAny\022\023\n\013cluster_ids\030\001 \003(\t\032N" - + "\n\024SingleClusterRouting\022\022\n\ncluster_id\030\001 \001" - + "(\t\022\"\n\032allow_transactional_writes\030\002 \001(\010\032T" - + "\n\021StandardIsolation\022?\n\010priority\030\001 \001(\0162-." - + "google.bigtable.admin.v2.AppProfile.Prio" - + "rity\032\374\001\n\032DataBoostIsolationReadOnly\022w\n\025c" - + "ompute_billing_owner\030\001 \001(\0162S.google.bigt" - + "able.admin.v2.AppProfile.DataBoostIsolat" - + "ionReadOnly.ComputeBillingOwnerH\000\210\001\001\"K\n\023" - + "ComputeBillingOwner\022%\n!COMPUTE_BILLING_O" - + "WNER_UNSPECIFIED\020\000\022\r\n\tHOST_PAYS\020\001B\030\n\026_co" - + "mpute_billing_owner\"^\n\010Priority\022\030\n\024PRIOR" - + "ITY_UNSPECIFIED\020\000\022\020\n\014PRIORITY_LOW\020\001\022\023\n\017P" - + "RIORITY_MEDIUM\020\002\022\021\n\rPRIORITY_HIGH\020\003:o\352Al" - + "\n\'bigtableadmin.googleapis.com/AppProfil" - + "e\022Aprojects/{project}/instances/{instanc" - + "e}/appProfiles/{app_profile}B\020\n\016routing_" - + "policyB\013\n\tisolation\"\210\003\n\tHotTablet\022\014\n\004nam" - + "e\030\001 \001(\t\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"bigtab" - + "leadmin.googleapis.com/Table\0223\n\nstart_ti" - + "me\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0221\n\010end_time\030\004 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n\007end_k" - + "ey\030\006 \001(\t\022#\n\026node_cpu_usage_percent\030\007 \001(\002" - + "B\003\340A\003:\177\352A|\n&bigtableadmin.googleapis.com" - + "/HotTablet\022Rprojects/{project}/instances" - + "/{instance}/clusters/{cluster}/hotTablet" - + "s/{hot_tablet}B\313\002\n\034com.google.bigtable.a" - + "dmin.v2B\rInstanceProtoP\001Z8cloud.google.c" - + "om/go/bigtable/admin/apiv2/adminpb;admin" - + "pb\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Go" - + "ogle\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::C" - + "loud::Bigtable::Admin::V2\352Ax\n!cloudkms.g" - + "oogleapis.com/CryptoKey\022Sprojects/{proje" - + "ct}/locations/{location}/keyRings/{key_r" - + "ing}/cryptoKeys/{crypto_key}b\006proto3" + + ".proto\032\037google/protobuf/timestamp.proto\"\207\006\n" + + "\010Instance\022\014\n" + + "\004name\030\001 \001(\t\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022<\n" + + "\005state\030\003" + + " \001(\0162(.google.bigtable.admin.v2.Instance.StateB\003\340A\003\0225\n" + + "\004type\030\004 \001(\0162\'.google.bigtable.admin.v2.Instance.Type\022>\n" + + "\006labels\030\005 \003(\0132..google.bigtable.admin.v2.Instance.LabelsEntry\0224\n" + + "\013create_time\030\007" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\037\n\r" + + "satisfies_pzs\030\010 \001(\010B\003\340A\003H\000\210\001\001\022\037\n\r" + + "satisfies_pzi\030\013 \001(\010B\003\340A\003H\001\210\001\001\022E\n" + + "\004tags\030\014 \003(\0132,.google.bigtable.admin.v2.Instance.TagsEntryB" + + "\t\340A\004\340A\005\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032+\n" + + "\tTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"5\n" + + "\005State\022\023\n" + + "\017STATE_NOT_KNOWN\020\000\022\t\n" + + "\005READY\020\001\022\014\n" + + "\010CREATING\020\002\"=\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\016\n\n" + + "PRODUCTION\020\001\022\017\n" + + "\013DEVELOPMENT\020\002:h\352Ae\n" + + "%bigtableadmin.googleapis.com/Instance\022\'projects/{project}/instances/{instance}*" + + "\tinstances2\010instanceB\020\n" + + "\016_satisfies_pzsB\020\n" + + "\016_satisfies_pzi\"_\n" + + "\022AutoscalingTargets\022\037\n" + + "\027cpu_utilization_percent\030\002 \001(\005\022(\n" + + " storage_utilization_gib_per_node\030\003 \001(\005\"O\n" + + "\021AutoscalingLimits\022\034\n" + + "\017min_serve_nodes\030\001 \001(\005B\003\340A\002\022\034\n" + + "\017max_serve_nodes\030\002 \001(\005B\003\340A\002\"\255\t\n" + + "\007Cluster\022\014\n" + + "\004name\030\001 \001(\t\022;\n" + + "\010location\030\002 \001(\tB)\340A\005\372A#\n" + + "!locations.googleapis.com/Location\022;\n" + + "\005state\030\003" + + " \001(\0162\'.google.bigtable.admin.v2.Cluster.StateB\003\340A\003\022\023\n" + + "\013serve_nodes\030\004 \001(\005\022U\n" + + "\023node_scaling_factor\030\t \001(\01623.goog" + + "le.bigtable.admin.v2.Cluster.NodeScalingFactorB\003\340A\005\022I\n" + + "\016cluster_config\030\007 \001(\0132/.go" + + "ogle.bigtable.admin.v2.Cluster.ClusterConfigH\000\022H\n" + + "\024default_storage_type\030\005 \001(\0162%.g" + + "oogle.bigtable.admin.v2.StorageTypeB\003\340A\005\022R\n" + + "\021encryption_config\030\006 \001(\01322.google.big" + + "table.admin.v2.Cluster.EncryptionConfigB\003\340A\005\032\270\001\n" + + "\030ClusterAutoscalingConfig\022L\n" + + "\022autoscaling_limits\030\001" + + " \001(\0132+.google.bigtable.admin.v2.AutoscalingLimitsB\003\340A\002\022N\n" + + "\023autoscaling_targets\030\002" + + " \001(\0132,.google.bigtable.admin.v2.AutoscalingTargetsB\003\340A\002\032o\n\r" + + "ClusterConfig\022^\n" + + "\032cluster_autoscaling_config\030\001" + + " \001(\0132:.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig\032P\n" + + "\020EncryptionConfig\022<\n" + + "\014kms_key_name\030\001 \001(\tB&\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\"Q\n" + + "\005State\022\023\n" + + "\017STATE_NOT_KNOWN\020\000\022\t\n" + + "\005READY\020\001\022\014\n" + + "\010CREATING\020\002\022\014\n" + + "\010RESIZING\020\003\022\014\n" + + "\010DISABLED\020\004\"p\n" + + "\021NodeScalingFactor\022#\n" + + "\037NODE_SCALING_FACTOR_UNSPECIFIED\020\000\022\032\n" + + "\026NODE_SCALING_FACTOR_1X\020\001\022\032\n" + + "\026NODE_SCALING_FACTOR_2X\020\002:x\352Au\n" + + "$bigtableadmin.googleapis.com/Cluster\022:projects/{pr" + + "oject}/instances/{instance}/clusters/{cluster}*\010clusters2\007clusterB\010\n" + + "\006config\"\355\n\n\n" + + "AppProfile\022\014\n" + + "\004name\030\001 \001(\t\022\014\n" + + "\004etag\030\002 \001(\t\022\023\n" + + "\013description\030\003 \001(\t\022g\n" + + "\035multi_cluster_routing_use_any\030\005 \001(\0132>.google.bigtable.adm" + + "in.v2.AppProfile.MultiClusterRoutingUseAnyH\000\022[\n" + + "\026single_cluster_routing\030\006 \001(\01329.g" + + "oogle.bigtable.admin.v2.AppProfile.SingleClusterRoutingH\000\022E\n" + + "\010priority\030\007 \001(\0162-.go" + + "ogle.bigtable.admin.v2.AppProfile.PriorityB\002\030\001H\001\022T\n" + + "\022standard_isolation\030\013 \001(\01326.g" + + "oogle.bigtable.admin.v2.AppProfile.StandardIsolationH\001\022i\n" + + "\036data_boost_isolation_read_only\030\n" + + " \001(\0132?.google.bigtable.admin.v" + + "2.AppProfile.DataBoostIsolationReadOnlyH\001\032\257\001\n" + + "\031MultiClusterRoutingUseAny\022\023\n" + + "\013cluster_ids\030\001 \003(\t\022b\n" + + "\014row_affinity\030\003 \001(\0132J.goo" + + "gle.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinityH\000\032\r\n" + + "\013RowAffinityB\n\n" + + "\010affinity\032N\n" + + "\024SingleClusterRouting\022\022\n\n" + + "cluster_id\030\001 \001(\t\022\"\n" + + "\032allow_transactional_writes\030\002 \001(\010\032T\n" + + "\021StandardIsolation\022?\n" + + "\010priority\030\001" + + " \001(\0162-.google.bigtable.admin.v2.AppProfile.Priority\032\374\001\n" + + "\032DataBoostIsolationReadOnly\022w\n" + + "\025compute_billing_owner\030\001 \001(\0162S.google.bigtable.admin.v2.AppPr" + + "ofile.DataBoostIsolationReadOnly.ComputeBillingOwnerH\000\210\001\001\"K\n" + + "\023ComputeBillingOwner\022%\n" + + "!COMPUTE_BILLING_OWNER_UNSPECIFIED\020\000\022\r\n" + + "\tHOST_PAYS\020\001B\030\n" + + "\026_compute_billing_owner\"^\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:\211\001\352A\205\001\n" + + "\'bigtableadmin.googleapis.com/AppProfile\022Aprojects/{proj" + + "ect}/instances/{instance}/appProfiles/{app_profile}*\013appProfiles2\n" + + "appProfileB\020\n" + + "\016routing_policyB\013\n" + + "\tisolation\"\241\003\n" + + "\tHotTablet\022\014\n" + + "\004name\030\001 \001(\t\022;\n\n" + + "table_name\030\002 \001(\tB\'\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\0223\n\n" + + "start_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\021\n" + + "\tstart_key\030\005 \001(\t\022\017\n" + + "\007end_key\030\006 \001(\t\022#\n" + + "\026node_cpu_usage_percent\030\007 \001(\002B\003\340A\003:\227\001\352A\223\001\n" + + "&bigtableadmin.googleapis.com/HotTablet\022Rprojects/{project}" + + "/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}*\n" + + "hotTablets2\thotTablet\"\372\001\n" + + "\013LogicalView\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\022\n" + + "\005query\030\002 \001(\tB\003\340A\002\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022 \n" + + "\023deletion_protection\030\006 \001(\010B\003\340A\001:\216\001\352A\212\001\n" + + "(bigtableadmin.googleapis.com/LogicalView\022Cprojects/{project}/instances/{inst" + + "ance}/logicalViews/{logical_view}*\014logicalViews2\013logicalView\"\226\002\n" + + "\020MaterializedView\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\025\n" + + "\005query\030\002 \001(\tB\006\340A\002\340A\005\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\022\033\n" + + "\023deletion_protection\030\006 \001(\010:\247\001\352A\243\001\n" + + "-bigtableadmin.googleapis.com/MaterializedView\022Mprojects/{pro" + + "ject}/instances/{instance}/materializedV" + + "iews/{materialized_view}*\021materializedViews2\020materializedViewB\313\002\n" + + "\034com.google.bigtable.admin.v2B\r" + + "InstanceProtoP\001Z8cloud.google.com/go/bigtable/admin/apiv2/adminp" + + "b;adminpb\252\002\036Google.Cloud.Bigtable.Admin." + + "V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::Cloud::Bigtable::Admin::V2\352Ax\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sprojects" + + "/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -202,80 +292,96 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_bigtable_admin_v2_Instance_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_admin_v2_Instance_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Instance_descriptor, new java.lang.String[] { - "Name", "DisplayName", "State", "Type", "Labels", "CreateTime", "SatisfiesPzs", + "Name", + "DisplayName", + "State", + "Type", + "Labels", + "CreateTime", + "SatisfiesPzs", + "SatisfiesPzi", + "Tags", }); internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_descriptor = - internal_static_google_bigtable_admin_v2_Instance_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Instance_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_descriptor = + internal_static_google_bigtable_admin_v2_Instance_descriptor.getNestedType(1); + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Instance_TagsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_bigtable_admin_v2_AutoscalingTargets_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor, new java.lang.String[] { "CpuUtilizationPercent", "StorageUtilizationGibPerNode", }); internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_bigtable_admin_v2_AutoscalingLimits_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor, new java.lang.String[] { "MinServeNodes", "MaxServeNodes", }); - internal_static_google_bigtable_admin_v2_Cluster_descriptor = - getDescriptor().getMessageTypes().get(3); + internal_static_google_bigtable_admin_v2_Cluster_descriptor = getDescriptor().getMessageType(3); internal_static_google_bigtable_admin_v2_Cluster_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Cluster_descriptor, new java.lang.String[] { "Name", "Location", "State", "ServeNodes", + "NodeScalingFactor", "ClusterConfig", "DefaultStorageType", "EncryptionConfig", "Config", }); internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_descriptor = - internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_descriptor, new java.lang.String[] { "AutoscalingLimits", "AutoscalingTargets", }); internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_descriptor = - internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_descriptor, new java.lang.String[] { "ClusterAutoscalingConfig", }); internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_descriptor = - internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_admin_v2_Cluster_descriptor.getNestedType(2); internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_descriptor, new java.lang.String[] { "KmsKeyName", }); internal_static_google_bigtable_admin_v2_AppProfile_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AppProfile_descriptor, new java.lang.String[] { "Name", @@ -290,41 +396,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Isolation", }); internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor = - internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor, new java.lang.String[] { - "ClusterIds", + "ClusterIds", "RowAffinity", "Affinity", }); + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor = + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor + .getNestedType(0); + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_RowAffinity_descriptor, + new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor = - internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor, new java.lang.String[] { "ClusterId", "AllowTransactionalWrites", }); internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_descriptor = - internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedType(2); internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AppProfile_StandardIsolation_descriptor, new java.lang.String[] { "Priority", }); internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_descriptor = - internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_admin_v2_AppProfile_descriptor.getNestedType(3); internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AppProfile_DataBoostIsolationReadOnly_descriptor, new java.lang.String[] { "ComputeBillingOwner", }); internal_static_google_bigtable_admin_v2_HotTablet_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_bigtable_admin_v2_HotTablet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_HotTablet_descriptor, new java.lang.String[] { "Name", @@ -335,6 +448,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndKey", "NodeCpuUsagePercent", }); + internal_static_google_bigtable_admin_v2_LogicalView_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_bigtable_admin_v2_LogicalView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_LogicalView_descriptor, + new java.lang.String[] { + "Name", "Query", "Etag", "DeletionProtection", + }); + internal_static_google_bigtable_admin_v2_MaterializedView_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_MaterializedView_descriptor, + new java.lang.String[] { + "Name", "Query", "Etag", "DeletionProtection", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.bigtable.admin.v2.CommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -343,10 +477,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.bigtable.admin.v2.CommonProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java index 1a8aaacb59..277fc5fb58 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListAppProfilesRequest} */ -public final class ListAppProfilesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListAppProfilesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAppProfilesRequest) ListAppProfilesRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAppProfilesRequest"); + } + // Use ListAppProfilesRequest.newBuilder() to construct. - private ListAppProfilesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListAppProfilesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListAppProfilesRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAppProfilesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -129,6 +138,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 3; private int pageSize_ = 0; + /** * * @@ -157,6 +167,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -180,6 +191,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -218,11 +230,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(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pageToken_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); @@ -236,11 +248,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(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageToken_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); @@ -323,38 +335,38 @@ public static com.google.bigtable.admin.v2.ListAppProfilesRequest parseFrom( public static com.google.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest 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,10 +389,11 @@ 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; } + /** * * @@ -390,7 +403,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListAppProfilesRequest} */ - 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.bigtable.admin.v2.ListAppProfilesRequest) com.google.bigtable.admin.v2.ListAppProfilesRequestOrBuilder { @@ -400,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_fieldAccessorTable @@ -412,7 +425,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListAppProfilesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -470,39 +483,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListAppProfilesRequest 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.bigtable.admin.v2.ListAppProfilesRequest) { @@ -593,6 +573,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -621,6 +602,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -649,6 +631,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -676,6 +659,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -699,6 +683,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -729,6 +714,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -752,6 +738,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -779,6 +766,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -806,6 +794,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -828,6 +817,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -850,6 +840,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -871,6 +862,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -888,6 +880,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -911,17 +904,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.bigtable.admin.v2.ListAppProfilesRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequestOrBuilder.java index 6402a1a695..ff95d7c35a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListAppProfilesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListAppProfilesRequest) @@ -42,6 +44,7 @@ public interface ListAppProfilesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -94,6 +97,7 @@ public interface ListAppProfilesRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java index 806bd25f4b..f04a7e710c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListAppProfilesResponse} */ -public final class ListAppProfilesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListAppProfilesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAppProfilesResponse) ListAppProfilesResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAppProfilesResponse"); + } + // Use ListAppProfilesResponse.newBuilder() to construct. - private ListAppProfilesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListAppProfilesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListAppProfilesResponse() { failedLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAppProfilesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List appProfiles_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getAppProfilesList() { return appProfiles_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getAppProfilesLis getAppProfilesOrBuilderList() { return appProfiles_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getAppProfilesLis public int getAppProfilesCount() { return appProfiles_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getAppProfilesCount() { public com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index) { return appProfiles_.get(index); } + /** * * @@ -140,6 +152,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +178,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -196,6 +210,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList failedLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -213,6 +228,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -230,6 +246,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -248,6 +265,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -284,11 +302,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < appProfiles_.size(); i++) { output.writeMessage(1, appProfiles_.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 < failedLocations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failedLocations_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, failedLocations_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -302,8 +320,8 @@ public int getSerializedSize() { for (int i = 0; i < appProfiles_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, appProfiles_.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; @@ -395,38 +413,38 @@ public static com.google.bigtable.admin.v2.ListAppProfilesResponse parseFrom( public static com.google.bigtable.admin.v2.ListAppProfilesResponse 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.bigtable.admin.v2.ListAppProfilesResponse 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.bigtable.admin.v2.ListAppProfilesResponse 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.bigtable.admin.v2.ListAppProfilesResponse 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.bigtable.admin.v2.ListAppProfilesResponse 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.bigtable.admin.v2.ListAppProfilesResponse 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); } @@ -449,10 +467,11 @@ 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 +481,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListAppProfilesResponse} */ - 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.bigtable.admin.v2.ListAppProfilesResponse) com.google.bigtable.admin.v2.ListAppProfilesResponseOrBuilder { @@ -472,7 +491,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_fieldAccessorTable @@ -484,7 +503,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListAppProfilesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -560,39 +579,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListAppProfilesResponse } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ListAppProfilesResponse) { @@ -625,8 +611,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListAppProfilesResponse ot appProfiles_ = other.appProfiles_; bitField0_ = (bitField0_ & ~0x00000001); appProfilesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAppProfilesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAppProfilesFieldBuilder() : null; } else { appProfilesBuilder_.addAllMessages(other.appProfiles_); @@ -730,7 +716,7 @@ private void ensureAppProfilesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> @@ -752,6 +738,7 @@ public java.util.List getAppProfilesLis return appProfilesBuilder_.getMessageList(); } } + /** * * @@ -768,6 +755,7 @@ public int getAppProfilesCount() { return appProfilesBuilder_.getCount(); } } + /** * * @@ -784,6 +772,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index) { return appProfilesBuilder_.getMessage(index); } } + /** * * @@ -806,6 +795,7 @@ public Builder setAppProfiles(int index, com.google.bigtable.admin.v2.AppProfile } return this; } + /** * * @@ -826,6 +816,7 @@ public Builder setAppProfiles( } return this; } + /** * * @@ -848,6 +839,7 @@ public Builder addAppProfiles(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -870,6 +862,7 @@ public Builder addAppProfiles(int index, com.google.bigtable.admin.v2.AppProfile } return this; } + /** * * @@ -889,6 +882,7 @@ public Builder addAppProfiles(com.google.bigtable.admin.v2.AppProfile.Builder bu } return this; } + /** * * @@ -909,6 +903,7 @@ public Builder addAppProfiles( } return this; } + /** * * @@ -929,6 +924,7 @@ public Builder addAllAppProfiles( } return this; } + /** * * @@ -948,6 +944,7 @@ public Builder clearAppProfiles() { } return this; } + /** * * @@ -967,6 +964,7 @@ public Builder removeAppProfiles(int index) { } return this; } + /** * * @@ -977,8 +975,9 @@ public Builder removeAppProfiles(int index) { * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfilesBuilder(int index) { - return getAppProfilesFieldBuilder().getBuilder(index); + return internalGetAppProfilesFieldBuilder().getBuilder(index); } + /** * * @@ -995,6 +994,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( return appProfilesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1012,6 +1012,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( return java.util.Collections.unmodifiableList(appProfiles_); } } + /** * * @@ -1022,9 +1023,10 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfilesOrBuilder( * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder() { - return getAppProfilesFieldBuilder() + return internalGetAppProfilesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()); } + /** * * @@ -1035,9 +1037,10 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder() { * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder(int index) { - return getAppProfilesFieldBuilder() + return internalGetAppProfilesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()); } + /** * * @@ -1049,17 +1052,17 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder(int */ public java.util.List getAppProfilesBuilderList() { - return getAppProfilesFieldBuilder().getBuilderList(); + return internalGetAppProfilesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> - getAppProfilesFieldBuilder() { + internalGetAppProfilesFieldBuilder() { if (appProfilesBuilder_ == null) { appProfilesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder>( @@ -1070,6 +1073,7 @@ public com.google.bigtable.admin.v2.AppProfile.Builder addAppProfilesBuilder(int } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1094,6 +1098,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1118,6 +1123,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1141,6 +1147,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1160,6 +1167,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1194,6 +1202,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -1212,6 +1221,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1229,6 +1239,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1247,6 +1258,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1265,6 +1277,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1291,6 +1304,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1316,6 +1330,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1338,6 +1353,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1359,6 +1375,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * @@ -1386,17 +1403,6 @@ public Builder addFailedLocationsBytes(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.bigtable.admin.v2.ListAppProfilesResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponseOrBuilder.java index 4af6359ce1..023200c187 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListAppProfilesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListAppProfilesResponse) @@ -34,6 +36,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ java.util.List getAppProfilesList(); + /** * * @@ -44,6 +47,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ com.google.bigtable.admin.v2.AppProfile getAppProfiles(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListAppProfilesResponseOrBuilder * repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; */ int getAppProfilesCount(); + /** * * @@ -65,6 +70,7 @@ public interface ListAppProfilesResponseOrBuilder */ java.util.List getAppProfilesOrBuilderList(); + /** * * @@ -90,6 +96,7 @@ public interface ListAppProfilesResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * @@ -120,6 +127,7 @@ public interface ListAppProfilesResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -135,6 +143,7 @@ public interface ListAppProfilesResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -151,6 +160,7 @@ public interface ListAppProfilesResponseOrBuilder * @return The failedLocations at the given index. */ java.lang.String getFailedLocations(int index); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequest.java index c5467adb4d..adad9eb877 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListAuthorizedViewsRequest} */ -public final class ListAuthorizedViewsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListAuthorizedViewsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAuthorizedViewsRequest) ListAuthorizedViewsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAuthorizedViewsRequest"); + } + // Use ListAuthorizedViewsRequest.newBuilder() to construct. - private ListAuthorizedViewsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListAuthorizedViewsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private ListAuthorizedViewsRequest() { view_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAuthorizedViewsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsRequest_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -127,6 +136,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -155,6 +165,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -178,6 +189,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -204,12 +216,13 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public static final int VIEW_FIELD_NUMBER = 4; private int view_ = 0; + /** * * *
      -   * Optional. The resource_view to be applied to the returned views' fields.
      -   * Default to NAME_ONLY.
      +   * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +   * fields. Default to NAME_ONLY.
          * 
      * * @@ -222,12 +235,13 @@ public com.google.protobuf.ByteString getPageTokenBytes() { public int getViewValue() { return view_; } + /** * * *
      -   * Optional. The resource_view to be applied to the returned views' fields.
      -   * Default to NAME_ONLY.
      +   * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +   * fields. Default to NAME_ONLY.
          * 
      * * @@ -259,14 +273,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 (view_ != com.google.bigtable.admin.v2.AuthorizedView.ResponseView.RESPONSE_VIEW_UNSPECIFIED @@ -282,14 +296,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 (view_ != com.google.bigtable.admin.v2.AuthorizedView.ResponseView.RESPONSE_VIEW_UNSPECIFIED @@ -377,38 +391,38 @@ public static com.google.bigtable.admin.v2.ListAuthorizedViewsRequest parseFrom( public static com.google.bigtable.admin.v2.ListAuthorizedViewsRequest 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.bigtable.admin.v2.ListAuthorizedViewsRequest 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.bigtable.admin.v2.ListAuthorizedViewsRequest 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.bigtable.admin.v2.ListAuthorizedViewsRequest 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.bigtable.admin.v2.ListAuthorizedViewsRequest 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.bigtable.admin.v2.ListAuthorizedViewsRequest 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,10 +446,11 @@ 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 +461,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListAuthorizedViewsRequest} */ - 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.bigtable.admin.v2.ListAuthorizedViewsRequest) com.google.bigtable.admin.v2.ListAuthorizedViewsRequestOrBuilder { @@ -456,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsRequest_fieldAccessorTable @@ -468,7 +483,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListAuthorizedViewsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -530,39 +545,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListAuthorizedViewsReque } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ListAuthorizedViewsRequest) { @@ -662,6 +644,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -688,6 +671,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -714,6 +698,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -739,6 +724,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -760,6 +746,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -788,6 +775,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -811,6 +799,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -838,6 +827,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -865,6 +855,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -887,6 +878,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -909,6 +901,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -930,6 +923,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -947,6 +941,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -971,12 +966,13 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * *
      -     * Optional. The resource_view to be applied to the returned views' fields.
      -     * Default to NAME_ONLY.
      +     * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +     * fields. Default to NAME_ONLY.
            * 
      * * @@ -989,12 +985,13 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * *
      -     * Optional. The resource_view to be applied to the returned views' fields.
      -     * Default to NAME_ONLY.
      +     * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +     * fields. Default to NAME_ONLY.
            * 
      * * @@ -1010,12 +1007,13 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * *
      -     * Optional. The resource_view to be applied to the returned views' fields.
      -     * Default to NAME_ONLY.
      +     * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +     * fields. Default to NAME_ONLY.
            * 
      * * @@ -1032,12 +1030,13 @@ public com.google.bigtable.admin.v2.AuthorizedView.ResponseView getView() { ? com.google.bigtable.admin.v2.AuthorizedView.ResponseView.UNRECOGNIZED : result; } + /** * * *
      -     * Optional. The resource_view to be applied to the returned views' fields.
      -     * Default to NAME_ONLY.
      +     * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +     * fields. Default to NAME_ONLY.
            * 
      * * @@ -1056,12 +1055,13 @@ public Builder setView(com.google.bigtable.admin.v2.AuthorizedView.ResponseView onChanged(); return this; } + /** * * *
      -     * Optional. The resource_view to be applied to the returned views' fields.
      -     * Default to NAME_ONLY.
      +     * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +     * fields. Default to NAME_ONLY.
            * 
      * * @@ -1077,17 +1077,6 @@ public Builder clearView() { 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.bigtable.admin.v2.ListAuthorizedViewsRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequestOrBuilder.java index ee8665c4f6..fca8de12bd 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListAuthorizedViewsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListAuthorizedViewsRequest) @@ -40,6 +42,7 @@ public interface ListAuthorizedViewsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -90,6 +93,7 @@ public interface ListAuthorizedViewsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * @@ -107,8 +111,8 @@ public interface ListAuthorizedViewsRequestOrBuilder * * *
      -   * Optional. The resource_view to be applied to the returned views' fields.
      -   * Default to NAME_ONLY.
      +   * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +   * fields. Default to NAME_ONLY.
          * 
      * * @@ -118,12 +122,13 @@ public interface ListAuthorizedViewsRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * *
      -   * Optional. The resource_view to be applied to the returned views' fields.
      -   * Default to NAME_ONLY.
      +   * Optional. The resource_view to be applied to the returned AuthorizedViews'
      +   * fields. Default to NAME_ONLY.
          * 
      * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponse.java index 2952210751..8d2efc53b0 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListAuthorizedViewsResponse} */ -public final class ListAuthorizedViewsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListAuthorizedViewsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListAuthorizedViewsResponse) ListAuthorizedViewsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAuthorizedViewsResponse"); + } + // Use ListAuthorizedViewsResponse.newBuilder() to construct. - private ListAuthorizedViewsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListAuthorizedViewsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListAuthorizedViewsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAuthorizedViewsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List authorizedViews_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getAuthorizedViewsList() { return authorizedViews_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getAuthorized getAuthorizedViewsOrBuilderList() { return authorizedViews_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getAuthorized public int getAuthorizedViewsCount() { return authorizedViews_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getAuthorizedViewsCount() { public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index) { return authorizedViews_.get(index); } + /** * * @@ -141,6 +153,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -166,6 +179,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -209,8 +223,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < authorizedViews_.size(); i++) { output.writeMessage(1, authorizedViews_.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); } @@ -224,8 +238,8 @@ public int getSerializedSize() { for (int i = 0; i < authorizedViews_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, authorizedViews_.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; @@ -304,38 +318,38 @@ public static com.google.bigtable.admin.v2.ListAuthorizedViewsResponse parseFrom public static com.google.bigtable.admin.v2.ListAuthorizedViewsResponse 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.bigtable.admin.v2.ListAuthorizedViewsResponse 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.bigtable.admin.v2.ListAuthorizedViewsResponse 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.bigtable.admin.v2.ListAuthorizedViewsResponse 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.bigtable.admin.v2.ListAuthorizedViewsResponse 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.bigtable.admin.v2.ListAuthorizedViewsResponse 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,10 +373,11 @@ 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; } + /** * * @@ -373,7 +388,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListAuthorizedViewsResponse} */ - 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.bigtable.admin.v2.ListAuthorizedViewsResponse) com.google.bigtable.admin.v2.ListAuthorizedViewsResponseOrBuilder { @@ -383,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListAuthorizedViewsResponse_fieldAccessorTable @@ -395,7 +410,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListAuthorizedViewsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -466,39 +481,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListAuthorizedViewsRespo } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ListAuthorizedViewsResponse) { @@ -531,8 +513,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListAuthorizedViewsRespons authorizedViews_ = other.authorizedViews_; bitField0_ = (bitField0_ & ~0x00000001); authorizedViewsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAuthorizedViewsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAuthorizedViewsFieldBuilder() : null; } else { authorizedViewsBuilder_.addAllMessages(other.authorizedViews_); @@ -619,7 +601,7 @@ private void ensureAuthorizedViewsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> @@ -641,6 +623,7 @@ public java.util.List getAuthorized return authorizedViewsBuilder_.getMessageList(); } } + /** * * @@ -657,6 +640,7 @@ public int getAuthorizedViewsCount() { return authorizedViewsBuilder_.getCount(); } } + /** * * @@ -673,6 +657,7 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index) return authorizedViewsBuilder_.getMessage(index); } } + /** * * @@ -696,6 +681,7 @@ public Builder setAuthorizedViews( } return this; } + /** * * @@ -716,6 +702,7 @@ public Builder setAuthorizedViews( } return this; } + /** * * @@ -738,6 +725,7 @@ public Builder addAuthorizedViews(com.google.bigtable.admin.v2.AuthorizedView va } return this; } + /** * * @@ -761,6 +749,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -781,6 +770,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -801,6 +791,7 @@ public Builder addAuthorizedViews( } return this; } + /** * * @@ -821,6 +812,7 @@ public Builder addAllAuthorizedViews( } return this; } + /** * * @@ -840,6 +832,7 @@ public Builder clearAuthorizedViews() { } return this; } + /** * * @@ -859,6 +852,7 @@ public Builder removeAuthorizedViews(int index) { } return this; } + /** * * @@ -870,8 +864,9 @@ public Builder removeAuthorizedViews(int index) { */ public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewsBuilder( int index) { - return getAuthorizedViewsFieldBuilder().getBuilder(index); + return internalGetAuthorizedViewsFieldBuilder().getBuilder(index); } + /** * * @@ -889,6 +884,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr return authorizedViewsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -906,6 +902,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr return java.util.Collections.unmodifiableList(authorizedViews_); } } + /** * * @@ -916,9 +913,10 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewsOr * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBuilder() { - return getAuthorizedViewsFieldBuilder() + return internalGetAuthorizedViewsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance()); } + /** * * @@ -930,9 +928,10 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui */ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBuilder( int index) { - return getAuthorizedViewsFieldBuilder() + return internalGetAuthorizedViewsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance()); } + /** * * @@ -944,17 +943,17 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui */ public java.util.List getAuthorizedViewsBuilderList() { - return getAuthorizedViewsFieldBuilder().getBuilderList(); + return internalGetAuthorizedViewsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> - getAuthorizedViewsFieldBuilder() { + internalGetAuthorizedViewsFieldBuilder() { if (authorizedViewsBuilder_ == null) { authorizedViewsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder>( @@ -968,6 +967,7 @@ public com.google.bigtable.admin.v2.AuthorizedView.Builder addAuthorizedViewsBui } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -992,6 +992,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1016,6 +1017,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1039,6 +1041,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1058,6 +1061,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1083,17 +1087,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.bigtable.admin.v2.ListAuthorizedViewsResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponseOrBuilder.java index 3847b70e9d..d97163303d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListAuthorizedViewsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListAuthorizedViewsResponse) @@ -34,6 +36,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ java.util.List getAuthorizedViewsList(); + /** * * @@ -44,6 +47,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ com.google.bigtable.admin.v2.AuthorizedView getAuthorizedViews(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; */ int getAuthorizedViewsCount(); + /** * * @@ -65,6 +70,7 @@ public interface ListAuthorizedViewsResponseOrBuilder */ java.util.List getAuthorizedViewsOrBuilderList(); + /** * * @@ -90,6 +96,7 @@ public interface ListAuthorizedViewsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java index 5899cad88c..28adc5789e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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 +59,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsRequest_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -99,6 +107,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -132,6 +141,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; + /** * * @@ -162,12 +172,12 @@ public com.google.protobuf.ByteString getParentBytes() { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -187,6 +197,7 @@ public java.lang.String getFilter() { return s; } } + /** * * @@ -217,12 +228,12 @@ public java.lang.String getFilter() { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -247,6 +258,7 @@ public com.google.protobuf.ByteString getFilterBytes() { @SuppressWarnings("serial") private volatile java.lang.Object orderBy_ = ""; + /** * * @@ -291,6 +303,7 @@ public java.lang.String getOrderBy() { return s; } } + /** * * @@ -338,6 +351,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 4; private int pageSize_ = 0; + /** * * @@ -359,6 +373,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -386,6 +401,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -428,20 +444,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(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, orderBy_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, orderBy_); } 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); } @@ -452,20 +468,20 @@ 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, orderBy_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, orderBy_); } 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; @@ -551,38 +567,38 @@ public static com.google.bigtable.admin.v2.ListBackupsRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -605,10 +621,11 @@ 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; } + /** * * @@ -619,7 +636,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.ListBackupsRequest) com.google.bigtable.admin.v2.ListBackupsRequestOrBuilder { @@ -629,7 +646,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsRequest_fieldAccessorTable @@ -641,7 +658,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListBackupsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -707,39 +724,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListBackupsRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ListBackupsRequest) { @@ -852,6 +836,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -879,6 +864,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -906,6 +892,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -932,6 +919,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -954,6 +942,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -983,6 +972,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object filter_ = ""; + /** * * @@ -1013,12 +1003,12 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -1037,6 +1027,7 @@ public java.lang.String getFilter() { return (java.lang.String) ref; } } + /** * * @@ -1067,12 +1058,12 @@ public java.lang.String getFilter() { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -1091,6 +1082,7 @@ public com.google.protobuf.ByteString getFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1121,12 +1113,12 @@ public com.google.protobuf.ByteString getFilterBytes() { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -1144,6 +1136,7 @@ public Builder setFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1174,12 +1167,12 @@ public Builder setFilter(java.lang.String value) { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -1193,6 +1186,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -1223,12 +1217,12 @@ public Builder clearFilter() { * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -1249,6 +1243,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } private java.lang.Object orderBy_ = ""; + /** * * @@ -1292,6 +1287,7 @@ public java.lang.String getOrderBy() { return (java.lang.String) ref; } } + /** * * @@ -1335,6 +1331,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1377,6 +1374,7 @@ public Builder setOrderBy(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1415,6 +1413,7 @@ public Builder clearOrderBy() { onChanged(); return this; } + /** * * @@ -1460,6 +1459,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -1476,6 +1476,7 @@ public Builder setOrderByBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -1496,6 +1497,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1516,6 +1518,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1542,6 +1545,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1568,6 +1572,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1593,6 +1598,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1614,6 +1620,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1641,17 +1648,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.bigtable.admin.v2.ListBackupsRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequestOrBuilder.java index 0fa611efc8..06162ac8e1 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListBackupsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListBackupsRequest) @@ -41,6 +43,7 @@ public interface ListBackupsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -89,12 +92,12 @@ public interface ListBackupsRequestOrBuilder * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -103,6 +106,7 @@ public interface ListBackupsRequestOrBuilder * @return The filter. */ java.lang.String getFilter(); + /** * * @@ -133,12 +137,12 @@ public interface ListBackupsRequestOrBuilder * * `name:"exact"` --> The backup's name is the string "exact". * * `name:howl` --> The backup's name contains the string "howl". * * `source_table:prod` - * --> The source_table's name contains the string "prod". + * --> The source_table'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 (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. + * --> The backup name contains the string "howl" and start_time + * of the backup is before 2018-03-28T14:50:00Z. * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB * * @@ -181,6 +185,7 @@ public interface ListBackupsRequestOrBuilder * @return The orderBy. */ java.lang.String getOrderBy(); + /** * * @@ -245,6 +250,7 @@ public interface ListBackupsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java index c7d28fdcc8..b1687c7f3c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -44,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List backups_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getBackupsList() { return backups_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getBackupsList() { getBackupsOrBuilderList() { return backups_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getBackupsList() { public int getBackupsCount() { return backups_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getBackupsCount() { public com.google.bigtable.admin.v2.Backup getBackups(int index) { return backups_.get(index); } + /** * * @@ -140,6 +152,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +178,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -208,8 +222,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); } @@ -223,8 +237,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; @@ -303,38 +317,38 @@ public static com.google.bigtable.admin.v2.ListBackupsResponse parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -357,10 +371,11 @@ 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; } + /** * * @@ -371,7 +386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.ListBackupsResponse) com.google.bigtable.admin.v2.ListBackupsResponseOrBuilder { @@ -381,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsResponse_fieldAccessorTable @@ -393,7 +408,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListBackupsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -464,39 +479,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListBackupsResponse 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.bigtable.admin.v2.ListBackupsResponse) { @@ -529,8 +511,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListBackupsResponse other) 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_); @@ -616,7 +598,7 @@ private void ensureBackupsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> @@ -638,6 +620,7 @@ public java.util.List getBackupsList() { return backupsBuilder_.getMessageList(); } } + /** * * @@ -654,6 +637,7 @@ public int getBackupsCount() { return backupsBuilder_.getCount(); } } + /** * * @@ -670,6 +654,7 @@ public com.google.bigtable.admin.v2.Backup getBackups(int index) { return backupsBuilder_.getMessage(index); } } + /** * * @@ -692,6 +677,7 @@ public Builder setBackups(int index, com.google.bigtable.admin.v2.Backup value) } return this; } + /** * * @@ -712,6 +698,7 @@ public Builder setBackups( } return this; } + /** * * @@ -734,6 +721,7 @@ public Builder addBackups(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -756,6 +744,7 @@ public Builder addBackups(int index, com.google.bigtable.admin.v2.Backup value) } return this; } + /** * * @@ -775,6 +764,7 @@ public Builder addBackups(com.google.bigtable.admin.v2.Backup.Builder builderFor } return this; } + /** * * @@ -795,6 +785,7 @@ public Builder addBackups( } return this; } + /** * * @@ -815,6 +806,7 @@ public Builder addAllBackups( } return this; } + /** * * @@ -834,6 +826,7 @@ public Builder clearBackups() { } return this; } + /** * * @@ -853,6 +846,7 @@ public Builder removeBackups(int index) { } return this; } + /** * * @@ -863,8 +857,9 @@ public Builder removeBackups(int index) { * repeated .google.bigtable.admin.v2.Backup backups = 1; */ public com.google.bigtable.admin.v2.Backup.Builder getBackupsBuilder(int index) { - return getBackupsFieldBuilder().getBuilder(index); + return internalGetBackupsFieldBuilder().getBuilder(index); } + /** * * @@ -881,6 +876,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde return backupsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -898,6 +894,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde return java.util.Collections.unmodifiableList(backups_); } } + /** * * @@ -908,9 +905,10 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupsOrBuilder(int inde * repeated .google.bigtable.admin.v2.Backup backups = 1; */ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder() { - return getBackupsFieldBuilder() + return internalGetBackupsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Backup.getDefaultInstance()); } + /** * * @@ -921,9 +919,10 @@ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder() { * repeated .google.bigtable.admin.v2.Backup backups = 1; */ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder(int index) { - return getBackupsFieldBuilder() + return internalGetBackupsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Backup.getDefaultInstance()); } + /** * * @@ -934,17 +933,17 @@ public com.google.bigtable.admin.v2.Backup.Builder addBackupsBuilder(int index) * repeated .google.bigtable.admin.v2.Backup backups = 1; */ public java.util.List getBackupsBuilderList() { - return getBackupsFieldBuilder().getBuilderList(); + return internalGetBackupsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> - getBackupsFieldBuilder() { + internalGetBackupsFieldBuilder() { if (backupsBuilder_ == null) { backupsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder>( @@ -955,6 +954,7 @@ public java.util.List getBackupsBui } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -979,6 +979,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1003,6 +1004,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1026,6 +1028,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1045,6 +1048,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1070,17 +1074,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.bigtable.admin.v2.ListBackupsResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponseOrBuilder.java index b02b9c574a..c1f8d9efc5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListBackupsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListBackupsResponse) @@ -34,6 +36,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ java.util.List getBackupsList(); + /** * * @@ -44,6 +47,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ com.google.bigtable.admin.v2.Backup getBackups(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ int getBackupsCount(); + /** * * @@ -64,6 +69,7 @@ public interface ListBackupsResponseOrBuilder * repeated .google.bigtable.admin.v2.Backup backups = 1; */ java.util.List getBackupsOrBuilderList(); + /** * * @@ -89,6 +95,7 @@ public interface ListBackupsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java index e59e112d02..5a2288c178 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListClustersRequest} */ -public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListClustersRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListClustersRequest) ListClustersRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListClustersRequest"); + } + // Use ListClustersRequest.newBuilder() to construct. - private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListClustersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListClustersRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListClustersRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -97,6 +105,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -131,6 +140,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -154,6 +164,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -192,11 +203,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(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pageToken_); } getUnknownFields().writeTo(output); } @@ -207,11 +218,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(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -288,38 +299,38 @@ public static com.google.bigtable.admin.v2.ListClustersRequest parseFrom( public static com.google.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest 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); } @@ -342,10 +353,11 @@ 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; } + /** * * @@ -355,7 +367,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListClustersRequest} */ - 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.bigtable.admin.v2.ListClustersRequest) com.google.bigtable.admin.v2.ListClustersRequestOrBuilder { @@ -365,7 +377,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersRequest_fieldAccessorTable @@ -377,7 +389,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListClustersRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -431,39 +443,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListClustersRequest 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.bigtable.admin.v2.ListClustersRequest) { @@ -545,6 +524,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -573,6 +553,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -601,6 +582,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -628,6 +610,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -651,6 +634,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -681,6 +665,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object pageToken_ = ""; + /** * * @@ -703,6 +688,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -725,6 +711,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -746,6 +733,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -763,6 +751,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -786,17 +775,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.bigtable.admin.v2.ListClustersRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequestOrBuilder.java index 5e5d9c1d9a..799caf000b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListClustersRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListClustersRequest) @@ -42,6 +44,7 @@ public interface ListClustersRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -73,6 +76,7 @@ public interface ListClustersRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java index 003a00ee33..e18d241018 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListClustersResponse} */ -public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListClustersResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListClustersResponse) ListClustersResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListClustersResponse"); + } + // Use ListClustersResponse.newBuilder() to construct. - private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListClustersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListClustersResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListClustersResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List clusters_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getClustersList() { return clusters_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getClustersList() { getClustersOrBuilderList() { return clusters_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getClustersList() { public int getClustersCount() { return clusters_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getClustersCount() { public com.google.bigtable.admin.v2.Cluster getClusters(int index) { return clusters_.get(index); } + /** * * @@ -141,6 +153,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList failedLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -159,6 +172,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -177,6 +191,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -196,6 +211,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -220,6 +236,7 @@ public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -243,6 +260,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -285,10 +303,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(1, clusters_.get(i)); } for (int i = 0; i < failedLocations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, failedLocations_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, failedLocations_.getRaw(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_); } getUnknownFields().writeTo(output); } @@ -310,8 +328,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFailedLocationsList().size(); } - 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_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -395,38 +413,38 @@ public static com.google.bigtable.admin.v2.ListClustersResponse parseFrom( public static com.google.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse 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); } @@ -449,10 +467,11 @@ 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 +481,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListClustersResponse} */ - 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.bigtable.admin.v2.ListClustersResponse) com.google.bigtable.admin.v2.ListClustersResponseOrBuilder { @@ -472,7 +491,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersResponse_fieldAccessorTable @@ -484,7 +503,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListClustersResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -560,39 +579,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListClustersResponse 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.bigtable.admin.v2.ListClustersResponse) { @@ -625,8 +611,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersResponse other clusters_ = other.clusters_; bitField0_ = (bitField0_ & ~0x00000001); clustersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getClustersFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetClustersFieldBuilder() : null; } else { clustersBuilder_.addAllMessages(other.clusters_); @@ -729,7 +715,7 @@ private void ensureClustersIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> @@ -751,6 +737,7 @@ public java.util.List getClustersList() { return clustersBuilder_.getMessageList(); } } + /** * * @@ -767,6 +754,7 @@ public int getClustersCount() { return clustersBuilder_.getCount(); } } + /** * * @@ -783,6 +771,7 @@ public com.google.bigtable.admin.v2.Cluster getClusters(int index) { return clustersBuilder_.getMessage(index); } } + /** * * @@ -805,6 +794,7 @@ public Builder setClusters(int index, com.google.bigtable.admin.v2.Cluster value } return this; } + /** * * @@ -825,6 +815,7 @@ public Builder setClusters( } return this; } + /** * * @@ -847,6 +838,7 @@ public Builder addClusters(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -869,6 +861,7 @@ public Builder addClusters(int index, com.google.bigtable.admin.v2.Cluster value } return this; } + /** * * @@ -888,6 +881,7 @@ public Builder addClusters(com.google.bigtable.admin.v2.Cluster.Builder builderF } return this; } + /** * * @@ -908,6 +902,7 @@ public Builder addClusters( } return this; } + /** * * @@ -928,6 +923,7 @@ public Builder addAllClusters( } return this; } + /** * * @@ -947,6 +943,7 @@ public Builder clearClusters() { } return this; } + /** * * @@ -966,6 +963,7 @@ public Builder removeClusters(int index) { } return this; } + /** * * @@ -976,8 +974,9 @@ public Builder removeClusters(int index) { * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ public com.google.bigtable.admin.v2.Cluster.Builder getClustersBuilder(int index) { - return getClustersFieldBuilder().getBuilder(index); + return internalGetClustersFieldBuilder().getBuilder(index); } + /** * * @@ -994,6 +993,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in return clustersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1011,6 +1011,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in return java.util.Collections.unmodifiableList(clusters_); } } + /** * * @@ -1021,9 +1022,10 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClustersOrBuilder(int in * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder() { - return getClustersFieldBuilder() + return internalGetClustersFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Cluster.getDefaultInstance()); } + /** * * @@ -1034,9 +1036,10 @@ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder() { * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder(int index) { - return getClustersFieldBuilder() + return internalGetClustersFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Cluster.getDefaultInstance()); } + /** * * @@ -1047,17 +1050,17 @@ public com.google.bigtable.admin.v2.Cluster.Builder addClustersBuilder(int index * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ public java.util.List getClustersBuilderList() { - return getClustersFieldBuilder().getBuilderList(); + return internalGetClustersFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> - getClustersFieldBuilder() { + internalGetClustersFieldBuilder() { if (clustersBuilder_ == null) { clustersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder>( @@ -1076,6 +1079,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1095,6 +1099,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1113,6 +1118,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1132,6 +1138,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1151,6 +1158,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1178,6 +1186,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1204,6 +1213,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1227,6 +1237,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1249,6 +1260,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * @@ -1278,6 +1290,7 @@ public Builder addFailedLocationsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1300,6 +1313,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1322,6 +1336,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1343,6 +1358,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1360,6 +1376,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1383,17 +1400,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.bigtable.admin.v2.ListClustersResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponseOrBuilder.java index 37661102b5..92eeb65c41 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListClustersResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListClustersResponse) @@ -34,6 +36,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ java.util.List getClustersList(); + /** * * @@ -44,6 +47,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ com.google.bigtable.admin.v2.Cluster getClusters(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListClustersResponseOrBuilder * repeated .google.bigtable.admin.v2.Cluster clusters = 1; */ int getClustersCount(); + /** * * @@ -65,6 +70,7 @@ public interface ListClustersResponseOrBuilder */ java.util.List getClustersOrBuilderList(); + /** * * @@ -92,6 +98,7 @@ public interface ListClustersResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -108,6 +115,7 @@ public interface ListClustersResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -125,6 +133,7 @@ public interface ListClustersResponseOrBuilder * @return The failedLocations at the given index. */ java.lang.String getFailedLocations(int index); + /** * * @@ -155,6 +164,7 @@ public interface ListClustersResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java index 62d286e5f8..bf4757cc61 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListHotTabletsRequest} */ -public final class ListHotTabletsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListHotTabletsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListHotTabletsRequest) ListHotTabletsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHotTabletsRequest"); + } + // Use ListHotTabletsRequest.newBuilder() to construct. - private ListHotTabletsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListHotTabletsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListHotTabletsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHotTabletsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -126,6 +135,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -146,6 +156,7 @@ public com.google.protobuf.ByteString getParentBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -166,6 +177,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -187,6 +199,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -202,6 +215,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -217,6 +231,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -233,6 +248,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int PAGE_SIZE_FIELD_NUMBER = 4; private int pageSize_ = 0; + /** * * @@ -261,6 +277,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -284,6 +301,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -322,8 +340,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(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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getStartTime()); @@ -334,8 +352,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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); } @@ -346,8 +364,8 @@ 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 (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); @@ -358,8 +376,8 @@ public int getSerializedSize() { 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; @@ -455,38 +473,38 @@ public static com.google.bigtable.admin.v2.ListHotTabletsRequest parseFrom( public static com.google.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest 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,10 +527,11 @@ 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 +541,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListHotTabletsRequest} */ - 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.bigtable.admin.v2.ListHotTabletsRequest) com.google.bigtable.admin.v2.ListHotTabletsRequestOrBuilder { @@ -532,7 +551,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_fieldAccessorTable @@ -546,15 +565,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(); } } @@ -632,39 +651,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListHotTabletsRequest 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.bigtable.admin.v2.ListHotTabletsRequest) { @@ -731,13 +717,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 @@ -773,6 +760,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -799,6 +787,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -825,6 +814,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -850,6 +840,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -871,6 +862,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -899,11 +891,12 @@ public Builder setParentBytes(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> startTimeBuilder_; + /** * * @@ -923,6 +916,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -946,6 +940,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -973,6 +968,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -997,6 +993,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -1029,6 +1026,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1053,6 +1051,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -1070,8 +1069,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1093,6 +1093,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -1107,14 +1108,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>( @@ -1125,11 +1126,12 @@ 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> endTimeBuilder_; + /** * * @@ -1144,6 +1146,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1162,6 +1165,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -1184,6 +1188,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1203,6 +1208,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1230,6 +1236,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1249,6 +1256,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1261,8 +1269,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1279,6 +1288,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1288,14 +1298,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>( @@ -1306,6 +1316,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private int pageSize_; + /** * * @@ -1329,6 +1340,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public int getPageSize() { return pageSize_; } + /** * * @@ -1356,6 +1368,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -1383,6 +1396,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -1405,6 +1419,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1427,6 +1442,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1448,6 +1464,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1465,6 +1482,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1488,17 +1506,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.bigtable.admin.v2.ListHotTabletsRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequestOrBuilder.java index 4aefb16414..cb49993125 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListHotTabletsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListHotTabletsRequest) @@ -40,6 +42,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -74,6 +77,7 @@ public interface ListHotTabletsRequestOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -91,6 +95,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -119,6 +124,7 @@ public interface ListHotTabletsRequestOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -131,6 +137,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -175,6 +182,7 @@ public interface ListHotTabletsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java index 1e8da63f16..d744c8e42a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListHotTabletsResponse} */ -public final class ListHotTabletsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListHotTabletsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListHotTabletsResponse) ListHotTabletsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHotTabletsResponse"); + } + // Use ListHotTabletsResponse.newBuilder() to construct. - private ListHotTabletsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListHotTabletsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ListHotTabletsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHotTabletsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List hotTablets_; + /** * * @@ -85,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getHotTabletsList() { return hotTablets_; } + /** * * @@ -103,6 +112,7 @@ public java.util.List getHotTabletsList( getHotTabletsOrBuilderList() { return hotTablets_; } + /** * * @@ -120,6 +130,7 @@ public java.util.List getHotTabletsList( public int getHotTabletsCount() { return hotTablets_.size(); } + /** * * @@ -137,6 +148,7 @@ public int getHotTabletsCount() { public com.google.bigtable.admin.v2.HotTablet getHotTablets(int index) { return hotTablets_.get(index); } + /** * * @@ -159,6 +171,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -184,6 +197,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -227,8 +241,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < hotTablets_.size(); i++) { output.writeMessage(1, hotTablets_.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); } @@ -242,8 +256,8 @@ public int getSerializedSize() { for (int i = 0; i < hotTablets_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hotTablets_.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; @@ -322,38 +336,38 @@ public static com.google.bigtable.admin.v2.ListHotTabletsResponse parseFrom( public static com.google.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse 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); } @@ -376,10 +390,11 @@ 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; } + /** * * @@ -389,7 +404,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListHotTabletsResponse} */ - 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.bigtable.admin.v2.ListHotTabletsResponse) com.google.bigtable.admin.v2.ListHotTabletsResponseOrBuilder { @@ -399,7 +414,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_fieldAccessorTable @@ -411,7 +426,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListHotTabletsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -482,39 +497,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListHotTabletsResponse 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.bigtable.admin.v2.ListHotTabletsResponse) { @@ -547,8 +529,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListHotTabletsResponse oth hotTablets_ = other.hotTablets_; bitField0_ = (bitField0_ & ~0x00000001); hotTabletsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getHotTabletsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHotTabletsFieldBuilder() : null; } else { hotTabletsBuilder_.addAllMessages(other.hotTablets_); @@ -634,7 +616,7 @@ private void ensureHotTabletsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.HotTablet, com.google.bigtable.admin.v2.HotTablet.Builder, com.google.bigtable.admin.v2.HotTabletOrBuilder> @@ -660,6 +642,7 @@ public java.util.List getHotTabletsList( return hotTabletsBuilder_.getMessageList(); } } + /** * * @@ -680,6 +663,7 @@ public int getHotTabletsCount() { return hotTabletsBuilder_.getCount(); } } + /** * * @@ -700,6 +684,7 @@ public com.google.bigtable.admin.v2.HotTablet getHotTablets(int index) { return hotTabletsBuilder_.getMessage(index); } } + /** * * @@ -726,6 +711,7 @@ public Builder setHotTablets(int index, com.google.bigtable.admin.v2.HotTablet v } return this; } + /** * * @@ -750,6 +736,7 @@ public Builder setHotTablets( } return this; } + /** * * @@ -776,6 +763,7 @@ public Builder addHotTablets(com.google.bigtable.admin.v2.HotTablet value) { } return this; } + /** * * @@ -802,6 +790,7 @@ public Builder addHotTablets(int index, com.google.bigtable.admin.v2.HotTablet v } return this; } + /** * * @@ -825,6 +814,7 @@ public Builder addHotTablets(com.google.bigtable.admin.v2.HotTablet.Builder buil } return this; } + /** * * @@ -849,6 +839,7 @@ public Builder addHotTablets( } return this; } + /** * * @@ -873,6 +864,7 @@ public Builder addAllHotTablets( } return this; } + /** * * @@ -896,6 +888,7 @@ public Builder clearHotTablets() { } return this; } + /** * * @@ -919,6 +912,7 @@ public Builder removeHotTablets(int index) { } return this; } + /** * * @@ -933,8 +927,9 @@ public Builder removeHotTablets(int index) { * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ public com.google.bigtable.admin.v2.HotTablet.Builder getHotTabletsBuilder(int index) { - return getHotTabletsFieldBuilder().getBuilder(index); + return internalGetHotTabletsFieldBuilder().getBuilder(index); } + /** * * @@ -955,6 +950,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in return hotTabletsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -976,6 +972,7 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in return java.util.Collections.unmodifiableList(hotTablets_); } } + /** * * @@ -990,9 +987,10 @@ public com.google.bigtable.admin.v2.HotTabletOrBuilder getHotTabletsOrBuilder(in * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder() { - return getHotTabletsFieldBuilder() + return internalGetHotTabletsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.HotTablet.getDefaultInstance()); } + /** * * @@ -1007,9 +1005,10 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder() { * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder(int index) { - return getHotTabletsFieldBuilder() + return internalGetHotTabletsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.HotTablet.getDefaultInstance()); } + /** * * @@ -1025,17 +1024,17 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder(int i */ public java.util.List getHotTabletsBuilderList() { - return getHotTabletsFieldBuilder().getBuilderList(); + return internalGetHotTabletsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.HotTablet, com.google.bigtable.admin.v2.HotTablet.Builder, com.google.bigtable.admin.v2.HotTabletOrBuilder> - getHotTabletsFieldBuilder() { + internalGetHotTabletsFieldBuilder() { if (hotTabletsBuilder_ == null) { hotTabletsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.HotTablet, com.google.bigtable.admin.v2.HotTablet.Builder, com.google.bigtable.admin.v2.HotTabletOrBuilder>( @@ -1046,6 +1045,7 @@ public com.google.bigtable.admin.v2.HotTablet.Builder addHotTabletsBuilder(int i } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1070,6 +1070,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1094,6 +1095,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1117,6 +1119,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1136,6 +1139,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1161,17 +1165,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.bigtable.admin.v2.ListHotTabletsResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponseOrBuilder.java index 2e3d0bb02d..f740e4e4ad 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListHotTabletsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListHotTabletsResponse) @@ -38,6 +40,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ java.util.List getHotTabletsList(); + /** * * @@ -52,6 +55,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ com.google.bigtable.admin.v2.HotTablet getHotTablets(int index); + /** * * @@ -66,6 +70,7 @@ public interface ListHotTabletsResponseOrBuilder * repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; */ int getHotTabletsCount(); + /** * * @@ -81,6 +86,7 @@ public interface ListHotTabletsResponseOrBuilder */ java.util.List getHotTabletsOrBuilderList(); + /** * * @@ -110,6 +116,7 @@ public interface ListHotTabletsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java index b2be196c86..13657d6edd 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -43,19 +56,13 @@ private ListInstancesRequest() { pageToken_ = ""; } - @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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -125,6 +134,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -148,6 +158,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -186,11 +197,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(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pageToken_); } getUnknownFields().writeTo(output); } @@ -201,11 +212,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(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageToken_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,38 +293,38 @@ public static com.google.bigtable.admin.v2.ListInstancesRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -336,10 +347,11 @@ 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; } + /** * * @@ -349,7 +361,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.ListInstancesRequest) com.google.bigtable.admin.v2.ListInstancesRequestOrBuilder { @@ -359,7 +371,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesRequest_fieldAccessorTable @@ -371,7 +383,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -425,39 +437,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListInstancesRequest 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.bigtable.admin.v2.ListInstancesRequest) { @@ -539,6 +518,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -564,6 +544,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -589,6 +570,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -613,6 +595,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -633,6 +616,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -660,6 +644,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object pageToken_ = ""; + /** * * @@ -682,6 +667,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -704,6 +690,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -725,6 +712,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -742,6 +730,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -765,17 +754,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.bigtable.admin.v2.ListInstancesRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequestOrBuilder.java index 68a72075bc..4b32b5b837 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListInstancesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListInstancesRequest) @@ -39,6 +41,7 @@ public interface ListInstancesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -67,6 +70,7 @@ public interface ListInstancesRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java index 4a4dd641e7..fdf318bf9b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -44,19 +57,13 @@ private ListInstancesResponse() { nextPageToken_ = ""; } - @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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List instances_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getInstancesList() { return instances_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getInstancesList() getInstancesOrBuilderList() { return instances_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getInstancesList() public int getInstancesCount() { return instances_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getInstancesCount() { public com.google.bigtable.admin.v2.Instance getInstances(int index) { return instances_.get(index); } + /** * * @@ -141,6 +153,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList failedLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -160,6 +173,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int public com.google.protobuf.ProtocolStringList getFailedLocationsList() { return failedLocations_; } + /** * * @@ -179,6 +193,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -199,6 +214,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -224,6 +240,7 @@ public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -247,6 +264,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -289,10 +307,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(1, instances_.get(i)); } for (int i = 0; i < failedLocations_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, failedLocations_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 2, failedLocations_.getRaw(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_); } getUnknownFields().writeTo(output); } @@ -314,8 +332,8 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFailedLocationsList().size(); } - 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_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -399,38 +417,38 @@ public static com.google.bigtable.admin.v2.ListInstancesResponse parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -453,10 +471,11 @@ 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; } + /** * * @@ -466,7 +485,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.ListInstancesResponse) com.google.bigtable.admin.v2.ListInstancesResponseOrBuilder { @@ -476,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesResponse_fieldAccessorTable @@ -488,7 +507,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListInstancesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -564,39 +583,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListInstancesResponse 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.bigtable.admin.v2.ListInstancesResponse) { @@ -629,8 +615,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListInstancesResponse othe 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_); @@ -733,7 +719,7 @@ private void ensureInstancesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> @@ -755,6 +741,7 @@ public java.util.List getInstancesList() return instancesBuilder_.getMessageList(); } } + /** * * @@ -771,6 +758,7 @@ public int getInstancesCount() { return instancesBuilder_.getCount(); } } + /** * * @@ -787,6 +775,7 @@ public com.google.bigtable.admin.v2.Instance getInstances(int index) { return instancesBuilder_.getMessage(index); } } + /** * * @@ -809,6 +798,7 @@ public Builder setInstances(int index, com.google.bigtable.admin.v2.Instance val } return this; } + /** * * @@ -829,6 +819,7 @@ public Builder setInstances( } return this; } + /** * * @@ -851,6 +842,7 @@ public Builder addInstances(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -873,6 +865,7 @@ public Builder addInstances(int index, com.google.bigtable.admin.v2.Instance val } return this; } + /** * * @@ -892,6 +885,7 @@ public Builder addInstances(com.google.bigtable.admin.v2.Instance.Builder builde } return this; } + /** * * @@ -912,6 +906,7 @@ public Builder addInstances( } return this; } + /** * * @@ -932,6 +927,7 @@ public Builder addAllInstances( } return this; } + /** * * @@ -951,6 +947,7 @@ public Builder clearInstances() { } return this; } + /** * * @@ -970,6 +967,7 @@ public Builder removeInstances(int index) { } return this; } + /** * * @@ -980,8 +978,9 @@ public Builder removeInstances(int index) { * repeated .google.bigtable.admin.v2.Instance instances = 1; */ public com.google.bigtable.admin.v2.Instance.Builder getInstancesBuilder(int index) { - return getInstancesFieldBuilder().getBuilder(index); + return internalGetInstancesFieldBuilder().getBuilder(index); } + /** * * @@ -998,6 +997,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int return instancesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1015,6 +1015,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int return java.util.Collections.unmodifiableList(instances_); } } + /** * * @@ -1025,9 +1026,10 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstancesOrBuilder(int * repeated .google.bigtable.admin.v2.Instance instances = 1; */ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder() { - return getInstancesFieldBuilder() + return internalGetInstancesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Instance.getDefaultInstance()); } + /** * * @@ -1038,9 +1040,10 @@ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder() { * repeated .google.bigtable.admin.v2.Instance instances = 1; */ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder(int index) { - return getInstancesFieldBuilder() + return internalGetInstancesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Instance.getDefaultInstance()); } + /** * * @@ -1051,17 +1054,17 @@ public com.google.bigtable.admin.v2.Instance.Builder addInstancesBuilder(int ind * repeated .google.bigtable.admin.v2.Instance instances = 1; */ public java.util.List getInstancesBuilderList() { - return getInstancesFieldBuilder().getBuilderList(); + return internalGetInstancesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> - getInstancesFieldBuilder() { + internalGetInstancesFieldBuilder() { if (instancesBuilder_ == null) { instancesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder>( @@ -1080,6 +1083,7 @@ private void ensureFailedLocationsIsMutable() { } bitField0_ |= 0x00000002; } + /** * * @@ -1100,6 +1104,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { failedLocations_.makeImmutable(); return failedLocations_; } + /** * * @@ -1119,6 +1124,7 @@ public com.google.protobuf.ProtocolStringList getFailedLocationsList() { public int getFailedLocationsCount() { return failedLocations_.size(); } + /** * * @@ -1139,6 +1145,7 @@ public int getFailedLocationsCount() { public java.lang.String getFailedLocations(int index) { return failedLocations_.get(index); } + /** * * @@ -1159,6 +1166,7 @@ public java.lang.String getFailedLocations(int index) { public com.google.protobuf.ByteString getFailedLocationsBytes(int index) { return failedLocations_.getByteString(index); } + /** * * @@ -1187,6 +1195,7 @@ public Builder setFailedLocations(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -1214,6 +1223,7 @@ public Builder addFailedLocations(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1238,6 +1248,7 @@ public Builder addAllFailedLocations(java.lang.Iterable values onChanged(); return this; } + /** * * @@ -1261,6 +1272,7 @@ public Builder clearFailedLocations() { onChanged(); return this; } + /** * * @@ -1291,6 +1303,7 @@ public Builder addFailedLocationsBytes(com.google.protobuf.ByteString value) { } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -1313,6 +1326,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1335,6 +1349,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1356,6 +1371,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1373,6 +1389,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1396,17 +1413,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.bigtable.admin.v2.ListInstancesResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponseOrBuilder.java index bd80677bd2..c8a67d0651 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListInstancesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListInstancesResponse) @@ -34,6 +36,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ java.util.List getInstancesList(); + /** * * @@ -44,6 +47,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ com.google.bigtable.admin.v2.Instance getInstances(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListInstancesResponseOrBuilder * repeated .google.bigtable.admin.v2.Instance instances = 1; */ int getInstancesCount(); + /** * * @@ -65,6 +70,7 @@ public interface ListInstancesResponseOrBuilder */ java.util.List getInstancesOrBuilderList(); + /** * * @@ -93,6 +99,7 @@ public interface ListInstancesResponseOrBuilder * @return A list containing the failedLocations. */ java.util.List getFailedLocationsList(); + /** * * @@ -110,6 +117,7 @@ public interface ListInstancesResponseOrBuilder * @return The count of failedLocations. */ int getFailedLocationsCount(); + /** * * @@ -128,6 +136,7 @@ public interface ListInstancesResponseOrBuilder * @return The failedLocations at the given index. */ java.lang.String getFailedLocations(int index); + /** * * @@ -159,6 +168,7 @@ public interface ListInstancesResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequest.java new file mode 100644 index 0000000000..c7c4459f59 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequest.java @@ -0,0 +1,942 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.ListLogicalViews.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsRequest} + */ +@com.google.protobuf.Generated +public final class ListLogicalViewsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListLogicalViewsRequest) + ListLogicalViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalViewsRequest"); + } + + // Use ListLogicalViewsRequest.newBuilder() to construct. + private ListLogicalViewsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListLogicalViewsRequest.class, + com.google.bigtable.admin.v2.ListLogicalViewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of logical
      +   * views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of logical
      +   * views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
      +   * Optional. The maximum number of logical views to return. The service may
      +   * return fewer than this value
      +   * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListLogicalViews` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListLogicalViews` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListLogicalViews` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListLogicalViews` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.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.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.ListLogicalViewsRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListLogicalViewsRequest other = + (com.google.bigtable.admin.v2.ListLogicalViewsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest 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.bigtable.admin.v2.ListLogicalViewsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest 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.bigtable.admin.v2.ListLogicalViewsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest 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.bigtable.admin.v2.ListLogicalViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest 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.bigtable.admin.v2.ListLogicalViewsRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.ListLogicalViews.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListLogicalViewsRequest) + com.google.bigtable.admin.v2.ListLogicalViewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListLogicalViewsRequest.class, + com.google.bigtable.admin.v2.ListLogicalViewsRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListLogicalViewsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListLogicalViewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsRequest build() { + com.google.bigtable.admin.v2.ListLogicalViewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsRequest buildPartial() { + com.google.bigtable.admin.v2.ListLogicalViewsRequest result = + new com.google.bigtable.admin.v2.ListLogicalViewsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListLogicalViewsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListLogicalViewsRequest) { + return mergeFrom((com.google.bigtable.admin.v2.ListLogicalViewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListLogicalViewsRequest other) { + if (other == com.google.bigtable.admin.v2.ListLogicalViewsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of logical
      +     * views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of logical
      +     * views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of logical
      +     * views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of logical
      +     * views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of logical
      +     * views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
      +     * Optional. The maximum number of logical views to return. The service may
      +     * return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
      +     * Optional. The maximum number of logical views to return. The service may
      +     * return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The maximum number of logical views to return. The service may
      +     * return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListLogicalViews` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListLogicalViews` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListLogicalViews` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListLogicalViews` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListLogicalViews` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListLogicalViews` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListLogicalViews` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListLogicalViews` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListLogicalViews` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListLogicalViews` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListLogicalViewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListLogicalViewsRequest) + private static final com.google.bigtable.admin.v2.ListLogicalViewsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListLogicalViewsRequest(); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalViewsRequest 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.bigtable.admin.v2.ListLogicalViewsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequestOrBuilder.java new file mode 100644 index 0000000000..18b5ea9e7a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListLogicalViewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListLogicalViewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of logical
      +   * views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of logical
      +   * views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Optional. The maximum number of logical views to return. The service may
      +   * return fewer than this value
      +   * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListLogicalViews` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListLogicalViews` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListLogicalViews` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListLogicalViews` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponse.java new file mode 100644 index 0000000000..245cf63f2a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponse.java @@ -0,0 +1,1121 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Response message for BigtableInstanceAdmin.ListLogicalViews.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsResponse} + */ +@com.google.protobuf.Generated +public final class ListLogicalViewsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListLogicalViewsResponse) + ListLogicalViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalViewsResponse"); + } + + // Use ListLogicalViewsResponse.newBuilder() to construct. + private ListLogicalViewsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalViewsResponse() { + logicalViews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListLogicalViewsResponse.class, + com.google.bigtable.admin.v2.ListLogicalViewsResponse.Builder.class); + } + + public static final int LOGICAL_VIEWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List logicalViews_; + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + @java.lang.Override + public java.util.List getLogicalViewsList() { + return logicalViews_; + } + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + @java.lang.Override + public java.util.List + getLogicalViewsOrBuilderList() { + return logicalViews_; + } + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + @java.lang.Override + public int getLogicalViewsCount() { + return logicalViews_.size(); + } + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView getLogicalViews(int index) { + return logicalViews_.get(index); + } + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewsOrBuilder(int index) { + return logicalViews_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < logicalViews_.size(); i++) { + output.writeMessage(1, logicalViews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logicalViews_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, logicalViews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.bigtable.admin.v2.ListLogicalViewsResponse)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListLogicalViewsResponse other = + (com.google.bigtable.admin.v2.ListLogicalViewsResponse) obj; + + if (!getLogicalViewsList().equals(other.getLogicalViewsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getLogicalViewsCount() > 0) { + hash = (37 * hash) + LOGICAL_VIEWS_FIELD_NUMBER; + hash = (53 * hash) + getLogicalViewsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse 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.bigtable.admin.v2.ListLogicalViewsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse 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.bigtable.admin.v2.ListLogicalViewsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse 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.bigtable.admin.v2.ListLogicalViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse 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.bigtable.admin.v2.ListLogicalViewsResponse 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; + } + + /** + * + * + *
      +   * Response message for BigtableInstanceAdmin.ListLogicalViews.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListLogicalViewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListLogicalViewsResponse) + com.google.bigtable.admin.v2.ListLogicalViewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListLogicalViewsResponse.class, + com.google.bigtable.admin.v2.ListLogicalViewsResponse.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListLogicalViewsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (logicalViewsBuilder_ == null) { + logicalViews_ = java.util.Collections.emptyList(); + } else { + logicalViews_ = null; + logicalViewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListLogicalViewsResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsResponse getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListLogicalViewsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsResponse build() { + com.google.bigtable.admin.v2.ListLogicalViewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListLogicalViewsResponse buildPartial() { + com.google.bigtable.admin.v2.ListLogicalViewsResponse result = + new com.google.bigtable.admin.v2.ListLogicalViewsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.bigtable.admin.v2.ListLogicalViewsResponse result) { + if (logicalViewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + logicalViews_ = java.util.Collections.unmodifiableList(logicalViews_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logicalViews_ = logicalViews_; + } else { + result.logicalViews_ = logicalViewsBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListLogicalViewsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListLogicalViewsResponse) { + return mergeFrom((com.google.bigtable.admin.v2.ListLogicalViewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListLogicalViewsResponse other) { + if (other == com.google.bigtable.admin.v2.ListLogicalViewsResponse.getDefaultInstance()) + return this; + if (logicalViewsBuilder_ == null) { + if (!other.logicalViews_.isEmpty()) { + if (logicalViews_.isEmpty()) { + logicalViews_ = other.logicalViews_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogicalViewsIsMutable(); + logicalViews_.addAll(other.logicalViews_); + } + onChanged(); + } + } else { + if (!other.logicalViews_.isEmpty()) { + if (logicalViewsBuilder_.isEmpty()) { + logicalViewsBuilder_.dispose(); + logicalViewsBuilder_ = null; + logicalViews_ = other.logicalViews_; + bitField0_ = (bitField0_ & ~0x00000001); + logicalViewsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLogicalViewsFieldBuilder() + : null; + } else { + logicalViewsBuilder_.addAllMessages(other.logicalViews_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.LogicalView m = + input.readMessage( + com.google.bigtable.admin.v2.LogicalView.parser(), extensionRegistry); + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + logicalViews_.add(m); + } else { + logicalViewsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List logicalViews_ = + java.util.Collections.emptyList(); + + private void ensureLogicalViewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + logicalViews_ = + new java.util.ArrayList(logicalViews_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + logicalViewsBuilder_; + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public java.util.List getLogicalViewsList() { + if (logicalViewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalViews_); + } else { + return logicalViewsBuilder_.getMessageList(); + } + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public int getLogicalViewsCount() { + if (logicalViewsBuilder_ == null) { + return logicalViews_.size(); + } else { + return logicalViewsBuilder_.getCount(); + } + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public com.google.bigtable.admin.v2.LogicalView getLogicalViews(int index) { + if (logicalViewsBuilder_ == null) { + return logicalViews_.get(index); + } else { + return logicalViewsBuilder_.getMessage(index); + } + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder setLogicalViews(int index, com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalViewsIsMutable(); + logicalViews_.set(index, value); + onChanged(); + } else { + logicalViewsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder setLogicalViews( + int index, com.google.bigtable.admin.v2.LogicalView.Builder builderForValue) { + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + logicalViews_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalViewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder addLogicalViews(com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalViewsIsMutable(); + logicalViews_.add(value); + onChanged(); + } else { + logicalViewsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder addLogicalViews(int index, com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalViewsIsMutable(); + logicalViews_.add(index, value); + onChanged(); + } else { + logicalViewsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder addLogicalViews( + com.google.bigtable.admin.v2.LogicalView.Builder builderForValue) { + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + logicalViews_.add(builderForValue.build()); + onChanged(); + } else { + logicalViewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder addLogicalViews( + int index, com.google.bigtable.admin.v2.LogicalView.Builder builderForValue) { + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + logicalViews_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalViewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder addAllLogicalViews( + java.lang.Iterable values) { + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalViews_); + onChanged(); + } else { + logicalViewsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder clearLogicalViews() { + if (logicalViewsBuilder_ == null) { + logicalViews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logicalViewsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public Builder removeLogicalViews(int index) { + if (logicalViewsBuilder_ == null) { + ensureLogicalViewsIsMutable(); + logicalViews_.remove(index); + onChanged(); + } else { + logicalViewsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public com.google.bigtable.admin.v2.LogicalView.Builder getLogicalViewsBuilder(int index) { + return internalGetLogicalViewsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewsOrBuilder(int index) { + if (logicalViewsBuilder_ == null) { + return logicalViews_.get(index); + } else { + return logicalViewsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public java.util.List + getLogicalViewsOrBuilderList() { + if (logicalViewsBuilder_ != null) { + return logicalViewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalViews_); + } + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public com.google.bigtable.admin.v2.LogicalView.Builder addLogicalViewsBuilder() { + return internalGetLogicalViewsFieldBuilder() + .addBuilder(com.google.bigtable.admin.v2.LogicalView.getDefaultInstance()); + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public com.google.bigtable.admin.v2.LogicalView.Builder addLogicalViewsBuilder(int index) { + return internalGetLogicalViewsFieldBuilder() + .addBuilder(index, com.google.bigtable.admin.v2.LogicalView.getDefaultInstance()); + } + + /** + * + * + *
      +     * The list of requested logical views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + public java.util.List + getLogicalViewsBuilderList() { + return internalGetLogicalViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + internalGetLogicalViewsFieldBuilder() { + if (logicalViewsBuilder_ == null) { + logicalViewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder>( + logicalViews_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + logicalViews_ = null; + } + return logicalViewsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListLogicalViewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListLogicalViewsResponse) + private static final com.google.bigtable.admin.v2.ListLogicalViewsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListLogicalViewsResponse(); + } + + public static com.google.bigtable.admin.v2.ListLogicalViewsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalViewsResponse 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.bigtable.admin.v2.ListLogicalViewsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponseOrBuilder.java new file mode 100644 index 0000000000..1d8b2d34fb --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListLogicalViewsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListLogicalViewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListLogicalViewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + java.util.List getLogicalViewsList(); + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + com.google.bigtable.admin.v2.LogicalView getLogicalViews(int index); + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + int getLogicalViewsCount(); + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + java.util.List + getLogicalViewsOrBuilderList(); + + /** + * + * + *
      +   * The list of requested logical views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.LogicalView logical_views = 1; + */ + com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewsOrBuilder(int index); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequest.java new file mode 100644 index 0000000000..0170c4ba13 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequest.java @@ -0,0 +1,943 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.ListMaterializedViews.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsRequest} + */ +@com.google.protobuf.Generated +public final class ListMaterializedViewsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListMaterializedViewsRequest) + ListMaterializedViewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMaterializedViewsRequest"); + } + + // Use ListMaterializedViewsRequest.newBuilder() to construct. + private ListMaterializedViewsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMaterializedViewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest.class, + com.google.bigtable.admin.v2.ListMaterializedViewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of
      +   * materialized views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of
      +   * materialized views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
      +   * Optional. The maximum number of materialized views to return. The service
      +   * may return fewer than this value
      +   * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListMaterializedViews`
      +   * call. Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListMaterializedViews`
      +   * must match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListMaterializedViews`
      +   * call. Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListMaterializedViews`
      +   * must match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.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.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.ListMaterializedViewsRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListMaterializedViewsRequest other = + (com.google.bigtable.admin.v2.ListMaterializedViewsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest 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.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest 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.bigtable.admin.v2.ListMaterializedViewsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest 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.bigtable.admin.v2.ListMaterializedViewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest 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.bigtable.admin.v2.ListMaterializedViewsRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.ListMaterializedViews.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListMaterializedViewsRequest) + com.google.bigtable.admin.v2.ListMaterializedViewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListMaterializedViewsRequest.class, + com.google.bigtable.admin.v2.ListMaterializedViewsRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListMaterializedViewsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListMaterializedViewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsRequest build() { + com.google.bigtable.admin.v2.ListMaterializedViewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsRequest buildPartial() { + com.google.bigtable.admin.v2.ListMaterializedViewsRequest result = + new com.google.bigtable.admin.v2.ListMaterializedViewsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListMaterializedViewsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListMaterializedViewsRequest) { + return mergeFrom((com.google.bigtable.admin.v2.ListMaterializedViewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListMaterializedViewsRequest other) { + if (other == com.google.bigtable.admin.v2.ListMaterializedViewsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of
      +     * materialized views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of
      +     * materialized views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of
      +     * materialized views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of
      +     * materialized views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The unique name of the instance for which the list of
      +     * materialized views is requested. Values are of the form
      +     * `projects/{project}/instances/{instance}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
      +     * Optional. The maximum number of materialized views to return. The service
      +     * may return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
      +     * Optional. The maximum number of materialized views to return. The service
      +     * may return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The maximum number of materialized views to return. The service
      +     * may return fewer than this value
      +     * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListMaterializedViews`
      +     * call. Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListMaterializedViews`
      +     * must match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListMaterializedViews`
      +     * call. Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListMaterializedViews`
      +     * must match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListMaterializedViews`
      +     * call. Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListMaterializedViews`
      +     * must match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListMaterializedViews`
      +     * call. Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListMaterializedViews`
      +     * must match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. A page token, received from a previous `ListMaterializedViews`
      +     * call. Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListMaterializedViews`
      +     * must match the call that provided the page token.
      +     * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListMaterializedViewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListMaterializedViewsRequest) + private static final com.google.bigtable.admin.v2.ListMaterializedViewsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListMaterializedViewsRequest(); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMaterializedViewsRequest 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.bigtable.admin.v2.ListMaterializedViewsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequestOrBuilder.java new file mode 100644 index 0000000000..a706c8db7b --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListMaterializedViewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListMaterializedViewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of
      +   * materialized views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The unique name of the instance for which the list of
      +   * materialized views is requested. Values are of the form
      +   * `projects/{project}/instances/{instance}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Optional. The maximum number of materialized views to return. The service
      +   * may return fewer than this value
      +   * 
      + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListMaterializedViews`
      +   * call. Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListMaterializedViews`
      +   * must match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
      +   * Optional. A page token, received from a previous `ListMaterializedViews`
      +   * call. Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListMaterializedViews`
      +   * must match the call that provided the page token.
      +   * 
      + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponse.java new file mode 100644 index 0000000000..6c36e54251 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponse.java @@ -0,0 +1,1133 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Response message for BigtableInstanceAdmin.ListMaterializedViews.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsResponse} + */ +@com.google.protobuf.Generated +public final class ListMaterializedViewsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListMaterializedViewsResponse) + ListMaterializedViewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMaterializedViewsResponse"); + } + + // Use ListMaterializedViewsResponse.newBuilder() to construct. + private ListMaterializedViewsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMaterializedViewsResponse() { + materializedViews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListMaterializedViewsResponse.class, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse.Builder.class); + } + + public static final int MATERIALIZED_VIEWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List materializedViews_; + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + @java.lang.Override + public java.util.List getMaterializedViewsList() { + return materializedViews_; + } + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + @java.lang.Override + public java.util.List + getMaterializedViewsOrBuilderList() { + return materializedViews_; + } + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + @java.lang.Override + public int getMaterializedViewsCount() { + return materializedViews_.size(); + } + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView getMaterializedViews(int index) { + return materializedViews_.get(index); + } + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewsOrBuilder( + int index) { + return materializedViews_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < materializedViews_.size(); i++) { + output.writeMessage(1, materializedViews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < materializedViews_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, materializedViews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.bigtable.admin.v2.ListMaterializedViewsResponse)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListMaterializedViewsResponse other = + (com.google.bigtable.admin.v2.ListMaterializedViewsResponse) obj; + + if (!getMaterializedViewsList().equals(other.getMaterializedViewsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getMaterializedViewsCount() > 0) { + hash = (37 * hash) + MATERIALIZED_VIEWS_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedViewsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse 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.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse 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.bigtable.admin.v2.ListMaterializedViewsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse 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.bigtable.admin.v2.ListMaterializedViewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse 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.bigtable.admin.v2.ListMaterializedViewsResponse 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; + } + + /** + * + * + *
      +   * Response message for BigtableInstanceAdmin.ListMaterializedViews.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListMaterializedViewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListMaterializedViewsResponse) + com.google.bigtable.admin.v2.ListMaterializedViewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListMaterializedViewsResponse.class, + com.google.bigtable.admin.v2.ListMaterializedViewsResponse.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListMaterializedViewsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (materializedViewsBuilder_ == null) { + materializedViews_ = java.util.Collections.emptyList(); + } else { + materializedViews_ = null; + materializedViewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_ListMaterializedViewsResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsResponse getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListMaterializedViewsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsResponse build() { + com.google.bigtable.admin.v2.ListMaterializedViewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListMaterializedViewsResponse buildPartial() { + com.google.bigtable.admin.v2.ListMaterializedViewsResponse result = + new com.google.bigtable.admin.v2.ListMaterializedViewsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.bigtable.admin.v2.ListMaterializedViewsResponse result) { + if (materializedViewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + materializedViews_ = java.util.Collections.unmodifiableList(materializedViews_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.materializedViews_ = materializedViews_; + } else { + result.materializedViews_ = materializedViewsBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListMaterializedViewsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListMaterializedViewsResponse) { + return mergeFrom((com.google.bigtable.admin.v2.ListMaterializedViewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListMaterializedViewsResponse other) { + if (other == com.google.bigtable.admin.v2.ListMaterializedViewsResponse.getDefaultInstance()) + return this; + if (materializedViewsBuilder_ == null) { + if (!other.materializedViews_.isEmpty()) { + if (materializedViews_.isEmpty()) { + materializedViews_ = other.materializedViews_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMaterializedViewsIsMutable(); + materializedViews_.addAll(other.materializedViews_); + } + onChanged(); + } + } else { + if (!other.materializedViews_.isEmpty()) { + if (materializedViewsBuilder_.isEmpty()) { + materializedViewsBuilder_.dispose(); + materializedViewsBuilder_ = null; + materializedViews_ = other.materializedViews_; + bitField0_ = (bitField0_ & ~0x00000001); + materializedViewsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMaterializedViewsFieldBuilder() + : null; + } else { + materializedViewsBuilder_.addAllMessages(other.materializedViews_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.MaterializedView m = + input.readMessage( + com.google.bigtable.admin.v2.MaterializedView.parser(), extensionRegistry); + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + materializedViews_.add(m); + } else { + materializedViewsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List materializedViews_ = + java.util.Collections.emptyList(); + + private void ensureMaterializedViewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + materializedViews_ = + new java.util.ArrayList( + materializedViews_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + materializedViewsBuilder_; + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public java.util.List + getMaterializedViewsList() { + if (materializedViewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(materializedViews_); + } else { + return materializedViewsBuilder_.getMessageList(); + } + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public int getMaterializedViewsCount() { + if (materializedViewsBuilder_ == null) { + return materializedViews_.size(); + } else { + return materializedViewsBuilder_.getCount(); + } + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public com.google.bigtable.admin.v2.MaterializedView getMaterializedViews(int index) { + if (materializedViewsBuilder_ == null) { + return materializedViews_.get(index); + } else { + return materializedViewsBuilder_.getMessage(index); + } + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder setMaterializedViews( + int index, com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterializedViewsIsMutable(); + materializedViews_.set(index, value); + onChanged(); + } else { + materializedViewsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder setMaterializedViews( + int index, com.google.bigtable.admin.v2.MaterializedView.Builder builderForValue) { + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + materializedViews_.set(index, builderForValue.build()); + onChanged(); + } else { + materializedViewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder addMaterializedViews(com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterializedViewsIsMutable(); + materializedViews_.add(value); + onChanged(); + } else { + materializedViewsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder addMaterializedViews( + int index, com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaterializedViewsIsMutable(); + materializedViews_.add(index, value); + onChanged(); + } else { + materializedViewsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder addMaterializedViews( + com.google.bigtable.admin.v2.MaterializedView.Builder builderForValue) { + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + materializedViews_.add(builderForValue.build()); + onChanged(); + } else { + materializedViewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder addMaterializedViews( + int index, com.google.bigtable.admin.v2.MaterializedView.Builder builderForValue) { + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + materializedViews_.add(index, builderForValue.build()); + onChanged(); + } else { + materializedViewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder addAllMaterializedViews( + java.lang.Iterable values) { + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, materializedViews_); + onChanged(); + } else { + materializedViewsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder clearMaterializedViews() { + if (materializedViewsBuilder_ == null) { + materializedViews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + materializedViewsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public Builder removeMaterializedViews(int index) { + if (materializedViewsBuilder_ == null) { + ensureMaterializedViewsIsMutable(); + materializedViews_.remove(index); + onChanged(); + } else { + materializedViewsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public com.google.bigtable.admin.v2.MaterializedView.Builder getMaterializedViewsBuilder( + int index) { + return internalGetMaterializedViewsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewsOrBuilder( + int index) { + if (materializedViewsBuilder_ == null) { + return materializedViews_.get(index); + } else { + return materializedViewsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public java.util.List + getMaterializedViewsOrBuilderList() { + if (materializedViewsBuilder_ != null) { + return materializedViewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(materializedViews_); + } + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public com.google.bigtable.admin.v2.MaterializedView.Builder addMaterializedViewsBuilder() { + return internalGetMaterializedViewsFieldBuilder() + .addBuilder(com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance()); + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public com.google.bigtable.admin.v2.MaterializedView.Builder addMaterializedViewsBuilder( + int index) { + return internalGetMaterializedViewsFieldBuilder() + .addBuilder(index, com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance()); + } + + /** + * + * + *
      +     * The list of requested materialized views.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + public java.util.List + getMaterializedViewsBuilderList() { + return internalGetMaterializedViewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + internalGetMaterializedViewsFieldBuilder() { + if (materializedViewsBuilder_ == null) { + materializedViewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder>( + materializedViews_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + materializedViews_ = null; + } + return materializedViewsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListMaterializedViewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListMaterializedViewsResponse) + private static final com.google.bigtable.admin.v2.ListMaterializedViewsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListMaterializedViewsResponse(); + } + + public static com.google.bigtable.admin.v2.ListMaterializedViewsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMaterializedViewsResponse 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.bigtable.admin.v2.ListMaterializedViewsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponseOrBuilder.java new file mode 100644 index 0000000000..34bbd2ea0c --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListMaterializedViewsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListMaterializedViewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListMaterializedViewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + java.util.List getMaterializedViewsList(); + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + com.google.bigtable.admin.v2.MaterializedView getMaterializedViews(int index); + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + int getMaterializedViewsCount(); + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + java.util.List + getMaterializedViewsOrBuilderList(); + + /** + * + * + *
      +   * The list of requested materialized views.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.MaterializedView materialized_views = 1; + */ + com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewsOrBuilder(int index); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequest.java new file mode 100644 index 0000000000..11fa9c7fbc --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequest.java @@ -0,0 +1,949 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The request for
      + * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesRequest} + */ +@com.google.protobuf.Generated +public final class ListSchemaBundlesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSchemaBundlesRequest) + ListSchemaBundlesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemaBundlesRequest"); + } + + // Use ListSchemaBundlesRequest.newBuilder() to construct. + private ListSchemaBundlesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSchemaBundlesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest.class, + com.google.bigtable.admin.v2.ListSchemaBundlesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
      +   * Required. The parent, which owns this collection of schema bundles.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + + /** + * + * + *
      +   * Required. The parent, which owns this collection of schema bundles.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
      +   * The maximum number of schema bundles to return. If the value is positive,
      +   * the server may return at most this value. If unspecified, the server will
      +   * return the maximum allowed page size.
      +   * 
      + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +   * A page token, received from a previous `ListSchemaBundles` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListSchemaBundles` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * A page token, received from a previous `ListSchemaBundles` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListSchemaBundles` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.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.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.ListSchemaBundlesRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListSchemaBundlesRequest other = + (com.google.bigtable.admin.v2.ListSchemaBundlesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest 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.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest 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.bigtable.admin.v2.ListSchemaBundlesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest 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.bigtable.admin.v2.ListSchemaBundlesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest 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.bigtable.admin.v2.ListSchemaBundlesRequest 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; + } + + /** + * + * + *
      +   * The request for
      +   * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListSchemaBundlesRequest) + com.google.bigtable.admin.v2.ListSchemaBundlesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListSchemaBundlesRequest.class, + com.google.bigtable.admin.v2.ListSchemaBundlesRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListSchemaBundlesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListSchemaBundlesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesRequest build() { + com.google.bigtable.admin.v2.ListSchemaBundlesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesRequest buildPartial() { + com.google.bigtable.admin.v2.ListSchemaBundlesRequest result = + new com.google.bigtable.admin.v2.ListSchemaBundlesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListSchemaBundlesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListSchemaBundlesRequest) { + return mergeFrom((com.google.bigtable.admin.v2.ListSchemaBundlesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListSchemaBundlesRequest other) { + if (other == com.google.bigtable.admin.v2.ListSchemaBundlesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
      +     * Required. The parent, which owns this collection of schema bundles.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Required. The parent, which owns this collection of schema bundles.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Required. The parent, which owns this collection of schema bundles.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent, which owns this collection of schema bundles.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The parent, which owns this collection of schema bundles.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}`.
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
      +     * The maximum number of schema bundles to return. If the value is positive,
      +     * the server may return at most this value. If unspecified, the server will
      +     * return the maximum allowed page size.
      +     * 
      + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
      +     * The maximum number of schema bundles to return. If the value is positive,
      +     * the server may return at most this value. If unspecified, the server will
      +     * return the maximum allowed page size.
      +     * 
      + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The maximum number of schema bundles to return. If the value is positive,
      +     * the server may return at most this value. If unspecified, the server will
      +     * return the maximum allowed page size.
      +     * 
      + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
      +     * A page token, received from a previous `ListSchemaBundles` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListSchemaBundles` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * A page token, received from a previous `ListSchemaBundles` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListSchemaBundles` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * A page token, received from a previous `ListSchemaBundles` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListSchemaBundles` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * A page token, received from a previous `ListSchemaBundles` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListSchemaBundles` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * A page token, received from a previous `ListSchemaBundles` call.
      +     * Provide this to retrieve the subsequent page.
      +     *
      +     * When paginating, all other parameters provided to `ListSchemaBundles` must
      +     * match the call that provided the page token.
      +     * 
      + * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListSchemaBundlesRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListSchemaBundlesRequest) + private static final com.google.bigtable.admin.v2.ListSchemaBundlesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListSchemaBundlesRequest(); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSchemaBundlesRequest 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.bigtable.admin.v2.ListSchemaBundlesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequestOrBuilder.java new file mode 100644 index 0000000000..4352f147eb --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListSchemaBundlesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListSchemaBundlesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The parent, which owns this collection of schema bundles.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
      +   * Required. The parent, which owns this collection of schema bundles.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}`.
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * The maximum number of schema bundles to return. If the value is positive,
      +   * the server may return at most this value. If unspecified, the server will
      +   * return the maximum allowed page size.
      +   * 
      + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
      +   * A page token, received from a previous `ListSchemaBundles` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListSchemaBundles` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
      +   * A page token, received from a previous `ListSchemaBundles` call.
      +   * Provide this to retrieve the subsequent page.
      +   *
      +   * When paginating, all other parameters provided to `ListSchemaBundles` must
      +   * match the call that provided the page token.
      +   * 
      + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponse.java new file mode 100644 index 0000000000..c4c023fbca --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The response for
      + * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesResponse} + */ +@com.google.protobuf.Generated +public final class ListSchemaBundlesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSchemaBundlesResponse) + ListSchemaBundlesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSchemaBundlesResponse"); + } + + // Use ListSchemaBundlesResponse.newBuilder() to construct. + private ListSchemaBundlesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSchemaBundlesResponse() { + schemaBundles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListSchemaBundlesResponse.class, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse.Builder.class); + } + + public static final int SCHEMA_BUNDLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List schemaBundles_; + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + @java.lang.Override + public java.util.List getSchemaBundlesList() { + return schemaBundles_; + } + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + @java.lang.Override + public java.util.List + getSchemaBundlesOrBuilderList() { + return schemaBundles_; + } + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + @java.lang.Override + public int getSchemaBundlesCount() { + return schemaBundles_.size(); + } + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundles(int index) { + return schemaBundles_.get(index); + } + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundlesOrBuilder(int index) { + return schemaBundles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < schemaBundles_.size(); i++) { + output.writeMessage(1, schemaBundles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < schemaBundles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schemaBundles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.bigtable.admin.v2.ListSchemaBundlesResponse)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ListSchemaBundlesResponse other = + (com.google.bigtable.admin.v2.ListSchemaBundlesResponse) obj; + + if (!getSchemaBundlesList().equals(other.getSchemaBundlesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getSchemaBundlesCount() > 0) { + hash = (37 * hash) + SCHEMA_BUNDLES_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundlesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse 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.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse 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.bigtable.admin.v2.ListSchemaBundlesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse 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.bigtable.admin.v2.ListSchemaBundlesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse 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.bigtable.admin.v2.ListSchemaBundlesResponse 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; + } + + /** + * + * + *
      +   * The response for
      +   * [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ListSchemaBundlesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ListSchemaBundlesResponse) + com.google.bigtable.admin.v2.ListSchemaBundlesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ListSchemaBundlesResponse.class, + com.google.bigtable.admin.v2.ListSchemaBundlesResponse.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ListSchemaBundlesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (schemaBundlesBuilder_ == null) { + schemaBundles_ = java.util.Collections.emptyList(); + } else { + schemaBundles_ = null; + schemaBundlesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_ListSchemaBundlesResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesResponse getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ListSchemaBundlesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesResponse build() { + com.google.bigtable.admin.v2.ListSchemaBundlesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ListSchemaBundlesResponse buildPartial() { + com.google.bigtable.admin.v2.ListSchemaBundlesResponse result = + new com.google.bigtable.admin.v2.ListSchemaBundlesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.bigtable.admin.v2.ListSchemaBundlesResponse result) { + if (schemaBundlesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + schemaBundles_ = java.util.Collections.unmodifiableList(schemaBundles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.schemaBundles_ = schemaBundles_; + } else { + result.schemaBundles_ = schemaBundlesBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.admin.v2.ListSchemaBundlesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ListSchemaBundlesResponse) { + return mergeFrom((com.google.bigtable.admin.v2.ListSchemaBundlesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ListSchemaBundlesResponse other) { + if (other == com.google.bigtable.admin.v2.ListSchemaBundlesResponse.getDefaultInstance()) + return this; + if (schemaBundlesBuilder_ == null) { + if (!other.schemaBundles_.isEmpty()) { + if (schemaBundles_.isEmpty()) { + schemaBundles_ = other.schemaBundles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSchemaBundlesIsMutable(); + schemaBundles_.addAll(other.schemaBundles_); + } + onChanged(); + } + } else { + if (!other.schemaBundles_.isEmpty()) { + if (schemaBundlesBuilder_.isEmpty()) { + schemaBundlesBuilder_.dispose(); + schemaBundlesBuilder_ = null; + schemaBundles_ = other.schemaBundles_; + bitField0_ = (bitField0_ & ~0x00000001); + schemaBundlesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSchemaBundlesFieldBuilder() + : null; + } else { + schemaBundlesBuilder_.addAllMessages(other.schemaBundles_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.SchemaBundle m = + input.readMessage( + com.google.bigtable.admin.v2.SchemaBundle.parser(), extensionRegistry); + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + schemaBundles_.add(m); + } else { + schemaBundlesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List schemaBundles_ = + java.util.Collections.emptyList(); + + private void ensureSchemaBundlesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + schemaBundles_ = + new java.util.ArrayList(schemaBundles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + schemaBundlesBuilder_; + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public java.util.List getSchemaBundlesList() { + if (schemaBundlesBuilder_ == null) { + return java.util.Collections.unmodifiableList(schemaBundles_); + } else { + return schemaBundlesBuilder_.getMessageList(); + } + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public int getSchemaBundlesCount() { + if (schemaBundlesBuilder_ == null) { + return schemaBundles_.size(); + } else { + return schemaBundlesBuilder_.getCount(); + } + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundles(int index) { + if (schemaBundlesBuilder_ == null) { + return schemaBundles_.get(index); + } else { + return schemaBundlesBuilder_.getMessage(index); + } + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder setSchemaBundles(int index, com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundlesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaBundlesIsMutable(); + schemaBundles_.set(index, value); + onChanged(); + } else { + schemaBundlesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder setSchemaBundles( + int index, com.google.bigtable.admin.v2.SchemaBundle.Builder builderForValue) { + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + schemaBundles_.set(index, builderForValue.build()); + onChanged(); + } else { + schemaBundlesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder addSchemaBundles(com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundlesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaBundlesIsMutable(); + schemaBundles_.add(value); + onChanged(); + } else { + schemaBundlesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder addSchemaBundles(int index, com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundlesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaBundlesIsMutable(); + schemaBundles_.add(index, value); + onChanged(); + } else { + schemaBundlesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder addSchemaBundles( + com.google.bigtable.admin.v2.SchemaBundle.Builder builderForValue) { + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + schemaBundles_.add(builderForValue.build()); + onChanged(); + } else { + schemaBundlesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder addSchemaBundles( + int index, com.google.bigtable.admin.v2.SchemaBundle.Builder builderForValue) { + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + schemaBundles_.add(index, builderForValue.build()); + onChanged(); + } else { + schemaBundlesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder addAllSchemaBundles( + java.lang.Iterable values) { + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schemaBundles_); + onChanged(); + } else { + schemaBundlesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder clearSchemaBundles() { + if (schemaBundlesBuilder_ == null) { + schemaBundles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + schemaBundlesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public Builder removeSchemaBundles(int index) { + if (schemaBundlesBuilder_ == null) { + ensureSchemaBundlesIsMutable(); + schemaBundles_.remove(index); + onChanged(); + } else { + schemaBundlesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public com.google.bigtable.admin.v2.SchemaBundle.Builder getSchemaBundlesBuilder(int index) { + return internalGetSchemaBundlesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundlesOrBuilder(int index) { + if (schemaBundlesBuilder_ == null) { + return schemaBundles_.get(index); + } else { + return schemaBundlesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public java.util.List + getSchemaBundlesOrBuilderList() { + if (schemaBundlesBuilder_ != null) { + return schemaBundlesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(schemaBundles_); + } + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public com.google.bigtable.admin.v2.SchemaBundle.Builder addSchemaBundlesBuilder() { + return internalGetSchemaBundlesFieldBuilder() + .addBuilder(com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance()); + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public com.google.bigtable.admin.v2.SchemaBundle.Builder addSchemaBundlesBuilder(int index) { + return internalGetSchemaBundlesFieldBuilder() + .addBuilder(index, com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance()); + } + + /** + * + * + *
      +     * The schema bundles from the specified table.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + public java.util.List + getSchemaBundlesBuilderList() { + return internalGetSchemaBundlesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + internalGetSchemaBundlesFieldBuilder() { + if (schemaBundlesBuilder_ == null) { + schemaBundlesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder>( + schemaBundles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + schemaBundles_ = null; + } + return schemaBundlesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * A token, which can be sent as `page_token` to retrieve the next page.
      +     * If this field is omitted, there are no subsequent pages.
      +     * 
      + * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ListSchemaBundlesResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListSchemaBundlesResponse) + private static final com.google.bigtable.admin.v2.ListSchemaBundlesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ListSchemaBundlesResponse(); + } + + public static com.google.bigtable.admin.v2.ListSchemaBundlesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSchemaBundlesResponse 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.bigtable.admin.v2.ListSchemaBundlesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponseOrBuilder.java new file mode 100644 index 0000000000..f7c4cd2d02 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSchemaBundlesResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ListSchemaBundlesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListSchemaBundlesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + java.util.List getSchemaBundlesList(); + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + com.google.bigtable.admin.v2.SchemaBundle getSchemaBundles(int index); + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + int getSchemaBundlesCount(); + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + java.util.List + getSchemaBundlesOrBuilderList(); + + /** + * + * + *
      +   * The schema bundles from the specified table.
      +   * 
      + * + * repeated .google.bigtable.admin.v2.SchemaBundle schema_bundles = 1; + */ + com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundlesOrBuilder(int index); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
      +   * A token, which can be sent as `page_token` to retrieve the next page.
      +   * If this field is omitted, there are no subsequent pages.
      +   * 
      + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java index e9340f4671..4616321aa3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListSnapshotsRequest} */ -public final class ListSnapshotsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSnapshotsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSnapshotsRequest) ListSnapshotsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSnapshotsRequest"); + } + // Use ListSnapshotsRequest.newBuilder() to construct. - private ListSnapshotsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSnapshotsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -49,19 +62,13 @@ private ListSnapshotsRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_fieldAccessorTable @@ -74,6 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -103,6 +111,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -135,6 +144,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int PAGE_SIZE_FIELD_NUMBER = 2; private int pageSize_ = 0; + /** * * @@ -156,6 +166,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -179,6 +190,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -217,14 +229,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); } @@ -235,14 +247,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; @@ -322,38 +334,38 @@ public static com.google.bigtable.admin.v2.ListSnapshotsRequest parseFrom( public static com.google.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest 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); } @@ -376,10 +388,11 @@ 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 +408,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListSnapshotsRequest} */ - 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.bigtable.admin.v2.ListSnapshotsRequest) com.google.bigtable.admin.v2.ListSnapshotsRequestOrBuilder { @@ -405,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_fieldAccessorTable @@ -417,7 +430,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListSnapshotsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -475,39 +488,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListSnapshotsRequest 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.bigtable.admin.v2.ListSnapshotsRequest) { @@ -598,6 +578,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -626,6 +607,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -654,6 +636,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -681,6 +664,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -704,6 +688,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -734,6 +719,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int pageSize_; + /** * * @@ -750,6 +736,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getPageSize() { return pageSize_; } + /** * * @@ -770,6 +757,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -790,6 +778,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -812,6 +801,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -834,6 +824,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -855,6 +846,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -872,6 +864,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -895,17 +888,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.bigtable.admin.v2.ListSnapshotsRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequestOrBuilder.java index 1e2af98da0..611ca5eb27 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListSnapshotsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListSnapshotsRequest) @@ -42,6 +44,7 @@ public interface ListSnapshotsRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -87,6 +90,7 @@ public interface ListSnapshotsRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java index 002b665a4c..4fd00db504 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListSnapshotsResponse} */ -public final class ListSnapshotsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListSnapshotsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListSnapshotsResponse) ListSnapshotsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSnapshotsResponse"); + } + // Use ListSnapshotsResponse.newBuilder() to construct. - private ListSnapshotsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListSnapshotsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -49,19 +62,13 @@ private ListSnapshotsResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListSnapshotsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_fieldAccessorTable @@ -74,6 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List snapshots_; + /** * * @@ -87,6 +95,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getSnapshotsList() { return snapshots_; } + /** * * @@ -101,6 +110,7 @@ public java.util.List getSnapshotsList() getSnapshotsOrBuilderList() { return snapshots_; } + /** * * @@ -114,6 +124,7 @@ public java.util.List getSnapshotsList() public int getSnapshotsCount() { return snapshots_.size(); } + /** * * @@ -127,6 +138,7 @@ public int getSnapshotsCount() { public com.google.bigtable.admin.v2.Snapshot getSnapshots(int index) { return snapshots_.get(index); } + /** * * @@ -145,6 +157,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -170,6 +183,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -213,8 +227,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < snapshots_.size(); i++) { output.writeMessage(1, snapshots_.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); } @@ -228,8 +242,8 @@ public int getSerializedSize() { for (int i = 0; i < snapshots_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, snapshots_.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; @@ -308,38 +322,38 @@ public static com.google.bigtable.admin.v2.ListSnapshotsResponse parseFrom( public static com.google.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse 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); } @@ -362,10 +376,11 @@ 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 +396,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListSnapshotsResponse} */ - 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.bigtable.admin.v2.ListSnapshotsResponse) com.google.bigtable.admin.v2.ListSnapshotsResponseOrBuilder { @@ -391,7 +406,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_fieldAccessorTable @@ -403,7 +418,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListSnapshotsResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -474,39 +489,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListSnapshotsResponse 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.bigtable.admin.v2.ListSnapshotsResponse) { @@ -539,8 +521,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListSnapshotsResponse othe snapshots_ = other.snapshots_; bitField0_ = (bitField0_ & ~0x00000001); snapshotsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getSnapshotsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSnapshotsFieldBuilder() : null; } else { snapshotsBuilder_.addAllMessages(other.snapshots_); @@ -626,7 +608,7 @@ private void ensureSnapshotsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Snapshot, com.google.bigtable.admin.v2.Snapshot.Builder, com.google.bigtable.admin.v2.SnapshotOrBuilder> @@ -648,6 +630,7 @@ public java.util.List getSnapshotsList() return snapshotsBuilder_.getMessageList(); } } + /** * * @@ -664,6 +647,7 @@ public int getSnapshotsCount() { return snapshotsBuilder_.getCount(); } } + /** * * @@ -680,6 +664,7 @@ public com.google.bigtable.admin.v2.Snapshot getSnapshots(int index) { return snapshotsBuilder_.getMessage(index); } } + /** * * @@ -702,6 +687,7 @@ public Builder setSnapshots(int index, com.google.bigtable.admin.v2.Snapshot val } return this; } + /** * * @@ -722,6 +708,7 @@ public Builder setSnapshots( } return this; } + /** * * @@ -744,6 +731,7 @@ public Builder addSnapshots(com.google.bigtable.admin.v2.Snapshot value) { } return this; } + /** * * @@ -766,6 +754,7 @@ public Builder addSnapshots(int index, com.google.bigtable.admin.v2.Snapshot val } return this; } + /** * * @@ -785,6 +774,7 @@ public Builder addSnapshots(com.google.bigtable.admin.v2.Snapshot.Builder builde } return this; } + /** * * @@ -805,6 +795,7 @@ public Builder addSnapshots( } return this; } + /** * * @@ -825,6 +816,7 @@ public Builder addAllSnapshots( } return this; } + /** * * @@ -844,6 +836,7 @@ public Builder clearSnapshots() { } return this; } + /** * * @@ -863,6 +856,7 @@ public Builder removeSnapshots(int index) { } return this; } + /** * * @@ -873,8 +867,9 @@ public Builder removeSnapshots(int index) { * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ public com.google.bigtable.admin.v2.Snapshot.Builder getSnapshotsBuilder(int index) { - return getSnapshotsFieldBuilder().getBuilder(index); + return internalGetSnapshotsFieldBuilder().getBuilder(index); } + /** * * @@ -891,6 +886,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int return snapshotsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -908,6 +904,7 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int return java.util.Collections.unmodifiableList(snapshots_); } } + /** * * @@ -918,9 +915,10 @@ public com.google.bigtable.admin.v2.SnapshotOrBuilder getSnapshotsOrBuilder(int * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder() { - return getSnapshotsFieldBuilder() + return internalGetSnapshotsFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Snapshot.getDefaultInstance()); } + /** * * @@ -931,9 +929,10 @@ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder() { * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder(int index) { - return getSnapshotsFieldBuilder() + return internalGetSnapshotsFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Snapshot.getDefaultInstance()); } + /** * * @@ -944,17 +943,17 @@ public com.google.bigtable.admin.v2.Snapshot.Builder addSnapshotsBuilder(int ind * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ public java.util.List getSnapshotsBuilderList() { - return getSnapshotsFieldBuilder().getBuilderList(); + return internalGetSnapshotsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Snapshot, com.google.bigtable.admin.v2.Snapshot.Builder, com.google.bigtable.admin.v2.SnapshotOrBuilder> - getSnapshotsFieldBuilder() { + internalGetSnapshotsFieldBuilder() { if (snapshotsBuilder_ == null) { snapshotsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Snapshot, com.google.bigtable.admin.v2.Snapshot.Builder, com.google.bigtable.admin.v2.SnapshotOrBuilder>( @@ -965,6 +964,7 @@ public java.util.List getSnapshot } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -989,6 +989,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1013,6 +1014,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1036,6 +1038,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1055,6 +1058,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1080,17 +1084,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.bigtable.admin.v2.ListSnapshotsResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponseOrBuilder.java index 80a3f7ea48..849c3c6408 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListSnapshotsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListSnapshotsResponse) @@ -34,6 +36,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ java.util.List getSnapshotsList(); + /** * * @@ -44,6 +47,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ com.google.bigtable.admin.v2.Snapshot getSnapshots(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListSnapshotsResponseOrBuilder * repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; */ int getSnapshotsCount(); + /** * * @@ -65,6 +70,7 @@ public interface ListSnapshotsResponseOrBuilder */ java.util.List getSnapshotsOrBuilderList(); + /** * * @@ -90,6 +96,7 @@ public interface ListSnapshotsResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java index 0a71479740..e567a8c1ae 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListTablesRequest} */ -public final class ListTablesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTablesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListTablesRequest) ListTablesRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTablesRequest"); + } + // Use ListTablesRequest.newBuilder() to construct. - private ListTablesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTablesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private ListTablesRequest() { pageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTablesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesRequest_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -96,6 +104,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -125,6 +134,7 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int VIEW_FIELD_NUMBER = 2; private int view_ = 0; + /** * * @@ -141,6 +151,7 @@ public com.google.protobuf.ByteString getParentBytes() { public int getViewValue() { return view_; } + /** * * @@ -162,6 +173,7 @@ public com.google.bigtable.admin.v2.Table.View getView() { public static final int PAGE_SIZE_FIELD_NUMBER = 4; private int pageSize_ = 0; + /** * * @@ -190,6 +202,7 @@ public int getPageSize() { @SuppressWarnings("serial") private volatile java.lang.Object pageToken_ = ""; + /** * * @@ -213,6 +226,7 @@ public java.lang.String getPageToken() { return s; } } + /** * * @@ -251,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(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 (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); } - 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 (pageSize_ != 0) { output.writeInt32(4, pageSize_); @@ -272,14 +286,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 (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); } - 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 (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); @@ -365,38 +379,38 @@ public static com.google.bigtable.admin.v2.ListTablesRequest parseFrom( public static com.google.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest 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,10 +433,11 @@ 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; } + /** * * @@ -433,7 +448,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListTablesRequest} */ - 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.bigtable.admin.v2.ListTablesRequest) com.google.bigtable.admin.v2.ListTablesRequestOrBuilder { @@ -443,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesRequest_fieldAccessorTable @@ -455,7 +470,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListTablesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -517,39 +532,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListTablesRequest 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.bigtable.admin.v2.ListTablesRequest) { @@ -648,6 +630,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -673,6 +656,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -698,6 +682,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -722,6 +707,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -742,6 +728,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -769,6 +756,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private int view_ = 0; + /** * * @@ -785,6 +773,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { public int getViewValue() { return view_; } + /** * * @@ -804,6 +793,7 @@ public Builder setViewValue(int value) { onChanged(); return this; } + /** * * @@ -822,6 +812,7 @@ public com.google.bigtable.admin.v2.Table.View getView() { com.google.bigtable.admin.v2.Table.View.forNumber(view_); return result == null ? com.google.bigtable.admin.v2.Table.View.UNRECOGNIZED : result; } + /** * * @@ -844,6 +835,7 @@ public Builder setView(com.google.bigtable.admin.v2.Table.View value) { onChanged(); return this; } + /** * * @@ -864,6 +856,7 @@ public Builder clearView() { } private int pageSize_; + /** * * @@ -887,6 +880,7 @@ public Builder clearView() { public int getPageSize() { return pageSize_; } + /** * * @@ -914,6 +908,7 @@ public Builder setPageSize(int value) { onChanged(); return this; } + /** * * @@ -941,6 +936,7 @@ public Builder clearPageSize() { } private java.lang.Object pageToken_ = ""; + /** * * @@ -963,6 +959,7 @@ public java.lang.String getPageToken() { return (java.lang.String) ref; } } + /** * * @@ -985,6 +982,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1006,6 +1004,7 @@ public Builder setPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1023,6 +1022,7 @@ public Builder clearPageToken() { onChanged(); return this; } + /** * * @@ -1046,17 +1046,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.bigtable.admin.v2.ListTablesRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequestOrBuilder.java index 34183121f3..7809366346 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListTablesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListTablesRequest) @@ -39,6 +41,7 @@ public interface ListTablesRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -68,6 +71,7 @@ public interface ListTablesRequestOrBuilder * @return The enum numeric value on the wire for view. */ int getViewValue(); + /** * * @@ -115,6 +119,7 @@ public interface ListTablesRequestOrBuilder * @return The pageToken. */ java.lang.String getPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java index 04d383aba9..281d07bc39 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ListTablesResponse} */ -public final class ListTablesResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ListTablesResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ListTablesResponse) ListTablesResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTablesResponse"); + } + // Use ListTablesResponse.newBuilder() to construct. - private ListTablesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ListTablesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ListTablesResponse() { nextPageToken_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTablesResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesResponse_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List tables_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getTablesList() { return tables_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getTablesList() { getTablesOrBuilderList() { return tables_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getTablesList() { public int getTablesCount() { return tables_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getTablesCount() { public com.google.bigtable.admin.v2.Table getTables(int index) { return tables_.get(index); } + /** * * @@ -140,6 +152,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) @SuppressWarnings("serial") private volatile java.lang.Object nextPageToken_ = ""; + /** * * @@ -165,6 +178,7 @@ public java.lang.String getNextPageToken() { return s; } } + /** * * @@ -208,8 +222,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < tables_.size(); i++) { output.writeMessage(1, tables_.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); } @@ -223,8 +237,8 @@ public int getSerializedSize() { for (int i = 0; i < tables_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tables_.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; @@ -303,38 +317,38 @@ public static com.google.bigtable.admin.v2.ListTablesResponse parseFrom( public static com.google.bigtable.admin.v2.ListTablesResponse 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.bigtable.admin.v2.ListTablesResponse 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.bigtable.admin.v2.ListTablesResponse 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.bigtable.admin.v2.ListTablesResponse 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.bigtable.admin.v2.ListTablesResponse 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.bigtable.admin.v2.ListTablesResponse 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); } @@ -357,10 +371,11 @@ 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; } + /** * * @@ -371,7 +386,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ListTablesResponse} */ - 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.bigtable.admin.v2.ListTablesResponse) com.google.bigtable.admin.v2.ListTablesResponseOrBuilder { @@ -381,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesResponse_fieldAccessorTable @@ -393,7 +408,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ListTablesResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -464,39 +479,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ListTablesResponse resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ListTablesResponse) { @@ -529,8 +511,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListTablesResponse other) tables_ = other.tables_; bitField0_ = (bitField0_ & ~0x00000001); tablesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTablesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTablesFieldBuilder() : null; } else { tablesBuilder_.addAllMessages(other.tables_); @@ -616,7 +598,7 @@ private void ensureTablesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> @@ -638,6 +620,7 @@ public java.util.List getTablesList() { return tablesBuilder_.getMessageList(); } } + /** * * @@ -654,6 +637,7 @@ public int getTablesCount() { return tablesBuilder_.getCount(); } } + /** * * @@ -670,6 +654,7 @@ public com.google.bigtable.admin.v2.Table getTables(int index) { return tablesBuilder_.getMessage(index); } } + /** * * @@ -692,6 +677,7 @@ public Builder setTables(int index, com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -712,6 +698,7 @@ public Builder setTables( } return this; } + /** * * @@ -734,6 +721,7 @@ public Builder addTables(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -756,6 +744,7 @@ public Builder addTables(int index, com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -775,6 +764,7 @@ public Builder addTables(com.google.bigtable.admin.v2.Table.Builder builderForVa } return this; } + /** * * @@ -795,6 +785,7 @@ public Builder addTables( } return this; } + /** * * @@ -815,6 +806,7 @@ public Builder addAllTables( } return this; } + /** * * @@ -834,6 +826,7 @@ public Builder clearTables() { } return this; } + /** * * @@ -853,6 +846,7 @@ public Builder removeTables(int index) { } return this; } + /** * * @@ -863,8 +857,9 @@ public Builder removeTables(int index) { * repeated .google.bigtable.admin.v2.Table tables = 1; */ public com.google.bigtable.admin.v2.Table.Builder getTablesBuilder(int index) { - return getTablesFieldBuilder().getBuilder(index); + return internalGetTablesFieldBuilder().getBuilder(index); } + /** * * @@ -881,6 +876,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) return tablesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -898,6 +894,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) return java.util.Collections.unmodifiableList(tables_); } } + /** * * @@ -908,9 +905,10 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTablesOrBuilder(int index) * repeated .google.bigtable.admin.v2.Table tables = 1; */ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder() { - return getTablesFieldBuilder() + return internalGetTablesFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.Table.getDefaultInstance()); } + /** * * @@ -921,9 +919,10 @@ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder() { * repeated .google.bigtable.admin.v2.Table tables = 1; */ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder(int index) { - return getTablesFieldBuilder() + return internalGetTablesFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.Table.getDefaultInstance()); } + /** * * @@ -934,17 +933,17 @@ public com.google.bigtable.admin.v2.Table.Builder addTablesBuilder(int index) { * repeated .google.bigtable.admin.v2.Table tables = 1; */ public java.util.List getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); + return internalGetTablesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> - getTablesFieldBuilder() { + internalGetTablesFieldBuilder() { if (tablesBuilder_ == null) { tablesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder>( @@ -955,6 +954,7 @@ public java.util.List getTablesBuild } private java.lang.Object nextPageToken_ = ""; + /** * * @@ -979,6 +979,7 @@ public java.lang.String getNextPageToken() { return (java.lang.String) ref; } } + /** * * @@ -1003,6 +1004,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1026,6 +1028,7 @@ public Builder setNextPageToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1045,6 +1048,7 @@ public Builder clearNextPageToken() { onChanged(); return this; } + /** * * @@ -1070,17 +1074,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.bigtable.admin.v2.ListTablesResponse) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponseOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponseOrBuilder.java index 939ad952e4..8e309c305b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ListTablesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ListTablesResponse) @@ -34,6 +36,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ java.util.List getTablesList(); + /** * * @@ -44,6 +47,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ com.google.bigtable.admin.v2.Table getTables(int index); + /** * * @@ -54,6 +58,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ int getTablesCount(); + /** * * @@ -64,6 +69,7 @@ public interface ListTablesResponseOrBuilder * repeated .google.bigtable.admin.v2.Table tables = 1; */ java.util.List getTablesOrBuilderList(); + /** * * @@ -89,6 +95,7 @@ public interface ListTablesResponseOrBuilder * @return The nextPageToken. */ java.lang.String getNextPageToken(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LocationName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LocationName.java index 7bb8a9d141..cb19f47946 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LocationName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LocationName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalView.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalView.java new file mode 100644 index 0000000000..dc1f53193f --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalView.java @@ -0,0 +1,1104 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * A SQL logical view object that can be referenced in SQL queries.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.LogicalView} + */ +@com.google.protobuf.Generated +public final class LogicalView extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.LogicalView) + LogicalViewOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogicalView"); + } + + // Use LogicalView.newBuilder() to construct. + private LogicalView(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LogicalView() { + name_ = ""; + query_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_LogicalView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_LogicalView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.LogicalView.class, + com.google.bigtable.admin.v2.LogicalView.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Identifier. The unique name of the logical view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Identifier. The unique name of the logical view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
      +   * Required. The logical view's select query.
      +   * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
      +   * Required. The logical view's select query.
      +   * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The etag for this logical view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The etag for this logical view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETION_PROTECTION_FIELD_NUMBER = 6; + private boolean deletionProtection_ = false; + + /** + * + * + *
      +   * Optional. Set to true to make the LogicalView protected against deletion.
      +   * 
      + * + * bool deletion_protection = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (deletionProtection_ != false) { + output.writeBool(6, deletionProtection_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (deletionProtection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, deletionProtection_); + } + 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.bigtable.admin.v2.LogicalView)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.LogicalView other = (com.google.bigtable.admin.v2.LogicalView) obj; + + if (!getName().equals(other.getName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getDeletionProtection() != other.getDeletionProtection()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.LogicalView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.LogicalView parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.LogicalView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.LogicalView 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.bigtable.admin.v2.LogicalView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.LogicalView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.LogicalView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.LogicalView 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.bigtable.admin.v2.LogicalView parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.LogicalView 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.bigtable.admin.v2.LogicalView parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.LogicalView 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.bigtable.admin.v2.LogicalView 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 SQL logical view object that can be referenced in SQL queries.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.LogicalView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.LogicalView) + com.google.bigtable.admin.v2.LogicalViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_LogicalView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_LogicalView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.LogicalView.class, + com.google.bigtable.admin.v2.LogicalView.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.LogicalView.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + query_ = ""; + etag_ = ""; + deletionProtection_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_LogicalView_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.LogicalView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView build() { + com.google.bigtable.admin.v2.LogicalView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView buildPartial() { + com.google.bigtable.admin.v2.LogicalView result = + new com.google.bigtable.admin.v2.LogicalView(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.LogicalView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deletionProtection_ = deletionProtection_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.LogicalView) { + return mergeFrom((com.google.bigtable.admin.v2.LogicalView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.LogicalView other) { + if (other == com.google.bigtable.admin.v2.LogicalView.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getDeletionProtection() != false) { + setDeletionProtection(other.getDeletionProtection()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 48: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000008; + 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 name_ = ""; + + /** + * + * + *
      +     * Identifier. The unique name of the logical view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name of the logical view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name of the logical view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name of the logical view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name of the logical view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + + /** + * + * + *
      +     * Required. The logical view's select query.
      +     * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
      +     * Required. The logical view's select query.
      +     * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
      +     * Required. The logical view's select query.
      +     * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view's select query.
      +     * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view's select query.
      +     * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The etag for this logical view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this logical view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this logical view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this logical view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this logical view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean deletionProtection_; + + /** + * + * + *
      +     * Optional. Set to true to make the LogicalView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + /** + * + * + *
      +     * Optional. Set to true to make the LogicalView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The deletionProtection to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtection(boolean value) { + + deletionProtection_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. Set to true to make the LogicalView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtection() { + bitField0_ = (bitField0_ & ~0x00000008); + deletionProtection_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.LogicalView) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.LogicalView) + private static final com.google.bigtable.admin.v2.LogicalView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.LogicalView(); + } + + public static com.google.bigtable.admin.v2.LogicalView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalView 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.bigtable.admin.v2.LogicalView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewName.java new file mode 100644 index 0000000000..6f77ebe815 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.bigtable.admin.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LogicalViewName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE_LOGICAL_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/instances/{instance}/logicalViews/{logical_view}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + private final String logicalView; + + @Deprecated + protected LogicalViewName() { + project = null; + instance = null; + logicalView = null; + } + + private LogicalViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + logicalView = Preconditions.checkNotNull(builder.getLogicalView()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getLogicalView() { + return logicalView; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogicalViewName of(String project, String instance, String logicalView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setLogicalView(logicalView) + .build(); + } + + public static String format(String project, String instance, String logicalView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setLogicalView(logicalView) + .build() + .toString(); + } + + public static LogicalViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE_LOGICAL_VIEW.validatedMatch( + formattedString, "LogicalViewName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("instance"), matchMap.get("logical_view")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LogicalViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE_LOGICAL_VIEW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (logicalView != null) { + fieldMapBuilder.put("logical_view", logicalView); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE_LOGICAL_VIEW.instantiate( + "project", project, "instance", instance, "logical_view", logicalView); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LogicalViewName that = ((LogicalViewName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.logicalView, that.logicalView); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(logicalView); + return h; + } + + /** Builder for projects/{project}/instances/{instance}/logicalViews/{logical_view}. */ + public static class Builder { + private String project; + private String instance; + private String logicalView; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getLogicalView() { + return logicalView; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setLogicalView(String logicalView) { + this.logicalView = logicalView; + return this; + } + + private Builder(LogicalViewName logicalViewName) { + this.project = logicalViewName.project; + this.instance = logicalViewName.instance; + this.logicalView = logicalViewName.logicalView; + } + + public LogicalViewName build() { + return new LogicalViewName(this); + } + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewOrBuilder.java new file mode 100644 index 0000000000..1ace53b9bc --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LogicalViewOrBuilder.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 + * + * 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface LogicalViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.LogicalView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Identifier. The unique name of the logical view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Identifier. The unique name of the logical view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Required. The logical view's select query.
      +   * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + java.lang.String getQuery(); + + /** + * + * + *
      +   * Required. The logical view's select query.
      +   * 
      + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
      +   * Optional. The etag for this logical view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The etag for this logical view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
      +   * Optional. Set to true to make the LogicalView protected against deletion.
      +   * 
      + * + * bool deletion_protection = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + boolean getDeletionProtection(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedView.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedView.java new file mode 100644 index 0000000000..87610aa1fb --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedView.java @@ -0,0 +1,1119 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * A materialized view object that can be referenced in SQL queries.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.MaterializedView} + */ +@com.google.protobuf.Generated +public final class MaterializedView extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.MaterializedView) + MaterializedViewOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MaterializedView"); + } + + // Use MaterializedView.newBuilder() to construct. + private MaterializedView(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MaterializedView() { + name_ = ""; + query_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_MaterializedView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.MaterializedView.class, + com.google.bigtable.admin.v2.MaterializedView.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Identifier. The unique name of the materialized view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Identifier. The unique name of the materialized view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
      +   * Required. Immutable. The materialized view's select query.
      +   * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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; + } + } + + /** + * + * + *
      +   * Required. Immutable. The materialized view's select query.
      +   * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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 ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The etag for this materialized view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The etag for this materialized view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DELETION_PROTECTION_FIELD_NUMBER = 6; + private boolean deletionProtection_ = false; + + /** + * + * + *
      +   * Set to true to make the MaterializedView protected against deletion.
      +   * 
      + * + * bool deletion_protection = 6; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + if (deletionProtection_ != false) { + output.writeBool(6, deletionProtection_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + if (deletionProtection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, deletionProtection_); + } + 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.bigtable.admin.v2.MaterializedView)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.MaterializedView other = + (com.google.bigtable.admin.v2.MaterializedView) obj; + + if (!getName().equals(other.getName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getDeletionProtection() != other.getDeletionProtection()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.MaterializedView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.MaterializedView parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.MaterializedView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.MaterializedView 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.bigtable.admin.v2.MaterializedView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.MaterializedView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.MaterializedView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.MaterializedView 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.bigtable.admin.v2.MaterializedView parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.MaterializedView 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.bigtable.admin.v2.MaterializedView parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.MaterializedView 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.bigtable.admin.v2.MaterializedView 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 materialized view object that can be referenced in SQL queries.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.MaterializedView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.MaterializedView) + com.google.bigtable.admin.v2.MaterializedViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_MaterializedView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_MaterializedView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.MaterializedView.class, + com.google.bigtable.admin.v2.MaterializedView.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.MaterializedView.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + query_ = ""; + etag_ = ""; + deletionProtection_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.InstanceProto + .internal_static_google_bigtable_admin_v2_MaterializedView_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView build() { + com.google.bigtable.admin.v2.MaterializedView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView buildPartial() { + com.google.bigtable.admin.v2.MaterializedView result = + new com.google.bigtable.admin.v2.MaterializedView(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.MaterializedView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deletionProtection_ = deletionProtection_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.MaterializedView) { + return mergeFrom((com.google.bigtable.admin.v2.MaterializedView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.MaterializedView other) { + if (other == com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getDeletionProtection() != false) { + setDeletionProtection(other.getDeletionProtection()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 48: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000008; + 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 name_ = ""; + + /** + * + * + *
      +     * Identifier. The unique name of the materialized view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name of the materialized view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name of the materialized view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name of the materialized view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name of the materialized view.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + + /** + * + * + *
      +     * Required. Immutable. The materialized view's select query.
      +     * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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; + } + } + + /** + * + * + *
      +     * Required. Immutable. The materialized view's select query.
      +     * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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; + } + } + + /** + * + * + *
      +     * Required. Immutable. The materialized view's select query.
      +     * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. Immutable. The materialized view's select query.
      +     * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. Immutable. The materialized view's select query.
      +     * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The etag for this materialized view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this materialized view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this materialized view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this materialized view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this materialized view.
      +     * This may be sent on update requests to ensure that the client has an
      +     * up-to-date value before proceeding. The server returns an ABORTED error on
      +     * a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean deletionProtection_; + + /** + * + * + *
      +     * Set to true to make the MaterializedView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + /** + * + * + *
      +     * Set to true to make the MaterializedView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6; + * + * @param value The deletionProtection to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtection(boolean value) { + + deletionProtection_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Set to true to make the MaterializedView protected against deletion.
      +     * 
      + * + * bool deletion_protection = 6; + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtection() { + bitField0_ = (bitField0_ & ~0x00000008); + deletionProtection_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.MaterializedView) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.MaterializedView) + private static final com.google.bigtable.admin.v2.MaterializedView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.MaterializedView(); + } + + public static com.google.bigtable.admin.v2.MaterializedView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaterializedView 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.bigtable.admin.v2.MaterializedView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewName.java new file mode 100644 index 0000000000..1cc350e40a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.bigtable.admin.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class MaterializedViewName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE_MATERIALIZED_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/instances/{instance}/materializedViews/{materialized_view}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + private final String materializedView; + + @Deprecated + protected MaterializedViewName() { + project = null; + instance = null; + materializedView = null; + } + + private MaterializedViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + materializedView = Preconditions.checkNotNull(builder.getMaterializedView()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getMaterializedView() { + return materializedView; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MaterializedViewName of(String project, String instance, String materializedView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setMaterializedView(materializedView) + .build(); + } + + public static String format(String project, String instance, String materializedView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setMaterializedView(materializedView) + .build() + .toString(); + } + + public static MaterializedViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE_MATERIALIZED_VIEW.validatedMatch( + formattedString, "MaterializedViewName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("instance"), matchMap.get("materialized_view")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (MaterializedViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE_MATERIALIZED_VIEW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (materializedView != null) { + fieldMapBuilder.put("materialized_view", materializedView); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE_MATERIALIZED_VIEW.instantiate( + "project", project, "instance", instance, "materialized_view", materializedView); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + MaterializedViewName that = ((MaterializedViewName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.materializedView, that.materializedView); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(materializedView); + return h; + } + + /** Builder for projects/{project}/instances/{instance}/materializedViews/{materialized_view}. */ + public static class Builder { + private String project; + private String instance; + private String materializedView; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getMaterializedView() { + return materializedView; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setMaterializedView(String materializedView) { + this.materializedView = materializedView; + return this; + } + + private Builder(MaterializedViewName materializedViewName) { + this.project = materializedViewName.project; + this.instance = materializedViewName.instance; + this.materializedView = materializedViewName.materializedView; + } + + public MaterializedViewName build() { + return new MaterializedViewName(this); + } + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewOrBuilder.java new file mode 100644 index 0000000000..e96881ebd2 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/MaterializedViewOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/instance.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface MaterializedViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.MaterializedView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Identifier. The unique name of the materialized view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Identifier. The unique name of the materialized view.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Required. Immutable. The materialized view's select query.
      +   * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The query. + */ + java.lang.String getQuery(); + + /** + * + * + *
      +   * Required. Immutable. The materialized view's select query.
      +   * 
      + * + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
      +   * Optional. The etag for this materialized view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The etag for this materialized view.
      +   * This may be sent on update requests to ensure that the client has an
      +   * up-to-date value before proceeding. The server returns an ABORTED error on
      +   * a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
      +   * Set to true to make the MaterializedView protected against deletion.
      +   * 
      + * + * bool deletion_protection = 6; + * + * @return The deletionProtection. + */ + boolean getDeletionProtection(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java index 5f7d8ae374..5ea20e672c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.ModifyColumnFamiliesRequest} */ -public final class ModifyColumnFamiliesRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ModifyColumnFamiliesRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ModifyColumnFamiliesRequest) ModifyColumnFamiliesRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModifyColumnFamiliesRequest"); + } + // Use ModifyColumnFamiliesRequest.newBuilder() to construct. - private ModifyColumnFamiliesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ModifyColumnFamiliesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ModifyColumnFamiliesRequest() { modifications_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModifyColumnFamiliesRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_fieldAccessorTable @@ -82,6 +89,7 @@ public interface ModificationOrBuilder * @return The id. */ java.lang.String getId(); + /** * * @@ -108,6 +116,7 @@ public interface ModificationOrBuilder * @return Whether the create field is set. */ boolean hasCreate(); + /** * * @@ -121,6 +130,7 @@ public interface ModificationOrBuilder * @return The create. */ com.google.bigtable.admin.v2.ColumnFamily getCreate(); + /** * * @@ -146,6 +156,7 @@ public interface ModificationOrBuilder * @return Whether the update field is set. */ boolean hasUpdate(); + /** * * @@ -159,6 +170,7 @@ public interface ModificationOrBuilder * @return The update. */ com.google.bigtable.admin.v2.ColumnFamily getUpdate(); + /** * * @@ -184,6 +196,7 @@ public interface ModificationOrBuilder * @return Whether the drop field is set. */ boolean hasDrop(); + /** * * @@ -213,6 +226,7 @@ public interface ModificationOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -228,6 +242,7 @@ public interface ModificationOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * @@ -244,6 +259,7 @@ public interface ModificationOrBuilder com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.ModCase getModCase(); } + /** * * @@ -253,13 +269,24 @@ public interface ModificationOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} */ - public static final class Modification extends com.google.protobuf.GeneratedMessageV3 + public static final class Modification extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) ModificationOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Modification"); + } + // Use Modification.newBuilder() to construct. - private Modification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Modification(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -267,19 +294,13 @@ private Modification() { id_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Modification(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_fieldAccessorTable @@ -307,6 +328,7 @@ public enum ModCase private ModCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -345,6 +367,7 @@ public ModCase getModCase() { @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; + /** * * @@ -368,6 +391,7 @@ public java.lang.String getId() { return s; } } + /** * * @@ -393,6 +417,7 @@ public com.google.protobuf.ByteString getIdBytes() { } public static final int CREATE_FIELD_NUMBER = 2; + /** * * @@ -409,6 +434,7 @@ public com.google.protobuf.ByteString getIdBytes() { public boolean hasCreate() { return modCase_ == 2; } + /** * * @@ -428,6 +454,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getCreate() { } return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } + /** * * @@ -447,6 +474,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { } public static final int UPDATE_FIELD_NUMBER = 3; + /** * * @@ -463,6 +491,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { public boolean hasUpdate() { return modCase_ == 3; } + /** * * @@ -482,6 +511,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getUpdate() { } return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } + /** * * @@ -501,6 +531,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { } public static final int DROP_FIELD_NUMBER = 4; + /** * * @@ -517,6 +548,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { public boolean hasDrop() { return modCase_ == 4; } + /** * * @@ -539,6 +571,7 @@ public boolean getDrop() { public static final int UPDATE_MASK_FIELD_NUMBER = 6; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -557,6 +590,7 @@ public boolean getDrop() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -575,6 +609,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -606,8 +641,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(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (modCase_ == 2) { output.writeMessage(2, (com.google.bigtable.admin.v2.ColumnFamily) mod_); @@ -630,8 +665,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (modCase_ == 2) { size += @@ -761,39 +796,39 @@ public static com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modificat public static com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification 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); } @@ -817,11 +852,11 @@ 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; } + /** * * @@ -831,8 +866,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification} */ - 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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder { @@ -842,7 +876,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_fieldAccessorTable @@ -858,14 +892,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) { - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); } } @@ -952,41 +986,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 @@ -1067,13 +1066,15 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getCreateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateFieldBuilder().getBuilder(), extensionRegistry); modCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateFieldBuilder().getBuilder(), extensionRegistry); modCase_ = 3; break; } // case 26 @@ -1085,7 +1086,8 @@ public Builder mergeFrom( } // case 32 case 50: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 @@ -1123,6 +1125,7 @@ public Builder clearMod() { private int bitField0_; private java.lang.Object id_ = ""; + /** * * @@ -1145,6 +1148,7 @@ public java.lang.String getId() { return (java.lang.String) ref; } } + /** * * @@ -1167,6 +1171,7 @@ public com.google.protobuf.ByteString getIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1188,6 +1193,7 @@ public Builder setId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1205,6 +1211,7 @@ public Builder clearId() { onChanged(); return this; } + /** * * @@ -1228,11 +1235,12 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> createBuilder_; + /** * * @@ -1249,6 +1257,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { public boolean hasCreate() { return modCase_ == 2; } + /** * * @@ -1275,6 +1284,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getCreate() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1298,6 +1308,7 @@ public Builder setCreate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 2; return this; } + /** * * @@ -1318,6 +1329,7 @@ public Builder setCreate(com.google.bigtable.admin.v2.ColumnFamily.Builder build modCase_ = 2; return this; } + /** * * @@ -1351,6 +1363,7 @@ public Builder mergeCreate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 2; return this; } + /** * * @@ -1377,6 +1390,7 @@ public Builder clearCreate() { } return this; } + /** * * @@ -1388,8 +1402,9 @@ public Builder clearCreate() { * .google.bigtable.admin.v2.ColumnFamily create = 2; */ public com.google.bigtable.admin.v2.ColumnFamily.Builder getCreateBuilder() { - return getCreateFieldBuilder().getBuilder(); + return internalGetCreateFieldBuilder().getBuilder(); } + /** * * @@ -1411,6 +1426,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1421,17 +1437,17 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { * * .google.bigtable.admin.v2.ColumnFamily create = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> - getCreateFieldBuilder() { + internalGetCreateFieldBuilder() { if (createBuilder_ == null) { if (!(modCase_ == 2)) { mod_ = com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } createBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder>( @@ -1445,11 +1461,12 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { return createBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> updateBuilder_; + /** * * @@ -1466,6 +1483,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getCreateOrBuilder() { public boolean hasUpdate() { return modCase_ == 3; } + /** * * @@ -1492,6 +1510,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getUpdate() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1515,6 +1534,7 @@ public Builder setUpdate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 3; return this; } + /** * * @@ -1535,6 +1555,7 @@ public Builder setUpdate(com.google.bigtable.admin.v2.ColumnFamily.Builder build modCase_ = 3; return this; } + /** * * @@ -1568,6 +1589,7 @@ public Builder mergeUpdate(com.google.bigtable.admin.v2.ColumnFamily value) { modCase_ = 3; return this; } + /** * * @@ -1594,6 +1616,7 @@ public Builder clearUpdate() { } return this; } + /** * * @@ -1605,8 +1628,9 @@ public Builder clearUpdate() { * .google.bigtable.admin.v2.ColumnFamily update = 3; */ public com.google.bigtable.admin.v2.ColumnFamily.Builder getUpdateBuilder() { - return getUpdateFieldBuilder().getBuilder(); + return internalGetUpdateFieldBuilder().getBuilder(); } + /** * * @@ -1628,6 +1652,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { return com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } } + /** * * @@ -1638,17 +1663,17 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { * * .google.bigtable.admin.v2.ColumnFamily update = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder> - getUpdateFieldBuilder() { + internalGetUpdateFieldBuilder() { if (updateBuilder_ == null) { if (!(modCase_ == 3)) { mod_ = com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance(); } updateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ColumnFamily, com.google.bigtable.admin.v2.ColumnFamily.Builder, com.google.bigtable.admin.v2.ColumnFamilyOrBuilder>( @@ -1677,6 +1702,7 @@ public com.google.bigtable.admin.v2.ColumnFamilyOrBuilder getUpdateOrBuilder() { public boolean hasDrop() { return modCase_ == 4; } + /** * * @@ -1695,6 +1721,7 @@ public boolean getDrop() { } return false; } + /** * * @@ -1715,6 +1742,7 @@ public Builder setDrop(boolean value) { onChanged(); return this; } + /** * * @@ -1737,11 +1765,12 @@ public Builder clearDrop() { } 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> updateMaskBuilder_; + /** * * @@ -1759,6 +1788,7 @@ public Builder clearDrop() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1782,6 +1812,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -1807,6 +1838,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -1829,6 +1861,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -1859,6 +1892,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -1881,6 +1915,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1896,8 +1931,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1919,6 +1955,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1931,14 +1968,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - 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>( @@ -1948,18 +1985,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.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) } @@ -2020,6 +2045,7 @@ public com.google.protobuf.Parser getParserForType() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -2047,6 +2073,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -2080,6 +2107,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private java.util.List modifications_; + /** * * @@ -2099,6 +2127,7 @@ public com.google.protobuf.ByteString getNameBytes() { getModificationsList() { return modifications_; } + /** * * @@ -2119,6 +2148,7 @@ public com.google.protobuf.ByteString getNameBytes() { getModificationsOrBuilderList() { return modifications_; } + /** * * @@ -2137,6 +2167,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getModificationsCount() { return modifications_.size(); } + /** * * @@ -2156,6 +2187,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get int index) { return modifications_.get(index); } + /** * * @@ -2178,6 +2210,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -2208,8 +2241,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 < modifications_.size(); i++) { output.writeMessage(2, modifications_.get(i)); @@ -2226,8 +2259,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 < modifications_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, modifications_.get(i)); @@ -2315,38 +2348,38 @@ public static com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest parseFrom public static com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest 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.bigtable.admin.v2.ModifyColumnFamiliesRequest 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.bigtable.admin.v2.ModifyColumnFamiliesRequest 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.bigtable.admin.v2.ModifyColumnFamiliesRequest 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.bigtable.admin.v2.ModifyColumnFamiliesRequest 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.bigtable.admin.v2.ModifyColumnFamiliesRequest 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); } @@ -2370,10 +2403,11 @@ 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; } + /** * * @@ -2384,7 +2418,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.ModifyColumnFamiliesRequest} */ - 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.bigtable.admin.v2.ModifyColumnFamiliesRequest) com.google.bigtable.admin.v2.ModifyColumnFamiliesRequestOrBuilder { @@ -2394,7 +2428,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_fieldAccessorTable @@ -2406,7 +2440,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2481,39 +2515,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequ } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) { @@ -2551,8 +2552,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ModifyColumnFamiliesReques modifications_ = other.modifications_; bitField0_ = (bitField0_ & ~0x00000002); modificationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModificationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetModificationsFieldBuilder() : null; } else { modificationsBuilder_.addAllMessages(other.modifications_); @@ -2635,6 +2636,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -2661,6 +2663,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -2687,6 +2690,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2712,6 +2716,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2733,6 +2738,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -2773,7 +2779,7 @@ private void ensureModificationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder> @@ -2801,6 +2807,7 @@ private void ensureModificationsIsMutable() { return modificationsBuilder_.getMessageList(); } } + /** * * @@ -2822,6 +2829,7 @@ public int getModificationsCount() { return modificationsBuilder_.getCount(); } } + /** * * @@ -2844,6 +2852,7 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get return modificationsBuilder_.getMessage(index); } } + /** * * @@ -2872,6 +2881,7 @@ public Builder setModifications( } return this; } + /** * * @@ -2899,6 +2909,7 @@ public Builder setModifications( } return this; } + /** * * @@ -2927,6 +2938,7 @@ public Builder addModifications( } return this; } + /** * * @@ -2955,6 +2967,7 @@ public Builder addModifications( } return this; } + /** * * @@ -2981,6 +2994,7 @@ public Builder addModifications( } return this; } + /** * * @@ -3008,6 +3022,7 @@ public Builder addModifications( } return this; } + /** * * @@ -3035,6 +3050,7 @@ public Builder addAllModifications( } return this; } + /** * * @@ -3059,6 +3075,7 @@ public Builder clearModifications() { } return this; } + /** * * @@ -3083,6 +3100,7 @@ public Builder removeModifications(int index) { } return this; } + /** * * @@ -3099,8 +3117,9 @@ public Builder removeModifications(int index) { */ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder getModificationsBuilder(int index) { - return getModificationsFieldBuilder().getBuilder(index); + return internalGetModificationsFieldBuilder().getBuilder(index); } + /** * * @@ -3123,6 +3142,7 @@ public Builder removeModifications(int index) { return modificationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3147,6 +3167,7 @@ public Builder removeModifications(int index) { return java.util.Collections.unmodifiableList(modifications_); } } + /** * * @@ -3163,11 +3184,12 @@ public Builder removeModifications(int index) { */ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder addModificationsBuilder() { - return getModificationsFieldBuilder() + return internalGetModificationsFieldBuilder() .addBuilder( com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification .getDefaultInstance()); } + /** * * @@ -3184,12 +3206,13 @@ public Builder removeModifications(int index) { */ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder addModificationsBuilder(int index) { - return getModificationsFieldBuilder() + return internalGetModificationsFieldBuilder() .addBuilder( index, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification .getDefaultInstance()); } + /** * * @@ -3207,17 +3230,17 @@ public Builder removeModifications(int index) { public java.util.List< com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder> getModificationsBuilderList() { - return getModificationsFieldBuilder().getBuilderList(); + return internalGetModificationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder> - getModificationsFieldBuilder() { + internalGetModificationsFieldBuilder() { if (modificationsBuilder_ == null) { modificationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.Builder, com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder>( @@ -3231,6 +3254,7 @@ public Builder removeModifications(int index) { } private boolean ignoreWarnings_; + /** * * @@ -3246,6 +3270,7 @@ public Builder removeModifications(int index) { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -3265,6 +3290,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * @@ -3283,17 +3309,6 @@ public Builder clearIgnoreWarnings() { 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.bigtable.admin.v2.ModifyColumnFamiliesRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequestOrBuilder.java index e36e434243..c096a2992a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface ModifyColumnFamiliesRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ModifyColumnFamiliesRequest) @@ -40,6 +42,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -73,6 +76,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder */ java.util.List getModificationsList(); + /** * * @@ -88,6 +92,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder *
      */ com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification getModifications(int index); + /** * * @@ -103,6 +108,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder *
      */ int getModificationsCount(); + /** * * @@ -120,6 +126,7 @@ public interface ModifyColumnFamiliesRequestOrBuilder java.util.List< ? extends com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder> getModificationsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java index 8a69a82ca2..36b3af1b9c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.CommonProto .internal_static_google_bigtable_admin_v2_OperationProgress_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.CommonProto .internal_static_google_bigtable_admin_v2_OperationProgress_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PROGRESS_PERCENT_FIELD_NUMBER = 1; private int progressPercent_ = 0; + /** * * @@ -84,6 +92,7 @@ public int getProgressPercent() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -99,6 +108,7 @@ public int getProgressPercent() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -114,6 +124,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -130,6 +141,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -146,6 +158,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -162,6 +175,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -306,38 +320,38 @@ public static com.google.bigtable.admin.v2.OperationProgress parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -360,10 +374,11 @@ 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 +389,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.OperationProgress) com.google.bigtable.admin.v2.OperationProgressOrBuilder { @@ -384,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.bigtable.admin.v2.CommonProto .internal_static_google_bigtable_admin_v2_OperationProgress_fieldAccessorTable @@ -398,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) { - getStartTimeFieldBuilder(); - getEndTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); } } @@ -476,39 +491,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.OperationProgress 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.bigtable.admin.v2.OperationProgress) { @@ -564,13 +546,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 @@ -594,6 +577,7 @@ public Builder mergeFrom( private int bitField0_; private int progressPercent_; + /** * * @@ -610,6 +594,7 @@ public Builder mergeFrom( public int getProgressPercent() { return progressPercent_; } + /** * * @@ -630,6 +615,7 @@ public Builder setProgressPercent(int value) { onChanged(); return this; } + /** * * @@ -650,11 +636,12 @@ 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> startTimeBuilder_; + /** * * @@ -669,6 +656,7 @@ public Builder clearProgressPercent() { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -687,6 +675,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -709,6 +698,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -728,6 +718,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -755,6 +746,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -774,6 +766,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -786,8 +779,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -804,6 +798,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -813,14 +808,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>( @@ -831,11 +826,12 @@ 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> endTimeBuilder_; + /** * * @@ -851,6 +847,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -870,6 +867,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -893,6 +891,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -913,6 +912,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -941,6 +941,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -961,6 +962,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -974,8 +976,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -993,6 +996,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1003,14 +1007,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>( @@ -1020,17 +1024,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.bigtable.admin.v2.OperationProgress) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgressOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgressOrBuilder.java index fb0ac99532..1ce9fdfd95 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgressOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgressOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface OperationProgressOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.OperationProgress) @@ -50,6 +52,7 @@ public interface OperationProgressOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -62,6 +65,7 @@ public interface OperationProgressOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -86,6 +90,7 @@ public interface OperationProgressOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -99,6 +104,7 @@ public interface OperationProgressOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java index 96e7ed8835..2212e8aaa6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -31,13 +32,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.OptimizeRestoredTableMetadata} */ -public final class OptimizeRestoredTableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class OptimizeRestoredTableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.OptimizeRestoredTableMetadata) OptimizeRestoredTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OptimizeRestoredTableMetadata"); + } + // Use OptimizeRestoredTableMetadata.newBuilder() to construct. - private OptimizeRestoredTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private OptimizeRestoredTableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private OptimizeRestoredTableMetadata() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OptimizeRestoredTableMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -94,6 +102,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -120,6 +129,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int PROGRESS_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.OperationProgress progress_; + /** * * @@ -135,6 +145,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasProgress() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -152,6 +163,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -182,8 +194,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()); @@ -197,8 +209,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()); @@ -283,38 +295,38 @@ public static com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata parseFr public static com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata 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.bigtable.admin.v2.OptimizeRestoredTableMetadata 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.bigtable.admin.v2.OptimizeRestoredTableMetadata 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.bigtable.admin.v2.OptimizeRestoredTableMetadata 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.bigtable.admin.v2.OptimizeRestoredTableMetadata 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.bigtable.admin.v2.OptimizeRestoredTableMetadata 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,10 +350,11 @@ 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 +367,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.OptimizeRestoredTableMetadata} */ - 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.bigtable.admin.v2.OptimizeRestoredTableMetadata) com.google.bigtable.admin.v2.OptimizeRestoredTableMetadataOrBuilder { @@ -364,7 +377,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_fieldAccessorTable @@ -378,14 +391,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(); } } @@ -446,39 +459,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.OptimizeRestoredTableMet 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.bigtable.admin.v2.OptimizeRestoredTableMetadata) { @@ -534,7 +514,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -558,6 +539,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -580,6 +562,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -602,6 +585,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -623,6 +607,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -640,6 +625,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -664,11 +650,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -683,6 +670,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasProgress() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -703,6 +691,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -725,6 +714,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -745,6 +735,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -772,6 +763,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -791,6 +783,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -803,8 +796,9 @@ public Builder clearProgress() { public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } + /** * * @@ -823,6 +817,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * @@ -832,14 +827,14 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil * * .google.bigtable.admin.v2.OperationProgress progress = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder>( @@ -849,17 +844,6 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil 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.bigtable.admin.v2.OptimizeRestoredTableMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadataOrBuilder.java index 6b825f6d50..bddb1ee77d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface OptimizeRestoredTableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.OptimizeRestoredTableMetadata) @@ -36,6 +38,7 @@ public interface OptimizeRestoredTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface OptimizeRestoredTableMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -73,6 +77,7 @@ public interface OptimizeRestoredTableMetadataOrBuilder * @return The progress. */ com.google.bigtable.admin.v2.OperationProgress getProgress(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java index 844cf94ddd..928b10c2c1 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateClusterMetadata} */ -public final class PartialUpdateClusterMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartialUpdateClusterMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateClusterMetadata) PartialUpdateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartialUpdateClusterMetadata"); + } + // Use PartialUpdateClusterMetadata.newBuilder() to construct. - private PartialUpdateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartialUpdateClusterMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PartialUpdateClusterMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartialUpdateClusterMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int REQUEST_TIME_FIELD_NUMBER = 1; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +103,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -110,6 +120,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -125,6 +136,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -140,6 +152,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -156,6 +169,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 3; private com.google.bigtable.admin.v2.PartialUpdateClusterRequest originalRequest_; + /** * * @@ -171,6 +185,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -188,6 +203,7 @@ public com.google.bigtable.admin.v2.PartialUpdateClusterRequest getOriginalReque ? com.google.bigtable.admin.v2.PartialUpdateClusterRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -339,38 +355,38 @@ public static com.google.bigtable.admin.v2.PartialUpdateClusterMetadata parseFro public static com.google.bigtable.admin.v2.PartialUpdateClusterMetadata 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.bigtable.admin.v2.PartialUpdateClusterMetadata 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.bigtable.admin.v2.PartialUpdateClusterMetadata 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.bigtable.admin.v2.PartialUpdateClusterMetadata 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.bigtable.admin.v2.PartialUpdateClusterMetadata 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.bigtable.admin.v2.PartialUpdateClusterMetadata 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); } @@ -394,10 +410,11 @@ 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; } + /** * * @@ -407,7 +424,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateClusterMetadata} */ - 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.bigtable.admin.v2.PartialUpdateClusterMetadata) com.google.bigtable.admin.v2.PartialUpdateClusterMetadataOrBuilder { @@ -417,7 +434,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_fieldAccessorTable @@ -431,16 +448,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) { - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); - getOriginalRequestFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); + internalGetOriginalRequestFieldBuilder(); } } @@ -517,39 +534,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.PartialUpdateClusterMeta 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.bigtable.admin.v2.PartialUpdateClusterMetadata) { @@ -600,19 +584,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -636,11 +623,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -655,6 +643,7 @@ public Builder mergeFrom( public boolean hasRequestTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -675,6 +664,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -697,6 +687,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -716,6 +707,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -743,6 +735,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -762,6 +755,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -774,8 +768,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -794,6 +789,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -803,14 +799,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -821,11 +817,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -840,6 +837,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -860,6 +858,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -882,6 +881,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -901,6 +901,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -928,6 +929,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -947,6 +949,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -959,8 +962,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -979,6 +983,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -988,14 +993,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1006,11 +1011,12 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { } private com.google.bigtable.admin.v2.PartialUpdateClusterRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateClusterRequest, com.google.bigtable.admin.v2.PartialUpdateClusterRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateClusterRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -1025,6 +1031,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1045,6 +1052,7 @@ public com.google.bigtable.admin.v2.PartialUpdateClusterRequest getOriginalReque return originalRequestBuilder_.getMessage(); } } + /** * * @@ -1068,6 +1076,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1088,6 +1097,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -1117,6 +1127,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -1136,6 +1147,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -1149,8 +1161,9 @@ public Builder clearOriginalRequest() { getOriginalRequestBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -1170,6 +1183,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -1179,14 +1193,14 @@ public Builder clearOriginalRequest() { * * .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateClusterRequest, com.google.bigtable.admin.v2.PartialUpdateClusterRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateClusterRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateClusterRequest, com.google.bigtable.admin.v2.PartialUpdateClusterRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateClusterRequestOrBuilder>( @@ -1196,17 +1210,6 @@ public Builder clearOriginalRequest() { return originalRequestBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.PartialUpdateClusterMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadataOrBuilder.java index 38abb26704..0d650f5e16 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface PartialUpdateClusterMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.PartialUpdateClusterMetadata) @@ -36,6 +38,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -48,6 +51,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -71,6 +75,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -83,6 +88,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * @@ -106,6 +112,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -118,6 +125,7 @@ public interface PartialUpdateClusterMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.PartialUpdateClusterRequest getOriginalRequest(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java index 038925bd6b..61096bc7f0 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateClusterRequest} */ -public final class PartialUpdateClusterRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartialUpdateClusterRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateClusterRequest) PartialUpdateClusterRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartialUpdateClusterRequest"); + } + // Use PartialUpdateClusterRequest.newBuilder() to construct. - private PartialUpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartialUpdateClusterRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PartialUpdateClusterRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartialUpdateClusterRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int CLUSTER_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Cluster cluster_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -98,6 +107,7 @@ public boolean hasCluster() { public com.google.bigtable.admin.v2.Cluster getCluster() { return cluster_ == null ? com.google.bigtable.admin.v2.Cluster.getDefaultInstance() : cluster_; } + /** * * @@ -116,6 +126,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -132,6 +143,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -148,6 +160,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -283,38 +296,38 @@ public static com.google.bigtable.admin.v2.PartialUpdateClusterRequest parseFrom public static com.google.bigtable.admin.v2.PartialUpdateClusterRequest 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.bigtable.admin.v2.PartialUpdateClusterRequest 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.bigtable.admin.v2.PartialUpdateClusterRequest 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.bigtable.admin.v2.PartialUpdateClusterRequest 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.bigtable.admin.v2.PartialUpdateClusterRequest 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.bigtable.admin.v2.PartialUpdateClusterRequest 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,10 +351,11 @@ 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 +365,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateClusterRequest} */ - 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.bigtable.admin.v2.PartialUpdateClusterRequest) com.google.bigtable.admin.v2.PartialUpdateClusterRequestOrBuilder { @@ -361,7 +375,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_fieldAccessorTable @@ -375,15 +389,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) { - getClusterFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClusterFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -449,39 +463,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.PartialUpdateClusterRequ 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.bigtable.admin.v2.PartialUpdateClusterRequest) { @@ -529,13 +510,14 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetClusterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -559,11 +541,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> clusterBuilder_; + /** * * @@ -581,6 +564,7 @@ public Builder mergeFrom( public boolean hasCluster() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -604,6 +588,7 @@ public com.google.bigtable.admin.v2.Cluster getCluster() { return clusterBuilder_.getMessage(); } } + /** * * @@ -629,6 +614,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -651,6 +637,7 @@ public Builder setCluster(com.google.bigtable.admin.v2.Cluster.Builder builderFo onChanged(); return this; } + /** * * @@ -681,6 +668,7 @@ public Builder mergeCluster(com.google.bigtable.admin.v2.Cluster value) { } return this; } + /** * * @@ -703,6 +691,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -718,8 +707,9 @@ public Builder clearCluster() { public com.google.bigtable.admin.v2.Cluster.Builder getClusterBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getClusterFieldBuilder().getBuilder(); + return internalGetClusterFieldBuilder().getBuilder(); } + /** * * @@ -741,6 +731,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { : cluster_; } } + /** * * @@ -753,14 +744,14 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { * .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> - getClusterFieldBuilder() { + internalGetClusterFieldBuilder() { if (clusterBuilder_ == null) { clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder>( @@ -771,11 +762,12 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { } 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> updateMaskBuilder_; + /** * * @@ -791,6 +783,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getClusterOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -812,6 +805,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -835,6 +829,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -855,6 +850,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -883,6 +879,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -903,6 +900,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -916,8 +914,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -937,6 +936,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -947,14 +947,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>( @@ -964,17 +964,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.bigtable.admin.v2.PartialUpdateClusterRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequestOrBuilder.java index e1bbd3923b..e4fcb7e063 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface PartialUpdateClusterRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.PartialUpdateClusterRequest) @@ -38,6 +40,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return Whether the cluster field is set. */ boolean hasCluster(); + /** * * @@ -52,6 +55,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return The cluster. */ com.google.bigtable.admin.v2.Cluster getCluster(); + /** * * @@ -78,6 +82,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -91,6 +96,7 @@ public interface PartialUpdateClusterRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java index 12219e50bc..23753169b2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateInstanceRequest} */ -public final class PartialUpdateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PartialUpdateInstanceRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.PartialUpdateInstanceRequest) PartialUpdateInstanceRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartialUpdateInstanceRequest"); + } + // Use PartialUpdateInstanceRequest.newBuilder() to construct. - private PartialUpdateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PartialUpdateInstanceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PartialUpdateInstanceRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartialUpdateInstanceRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int INSTANCE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Instance instance_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +109,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { ? com.google.bigtable.admin.v2.Instance.getDefaultInstance() : instance_; } + /** * * @@ -120,6 +130,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -137,6 +148,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +166,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -290,38 +303,38 @@ public static com.google.bigtable.admin.v2.PartialUpdateInstanceRequest parseFro public static com.google.bigtable.admin.v2.PartialUpdateInstanceRequest 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.bigtable.admin.v2.PartialUpdateInstanceRequest 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.bigtable.admin.v2.PartialUpdateInstanceRequest 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.bigtable.admin.v2.PartialUpdateInstanceRequest 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.bigtable.admin.v2.PartialUpdateInstanceRequest 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.bigtable.admin.v2.PartialUpdateInstanceRequest 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); } @@ -345,10 +358,11 @@ 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; } + /** * * @@ -358,7 +372,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.PartialUpdateInstanceRequest} */ - 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.bigtable.admin.v2.PartialUpdateInstanceRequest) com.google.bigtable.admin.v2.PartialUpdateInstanceRequestOrBuilder { @@ -368,7 +382,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_fieldAccessorTable @@ -382,15 +396,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(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -456,39 +470,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.PartialUpdateInstanceReq 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.bigtable.admin.v2.PartialUpdateInstanceRequest) { @@ -536,13 +517,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(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -566,11 +549,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Instance instance_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> instanceBuilder_; + /** * * @@ -587,6 +571,7 @@ public Builder mergeFrom( public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -609,6 +594,7 @@ public com.google.bigtable.admin.v2.Instance getInstance() { return instanceBuilder_.getMessage(); } } + /** * * @@ -633,6 +619,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance value) { onChanged(); return this; } + /** * * @@ -654,6 +641,7 @@ public Builder setInstance(com.google.bigtable.admin.v2.Instance.Builder builder onChanged(); return this; } + /** * * @@ -683,6 +671,7 @@ public Builder mergeInstance(com.google.bigtable.admin.v2.Instance value) { } return this; } + /** * * @@ -704,6 +693,7 @@ public Builder clearInstance() { onChanged(); return this; } + /** * * @@ -718,8 +708,9 @@ public Builder clearInstance() { public com.google.bigtable.admin.v2.Instance.Builder getInstanceBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInstanceFieldBuilder().getBuilder(); + return internalGetInstanceFieldBuilder().getBuilder(); } + /** * * @@ -740,6 +731,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { : instance_; } } + /** * * @@ -751,14 +743,14 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { * .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder> - getInstanceFieldBuilder() { + internalGetInstanceFieldBuilder() { if (instanceBuilder_ == null) { instanceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Instance, com.google.bigtable.admin.v2.Instance.Builder, com.google.bigtable.admin.v2.InstanceOrBuilder>( @@ -769,11 +761,12 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { } 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> updateMaskBuilder_; + /** * * @@ -790,6 +783,7 @@ public com.google.bigtable.admin.v2.InstanceOrBuilder getInstanceOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -812,6 +806,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -836,6 +831,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -857,6 +853,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -886,6 +883,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -907,6 +905,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -921,8 +920,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -943,6 +943,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -954,14 +955,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>( @@ -971,17 +972,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.bigtable.admin.v2.PartialUpdateInstanceRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequestOrBuilder.java index c5be758991..52250b188a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface PartialUpdateInstanceRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.PartialUpdateInstanceRequest) @@ -38,6 +40,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return Whether the instance field is set. */ boolean hasInstance(); + /** * * @@ -52,6 +55,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return The instance. */ com.google.bigtable.admin.v2.Instance getInstance(); + /** * * @@ -79,6 +83,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +98,7 @@ public interface PartialUpdateInstanceRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProjectName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProjectName.java index b4f47f5bd9..b90dd1f26a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProjectName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProjectName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchema.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchema.java new file mode 100644 index 0000000000..bdd6976f56 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchema.java @@ -0,0 +1,561 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Represents a protobuf schema.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ProtoSchema} + */ +@com.google.protobuf.Generated +public final class ProtoSchema extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.ProtoSchema) + ProtoSchemaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtoSchema"); + } + + // Use ProtoSchema.newBuilder() to construct. + private ProtoSchema(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProtoSchema() { + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ProtoSchema.class, + com.google.bigtable.admin.v2.ProtoSchema.Builder.class); + } + + public static final int PROTO_DESCRIPTORS_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
      +   * Required. Contains a protobuf-serialized
      +   * [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
      +   * which could include multiple proto files.
      +   * To generate it, [install](https://grpc.io/docs/protoc-installation/) and
      +   * run `protoc` with
      +   * `--include_imports` and `--descriptor_set_out`. For example, to generate
      +   * for moon/shot/app.proto, run
      +   * ```
      +   * $protoc  --proto_path=/app_path --proto_path=/lib_path \
      +   * --include_imports \
      +   * --descriptor_set_out=descriptors.pb \
      +   * moon/shot/app.proto
      +   * ```
      +   * For more details, see protobuffer [self
      +   * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
      +   * 
      + * + * bytes proto_descriptors = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!protoDescriptors_.isEmpty()) { + output.writeBytes(2, protoDescriptors_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!protoDescriptors_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, protoDescriptors_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.ProtoSchema)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.ProtoSchema other = (com.google.bigtable.admin.v2.ProtoSchema) obj; + + if (!getProtoDescriptors().equals(other.getProtoDescriptors())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROTO_DESCRIPTORS_FIELD_NUMBER; + hash = (53 * hash) + getProtoDescriptors().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.ProtoSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ProtoSchema parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ProtoSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ProtoSchema 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.bigtable.admin.v2.ProtoSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.ProtoSchema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.ProtoSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ProtoSchema 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.bigtable.admin.v2.ProtoSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ProtoSchema 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.bigtable.admin.v2.ProtoSchema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.ProtoSchema 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.bigtable.admin.v2.ProtoSchema 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; + } + + /** + * + * + *
      +   * Represents a protobuf schema.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.ProtoSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.ProtoSchema) + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.ProtoSchema.class, + com.google.bigtable.admin.v2.ProtoSchema.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.ProtoSchema.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchema getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchema build() { + com.google.bigtable.admin.v2.ProtoSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchema buildPartial() { + com.google.bigtable.admin.v2.ProtoSchema result = + new com.google.bigtable.admin.v2.ProtoSchema(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.ProtoSchema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.protoDescriptors_ = protoDescriptors_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.ProtoSchema) { + return mergeFrom((com.google.bigtable.admin.v2.ProtoSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.ProtoSchema other) { + if (other == com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance()) return this; + if (!other.getProtoDescriptors().isEmpty()) { + setProtoDescriptors(other.getProtoDescriptors()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + protoDescriptors_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString protoDescriptors_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
      +     * Required. Contains a protobuf-serialized
      +     * [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
      +     * which could include multiple proto files.
      +     * To generate it, [install](https://grpc.io/docs/protoc-installation/) and
      +     * run `protoc` with
      +     * `--include_imports` and `--descriptor_set_out`. For example, to generate
      +     * for moon/shot/app.proto, run
      +     * ```
      +     * $protoc  --proto_path=/app_path --proto_path=/lib_path \
      +     * --include_imports \
      +     * --descriptor_set_out=descriptors.pb \
      +     * moon/shot/app.proto
      +     * ```
      +     * For more details, see protobuffer [self
      +     * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
      +     * 
      + * + * bytes proto_descriptors = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The protoDescriptors. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProtoDescriptors() { + return protoDescriptors_; + } + + /** + * + * + *
      +     * Required. Contains a protobuf-serialized
      +     * [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
      +     * which could include multiple proto files.
      +     * To generate it, [install](https://grpc.io/docs/protoc-installation/) and
      +     * run `protoc` with
      +     * `--include_imports` and `--descriptor_set_out`. For example, to generate
      +     * for moon/shot/app.proto, run
      +     * ```
      +     * $protoc  --proto_path=/app_path --proto_path=/lib_path \
      +     * --include_imports \
      +     * --descriptor_set_out=descriptors.pb \
      +     * moon/shot/app.proto
      +     * ```
      +     * For more details, see protobuffer [self
      +     * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
      +     * 
      + * + * bytes proto_descriptors = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The protoDescriptors to set. + * @return This builder for chaining. + */ + public Builder setProtoDescriptors(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + protoDescriptors_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. Contains a protobuf-serialized
      +     * [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
      +     * which could include multiple proto files.
      +     * To generate it, [install](https://grpc.io/docs/protoc-installation/) and
      +     * run `protoc` with
      +     * `--include_imports` and `--descriptor_set_out`. For example, to generate
      +     * for moon/shot/app.proto, run
      +     * ```
      +     * $protoc  --proto_path=/app_path --proto_path=/lib_path \
      +     * --include_imports \
      +     * --descriptor_set_out=descriptors.pb \
      +     * moon/shot/app.proto
      +     * ```
      +     * For more details, see protobuffer [self
      +     * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
      +     * 
      + * + * bytes proto_descriptors = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProtoDescriptors() { + bitField0_ = (bitField0_ & ~0x00000001); + protoDescriptors_ = getDefaultInstance().getProtoDescriptors(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.ProtoSchema) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ProtoSchema) + private static final com.google.bigtable.admin.v2.ProtoSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.ProtoSchema(); + } + + public static com.google.bigtable.admin.v2.ProtoSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProtoSchema 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.bigtable.admin.v2.ProtoSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchemaOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchemaOrBuilder.java new file mode 100644 index 0000000000..4fed01de13 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProtoSchemaOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface ProtoSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.ProtoSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. Contains a protobuf-serialized
      +   * [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
      +   * which could include multiple proto files.
      +   * To generate it, [install](https://grpc.io/docs/protoc-installation/) and
      +   * run `protoc` with
      +   * `--include_imports` and `--descriptor_set_out`. For example, to generate
      +   * for moon/shot/app.proto, run
      +   * ```
      +   * $protoc  --proto_path=/app_path --proto_path=/lib_path \
      +   * --include_imports \
      +   * --descriptor_set_out=descriptors.pb \
      +   * moon/shot/app.proto
      +   * ```
      +   * For more details, see protobuffer [self
      +   * description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
      +   * 
      + * + * bytes proto_descriptors = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The protoDescriptors. + */ + com.google.protobuf.ByteString getProtoDescriptors(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java index d17612f6bd..d47d28bedc 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -42,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_RestoreInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_RestoreInfo_fieldAccessorTable @@ -79,6 +86,7 @@ public enum SourceInfoCase private SourceInfoCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -111,6 +119,7 @@ public SourceInfoCase getSourceInfoCase() { public static final int SOURCE_TYPE_FIELD_NUMBER = 1; private int sourceType_ = 0; + /** * * @@ -126,6 +135,7 @@ public SourceInfoCase getSourceInfoCase() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -145,6 +155,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { } public static final int BACKUP_INFO_FIELD_NUMBER = 2; + /** * * @@ -161,6 +172,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 2; } + /** * * @@ -180,6 +192,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { } return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } + /** * * @@ -326,38 +339,38 @@ public static com.google.bigtable.admin.v2.RestoreInfo parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -380,10 +393,11 @@ 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 +407,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.RestoreInfo) com.google.bigtable.admin.v2.RestoreInfoOrBuilder { @@ -403,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_RestoreInfo_fieldAccessorTable @@ -415,7 +429,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.RestoreInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -479,39 +493,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.RestoreInfo 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.bigtable.admin.v2.RestoreInfo) { @@ -572,7 +553,8 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupInfoFieldBuilder().getBuilder(), extensionRegistry); sourceInfoCase_ = 2; break; } // case 18 @@ -610,6 +592,7 @@ public Builder clearSourceInfo() { private int bitField0_; private int sourceType_ = 0; + /** * * @@ -625,6 +608,7 @@ public Builder clearSourceInfo() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -643,6 +627,7 @@ public Builder setSourceTypeValue(int value) { onChanged(); return this; } + /** * * @@ -660,6 +645,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { com.google.bigtable.admin.v2.RestoreSourceType.forNumber(sourceType_); return result == null ? com.google.bigtable.admin.v2.RestoreSourceType.UNRECOGNIZED : result; } + /** * * @@ -681,6 +667,7 @@ public Builder setSourceType(com.google.bigtable.admin.v2.RestoreSourceType valu onChanged(); return this; } + /** * * @@ -699,11 +686,12 @@ public Builder clearSourceType() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> backupInfoBuilder_; + /** * * @@ -720,6 +708,7 @@ public Builder clearSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 2; } + /** * * @@ -746,6 +735,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** * * @@ -769,6 +759,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 2; return this; } + /** * * @@ -789,6 +780,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo.Builder bui sourceInfoCase_ = 2; return this; } + /** * * @@ -822,6 +814,7 @@ public Builder mergeBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 2; return this; } + /** * * @@ -848,6 +841,7 @@ public Builder clearBackupInfo() { } return this; } + /** * * @@ -859,8 +853,9 @@ public Builder clearBackupInfo() { * .google.bigtable.admin.v2.BackupInfo backup_info = 2; */ public com.google.bigtable.admin.v2.BackupInfo.Builder getBackupInfoBuilder() { - return getBackupInfoFieldBuilder().getBuilder(); + return internalGetBackupInfoFieldBuilder().getBuilder(); } + /** * * @@ -882,6 +877,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** * * @@ -892,17 +888,17 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() * * .google.bigtable.admin.v2.BackupInfo backup_info = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> - getBackupInfoFieldBuilder() { + internalGetBackupInfoFieldBuilder() { if (backupInfoBuilder_ == null) { if (!(sourceInfoCase_ == 2)) { sourceInfo_ = com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } backupInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder>( @@ -916,17 +912,6 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() 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.bigtable.admin.v2.RestoreInfo) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfoOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfoOrBuilder.java index 259f1f72a9..dd83ac54b2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfoOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface RestoreInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.RestoreInfo) @@ -36,6 +38,7 @@ public interface RestoreInfoOrBuilder * @return The enum numeric value on the wire for sourceType. */ int getSourceTypeValue(); + /** * * @@ -62,6 +65,7 @@ public interface RestoreInfoOrBuilder * @return Whether the backupInfo field is set. */ boolean hasBackupInfo(); + /** * * @@ -75,6 +79,7 @@ public interface RestoreInfoOrBuilder * @return The backupInfo. */ com.google.bigtable.admin.v2.BackupInfo getBackupInfo(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreSourceType.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreSourceType.java index 909f197bf1..3ce2642b54 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreSourceType.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreSourceType.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.bigtable.admin.v2.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"); + } + /** * * @@ -62,6 +74,7 @@ public enum RestoreSourceType implements com.google.protobuf.ProtocolMessageEnum * RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; */ public static final int RESTORE_SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -130,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.bigtable.admin.v2.TableProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java index 816082d0fe..fd48902b00 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.RestoreTableMetadata} */ -public final class RestoreTableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreTableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.RestoreTableMetadata) RestoreTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreTableMetadata"); + } + // Use RestoreTableMetadata.newBuilder() to construct. - private RestoreTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreTableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private RestoreTableMetadata() { optimizeTableOperationName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreTableMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableMetadata_fieldAccessorTable @@ -83,6 +90,7 @@ public enum SourceInfoCase private SourceInfoCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -117,6 +125,7 @@ public SourceInfoCase getSourceInfoCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -140,6 +149,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -166,6 +176,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int SOURCE_TYPE_FIELD_NUMBER = 2; private int sourceType_ = 0; + /** * * @@ -181,6 +192,7 @@ public com.google.protobuf.ByteString getNameBytes() { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -200,6 +212,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { } public static final int BACKUP_INFO_FIELD_NUMBER = 3; + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -209,6 +222,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 3; } + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -221,6 +235,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { } return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ @java.lang.Override public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() { @@ -234,6 +249,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() @SuppressWarnings("serial") private volatile java.lang.Object optimizeTableOperationName_ = ""; + /** * * @@ -265,6 +281,7 @@ public java.lang.String getOptimizeTableOperationName() { return s; } } + /** * * @@ -299,6 +316,7 @@ public com.google.protobuf.ByteString getOptimizeTableOperationNameBytes() { public static final int PROGRESS_FIELD_NUMBER = 5; private com.google.bigtable.admin.v2.OperationProgress progress_; + /** * * @@ -316,6 +334,7 @@ public com.google.protobuf.ByteString getOptimizeTableOperationNameBytes() { public boolean hasProgress() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -335,6 +354,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { ? com.google.bigtable.admin.v2.OperationProgress.getDefaultInstance() : progress_; } + /** * * @@ -367,8 +387,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.bigtable.admin.v2.RestoreSourceType.RESTORE_SOURCE_TYPE_UNSPECIFIED @@ -378,8 +398,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceInfoCase_ == 3) { output.writeMessage(3, (com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizeTableOperationName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optimizeTableOperationName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizeTableOperationName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, optimizeTableOperationName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getProgress()); @@ -393,8 +413,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.bigtable.admin.v2.RestoreSourceType.RESTORE_SOURCE_TYPE_UNSPECIFIED @@ -406,9 +426,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizeTableOperationName_)) { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizeTableOperationName_)) { size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optimizeTableOperationName_); + com.google.protobuf.GeneratedMessage.computeStringSize(4, optimizeTableOperationName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgress()); @@ -516,38 +536,38 @@ public static com.google.bigtable.admin.v2.RestoreTableMetadata parseFrom( public static com.google.bigtable.admin.v2.RestoreTableMetadata 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.bigtable.admin.v2.RestoreTableMetadata 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.bigtable.admin.v2.RestoreTableMetadata 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.bigtable.admin.v2.RestoreTableMetadata 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.bigtable.admin.v2.RestoreTableMetadata 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.bigtable.admin.v2.RestoreTableMetadata 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); } @@ -570,10 +590,11 @@ 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; } + /** * * @@ -584,7 +605,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.RestoreTableMetadata} */ - 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.bigtable.admin.v2.RestoreTableMetadata) com.google.bigtable.admin.v2.RestoreTableMetadataOrBuilder { @@ -594,7 +615,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableMetadata_fieldAccessorTable @@ -608,14 +629,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(); } } @@ -698,39 +719,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.RestoreTableMetadat } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.RestoreTableMetadata) { @@ -811,7 +799,8 @@ public Builder mergeFrom( } // case 16 case 26: { - input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBackupInfoFieldBuilder().getBuilder(), extensionRegistry); sourceInfoCase_ = 3; break; } // case 26 @@ -823,7 +812,8 @@ public Builder mergeFrom( } // case 34 case 42: { - input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProgressFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -861,6 +851,7 @@ public Builder clearSourceInfo() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -883,6 +874,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -905,6 +897,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -926,6 +919,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -943,6 +937,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -967,6 +962,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private int sourceType_ = 0; + /** * * @@ -982,6 +978,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public int getSourceTypeValue() { return sourceType_; } + /** * * @@ -1000,6 +997,7 @@ public Builder setSourceTypeValue(int value) { onChanged(); return this; } + /** * * @@ -1017,6 +1015,7 @@ public com.google.bigtable.admin.v2.RestoreSourceType getSourceType() { com.google.bigtable.admin.v2.RestoreSourceType.forNumber(sourceType_); return result == null ? com.google.bigtable.admin.v2.RestoreSourceType.UNRECOGNIZED : result; } + /** * * @@ -1038,6 +1037,7 @@ public Builder setSourceType(com.google.bigtable.admin.v2.RestoreSourceType valu onChanged(); return this; } + /** * * @@ -1056,11 +1056,12 @@ public Builder clearSourceType() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> backupInfoBuilder_; + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -1070,6 +1071,7 @@ public Builder clearSourceType() { public boolean hasBackupInfo() { return sourceInfoCase_ == 3; } + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * @@ -1089,6 +1091,7 @@ public com.google.bigtable.admin.v2.BackupInfo getBackupInfo() { return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { if (backupInfoBuilder_ == null) { @@ -1103,6 +1106,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 3; return this; } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo.Builder builderForValue) { if (backupInfoBuilder_ == null) { @@ -1114,6 +1118,7 @@ public Builder setBackupInfo(com.google.bigtable.admin.v2.BackupInfo.Builder bui sourceInfoCase_ = 3; return this; } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ public Builder mergeBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { if (backupInfoBuilder_ == null) { @@ -1138,6 +1143,7 @@ public Builder mergeBackupInfo(com.google.bigtable.admin.v2.BackupInfo value) { sourceInfoCase_ = 3; return this; } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ public Builder clearBackupInfo() { if (backupInfoBuilder_ == null) { @@ -1155,10 +1161,12 @@ public Builder clearBackupInfo() { } return this; } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ public com.google.bigtable.admin.v2.BackupInfo.Builder getBackupInfoBuilder() { - return getBackupInfoFieldBuilder().getBuilder(); + return internalGetBackupInfoFieldBuilder().getBuilder(); } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ @java.lang.Override public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() { @@ -1171,18 +1179,19 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() return com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } } + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder> - getBackupInfoFieldBuilder() { + internalGetBackupInfoFieldBuilder() { if (backupInfoBuilder_ == null) { if (!(sourceInfoCase_ == 3)) { sourceInfo_ = com.google.bigtable.admin.v2.BackupInfo.getDefaultInstance(); } backupInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.BackupInfo, com.google.bigtable.admin.v2.BackupInfo.Builder, com.google.bigtable.admin.v2.BackupInfoOrBuilder>( @@ -1197,6 +1206,7 @@ public com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder() } private java.lang.Object optimizeTableOperationName_ = ""; + /** * * @@ -1227,6 +1237,7 @@ public java.lang.String getOptimizeTableOperationName() { return (java.lang.String) ref; } } + /** * * @@ -1257,6 +1268,7 @@ public com.google.protobuf.ByteString getOptimizeTableOperationNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1286,6 +1298,7 @@ public Builder setOptimizeTableOperationName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1311,6 +1324,7 @@ public Builder clearOptimizeTableOperationName() { onChanged(); return this; } + /** * * @@ -1343,11 +1357,12 @@ public Builder setOptimizeTableOperationNameBytes(com.google.protobuf.ByteString } private com.google.bigtable.admin.v2.OperationProgress progress_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> progressBuilder_; + /** * * @@ -1364,6 +1379,7 @@ public Builder setOptimizeTableOperationNameBytes(com.google.protobuf.ByteString public boolean hasProgress() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1386,6 +1402,7 @@ public com.google.bigtable.admin.v2.OperationProgress getProgress() { return progressBuilder_.getMessage(); } } + /** * * @@ -1410,6 +1427,7 @@ public Builder setProgress(com.google.bigtable.admin.v2.OperationProgress value) onChanged(); return this; } + /** * * @@ -1432,6 +1450,7 @@ public Builder setProgress( onChanged(); return this; } + /** * * @@ -1461,6 +1480,7 @@ public Builder mergeProgress(com.google.bigtable.admin.v2.OperationProgress valu } return this; } + /** * * @@ -1482,6 +1502,7 @@ public Builder clearProgress() { onChanged(); return this; } + /** * * @@ -1496,8 +1517,9 @@ public Builder clearProgress() { public com.google.bigtable.admin.v2.OperationProgress.Builder getProgressBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getProgressFieldBuilder().getBuilder(); + return internalGetProgressFieldBuilder().getBuilder(); } + /** * * @@ -1518,6 +1540,7 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil : progress_; } } + /** * * @@ -1529,14 +1552,14 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil * * .google.bigtable.admin.v2.OperationProgress progress = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder> - getProgressFieldBuilder() { + internalGetProgressFieldBuilder() { if (progressBuilder_ == null) { progressBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.OperationProgress, com.google.bigtable.admin.v2.OperationProgress.Builder, com.google.bigtable.admin.v2.OperationProgressOrBuilder>( @@ -1546,17 +1569,6 @@ public com.google.bigtable.admin.v2.OperationProgressOrBuilder getProgressOrBuil 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.bigtable.admin.v2.RestoreTableMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadataOrBuilder.java index a16c4b897c..1dde37589c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface RestoreTableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.RestoreTableMetadata) @@ -36,6 +38,7 @@ public interface RestoreTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface RestoreTableMetadataOrBuilder * @return The enum numeric value on the wire for sourceType. */ int getSourceTypeValue(); + /** * * @@ -80,12 +84,14 @@ public interface RestoreTableMetadataOrBuilder * @return Whether the backupInfo field is set. */ boolean hasBackupInfo(); + /** * .google.bigtable.admin.v2.BackupInfo backup_info = 3; * * @return The backupInfo. */ com.google.bigtable.admin.v2.BackupInfo getBackupInfo(); + /** .google.bigtable.admin.v2.BackupInfo backup_info = 3; */ com.google.bigtable.admin.v2.BackupInfoOrBuilder getBackupInfoOrBuilder(); @@ -109,6 +115,7 @@ public interface RestoreTableMetadataOrBuilder * @return The optimizeTableOperationName. */ java.lang.String getOptimizeTableOperationName(); + /** * * @@ -144,6 +151,7 @@ public interface RestoreTableMetadataOrBuilder * @return Whether the progress field is set. */ boolean hasProgress(); + /** * * @@ -158,6 +166,7 @@ public interface RestoreTableMetadataOrBuilder * @return The progress. */ com.google.bigtable.admin.v2.OperationProgress getProgress(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java index f4415ca6cf..dc3b557a57 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.RestoreTableRequest} */ -public final class RestoreTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RestoreTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.RestoreTableRequest) RestoreTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestoreTableRequest"); + } + // Use RestoreTableRequest.newBuilder() to construct. - private RestoreTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RestoreTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private RestoreTableRequest() { tableId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RestoreTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableRequest_fieldAccessorTable @@ -81,6 +88,7 @@ public enum SourceCase private SourceCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -115,6 +123,7 @@ public SourceCase getSourceCase() { @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; + /** * * @@ -141,6 +150,7 @@ public java.lang.String getParent() { return s; } } + /** * * @@ -172,6 +182,7 @@ public com.google.protobuf.ByteString getParentBytes() { @SuppressWarnings("serial") private volatile java.lang.Object tableId_ = ""; + /** * * @@ -198,6 +209,7 @@ public java.lang.String getTableId() { return s; } } + /** * * @@ -226,6 +238,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { } public static final int BACKUP_FIELD_NUMBER = 3; + /** * * @@ -241,6 +254,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { public boolean hasBackup() { return sourceCase_ == 3; } + /** * * @@ -269,6 +283,7 @@ public java.lang.String getBackup() { return s; } } + /** * * @@ -312,14 +327,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(tableId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tableId_); } if (sourceCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, source_); } getUnknownFields().writeTo(output); } @@ -330,14 +345,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(tableId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tableId_); } if (sourceCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, source_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -430,38 +445,38 @@ public static com.google.bigtable.admin.v2.RestoreTableRequest parseFrom( public static com.google.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest 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); } @@ -484,10 +499,11 @@ 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; } + /** * * @@ -498,7 +514,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.RestoreTableRequest} */ - 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.bigtable.admin.v2.RestoreTableRequest) com.google.bigtable.admin.v2.RestoreTableRequestOrBuilder { @@ -508,7 +524,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableRequest_fieldAccessorTable @@ -520,7 +536,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.RestoreTableRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -582,39 +598,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.RestoreTableRequest 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.bigtable.admin.v2.RestoreTableRequest) { @@ -730,6 +713,7 @@ public Builder clearSource() { private int bitField0_; private java.lang.Object parent_ = ""; + /** * * @@ -755,6 +739,7 @@ public java.lang.String getParent() { return (java.lang.String) ref; } } + /** * * @@ -780,6 +765,7 @@ public com.google.protobuf.ByteString getParentBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -804,6 +790,7 @@ public Builder setParent(java.lang.String value) { onChanged(); return this; } + /** * * @@ -824,6 +811,7 @@ public Builder clearParent() { onChanged(); return this; } + /** * * @@ -851,6 +839,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } private java.lang.Object tableId_ = ""; + /** * * @@ -876,6 +865,7 @@ public java.lang.String getTableId() { return (java.lang.String) ref; } } + /** * * @@ -901,6 +891,7 @@ public com.google.protobuf.ByteString getTableIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -925,6 +916,7 @@ public Builder setTableId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -945,6 +937,7 @@ public Builder clearTableId() { onChanged(); return this; } + /** * * @@ -987,6 +980,7 @@ public Builder setTableIdBytes(com.google.protobuf.ByteString value) { public boolean hasBackup() { return sourceCase_ == 3; } + /** * * @@ -1016,6 +1010,7 @@ public java.lang.String getBackup() { return (java.lang.String) ref; } } + /** * * @@ -1045,6 +1040,7 @@ public com.google.protobuf.ByteString getBackupBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1067,6 +1063,7 @@ public Builder setBackup(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1087,6 +1084,7 @@ public Builder clearBackup() { } return this; } + /** * * @@ -1111,17 +1109,6 @@ public Builder setBackupBytes(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.bigtable.admin.v2.RestoreTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequestOrBuilder.java index 286a9812fd..d078b0fef4 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface RestoreTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.RestoreTableRequest) @@ -39,6 +41,7 @@ public interface RestoreTableRequestOrBuilder * @return The parent. */ java.lang.String getParent(); + /** * * @@ -70,6 +73,7 @@ public interface RestoreTableRequestOrBuilder * @return The tableId. */ java.lang.String getTableId(); + /** * * @@ -99,6 +103,7 @@ public interface RestoreTableRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -112,6 +117,7 @@ public interface RestoreTableRequestOrBuilder * @return The backup. */ java.lang.String getBackup(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundle.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundle.java new file mode 100644 index 0000000000..ae18eb985f --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundle.java @@ -0,0 +1,1208 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * A named collection of related schemas.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.SchemaBundle} + */ +@com.google.protobuf.Generated +public final class SchemaBundle extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SchemaBundle) + SchemaBundleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SchemaBundle"); + } + + // Use SchemaBundle.newBuilder() to construct. + private SchemaBundle(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchemaBundle() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.SchemaBundle.class, + com.google.bigtable.admin.v2.SchemaBundle.Builder.class); + } + + private int typeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROTO_SCHEMA(2), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(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 TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 2: + return PROTO_SCHEMA; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * Identifier. The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * Identifier. The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTO_SCHEMA_FIELD_NUMBER = 2; + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return Whether the protoSchema field is set. + */ + @java.lang.Override + public boolean hasProtoSchema() { + return typeCase_ == 2; + } + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return The protoSchema. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchema getProtoSchema() { + if (typeCase_ == 2) { + return (com.google.bigtable.admin.v2.ProtoSchema) type_; + } + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { + if (typeCase_ == 2) { + return (com.google.bigtable.admin.v2.ProtoSchema) type_; + } + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
      +   * Optional. The etag for this schema bundle.
      +   * This may be sent on update and delete requests to ensure the
      +   * client has an up-to-date value before proceeding. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
      +   * Optional. The etag for this schema bundle.
      +   * This may be sent on update and delete requests to ensure the
      +   * client has an up-to-date value before proceeding. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.admin.v2.ProtoSchema) type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (typeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.ProtoSchema) type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + 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.bigtable.admin.v2.SchemaBundle)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.SchemaBundle other = + (com.google.bigtable.admin.v2.SchemaBundle) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 2: + if (!getProtoSchema().equals(other.getProtoSchema())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + switch (typeCase_) { + case 2: + hash = (37 * hash) + PROTO_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getProtoSchema().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.SchemaBundle parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.SchemaBundle parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.SchemaBundle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.SchemaBundle 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.bigtable.admin.v2.SchemaBundle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.SchemaBundle parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.SchemaBundle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.SchemaBundle 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.bigtable.admin.v2.SchemaBundle parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.SchemaBundle 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.bigtable.admin.v2.SchemaBundle parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.SchemaBundle 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.bigtable.admin.v2.SchemaBundle 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 named collection of related schemas.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.SchemaBundle} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.SchemaBundle) + com.google.bigtable.admin.v2.SchemaBundleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.SchemaBundle.class, + com.google.bigtable.admin.v2.SchemaBundle.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.SchemaBundle.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (protoSchemaBuilder_ != null) { + protoSchemaBuilder_.clear(); + } + etag_ = ""; + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle build() { + com.google.bigtable.admin.v2.SchemaBundle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle buildPartial() { + com.google.bigtable.admin.v2.SchemaBundle result = + new com.google.bigtable.admin.v2.SchemaBundle(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.SchemaBundle result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etag_ = etag_; + } + } + + private void buildPartialOneofs(com.google.bigtable.admin.v2.SchemaBundle result) { + result.typeCase_ = typeCase_; + result.type_ = this.type_; + if (typeCase_ == 2 && protoSchemaBuilder_ != null) { + result.type_ = protoSchemaBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.SchemaBundle) { + return mergeFrom((com.google.bigtable.admin.v2.SchemaBundle) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.SchemaBundle other) { + if (other == com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getTypeCase()) { + case PROTO_SCHEMA: + { + mergeProtoSchema(other.getProtoSchema()); + break; + } + case TYPE_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetProtoSchemaFieldBuilder().getBuilder(), extensionRegistry); + typeCase_ = 2; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * Identifier. The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Identifier. The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Identifier. The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.ProtoSchema, + com.google.bigtable.admin.v2.ProtoSchema.Builder, + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder> + protoSchemaBuilder_; + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return Whether the protoSchema field is set. + */ + @java.lang.Override + public boolean hasProtoSchema() { + return typeCase_ == 2; + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return The protoSchema. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchema getProtoSchema() { + if (protoSchemaBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.bigtable.admin.v2.ProtoSchema) type_; + } + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return protoSchemaBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + public Builder setProtoSchema(com.google.bigtable.admin.v2.ProtoSchema value) { + if (protoSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + protoSchemaBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + public Builder setProtoSchema( + com.google.bigtable.admin.v2.ProtoSchema.Builder builderForValue) { + if (protoSchemaBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + protoSchemaBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + public Builder mergeProtoSchema(com.google.bigtable.admin.v2.ProtoSchema value) { + if (protoSchemaBuilder_ == null) { + if (typeCase_ == 2 + && type_ != com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance()) { + type_ = + com.google.bigtable.admin.v2.ProtoSchema.newBuilder( + (com.google.bigtable.admin.v2.ProtoSchema) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + protoSchemaBuilder_.mergeFrom(value); + } else { + protoSchemaBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + public Builder clearProtoSchema() { + if (protoSchemaBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + protoSchemaBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + public com.google.bigtable.admin.v2.ProtoSchema.Builder getProtoSchemaBuilder() { + return internalGetProtoSchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { + if ((typeCase_ == 2) && (protoSchemaBuilder_ != null)) { + return protoSchemaBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.bigtable.admin.v2.ProtoSchema) type_; + } + return com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + } + + /** + * + * + *
      +     * Schema for Protobufs.
      +     * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.ProtoSchema, + com.google.bigtable.admin.v2.ProtoSchema.Builder, + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder> + internalGetProtoSchemaFieldBuilder() { + if (protoSchemaBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.bigtable.admin.v2.ProtoSchema.getDefaultInstance(); + } + protoSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.ProtoSchema, + com.google.bigtable.admin.v2.ProtoSchema.Builder, + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder>( + (com.google.bigtable.admin.v2.ProtoSchema) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged(); + return protoSchemaBuilder_; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
      +     * Optional. The etag for this schema bundle.
      +     * This may be sent on update and delete requests to ensure the
      +     * client has an up-to-date value before proceeding. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this schema bundle.
      +     * This may be sent on update and delete requests to ensure the
      +     * client has an up-to-date value before proceeding. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * Optional. The etag for this schema bundle.
      +     * This may be sent on update and delete requests to ensure the
      +     * client has an up-to-date value before proceeding. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this schema bundle.
      +     * This may be sent on update and delete requests to ensure the
      +     * client has an up-to-date value before proceeding. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The etag for this schema bundle.
      +     * This may be sent on update and delete requests to ensure the
      +     * client has an up-to-date value before proceeding. The server
      +     * returns an ABORTED error on a mismatched etag.
      +     * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.SchemaBundle) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.SchemaBundle) + private static final com.google.bigtable.admin.v2.SchemaBundle DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.SchemaBundle(); + } + + public static com.google.bigtable.admin.v2.SchemaBundle getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchemaBundle 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.bigtable.admin.v2.SchemaBundle getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleName.java new file mode 100644 index 0000000000..01ffe0e433 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleName.java @@ -0,0 +1,261 @@ +/* + * Copyright 2026 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.bigtable.admin.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SchemaBundleName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE_TABLE_SCHEMA_BUNDLE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + private final String table; + private final String schemaBundle; + + @Deprecated + protected SchemaBundleName() { + project = null; + instance = null; + table = null; + schemaBundle = null; + } + + private SchemaBundleName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + table = Preconditions.checkNotNull(builder.getTable()); + schemaBundle = Preconditions.checkNotNull(builder.getSchemaBundle()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getTable() { + return table; + } + + public String getSchemaBundle() { + return schemaBundle; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SchemaBundleName of( + String project, String instance, String table, String schemaBundle) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setTable(table) + .setSchemaBundle(schemaBundle) + .build(); + } + + public static String format(String project, String instance, String table, String schemaBundle) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setTable(table) + .setSchemaBundle(schemaBundle) + .build() + .toString(); + } + + public static SchemaBundleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE_TABLE_SCHEMA_BUNDLE.validatedMatch( + formattedString, "SchemaBundleName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("instance"), + matchMap.get("table"), + matchMap.get("schema_bundle")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SchemaBundleName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE_TABLE_SCHEMA_BUNDLE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (table != null) { + fieldMapBuilder.put("table", table); + } + if (schemaBundle != null) { + fieldMapBuilder.put("schema_bundle", schemaBundle); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE_TABLE_SCHEMA_BUNDLE.instantiate( + "project", project, "instance", instance, "table", table, "schema_bundle", schemaBundle); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SchemaBundleName that = ((SchemaBundleName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.table, that.table) + && Objects.equals(this.schemaBundle, that.schemaBundle); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(table); + h *= 1000003; + h ^= Objects.hashCode(schemaBundle); + return h; + } + + /** + * Builder for + * projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}. + */ + public static class Builder { + private String project; + private String instance; + private String table; + private String schemaBundle; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getTable() { + return table; + } + + public String getSchemaBundle() { + return schemaBundle; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setTable(String table) { + this.table = table; + return this; + } + + public Builder setSchemaBundle(String schemaBundle) { + this.schemaBundle = schemaBundle; + return this; + } + + private Builder(SchemaBundleName schemaBundleName) { + this.project = schemaBundleName.project; + this.instance = schemaBundleName.instance; + this.table = schemaBundleName.table; + this.schemaBundle = schemaBundleName.schemaBundle; + } + + public SchemaBundleName build() { + return new SchemaBundleName(this); + } + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleOrBuilder.java new file mode 100644 index 0000000000..5b433ff344 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SchemaBundleOrBuilder.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 + * + * 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface SchemaBundleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.SchemaBundle) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Identifier. The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * Identifier. The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return Whether the protoSchema field is set. + */ + boolean hasProtoSchema(); + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + * + * @return The protoSchema. + */ + com.google.bigtable.admin.v2.ProtoSchema getProtoSchema(); + + /** + * + * + *
      +   * Schema for Protobufs.
      +   * 
      + * + * .google.bigtable.admin.v2.ProtoSchema proto_schema = 2; + */ + com.google.bigtable.admin.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder(); + + /** + * + * + *
      +   * Optional. The etag for this schema bundle.
      +   * This may be sent on update and delete requests to ensure the
      +   * client has an up-to-date value before proceeding. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
      +   * Optional. The etag for this schema bundle.
      +   * This may be sent on update and delete requests to ensure the
      +   * client has an up-to-date value before proceeding. The server
      +   * returns an ABORTED error on a mismatched etag.
      +   * 
      + * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + com.google.bigtable.admin.v2.SchemaBundle.TypeCase getTypeCase(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java index daef8aa74d..1366ac6e3a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.Snapshot} */ -public final class Snapshot extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Snapshot extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Snapshot) SnapshotOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Snapshot"); + } + // Use Snapshot.newBuilder() to construct. - private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Snapshot(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -50,19 +63,13 @@ private Snapshot() { description_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Snapshot(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Snapshot_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable @@ -116,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"); + } + /** * * @@ -126,6 +143,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -136,6 +154,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * READY = 1; */ public static final int READY_VALUE = 1; + /** * * @@ -207,7 +226,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.bigtable.admin.v2.Snapshot.getDescriptor().getEnumTypes().get(0); } @@ -237,6 +256,7 @@ private State(int value) { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -262,6 +282,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -290,6 +311,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int SOURCE_TABLE_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.Table sourceTable_; + /** * * @@ -307,6 +329,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasSourceTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -326,6 +349,7 @@ public com.google.bigtable.admin.v2.Table getSourceTable() { ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : sourceTable_; } + /** * * @@ -346,6 +370,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { public static final int DATA_SIZE_BYTES_FIELD_NUMBER = 3; private long dataSizeBytes_ = 0L; + /** * * @@ -367,6 +392,7 @@ public long getDataSizeBytes() { public static final int CREATE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp createTime_; + /** * * @@ -383,6 +409,7 @@ public long getDataSizeBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -399,6 +426,7 @@ public boolean hasCreateTime() { public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + /** * * @@ -416,6 +444,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public static final int DELETE_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp deleteTime_; + /** * * @@ -433,6 +462,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasDeleteTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -450,6 +480,7 @@ public boolean hasDeleteTime() { public com.google.protobuf.Timestamp getDeleteTime() { return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_; } + /** * * @@ -468,6 +499,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public static final int STATE_FIELD_NUMBER = 6; private int state_ = 0; + /** * * @@ -485,6 +517,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -509,6 +542,7 @@ public com.google.bigtable.admin.v2.Snapshot.State getState() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -532,6 +566,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -570,8 +605,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, getSourceTable()); @@ -588,8 +623,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (state_ != com.google.bigtable.admin.v2.Snapshot.State.STATE_NOT_KNOWN.getNumber()) { output.writeEnum(6, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, description_); } getUnknownFields().writeTo(output); } @@ -600,8 +635,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, getSourceTable()); @@ -618,8 +653,8 @@ public int getSerializedSize() { if (state_ != com.google.bigtable.admin.v2.Snapshot.State.STATE_NOT_KNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, description_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -724,38 +759,38 @@ public static com.google.bigtable.admin.v2.Snapshot parseFrom( public static com.google.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot 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); } @@ -778,10 +813,11 @@ 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; } + /** * * @@ -797,7 +833,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.Snapshot} */ - 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.bigtable.admin.v2.Snapshot) com.google.bigtable.admin.v2.SnapshotOrBuilder { @@ -807,7 +843,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable @@ -821,16 +857,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) { - getSourceTableFieldBuilder(); - getCreateTimeFieldBuilder(); - getDeleteTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSourceTableFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetDeleteTimeFieldBuilder(); } } @@ -922,39 +958,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Snapshot 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.bigtable.admin.v2.Snapshot) { @@ -1026,7 +1029,8 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getSourceTableFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetSourceTableFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1038,13 +1042,15 @@ public Builder mergeFrom( } // case 24 case 34: { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { - input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 @@ -1080,6 +1086,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -1104,6 +1111,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -1128,6 +1136,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1151,6 +1160,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1170,6 +1180,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -1196,11 +1207,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.admin.v2.Table sourceTable_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> sourceTableBuilder_; + /** * * @@ -1217,6 +1229,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasSourceTable() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1239,6 +1252,7 @@ public com.google.bigtable.admin.v2.Table getSourceTable() { return sourceTableBuilder_.getMessage(); } } + /** * * @@ -1263,6 +1277,7 @@ public Builder setSourceTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -1284,6 +1299,7 @@ public Builder setSourceTable(com.google.bigtable.admin.v2.Table.Builder builder onChanged(); return this; } + /** * * @@ -1313,6 +1329,7 @@ public Builder mergeSourceTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -1334,6 +1351,7 @@ public Builder clearSourceTable() { onChanged(); return this; } + /** * * @@ -1348,8 +1366,9 @@ public Builder clearSourceTable() { public com.google.bigtable.admin.v2.Table.Builder getSourceTableBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSourceTableFieldBuilder().getBuilder(); + return internalGetSourceTableFieldBuilder().getBuilder(); } + /** * * @@ -1370,6 +1389,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { : sourceTable_; } } + /** * * @@ -1381,14 +1401,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { * .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> - getSourceTableFieldBuilder() { + internalGetSourceTableFieldBuilder() { if (sourceTableBuilder_ == null) { sourceTableBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder>( @@ -1399,6 +1419,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { } private long dataSizeBytes_; + /** * * @@ -1417,6 +1438,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() { public long getDataSizeBytes() { return dataSizeBytes_; } + /** * * @@ -1439,6 +1461,7 @@ public Builder setDataSizeBytes(long value) { onChanged(); return this; } + /** * * @@ -1461,11 +1484,12 @@ public Builder clearDataSizeBytes() { } 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> createTimeBuilder_; + /** * * @@ -1482,6 +1506,7 @@ public Builder clearDataSizeBytes() { public boolean hasCreateTime() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1504,6 +1529,7 @@ public com.google.protobuf.Timestamp getCreateTime() { return createTimeBuilder_.getMessage(); } } + /** * * @@ -1528,6 +1554,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1549,6 +1576,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1578,6 +1606,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1599,6 +1628,7 @@ public Builder clearCreateTime() { onChanged(); return this; } + /** * * @@ -1613,8 +1643,9 @@ public Builder clearCreateTime() { public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } + /** * * @@ -1635,6 +1666,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { : createTime_; } } + /** * * @@ -1646,14 +1678,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>( @@ -1664,11 +1696,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { } private com.google.protobuf.Timestamp deleteTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deleteTimeBuilder_; + /** * * @@ -1685,6 +1718,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { public boolean hasDeleteTime() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1707,6 +1741,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { return deleteTimeBuilder_.getMessage(); } } + /** * * @@ -1731,6 +1766,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1752,6 +1788,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1781,6 +1818,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1802,6 +1840,7 @@ public Builder clearDeleteTime() { onChanged(); return this; } + /** * * @@ -1816,8 +1855,9 @@ public Builder clearDeleteTime() { public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getDeleteTimeFieldBuilder().getBuilder(); + return internalGetDeleteTimeFieldBuilder().getBuilder(); } + /** * * @@ -1838,6 +1878,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { : deleteTime_; } } + /** * * @@ -1849,14 +1890,14 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * .google.protobuf.Timestamp delete_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> - getDeleteTimeFieldBuilder() { + internalGetDeleteTimeFieldBuilder() { if (deleteTimeBuilder_ == null) { deleteTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1867,6 +1908,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { } private int state_ = 0; + /** * * @@ -1884,6 +1926,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { public int getStateValue() { return state_; } + /** * * @@ -1904,6 +1947,7 @@ public Builder setStateValue(int value) { onChanged(); return this; } + /** * * @@ -1923,6 +1967,7 @@ public com.google.bigtable.admin.v2.Snapshot.State getState() { com.google.bigtable.admin.v2.Snapshot.State.forNumber(state_); return result == null ? com.google.bigtable.admin.v2.Snapshot.State.UNRECOGNIZED : result; } + /** * * @@ -1946,6 +1991,7 @@ public Builder setState(com.google.bigtable.admin.v2.Snapshot.State value) { onChanged(); return this; } + /** * * @@ -1967,6 +2013,7 @@ public Builder clearState() { } private java.lang.Object description_ = ""; + /** * * @@ -1989,6 +2036,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -2011,6 +2059,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2032,6 +2081,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2049,6 +2099,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * @@ -2072,17 +2123,6 @@ public Builder setDescriptionBytes(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.bigtable.admin.v2.Snapshot) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotName.java index 881075fe8c..9e0af534fe 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotOrBuilder.java index c8bc0b4eee..c3a3507134 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface SnapshotOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Snapshot) @@ -38,6 +40,7 @@ public interface SnapshotOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -67,6 +70,7 @@ public interface SnapshotOrBuilder * @return Whether the sourceTable field is set. */ boolean hasSourceTable(); + /** * * @@ -81,6 +85,7 @@ public interface SnapshotOrBuilder * @return The sourceTable. */ com.google.bigtable.admin.v2.Table getSourceTable(); + /** * * @@ -123,6 +128,7 @@ public interface SnapshotOrBuilder * @return Whether the createTime field is set. */ boolean hasCreateTime(); + /** * * @@ -136,6 +142,7 @@ public interface SnapshotOrBuilder * @return The createTime. */ com.google.protobuf.Timestamp getCreateTime(); + /** * * @@ -162,6 +169,7 @@ public interface SnapshotOrBuilder * @return Whether the deleteTime field is set. */ boolean hasDeleteTime(); + /** * * @@ -176,6 +184,7 @@ public interface SnapshotOrBuilder * @return The deleteTime. */ com.google.protobuf.Timestamp getDeleteTime(); + /** * * @@ -203,6 +212,7 @@ public interface SnapshotOrBuilder * @return The enum numeric value on the wire for state. */ int getStateValue(); + /** * * @@ -230,6 +240,7 @@ public interface SnapshotOrBuilder * @return The description. */ java.lang.String getDescription(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java index 3060863b2a..f7840fb2a3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -33,31 +34,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.SnapshotTableMetadata} */ -public final class SnapshotTableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SnapshotTableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SnapshotTableMetadata) SnapshotTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SnapshotTableMetadata"); + } + // Use SnapshotTableMetadata.newBuilder() to construct. - private SnapshotTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SnapshotTableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SnapshotTableMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SnapshotTableMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.SnapshotTableRequest originalRequest_; + /** * * @@ -84,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -101,6 +110,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest() { ? com.google.bigtable.admin.v2.SnapshotTableRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -119,6 +129,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder getOriginalReq public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -134,6 +145,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder getOriginalReq public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +161,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -165,6 +178,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -180,6 +194,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -195,6 +210,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -343,38 +359,38 @@ public static com.google.bigtable.admin.v2.SnapshotTableMetadata parseFrom( public static com.google.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata 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); } @@ -397,10 +413,11 @@ 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; } + /** * * @@ -415,7 +432,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.SnapshotTableMetadata} */ - 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.bigtable.admin.v2.SnapshotTableMetadata) com.google.bigtable.admin.v2.SnapshotTableMetadataOrBuilder { @@ -425,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_fieldAccessorTable @@ -439,16 +456,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -525,39 +542,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.SnapshotTableMetadata 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.bigtable.admin.v2.SnapshotTableMetadata) { @@ -608,19 +592,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -644,11 +631,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.SnapshotTableRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.SnapshotTableRequest, com.google.bigtable.admin.v2.SnapshotTableRequest.Builder, com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -663,6 +651,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -683,6 +672,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -705,6 +695,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.SnapshotTableRequ onChanged(); return this; } + /** * * @@ -725,6 +716,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -753,6 +745,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.SnapshotTableRe } return this; } + /** * * @@ -772,6 +765,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -784,8 +778,9 @@ public Builder clearOriginalRequest() { public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -805,6 +800,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ : originalRequest_; } } + /** * * @@ -814,14 +810,14 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ * * .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.SnapshotTableRequest, com.google.bigtable.admin.v2.SnapshotTableRequest.Builder, com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.SnapshotTableRequest, com.google.bigtable.admin.v2.SnapshotTableRequest.Builder, com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder>( @@ -832,11 +828,12 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -851,6 +848,7 @@ public com.google.bigtable.admin.v2.SnapshotTableRequest.Builder getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -871,6 +869,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -893,6 +892,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -912,6 +912,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -939,6 +940,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -958,6 +960,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -970,8 +973,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -990,6 +994,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -999,14 +1004,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1017,11 +1022,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1036,6 +1042,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1056,6 +1063,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1078,6 +1086,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1097,6 +1106,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1124,6 +1134,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1143,6 +1154,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1155,8 +1167,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1175,6 +1188,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1184,14 +1198,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1201,17 +1215,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.SnapshotTableMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadataOrBuilder.java index 6a0ba049c3..bb0f480322 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface SnapshotTableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.SnapshotTableMetadata) @@ -36,6 +38,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +51,7 @@ public interface SnapshotTableMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest(); + /** * * @@ -71,6 +75,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +88,7 @@ public interface SnapshotTableMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +112,7 @@ public interface SnapshotTableMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +125,7 @@ public interface SnapshotTableMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java index 3a0bc0eff4..23b3446913 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -34,13 +35,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.SnapshotTableRequest} */ -public final class SnapshotTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SnapshotTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.SnapshotTableRequest) SnapshotTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SnapshotTableRequest"); + } + // Use SnapshotTableRequest.newBuilder() to construct. - private SnapshotTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SnapshotTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -51,19 +64,13 @@ private SnapshotTableRequest() { description_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SnapshotTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableRequest_fieldAccessorTable @@ -77,6 +84,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -104,6 +112,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -136,6 +145,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object cluster_ = ""; + /** * * @@ -163,6 +173,7 @@ public java.lang.String getCluster() { return s; } } + /** * * @@ -195,6 +206,7 @@ public com.google.protobuf.ByteString getClusterBytes() { @SuppressWarnings("serial") private volatile java.lang.Object snapshotId_ = ""; + /** * * @@ -221,6 +233,7 @@ public java.lang.String getSnapshotId() { return s; } } + /** * * @@ -250,6 +263,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { public static final int TTL_FIELD_NUMBER = 4; private com.google.protobuf.Duration ttl_; + /** * * @@ -268,6 +282,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { public boolean hasTtl() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -286,6 +301,7 @@ public boolean hasTtl() { public com.google.protobuf.Duration getTtl() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } + /** * * @@ -307,6 +323,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; + /** * * @@ -330,6 +347,7 @@ public java.lang.String getDescription() { return s; } } + /** * * @@ -368,20 +386,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(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(cluster_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cluster_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cluster_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, cluster_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, snapshotId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, snapshotId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getTtl()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); } getUnknownFields().writeTo(output); } @@ -392,20 +410,20 @@ 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(cluster_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cluster_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cluster_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, cluster_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshotId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, snapshotId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snapshotId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, snapshotId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTtl()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -496,38 +514,38 @@ public static com.google.bigtable.admin.v2.SnapshotTableRequest parseFrom( public static com.google.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest 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); } @@ -550,10 +568,11 @@ 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; } + /** * * @@ -569,7 +588,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.SnapshotTableRequest} */ - 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.bigtable.admin.v2.SnapshotTableRequest) com.google.bigtable.admin.v2.SnapshotTableRequestOrBuilder { @@ -579,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableRequest_fieldAccessorTable @@ -593,14 +612,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) { - getTtlFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTtlFieldBuilder(); } } @@ -673,39 +692,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.SnapshotTableRequest 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.bigtable.admin.v2.SnapshotTableRequest) { @@ -788,7 +774,7 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTtlFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -818,6 +804,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -844,6 +831,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -870,6 +858,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -895,6 +884,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -916,6 +906,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -944,6 +935,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object cluster_ = ""; + /** * * @@ -970,6 +962,7 @@ public java.lang.String getCluster() { return (java.lang.String) ref; } } + /** * * @@ -996,6 +989,7 @@ public com.google.protobuf.ByteString getClusterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1021,6 +1015,7 @@ public Builder setCluster(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1042,6 +1037,7 @@ public Builder clearCluster() { onChanged(); return this; } + /** * * @@ -1070,6 +1066,7 @@ public Builder setClusterBytes(com.google.protobuf.ByteString value) { } private java.lang.Object snapshotId_ = ""; + /** * * @@ -1095,6 +1092,7 @@ public java.lang.String getSnapshotId() { return (java.lang.String) ref; } } + /** * * @@ -1120,6 +1118,7 @@ public com.google.protobuf.ByteString getSnapshotIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1144,6 +1143,7 @@ public Builder setSnapshotId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1164,6 +1164,7 @@ public Builder clearSnapshotId() { onChanged(); return this; } + /** * * @@ -1191,11 +1192,12 @@ public Builder setSnapshotIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Duration ttl_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_; + /** * * @@ -1213,6 +1215,7 @@ public Builder setSnapshotIdBytes(com.google.protobuf.ByteString value) { public boolean hasTtl() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -1234,6 +1237,7 @@ public com.google.protobuf.Duration getTtl() { return ttlBuilder_.getMessage(); } } + /** * * @@ -1259,6 +1263,7 @@ public Builder setTtl(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -1281,6 +1286,7 @@ public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -1311,6 +1317,7 @@ public Builder mergeTtl(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -1333,6 +1340,7 @@ public Builder clearTtl() { onChanged(); return this; } + /** * * @@ -1348,8 +1356,9 @@ public Builder clearTtl() { public com.google.protobuf.Duration.Builder getTtlBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getTtlFieldBuilder().getBuilder(); + return internalGetTtlFieldBuilder().getBuilder(); } + /** * * @@ -1369,6 +1378,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; } } + /** * * @@ -1381,14 +1391,14 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { * * .google.protobuf.Duration ttl = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getTtlFieldBuilder() { + internalGetTtlFieldBuilder() { if (ttlBuilder_ == null) { ttlBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); @@ -1398,6 +1408,7 @@ public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { } private java.lang.Object description_ = ""; + /** * * @@ -1420,6 +1431,7 @@ public java.lang.String getDescription() { return (java.lang.String) ref; } } + /** * * @@ -1442,6 +1454,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1463,6 +1476,7 @@ public Builder setDescription(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1480,6 +1494,7 @@ public Builder clearDescription() { onChanged(); return this; } + /** * * @@ -1503,17 +1518,6 @@ public Builder setDescriptionBytes(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.bigtable.admin.v2.SnapshotTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequestOrBuilder.java index 7b7b506b89..2934d11ce9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface SnapshotTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.SnapshotTableRequest) @@ -40,6 +42,7 @@ public interface SnapshotTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -73,6 +76,7 @@ public interface SnapshotTableRequestOrBuilder * @return The cluster. */ java.lang.String getCluster(); + /** * * @@ -105,6 +109,7 @@ public interface SnapshotTableRequestOrBuilder * @return The snapshotId. */ java.lang.String getSnapshotId(); + /** * * @@ -136,6 +141,7 @@ public interface SnapshotTableRequestOrBuilder * @return Whether the ttl field is set. */ boolean hasTtl(); + /** * * @@ -151,6 +157,7 @@ public interface SnapshotTableRequestOrBuilder * @return The ttl. */ com.google.protobuf.Duration getTtl(); + /** * * @@ -177,6 +184,7 @@ public interface SnapshotTableRequestOrBuilder * @return The description. */ java.lang.String getDescription(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWrites.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWrites.java index 13eb45997d..34d19e9d61 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWrites.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWrites.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.StandardReadRemoteWrites} */ -public final class StandardReadRemoteWrites extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StandardReadRemoteWrites extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.StandardReadRemoteWrites) StandardReadRemoteWritesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StandardReadRemoteWrites"); + } + // Use StandardReadRemoteWrites.newBuilder() to construct. - private StandardReadRemoteWrites(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StandardReadRemoteWrites(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private StandardReadRemoteWrites() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StandardReadRemoteWrites(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_StandardReadRemoteWrites_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_StandardReadRemoteWrites_fieldAccessorTable @@ -154,38 +161,38 @@ public static com.google.bigtable.admin.v2.StandardReadRemoteWrites parseFrom( public static com.google.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites 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); } @@ -209,10 +216,11 @@ 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; } + /** * * @@ -223,7 +231,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.StandardReadRemoteWrites} */ - 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.bigtable.admin.v2.StandardReadRemoteWrites) com.google.bigtable.admin.v2.StandardReadRemoteWritesOrBuilder { @@ -233,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_StandardReadRemoteWrites_fieldAccessorTable @@ -245,7 +253,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.StandardReadRemoteWrites.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -283,39 +291,6 @@ public com.google.bigtable.admin.v2.StandardReadRemoteWrites 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.bigtable.admin.v2.StandardReadRemoteWrites) { @@ -372,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.bigtable.admin.v2.StandardReadRemoteWrites) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWritesOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWritesOrBuilder.java index b280db40b5..13ab9e7191 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWritesOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StandardReadRemoteWritesOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface StandardReadRemoteWritesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.StandardReadRemoteWrites) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StorageType.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StorageType.java index 9b87ca5f9d..91de4a987d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StorageType.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/StorageType.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/common.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,6 +29,7 @@ * * Protobuf enum {@code google.bigtable.admin.v2.StorageType} */ +@com.google.protobuf.Generated public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { /** * @@ -62,6 +64,16 @@ public enum StorageType 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= */ "", + "StorageType"); + } + /** * * @@ -72,6 +84,7 @@ public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { * STORAGE_TYPE_UNSPECIFIED = 0; */ public static final int STORAGE_TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -82,6 +95,7 @@ public enum StorageType implements com.google.protobuf.ProtocolMessageEnum { * SSD = 1; */ public static final int SSD_VALUE = 1; + /** * * @@ -151,7 +165,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.bigtable.admin.v2.CommonProto.getDescriptor().getEnumTypes().get(0); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java index e759c26a8a..aeb1008982 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.Table} */ -public final class Table extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Table extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table) TableOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Table"); + } + // Use Table.newBuilder() to construct. - private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Table(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,12 +57,6 @@ private Table() { granularity_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Table(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_descriptor; @@ -70,7 +77,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_fieldAccessorTable @@ -114,6 +121,16 @@ public enum TimestampGranularity implements com.google.protobuf.ProtocolMessageE UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimestampGranularity"); + } + /** * * @@ -125,6 +142,7 @@ public enum TimestampGranularity implements com.google.protobuf.ProtocolMessageE * TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; */ public static final int TIMESTAMP_GRANULARITY_UNSPECIFIED_VALUE = 0; + /** * * @@ -194,7 +212,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.bigtable.admin.v2.Table.getDescriptor().getEnumTypes().get(0); } @@ -294,6 +312,16 @@ public enum View 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= */ "", + "View"); + } + /** * * @@ -304,6 +332,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * VIEW_UNSPECIFIED = 0; */ public static final int VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -314,6 +343,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * NAME_ONLY = 1; */ public static final int NAME_ONLY_VALUE = 1; + /** * * @@ -324,6 +354,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * SCHEMA_VIEW = 2; */ public static final int SCHEMA_VIEW_VALUE = 2; + /** * * @@ -335,6 +366,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * REPLICATION_VIEW = 3; */ public static final int REPLICATION_VIEW_VALUE = 3; + /** * * @@ -345,6 +377,7 @@ public enum View implements com.google.protobuf.ProtocolMessageEnum { * ENCRYPTION_VIEW = 5; */ public static final int ENCRYPTION_VIEW_VALUE = 5; + /** * * @@ -420,7 +453,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.bigtable.admin.v2.Table.getDescriptor().getEnumTypes().get(1); } @@ -464,6 +497,7 @@ public interface ClusterStateOrBuilder * @return The enum numeric value on the wire for replicationState. */ int getReplicationStateValue(); + /** * * @@ -495,6 +529,7 @@ public interface ClusterStateOrBuilder * */ java.util.List getEncryptionInfoList(); + /** * * @@ -511,6 +546,7 @@ public interface ClusterStateOrBuilder * */ com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index); + /** * * @@ -527,6 +563,7 @@ public interface ClusterStateOrBuilder * */ int getEncryptionInfoCount(); + /** * * @@ -544,6 +581,7 @@ public interface ClusterStateOrBuilder */ java.util.List getEncryptionInfoOrBuilderList(); + /** * * @@ -561,6 +599,7 @@ public interface ClusterStateOrBuilder */ com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(int index); } + /** * * @@ -570,13 +609,24 @@ public interface ClusterStateOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Table.ClusterState} */ - public static final class ClusterState extends com.google.protobuf.GeneratedMessageV3 + public static final class ClusterState extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table.ClusterState) ClusterStateOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClusterState"); + } + // Use ClusterState.newBuilder() to construct. - private ClusterState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ClusterState(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -585,19 +635,13 @@ private ClusterState() { encryptionInfo_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClusterState(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_ClusterState_fieldAccessorTable @@ -687,6 +731,16 @@ public enum ReplicationState 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= */ "", + "ReplicationState"); + } + /** * * @@ -697,6 +751,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * STATE_NOT_KNOWN = 0; */ public static final int STATE_NOT_KNOWN_VALUE = 0; + /** * * @@ -709,6 +764,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * INITIALIZING = 1; */ public static final int INITIALIZING_VALUE = 1; + /** * * @@ -720,6 +776,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * PLANNED_MAINTENANCE = 2; */ public static final int PLANNED_MAINTENANCE_VALUE = 2; + /** * * @@ -731,6 +788,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * UNPLANNED_MAINTENANCE = 3; */ public static final int UNPLANNED_MAINTENANCE_VALUE = 3; + /** * * @@ -743,6 +801,7 @@ public enum ReplicationState implements com.google.protobuf.ProtocolMessageEnum * READY = 4; */ public static final int READY_VALUE = 4; + /** * * @@ -822,7 +881,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.bigtable.admin.v2.Table.ClusterState.getDescriptor() .getEnumTypes() .get(0); @@ -852,6 +911,7 @@ private ReplicationState(int value) { public static final int REPLICATION_STATE_FIELD_NUMBER = 1; private int replicationState_ = 0; + /** * * @@ -869,6 +929,7 @@ private ReplicationState(int value) { public int getReplicationStateValue() { return replicationState_; } + /** * * @@ -896,6 +957,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState getRepli @SuppressWarnings("serial") private java.util.List encryptionInfo_; + /** * * @@ -915,6 +977,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState getRepli public java.util.List getEncryptionInfoList() { return encryptionInfo_; } + /** * * @@ -935,6 +998,7 @@ public java.util.List getEncryption getEncryptionInfoOrBuilderList() { return encryptionInfo_; } + /** * * @@ -954,6 +1018,7 @@ public java.util.List getEncryption public int getEncryptionInfoCount() { return encryptionInfo_.size(); } + /** * * @@ -973,6 +1038,7 @@ public int getEncryptionInfoCount() { public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index) { return encryptionInfo_.get(index); } + /** * * @@ -1110,38 +1176,38 @@ public static com.google.bigtable.admin.v2.Table.ClusterState parseFrom( public static com.google.bigtable.admin.v2.Table.ClusterState 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.bigtable.admin.v2.Table.ClusterState 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.bigtable.admin.v2.Table.ClusterState 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.bigtable.admin.v2.Table.ClusterState 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.bigtable.admin.v2.Table.ClusterState 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.bigtable.admin.v2.Table.ClusterState 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); } @@ -1164,11 +1230,11 @@ 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; } + /** * * @@ -1178,8 +1244,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Table.ClusterState} */ - 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.bigtable.admin.v2.Table.ClusterState) com.google.bigtable.admin.v2.Table.ClusterStateOrBuilder { @@ -1189,7 +1254,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_ClusterState_fieldAccessorTable @@ -1201,7 +1266,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Table.ClusterState.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1272,41 +1337,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Table.ClusterState resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.Table.ClusterState) { @@ -1342,8 +1372,8 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table.ClusterState other) encryptionInfo_ = other.encryptionInfo_; bitField0_ = (bitField0_ & ~0x00000002); encryptionInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEncryptionInfoFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEncryptionInfoFieldBuilder() : null; } else { encryptionInfoBuilder_.addAllMessages(other.encryptionInfo_); @@ -1415,6 +1445,7 @@ public Builder mergeFrom( private int bitField0_; private int replicationState_ = 0; + /** * * @@ -1432,6 +1463,7 @@ public Builder mergeFrom( public int getReplicationStateValue() { return replicationState_; } + /** * * @@ -1452,6 +1484,7 @@ public Builder setReplicationStateValue(int value) { onChanged(); return this; } + /** * * @@ -1475,6 +1508,7 @@ public Builder setReplicationStateValue(int value) { ? com.google.bigtable.admin.v2.Table.ClusterState.ReplicationState.UNRECOGNIZED : result; } + /** * * @@ -1499,6 +1533,7 @@ public Builder setReplicationState( onChanged(); return this; } + /** * * @@ -1530,7 +1565,7 @@ private void ensureEncryptionInfoIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder> @@ -1558,6 +1593,7 @@ public java.util.List getEncryption return encryptionInfoBuilder_.getMessageList(); } } + /** * * @@ -1580,6 +1616,7 @@ public int getEncryptionInfoCount() { return encryptionInfoBuilder_.getCount(); } } + /** * * @@ -1602,6 +1639,7 @@ public com.google.bigtable.admin.v2.EncryptionInfo getEncryptionInfo(int index) return encryptionInfoBuilder_.getMessage(index); } } + /** * * @@ -1631,6 +1669,7 @@ public Builder setEncryptionInfo( } return this; } + /** * * @@ -1657,6 +1696,7 @@ public Builder setEncryptionInfo( } return this; } + /** * * @@ -1685,6 +1725,7 @@ public Builder addEncryptionInfo(com.google.bigtable.admin.v2.EncryptionInfo val } return this; } + /** * * @@ -1714,6 +1755,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1740,6 +1782,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1766,6 +1809,7 @@ public Builder addEncryptionInfo( } return this; } + /** * * @@ -1792,6 +1836,7 @@ public Builder addAllEncryptionInfo( } return this; } + /** * * @@ -1817,6 +1862,7 @@ public Builder clearEncryptionInfo() { } return this; } + /** * * @@ -1842,6 +1888,7 @@ public Builder removeEncryptionInfo(int index) { } return this; } + /** * * @@ -1859,8 +1906,9 @@ public Builder removeEncryptionInfo(int index) { */ public com.google.bigtable.admin.v2.EncryptionInfo.Builder getEncryptionInfoBuilder( int index) { - return getEncryptionInfoFieldBuilder().getBuilder(index); + return internalGetEncryptionInfoFieldBuilder().getBuilder(index); } + /** * * @@ -1884,6 +1932,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB return encryptionInfoBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1907,6 +1956,7 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB return java.util.Collections.unmodifiableList(encryptionInfo_); } } + /** * * @@ -1923,9 +1973,10 @@ public com.google.bigtable.admin.v2.EncryptionInfoOrBuilder getEncryptionInfoOrB * */ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuilder() { - return getEncryptionInfoFieldBuilder() + return internalGetEncryptionInfoFieldBuilder() .addBuilder(com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance()); } + /** * * @@ -1943,9 +1994,10 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuil */ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuilder( int index) { - return getEncryptionInfoFieldBuilder() + return internalGetEncryptionInfoFieldBuilder() .addBuilder(index, com.google.bigtable.admin.v2.EncryptionInfo.getDefaultInstance()); } + /** * * @@ -1963,17 +2015,17 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuil */ public java.util.List getEncryptionInfoBuilderList() { - return getEncryptionInfoFieldBuilder().getBuilderList(); + return internalGetEncryptionInfoFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder> - getEncryptionInfoFieldBuilder() { + internalGetEncryptionInfoFieldBuilder() { if (encryptionInfoBuilder_ == null) { encryptionInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.admin.v2.EncryptionInfo, com.google.bigtable.admin.v2.EncryptionInfo.Builder, com.google.bigtable.admin.v2.EncryptionInfoOrBuilder>( @@ -1986,18 +2038,6 @@ public com.google.bigtable.admin.v2.EncryptionInfo.Builder addEncryptionInfoBuil return encryptionInfoBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Table.ClusterState) } @@ -2059,8 +2099,8 @@ public interface AutomatedBackupPolicyOrBuilder * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2070,12 +2110,13 @@ public interface AutomatedBackupPolicyOrBuilder * @return Whether the retentionPeriod field is set. */ boolean hasRetentionPeriod(); + /** * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2085,12 +2126,13 @@ public interface AutomatedBackupPolicyOrBuilder * @return The retentionPeriod. */ com.google.protobuf.Duration getRetentionPeriod(); + /** * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2103,43 +2145,121 @@ public interface AutomatedBackupPolicyOrBuilder * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return Whether the frequency field is set. */ boolean hasFrequency(); + /** * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return The frequency. */ com.google.protobuf.Duration getFrequency(); + /** * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder(); + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the locations. + */ + java.util.List getLocationsList(); + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of locations. + */ + int getLocationsCount(); + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + java.lang.String getLocations(int index); + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + com.google.protobuf.ByteString getLocationsBytes(int index); } + /** * * @@ -2149,22 +2269,29 @@ public interface AutomatedBackupPolicyOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Table.AutomatedBackupPolicy} */ - public static final class AutomatedBackupPolicy extends com.google.protobuf.GeneratedMessageV3 + public static final class AutomatedBackupPolicy extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Table.AutomatedBackupPolicy) AutomatedBackupPolicyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutomatedBackupPolicy"); + } + // Use AutomatedBackupPolicy.newBuilder() to construct. - private AutomatedBackupPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AutomatedBackupPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private AutomatedBackupPolicy() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AutomatedBackupPolicy(); + private AutomatedBackupPolicy() { + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -2173,7 +2300,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_fieldAccessorTable @@ -2185,12 +2312,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int RETENTION_PERIOD_FIELD_NUMBER = 1; private com.google.protobuf.Duration retentionPeriod_; + /** * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2203,12 +2331,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2223,12 +2352,13 @@ public com.google.protobuf.Duration getRetentionPeriod() { ? com.google.protobuf.Duration.getDefaultInstance() : retentionPeriod_; } + /** * * *
      -     * Required. How long the automated backups should be retained. The only
      -     * supported value at this time is 3 days.
      +     * Required. How long the automated backups should be retained. Values must
      +     * be at least 3 days and at most 90 days.
            * 
      * * @@ -2244,16 +2374,16 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { public static final int FREQUENCY_FIELD_NUMBER = 2; private com.google.protobuf.Duration frequency_; + /** * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return Whether the frequency field is set. */ @@ -2261,16 +2391,16 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { public boolean hasFrequency() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return The frequency. */ @@ -2278,22 +2408,114 @@ public boolean hasFrequency() { public com.google.protobuf.Duration getFrequency() { return frequency_ == null ? com.google.protobuf.Duration.getDefaultInstance() : frequency_; } + /** * * *
      -     * Required. How frequently automated backups should occur. The only
      -     * supported value at this time is 24 hours.
      +     * How frequently automated backups should occur. The only supported value
      +     * at this time is 24 hours. An undefined frequency is treated as 24 hours.
            * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder() { return frequency_ == null ? com.google.protobuf.Duration.getDefaultInstance() : frequency_; } + public static final int LOCATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList locations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the locations. + */ + public com.google.protobuf.ProtocolStringList getLocationsList() { + return locations_; + } + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of locations. + */ + public int getLocationsCount() { + return locations_.size(); + } + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + public java.lang.String getLocations(int index) { + return locations_.get(index); + } + + /** + * + * + *
      +     * Optional. A list of Cloud Bigtable zones where automated backups are
      +     * allowed to be created. If empty, automated backups will be created in all
      +     * zones of the instance. Locations are in the format
      +     * `projects/{project}/locations/{zone}`.
      +     * This field can only set for tables in Enterprise Plus instances.
      +     * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + public com.google.protobuf.ByteString getLocationsBytes(int index) { + return locations_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2314,6 +2536,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getFrequency()); } + for (int i = 0; i < locations_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, locations_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2329,6 +2554,14 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFrequency()); } + { + int dataSize = 0; + for (int i = 0; i < locations_.size(); i++) { + dataSize += computeStringSizeNoTag(locations_.getRaw(i)); + } + size += dataSize; + size += 1 * getLocationsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2353,6 +2586,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFrequency()) { if (!getFrequency().equals(other.getFrequency())) return false; } + if (!getLocationsList().equals(other.getLocationsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2372,6 +2606,10 @@ public int hashCode() { hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; hash = (53 * hash) + getFrequency().hashCode(); } + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2414,38 +2652,38 @@ public static com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy parseFrom public static com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy 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.bigtable.admin.v2.Table.AutomatedBackupPolicy 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.bigtable.admin.v2.Table.AutomatedBackupPolicy 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.bigtable.admin.v2.Table.AutomatedBackupPolicy 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.bigtable.admin.v2.Table.AutomatedBackupPolicy 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.bigtable.admin.v2.Table.AutomatedBackupPolicy 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); } @@ -2469,11 +2707,11 @@ 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; } + /** * * @@ -2483,8 +2721,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Table.AutomatedBackupPolicy} */ - 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.bigtable.admin.v2.Table.AutomatedBackupPolicy) com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder { @@ -2494,7 +2731,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_fieldAccessorTable @@ -2508,15 +2745,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) { - getRetentionPeriodFieldBuilder(); - getFrequencyFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRetentionPeriodFieldBuilder(); + internalGetFrequencyFieldBuilder(); } } @@ -2534,6 +2771,7 @@ public Builder clear() { frequencyBuilder_.dispose(); frequencyBuilder_ = null; } + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2580,44 +2818,13 @@ private void buildPartial0(com.google.bigtable.admin.v2.Table.AutomatedBackupPol result.frequency_ = frequencyBuilder_ == null ? frequency_ : frequencyBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + locations_.makeImmutable(); + result.locations_ = locations_; + } 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.bigtable.admin.v2.Table.AutomatedBackupPolicy) { @@ -2637,6 +2844,16 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table.AutomatedBackupPolic if (other.hasFrequency()) { mergeFrequency(other.getFrequency()); } + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ |= 0x00000004; + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2666,16 +2883,24 @@ public Builder mergeFrom( case 10: { input.readMessage( - getRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); + internalGetRetentionPeriodFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getFrequencyFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFrequencyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLocationsIsMutable(); + locations_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2696,17 +2921,18 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration retentionPeriod_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retentionPeriodBuilder_; + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2718,12 +2944,13 @@ public Builder mergeFrom( public boolean hasRetentionPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2741,12 +2968,13 @@ public com.google.protobuf.Duration getRetentionPeriod() { return retentionPeriodBuilder_.getMessage(); } } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2766,12 +2994,13 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2788,12 +3017,13 @@ public Builder setRetentionPeriod(com.google.protobuf.Duration.Builder builderFo onChanged(); return this; } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2818,12 +3048,13 @@ public Builder mergeRetentionPeriod(com.google.protobuf.Duration value) { } return this; } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2840,12 +3071,13 @@ public Builder clearRetentionPeriod() { onChanged(); return this; } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2855,14 +3087,15 @@ public Builder clearRetentionPeriod() { public com.google.protobuf.Duration.Builder getRetentionPeriodBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRetentionPeriodFieldBuilder().getBuilder(); + return internalGetRetentionPeriodFieldBuilder().getBuilder(); } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * @@ -2878,26 +3111,27 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { : retentionPeriod_; } } + /** * * *
      -       * Required. How long the automated backups should be retained. The only
      -       * supported value at this time is 3 days.
      +       * Required. How long the automated backups should be retained. Values must
      +       * be at least 3 days and at most 90 days.
              * 
      * * * .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getRetentionPeriodFieldBuilder() { + internalGetRetentionPeriodFieldBuilder() { if (retentionPeriodBuilder_ == null) { retentionPeriodBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -2908,37 +3142,37 @@ public com.google.protobuf.DurationOrBuilder getRetentionPeriodOrBuilder() { } private com.google.protobuf.Duration frequency_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> frequencyBuilder_; + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return Whether the frequency field is set. */ public boolean hasFrequency() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; * * @return The frequency. */ @@ -2951,16 +3185,16 @@ public com.google.protobuf.Duration getFrequency() { return frequencyBuilder_.getMessage(); } } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public Builder setFrequency(com.google.protobuf.Duration value) { if (frequencyBuilder_ == null) { @@ -2975,16 +3209,16 @@ public Builder setFrequency(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public Builder setFrequency(com.google.protobuf.Duration.Builder builderForValue) { if (frequencyBuilder_ == null) { @@ -2996,16 +3230,16 @@ public Builder setFrequency(com.google.protobuf.Duration.Builder builderForValue onChanged(); return this; } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public Builder mergeFrequency(com.google.protobuf.Duration value) { if (frequencyBuilder_ == null) { @@ -3025,16 +3259,16 @@ public Builder mergeFrequency(com.google.protobuf.Duration value) { } return this; } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public Builder clearFrequency() { bitField0_ = (bitField0_ & ~0x00000002); @@ -3046,32 +3280,32 @@ public Builder clearFrequency() { onChanged(); return this; } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public com.google.protobuf.Duration.Builder getFrequencyBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFrequencyFieldBuilder().getBuilder(); + return internalGetFrequencyFieldBuilder().getBuilder(); } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ public com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder() { if (frequencyBuilder_ != null) { @@ -3082,25 +3316,25 @@ public com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder() { : frequency_; } } + /** * * *
      -       * Required. How frequently automated backups should occur. The only
      -       * supported value at this time is 24 hours.
      +       * How frequently automated backups should occur. The only supported value
      +       * at this time is 24 hours. An undefined frequency is treated as 24 hours.
              * 
      * - * .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * .google.protobuf.Duration frequency = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getFrequencyFieldBuilder() { + internalGetFrequencyFieldBuilder() { if (frequencyBuilder_ == null) { frequencyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -3110,16 +3344,241 @@ public com.google.protobuf.DurationOrBuilder getFrequencyOrBuilder() { return frequencyBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.protobuf.LazyStringArrayList locations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLocationsIsMutable() { + if (!locations_.isModifiable()) { + locations_ = new com.google.protobuf.LazyStringArrayList(locations_); + } + bitField0_ |= 0x00000004; } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the locations. + */ + public com.google.protobuf.ProtocolStringList getLocationsList() { + locations_.makeImmutable(); + return locations_; + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of locations. + */ + public int getLocationsCount() { + return locations_.size(); + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + public java.lang.String getLocations(int index) { + return locations_.get(index); + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + public com.google.protobuf.ByteString getLocationsBytes(int index) { + return locations_.getByteString(index); + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The locations to set. + * @return This builder for chaining. + */ + public Builder setLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The locations to add. + * @return This builder for chaining. + */ + public Builder addLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The locations to add. + * @return This builder for chaining. + */ + public Builder addAllLocations(java.lang.Iterable values) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLocations() { + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. A list of Cloud Bigtable zones where automated backups are
      +       * allowed to be created. If empty, automated backups will be created in all
      +       * zones of the instance. Locations are in the format
      +       * `projects/{project}/locations/{zone}`.
      +       * This field can only set for tables in Enterprise Plus instances.
      +       * 
      + * + * + * repeated string locations = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the locations to add. + * @return This builder for chaining. + */ + public Builder addLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLocationsIsMutable(); + locations_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Table.AutomatedBackupPolicy) @@ -3191,6 +3650,7 @@ public enum AutomatedBackupConfigCase private AutomatedBackupConfigCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -3225,6 +3685,7 @@ public AutomatedBackupConfigCase getAutomatedBackupConfigCase() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -3250,6 +3711,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -3311,6 +3773,7 @@ private static final class ClusterStatesDefaultEntryHolder { public int getClusterStatesCount() { return internalGetClusterStates().getMap().size(); } + /** * * @@ -3333,6 +3796,7 @@ public boolean containsClusterStates(java.lang.String key) { } return internalGetClusterStates().getMap().containsKey(key); } + /** Use {@link #getClusterStatesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -3340,6 +3804,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStates() { return getClusterStatesMap(); } + /** * * @@ -3360,6 +3825,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStatesMap() { return internalGetClusterStates().getMap(); } + /** * * @@ -3387,6 +3853,7 @@ public boolean containsClusterStates(java.lang.String key) { internalGetClusterStates().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -3448,6 +3915,7 @@ private static final class ColumnFamiliesDefaultEntryHolder { public int getColumnFamiliesCount() { return internalGetColumnFamilies().getMap().size(); } + /** * * @@ -3465,6 +3933,7 @@ public boolean containsColumnFamilies(java.lang.String key) { } return internalGetColumnFamilies().getMap().containsKey(key); } + /** Use {@link #getColumnFamiliesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -3472,6 +3941,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamilies() { return getColumnFamiliesMap(); } + /** * * @@ -3487,6 +3957,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamiliesMap() { return internalGetColumnFamilies().getMap(); } + /** * * @@ -3509,6 +3980,7 @@ public boolean containsColumnFamilies(java.lang.String key) { internalGetColumnFamilies().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -3534,6 +4006,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrThrow(java.l public static final int GRANULARITY_FIELD_NUMBER = 4; private int granularity_ = 0; + /** * * @@ -3554,6 +4027,7 @@ public com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrThrow(java.l public int getGranularityValue() { return granularity_; } + /** * * @@ -3581,6 +4055,7 @@ public com.google.bigtable.admin.v2.Table.TimestampGranularity getGranularity() public static final int RESTORE_INFO_FIELD_NUMBER = 6; private com.google.bigtable.admin.v2.RestoreInfo restoreInfo_; + /** * * @@ -3599,6 +4074,7 @@ public com.google.bigtable.admin.v2.Table.TimestampGranularity getGranularity() public boolean hasRestoreInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3619,6 +4095,7 @@ public com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo() { ? com.google.bigtable.admin.v2.RestoreInfo.getDefaultInstance() : restoreInfo_; } + /** * * @@ -3640,6 +4117,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder public static final int CHANGE_STREAM_CONFIG_FIELD_NUMBER = 8; private com.google.bigtable.admin.v2.ChangeStreamConfig changeStreamConfig_; + /** * * @@ -3657,6 +4135,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder public boolean hasChangeStreamConfig() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3676,6 +4155,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig() { ? com.google.bigtable.admin.v2.ChangeStreamConfig.getDefaultInstance() : changeStreamConfig_; } + /** * * @@ -3696,6 +4176,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder getChangeStreamC public static final int DELETION_PROTECTION_FIELD_NUMBER = 9; private boolean deletionProtection_ = false; + /** * * @@ -3720,6 +4201,7 @@ public boolean getDeletionProtection() { } public static final int AUTOMATED_BACKUP_POLICY_FIELD_NUMBER = 13; + /** * * @@ -3737,6 +4219,7 @@ public boolean getDeletionProtection() { public boolean hasAutomatedBackupPolicy() { return automatedBackupConfigCase_ == 13; } + /** * * @@ -3757,6 +4240,7 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack } return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } + /** * * @@ -3777,6 +4261,296 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } + public static final int TIERED_STORAGE_CONFIG_FIELD_NUMBER = 14; + private com.google.bigtable.admin.v2.TieredStorageConfig tieredStorageConfig_; + + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return Whether the tieredStorageConfig field is set. + */ + @java.lang.Override + public boolean hasTieredStorageConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return The tieredStorageConfig. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageConfig getTieredStorageConfig() { + return tieredStorageConfig_ == null + ? com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance() + : tieredStorageConfig_; + } + + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder + getTieredStorageConfigOrBuilder() { + return tieredStorageConfig_ == null + ? com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance() + : tieredStorageConfig_; + } + + public static final int ROW_KEY_SCHEMA_FIELD_NUMBER = 15; + private com.google.bigtable.admin.v2.Type.Struct rowKeySchema_; + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return Whether the rowKeySchema field is set. + */ + @java.lang.Override + public boolean hasRowKeySchema() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return The rowKeySchema. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct getRowKeySchema() { + return rowKeySchema_ == null + ? com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance() + : rowKeySchema_; + } + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.StructOrBuilder getRowKeySchemaOrBuilder() { + return rowKeySchema_ == null + ? com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance() + : rowKeySchema_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3791,12 +4565,12 @@ 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, internalGetClusterStates(), ClusterStatesDefaultEntryHolder.defaultEntry, 2); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetColumnFamilies(), ColumnFamiliesDefaultEntryHolder.defaultEntry, 3); if (granularity_ != com.google.bigtable.admin.v2.Table.TimestampGranularity.TIMESTAMP_GRANULARITY_UNSPECIFIED @@ -3816,6 +4590,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 13, (com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) automatedBackupConfig_); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getTieredStorageConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(15, getRowKeySchema()); + } getUnknownFields().writeTo(output); } @@ -3825,8 +4605,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 : internalGetClusterStates().getMap().entrySet()) { @@ -3871,6 +4651,13 @@ public int getSerializedSize() { 13, (com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy) automatedBackupConfig_); } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTieredStorageConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getRowKeySchema()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3899,6 +4686,14 @@ public boolean equals(final java.lang.Object obj) { if (!getChangeStreamConfig().equals(other.getChangeStreamConfig())) return false; } if (getDeletionProtection() != other.getDeletionProtection()) return false; + if (hasTieredStorageConfig() != other.hasTieredStorageConfig()) return false; + if (hasTieredStorageConfig()) { + if (!getTieredStorageConfig().equals(other.getTieredStorageConfig())) return false; + } + if (hasRowKeySchema() != other.hasRowKeySchema()) return false; + if (hasRowKeySchema()) { + if (!getRowKeySchema().equals(other.getRowKeySchema())) return false; + } if (!getAutomatedBackupConfigCase().equals(other.getAutomatedBackupConfigCase())) return false; switch (automatedBackupConfigCase_) { case 13: @@ -3940,6 +4735,14 @@ public int hashCode() { } hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + if (hasTieredStorageConfig()) { + hash = (37 * hash) + TIERED_STORAGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTieredStorageConfig().hashCode(); + } + if (hasRowKeySchema()) { + hash = (37 * hash) + ROW_KEY_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getRowKeySchema().hashCode(); + } switch (automatedBackupConfigCase_) { case 13: hash = (37 * hash) + AUTOMATED_BACKUP_POLICY_FIELD_NUMBER; @@ -3989,38 +4792,38 @@ public static com.google.bigtable.admin.v2.Table parseFrom( public static com.google.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table 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); } @@ -4043,10 +4846,11 @@ 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; } + /** * * @@ -4057,7 +4861,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.Table} */ - 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.bigtable.admin.v2.Table) com.google.bigtable.admin.v2.TableOrBuilder { @@ -4093,7 +4897,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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_fieldAccessorTable @@ -4107,15 +4911,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) { - getRestoreInfoFieldBuilder(); - getChangeStreamConfigFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRestoreInfoFieldBuilder(); + internalGetChangeStreamConfigFieldBuilder(); + internalGetTieredStorageConfigFieldBuilder(); + internalGetRowKeySchemaFieldBuilder(); } } @@ -4141,6 +4947,16 @@ public Builder clear() { if (automatedBackupPolicyBuilder_ != null) { automatedBackupPolicyBuilder_.clear(); } + tieredStorageConfig_ = null; + if (tieredStorageConfigBuilder_ != null) { + tieredStorageConfigBuilder_.dispose(); + tieredStorageConfigBuilder_ = null; + } + rowKeySchema_ = null; + if (rowKeySchemaBuilder_ != null) { + rowKeySchemaBuilder_.dispose(); + rowKeySchemaBuilder_ = null; + } automatedBackupConfigCase_ = 0; automatedBackupConfig_ = null; return this; @@ -4209,6 +5025,18 @@ private void buildPartial0(com.google.bigtable.admin.v2.Table result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.deletionProtection_ = deletionProtection_; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.tieredStorageConfig_ = + tieredStorageConfigBuilder_ == null + ? tieredStorageConfig_ + : tieredStorageConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.rowKeySchema_ = + rowKeySchemaBuilder_ == null ? rowKeySchema_ : rowKeySchemaBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -4220,39 +5048,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.Table 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.bigtable.admin.v2.Table) { @@ -4286,6 +5081,12 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table other) { if (other.getDeletionProtection() != false) { setDeletionProtection(other.getDeletionProtection()); } + if (other.hasTieredStorageConfig()) { + mergeTieredStorageConfig(other.getTieredStorageConfig()); + } + if (other.hasRowKeySchema()) { + mergeRowKeySchema(other.getRowKeySchema()); + } switch (other.getAutomatedBackupConfigCase()) { case AUTOMATED_BACKUP_POLICY: { @@ -4365,14 +5166,15 @@ public Builder mergeFrom( } // case 32 case 50: { - input.readMessage(getRestoreInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRestoreInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 case 66: { input.readMessage( - getChangeStreamConfigFieldBuilder().getBuilder(), extensionRegistry); + internalGetChangeStreamConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 66 @@ -4385,10 +5187,24 @@ public Builder mergeFrom( case 106: { input.readMessage( - getAutomatedBackupPolicyFieldBuilder().getBuilder(), extensionRegistry); + internalGetAutomatedBackupPolicyFieldBuilder().getBuilder(), extensionRegistry); automatedBackupConfigCase_ = 13; break; } // case 106 + case 114: + { + input.readMessage( + internalGetTieredStorageConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetRowKeySchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4423,6 +5239,7 @@ public Builder clearAutomatedBackupConfig() { private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -4447,6 +5264,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -4471,6 +5289,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4494,6 +5313,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4513,6 +5333,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -4558,7 +5379,8 @@ public com.google.bigtable.admin.v2.Table.ClusterState build( defaultEntry() { return ClusterStatesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ClusterStatesConverter clusterStatesConverter = new ClusterStatesConverter(); @@ -4599,6 +5421,7 @@ public com.google.bigtable.admin.v2.Table.ClusterState build( public int getClusterStatesCount() { return internalGetClusterStates().ensureBuilderMap().size(); } + /** * * @@ -4621,6 +5444,7 @@ public boolean containsClusterStates(java.lang.String key) { } return internalGetClusterStates().ensureBuilderMap().containsKey(key); } + /** Use {@link #getClusterStatesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -4628,6 +5452,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStates() { return getClusterStatesMap(); } + /** * * @@ -4648,6 +5473,7 @@ public boolean containsClusterStates(java.lang.String key) { getClusterStatesMap() { return internalGetClusterStates().getImmutableMap(); } + /** * * @@ -4675,6 +5501,7 @@ public boolean containsClusterStates(java.lang.String key) { map = internalGetMutableClusterStates().ensureBuilderMap(); return map.containsKey(key) ? clusterStatesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -4709,6 +5536,7 @@ public Builder clearClusterStates() { internalGetMutableClusterStates().clear(); return this; } + /** * * @@ -4731,6 +5559,7 @@ public Builder removeClusterStates(java.lang.String key) { internalGetMutableClusterStates().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map @@ -4738,6 +5567,7 @@ public Builder removeClusterStates(java.lang.String key) { bitField0_ |= 0x00000002; return internalGetMutableClusterStates().ensureMessageMap(); } + /** * * @@ -4765,6 +5595,7 @@ public Builder putClusterStates( bitField0_ |= 0x00000002; return this; } + /** * * @@ -4792,6 +5623,7 @@ public Builder putAllClusterStates( bitField0_ |= 0x00000002; return this; } + /** * * @@ -4843,7 +5675,8 @@ public com.google.bigtable.admin.v2.ColumnFamily build( defaultEntry() { return ColumnFamiliesDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ColumnFamiliesConverter columnFamiliesConverter = new ColumnFamiliesConverter(); @@ -4884,6 +5717,7 @@ public com.google.bigtable.admin.v2.ColumnFamily build( public int getColumnFamiliesCount() { return internalGetColumnFamilies().ensureBuilderMap().size(); } + /** * * @@ -4901,6 +5735,7 @@ public boolean containsColumnFamilies(java.lang.String key) { } return internalGetColumnFamilies().ensureBuilderMap().containsKey(key); } + /** Use {@link #getColumnFamiliesMap()} instead. */ @java.lang.Override @java.lang.Deprecated @@ -4908,6 +5743,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamilies() { return getColumnFamiliesMap(); } + /** * * @@ -4923,6 +5759,7 @@ public boolean containsColumnFamilies(java.lang.String key) { getColumnFamiliesMap() { return internalGetColumnFamilies().getImmutableMap(); } + /** * * @@ -4945,6 +5782,7 @@ public boolean containsColumnFamilies(java.lang.String key) { internalGetMutableColumnFamilies().ensureBuilderMap(); return map.containsKey(key) ? columnFamiliesConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -4974,6 +5812,7 @@ public Builder clearColumnFamilies() { internalGetMutableColumnFamilies().clear(); return this; } + /** * * @@ -4991,6 +5830,7 @@ public Builder removeColumnFamilies(java.lang.String key) { internalGetMutableColumnFamilies().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map @@ -4998,6 +5838,7 @@ public Builder removeColumnFamilies(java.lang.String key) { bitField0_ |= 0x00000004; return internalGetMutableColumnFamilies().ensureMessageMap(); } + /** * * @@ -5020,6 +5861,7 @@ public Builder putColumnFamilies( bitField0_ |= 0x00000004; return this; } + /** * * @@ -5042,6 +5884,7 @@ public Builder putAllColumnFamilies( bitField0_ |= 0x00000004; return this; } + /** * * @@ -5069,6 +5912,7 @@ public com.google.bigtable.admin.v2.ColumnFamily.Builder putColumnFamiliesBuilde } private int granularity_ = 0; + /** * * @@ -5089,6 +5933,7 @@ public com.google.bigtable.admin.v2.ColumnFamily.Builder putColumnFamiliesBuilde public int getGranularityValue() { return granularity_; } + /** * * @@ -5112,6 +5957,7 @@ public Builder setGranularityValue(int value) { onChanged(); return this; } + /** * * @@ -5136,6 +5982,7 @@ public com.google.bigtable.admin.v2.Table.TimestampGranularity getGranularity() ? com.google.bigtable.admin.v2.Table.TimestampGranularity.UNRECOGNIZED : result; } + /** * * @@ -5162,6 +6009,7 @@ public Builder setGranularity(com.google.bigtable.admin.v2.Table.TimestampGranul onChanged(); return this; } + /** * * @@ -5186,11 +6034,12 @@ public Builder clearGranularity() { } private com.google.bigtable.admin.v2.RestoreInfo restoreInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.RestoreInfo, com.google.bigtable.admin.v2.RestoreInfo.Builder, com.google.bigtable.admin.v2.RestoreInfoOrBuilder> restoreInfoBuilder_; + /** * * @@ -5208,6 +6057,7 @@ public Builder clearGranularity() { public boolean hasRestoreInfo() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -5231,6 +6081,7 @@ public com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo() { return restoreInfoBuilder_.getMessage(); } } + /** * * @@ -5256,6 +6107,7 @@ public Builder setRestoreInfo(com.google.bigtable.admin.v2.RestoreInfo value) { onChanged(); return this; } + /** * * @@ -5279,6 +6131,7 @@ public Builder setRestoreInfo( onChanged(); return this; } + /** * * @@ -5309,6 +6162,7 @@ public Builder mergeRestoreInfo(com.google.bigtable.admin.v2.RestoreInfo value) } return this; } + /** * * @@ -5331,6 +6185,7 @@ public Builder clearRestoreInfo() { onChanged(); return this; } + /** * * @@ -5346,8 +6201,9 @@ public Builder clearRestoreInfo() { public com.google.bigtable.admin.v2.RestoreInfo.Builder getRestoreInfoBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getRestoreInfoFieldBuilder().getBuilder(); + return internalGetRestoreInfoFieldBuilder().getBuilder(); } + /** * * @@ -5369,6 +6225,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder : restoreInfo_; } } + /** * * @@ -5381,14 +6238,14 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder * .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; *
      */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.RestoreInfo, com.google.bigtable.admin.v2.RestoreInfo.Builder, com.google.bigtable.admin.v2.RestoreInfoOrBuilder> - getRestoreInfoFieldBuilder() { + internalGetRestoreInfoFieldBuilder() { if (restoreInfoBuilder_ == null) { restoreInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.RestoreInfo, com.google.bigtable.admin.v2.RestoreInfo.Builder, com.google.bigtable.admin.v2.RestoreInfoOrBuilder>( @@ -5399,11 +6256,12 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder } private com.google.bigtable.admin.v2.ChangeStreamConfig changeStreamConfig_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ChangeStreamConfig, com.google.bigtable.admin.v2.ChangeStreamConfig.Builder, com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder> changeStreamConfigBuilder_; + /** * * @@ -5420,6 +6278,7 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder public boolean hasChangeStreamConfig() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -5442,6 +6301,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig() { return changeStreamConfigBuilder_.getMessage(); } } + /** * * @@ -5466,6 +6326,7 @@ public Builder setChangeStreamConfig(com.google.bigtable.admin.v2.ChangeStreamCo onChanged(); return this; } + /** * * @@ -5488,6 +6349,7 @@ public Builder setChangeStreamConfig( onChanged(); return this; } + /** * * @@ -5518,6 +6380,7 @@ public Builder mergeChangeStreamConfig(com.google.bigtable.admin.v2.ChangeStream } return this; } + /** * * @@ -5539,6 +6402,7 @@ public Builder clearChangeStreamConfig() { onChanged(); return this; } + /** * * @@ -5553,8 +6417,9 @@ public Builder clearChangeStreamConfig() { public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamConfigBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getChangeStreamConfigFieldBuilder().getBuilder(); + return internalGetChangeStreamConfigFieldBuilder().getBuilder(); } + /** * * @@ -5576,6 +6441,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo : changeStreamConfig_; } } + /** * * @@ -5587,14 +6453,14 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo * * .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ChangeStreamConfig, com.google.bigtable.admin.v2.ChangeStreamConfig.Builder, com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder> - getChangeStreamConfigFieldBuilder() { + internalGetChangeStreamConfigFieldBuilder() { if (changeStreamConfigBuilder_ == null) { changeStreamConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.ChangeStreamConfig, com.google.bigtable.admin.v2.ChangeStreamConfig.Builder, com.google.bigtable.admin.v2.ChangeStreamConfigOrBuilder>( @@ -5605,6 +6471,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo } private boolean deletionProtection_; + /** * * @@ -5627,6 +6494,7 @@ public com.google.bigtable.admin.v2.ChangeStreamConfig.Builder getChangeStreamCo public boolean getDeletionProtection() { return deletionProtection_; } + /** * * @@ -5653,6 +6521,7 @@ public Builder setDeletionProtection(boolean value) { onChanged(); return this; } + /** * * @@ -5678,11 +6547,12 @@ public Builder clearDeletionProtection() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder> automatedBackupPolicyBuilder_; + /** * * @@ -5700,6 +6570,7 @@ public Builder clearDeletionProtection() { public boolean hasAutomatedBackupPolicy() { return automatedBackupConfigCase_ == 13; } + /** * * @@ -5727,6 +6598,7 @@ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBack return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } } + /** * * @@ -5752,6 +6624,7 @@ public Builder setAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5774,6 +6647,7 @@ public Builder setAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5811,6 +6685,7 @@ public Builder mergeAutomatedBackupPolicy( automatedBackupConfigCase_ = 13; return this; } + /** * * @@ -5838,6 +6713,7 @@ public Builder clearAutomatedBackupPolicy() { } return this; } + /** * * @@ -5851,8 +6727,9 @@ public Builder clearAutomatedBackupPolicy() { */ public com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder getAutomatedBackupPolicyBuilder() { - return getAutomatedBackupPolicyFieldBuilder().getBuilder(); + return internalGetAutomatedBackupPolicyFieldBuilder().getBuilder(); } + /** * * @@ -5876,6 +6753,7 @@ public Builder clearAutomatedBackupPolicy() { return com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } } + /** * * @@ -5887,18 +6765,18 @@ public Builder clearAutomatedBackupPolicy() { * .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder> - getAutomatedBackupPolicyFieldBuilder() { + internalGetAutomatedBackupPolicyFieldBuilder() { if (automatedBackupPolicyBuilder_ == null) { if (!(automatedBackupConfigCase_ == 13)) { automatedBackupConfig_ = com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.getDefaultInstance(); } automatedBackupPolicyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy.Builder, com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder>( @@ -5912,15 +6790,947 @@ public Builder clearAutomatedBackupPolicy() { return automatedBackupPolicyBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.bigtable.admin.v2.TieredStorageConfig tieredStorageConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageConfig, + com.google.bigtable.admin.v2.TieredStorageConfig.Builder, + com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder> + tieredStorageConfigBuilder_; + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return Whether the tieredStorageConfig field is set. + */ + public boolean hasTieredStorageConfig() { + return ((bitField0_ & 0x00000100) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return The tieredStorageConfig. + */ + public com.google.bigtable.admin.v2.TieredStorageConfig getTieredStorageConfig() { + if (tieredStorageConfigBuilder_ == null) { + return tieredStorageConfig_ == null + ? com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance() + : tieredStorageConfig_; + } else { + return tieredStorageConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public Builder setTieredStorageConfig(com.google.bigtable.admin.v2.TieredStorageConfig value) { + if (tieredStorageConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tieredStorageConfig_ = value; + } else { + tieredStorageConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public Builder setTieredStorageConfig( + com.google.bigtable.admin.v2.TieredStorageConfig.Builder builderForValue) { + if (tieredStorageConfigBuilder_ == null) { + tieredStorageConfig_ = builderForValue.build(); + } else { + tieredStorageConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public Builder mergeTieredStorageConfig( + com.google.bigtable.admin.v2.TieredStorageConfig value) { + if (tieredStorageConfigBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && tieredStorageConfig_ != null + && tieredStorageConfig_ + != com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance()) { + getTieredStorageConfigBuilder().mergeFrom(value); + } else { + tieredStorageConfig_ = value; + } + } else { + tieredStorageConfigBuilder_.mergeFrom(value); + } + if (tieredStorageConfig_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public Builder clearTieredStorageConfig() { + bitField0_ = (bitField0_ & ~0x00000100); + tieredStorageConfig_ = null; + if (tieredStorageConfigBuilder_ != null) { + tieredStorageConfigBuilder_.dispose(); + tieredStorageConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public com.google.bigtable.admin.v2.TieredStorageConfig.Builder + getTieredStorageConfigBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetTieredStorageConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + public com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder + getTieredStorageConfigOrBuilder() { + if (tieredStorageConfigBuilder_ != null) { + return tieredStorageConfigBuilder_.getMessageOrBuilder(); + } else { + return tieredStorageConfig_ == null + ? com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance() + : tieredStorageConfig_; + } + } + + /** + * + * + *
      +     * Rules to specify what data is stored in each storage tier.
      +     * Different tiers store data differently, providing different trade-offs
      +     * between cost and performance. Different parts of a table can be stored
      +     * separately on different tiers.
      +     * If a config is specified, tiered storage is enabled for this table.
      +     * Otherwise, tiered storage is disabled.
      +     * Only SSD instances can configure tiered storage.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageConfig, + com.google.bigtable.admin.v2.TieredStorageConfig.Builder, + com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder> + internalGetTieredStorageConfigFieldBuilder() { + if (tieredStorageConfigBuilder_ == null) { + tieredStorageConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageConfig, + com.google.bigtable.admin.v2.TieredStorageConfig.Builder, + com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder>( + getTieredStorageConfig(), getParentForChildren(), isClean()); + tieredStorageConfig_ = null; + } + return tieredStorageConfigBuilder_; + } + + private com.google.bigtable.admin.v2.Type.Struct rowKeySchema_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + rowKeySchemaBuilder_; + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return Whether the rowKeySchema field is set. + */ + public boolean hasRowKeySchema() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return The rowKeySchema. + */ + public com.google.bigtable.admin.v2.Type.Struct getRowKeySchema() { + if (rowKeySchemaBuilder_ == null) { + return rowKeySchema_ == null + ? com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance() + : rowKeySchema_; + } else { + return rowKeySchemaBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public Builder setRowKeySchema(com.google.bigtable.admin.v2.Type.Struct value) { + if (rowKeySchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowKeySchema_ = value; + } else { + rowKeySchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public Builder setRowKeySchema( + com.google.bigtable.admin.v2.Type.Struct.Builder builderForValue) { + if (rowKeySchemaBuilder_ == null) { + rowKeySchema_ = builderForValue.build(); + } else { + rowKeySchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public Builder mergeRowKeySchema(com.google.bigtable.admin.v2.Type.Struct value) { + if (rowKeySchemaBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && rowKeySchema_ != null + && rowKeySchema_ != com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance()) { + getRowKeySchemaBuilder().mergeFrom(value); + } else { + rowKeySchema_ = value; + } + } else { + rowKeySchemaBuilder_.mergeFrom(value); + } + if (rowKeySchema_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public Builder clearRowKeySchema() { + bitField0_ = (bitField0_ & ~0x00000200); + rowKeySchema_ = null; + if (rowKeySchemaBuilder_ != null) { + rowKeySchemaBuilder_.dispose(); + rowKeySchemaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public com.google.bigtable.admin.v2.Type.Struct.Builder getRowKeySchemaBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetRowKeySchemaFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + public com.google.bigtable.admin.v2.Type.StructOrBuilder getRowKeySchemaOrBuilder() { + if (rowKeySchemaBuilder_ != null) { + return rowKeySchemaBuilder_.getMessageOrBuilder(); + } else { + return rowKeySchema_ == null + ? com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance() + : rowKeySchema_; + } + } + + /** + * + * + *
      +     * The row key schema for this table. The schema is used to decode the raw row
      +     * key bytes into a structured format. The order of field declarations in this
      +     * schema is important, as it reflects how the raw row key bytes are
      +     * structured. Currently, this only affects how the key is read via a
      +     * GoogleSQL query from the ExecuteQuery API.
      +     *
      +     * For a SQL query, the _key column is still read as raw bytes. But queries
      +     * can reference the key fields by name, which will be decoded from _key using
      +     * provided type and encoding. Queries that reference key fields will fail if
      +     * they encounter an invalid row key.
      +     *
      +     * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +     * following schema:
      +     * {
      +     * fields {
      +     * field_name: "id"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "date"
      +     * type { string { encoding: utf8_bytes {} } }
      +     * }
      +     * fields {
      +     * field_name: "product_code"
      +     * type { int64 { encoding: big_endian_bytes {} } }
      +     * }
      +     * encoding { delimited_bytes { delimiter: "#" } }
      +     * }
      +     *
      +     * The decoded key parts would be:
      +     * id = "some_id", date = "2024-04-30", product_code = 1245427
      +     * The query "SELECT _key, product_code FROM table" will return two columns:
      +     * /------------------------------------------------------\
      +     * |              _key                     | product_code |
      +     * | --------------------------------------|--------------|
      +     * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +     * \------------------------------------------------------/
      +     *
      +     * The schema has the following invariants:
      +     * (1) The decoded field values are order-preserved. For read, the field
      +     * values will be decoded in sorted mode from the raw bytes.
      +     * (2) Every field in the schema must specify a non-empty name.
      +     * (3) Every field must specify a type with an associated encoding. The type
      +     * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +     * allowed.
      +     * (4) The field names must not collide with existing column family
      +     * names and reserved keywords "_key" and "_timestamp".
      +     *
      +     * The following update operations are allowed for row_key_schema:
      +     * - Update from an empty schema to a new schema.
      +     * - Remove the existing schema. This operation requires setting the
      +     * `ignore_warnings` flag to `true`, since it might be a backward
      +     * incompatible change. Without the flag, the update request will fail with
      +     * an INVALID_ARGUMENT error.
      +     * Any other row key schema update operation (e.g. update existing schema
      +     * columns names or types) is currently unsupported.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + internalGetRowKeySchemaFieldBuilder() { + if (rowKeySchemaBuilder_ == null) { + rowKeySchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder>( + getRowKeySchema(), getParentForChildren(), isClean()); + rowKeySchema_ = null; + } + return rowKeySchemaBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Table) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableName.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableName.java index 25337b915d..84b258e78d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableName.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java index 4af441ef7b..f82f216bfa 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface TableOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Table) @@ -38,6 +40,7 @@ public interface TableOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +72,7 @@ public interface TableOrBuilder *
      */ int getClusterStatesCount(); + /** * * @@ -85,10 +89,12 @@ public interface TableOrBuilder *
      */ boolean containsClusterStates(java.lang.String key); + /** Use {@link #getClusterStatesMap()} instead. */ @java.lang.Deprecated java.util.Map getClusterStates(); + /** * * @@ -106,6 +112,7 @@ public interface TableOrBuilder */ java.util.Map getClusterStatesMap(); + /** * * @@ -126,6 +133,7 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.Table.ClusterState defaultValue); + /** * * @@ -154,6 +162,7 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( * map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3; */ int getColumnFamiliesCount(); + /** * * @@ -165,9 +174,11 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( * map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3; */ boolean containsColumnFamilies(java.lang.String key); + /** Use {@link #getColumnFamiliesMap()} instead. */ @java.lang.Deprecated java.util.Map getColumnFamilies(); + /** * * @@ -179,6 +190,7 @@ com.google.bigtable.admin.v2.Table.ClusterState getClusterStatesOrDefault( * map<string, .google.bigtable.admin.v2.ColumnFamily> column_families = 3; */ java.util.Map getColumnFamiliesMap(); + /** * * @@ -194,6 +206,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.admin.v2.ColumnFamily defaultValue); + /** * * @@ -223,6 +236,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The enum numeric value on the wire for granularity. */ int getGranularityValue(); + /** * * @@ -256,6 +270,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the restoreInfo field is set. */ boolean hasRestoreInfo(); + /** * * @@ -271,6 +286,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The restoreInfo. */ com.google.bigtable.admin.v2.RestoreInfo getRestoreInfo(); + /** * * @@ -299,6 +315,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the changeStreamConfig field is set. */ boolean hasChangeStreamConfig(); + /** * * @@ -313,6 +330,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The changeStreamConfig. */ com.google.bigtable.admin.v2.ChangeStreamConfig getChangeStreamConfig(); + /** * * @@ -360,6 +378,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return Whether the automatedBackupPolicy field is set. */ boolean hasAutomatedBackupPolicy(); + /** * * @@ -374,6 +393,7 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * @return The automatedBackupPolicy. */ com.google.bigtable.admin.v2.Table.AutomatedBackupPolicy getAutomatedBackupPolicy(); + /** * * @@ -388,5 +408,262 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( com.google.bigtable.admin.v2.Table.AutomatedBackupPolicyOrBuilder getAutomatedBackupPolicyOrBuilder(); + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return Whether the tieredStorageConfig field is set. + */ + boolean hasTieredStorageConfig(); + + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + * + * @return The tieredStorageConfig. + */ + com.google.bigtable.admin.v2.TieredStorageConfig getTieredStorageConfig(); + + /** + * + * + *
      +   * Rules to specify what data is stored in each storage tier.
      +   * Different tiers store data differently, providing different trade-offs
      +   * between cost and performance. Different parts of a table can be stored
      +   * separately on different tiers.
      +   * If a config is specified, tiered storage is enabled for this table.
      +   * Otherwise, tiered storage is disabled.
      +   * Only SSD instances can configure tiered storage.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageConfig tiered_storage_config = 14; + */ + com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder getTieredStorageConfigOrBuilder(); + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return Whether the rowKeySchema field is set. + */ + boolean hasRowKeySchema(); + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + * + * @return The rowKeySchema. + */ + com.google.bigtable.admin.v2.Type.Struct getRowKeySchema(); + + /** + * + * + *
      +   * The row key schema for this table. The schema is used to decode the raw row
      +   * key bytes into a structured format. The order of field declarations in this
      +   * schema is important, as it reflects how the raw row key bytes are
      +   * structured. Currently, this only affects how the key is read via a
      +   * GoogleSQL query from the ExecuteQuery API.
      +   *
      +   * For a SQL query, the _key column is still read as raw bytes. But queries
      +   * can reference the key fields by name, which will be decoded from _key using
      +   * provided type and encoding. Queries that reference key fields will fail if
      +   * they encounter an invalid row key.
      +   *
      +   * For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
      +   * following schema:
      +   * {
      +   * fields {
      +   * field_name: "id"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "date"
      +   * type { string { encoding: utf8_bytes {} } }
      +   * }
      +   * fields {
      +   * field_name: "product_code"
      +   * type { int64 { encoding: big_endian_bytes {} } }
      +   * }
      +   * encoding { delimited_bytes { delimiter: "#" } }
      +   * }
      +   *
      +   * The decoded key parts would be:
      +   * id = "some_id", date = "2024-04-30", product_code = 1245427
      +   * The query "SELECT _key, product_code FROM table" will return two columns:
      +   * /------------------------------------------------------\
      +   * |              _key                     | product_code |
      +   * | --------------------------------------|--------------|
      +   * | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
      +   * \------------------------------------------------------/
      +   *
      +   * The schema has the following invariants:
      +   * (1) The decoded field values are order-preserved. For read, the field
      +   * values will be decoded in sorted mode from the raw bytes.
      +   * (2) Every field in the schema must specify a non-empty name.
      +   * (3) Every field must specify a type with an associated encoding. The type
      +   * is limited to scalar types only: Array, Map, Aggregate, and Struct are not
      +   * allowed.
      +   * (4) The field names must not collide with existing column family
      +   * names and reserved keywords "_key" and "_timestamp".
      +   *
      +   * The following update operations are allowed for row_key_schema:
      +   * - Update from an empty schema to a new schema.
      +   * - Remove the existing schema. This operation requires setting the
      +   * `ignore_warnings` flag to `true`, since it might be a backward
      +   * incompatible change. Without the flag, the update request will fail with
      +   * an INVALID_ARGUMENT error.
      +   * Any other row key schema update operation (e.g. update existing schema
      +   * columns names or types) is currently unsupported.
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Struct row_key_schema = 15; + */ + com.google.bigtable.admin.v2.Type.StructOrBuilder getRowKeySchemaOrBuilder(); + com.google.bigtable.admin.v2.Table.AutomatedBackupConfigCase getAutomatedBackupConfigCase(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java index f54afaa543..d25349332e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -public final class TableProto { +@com.google.protobuf.Generated +public final class TableProto extends com.google.protobuf.GeneratedFile { private TableProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TableProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,80 +42,96 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_RestoreInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_RestoreInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ChangeStreamConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ChangeStreamConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Table_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Table_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Table_ClusterState_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Table_ClusterStatesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Table_ClusterStatesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Table_ColumnFamiliesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Table_ColumnFamiliesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AuthorizedView_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_FamilySubsetsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_FamilySubsetsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_ColumnFamily_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_ColumnFamily_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GcRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_EncryptionInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_EncryptionInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Snapshot_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Backup_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Backup_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_BackupInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_BackupInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_TieredStorageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_TieredStorageRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_ProtoSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -113,141 +141,203 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n$google/bigtable/admin/v2/table.proto\022\030" + "\n" + + "$google/bigtable/admin/v2/table.proto\022\030" + "google.bigtable.admin.v2\032\037google/api/fie" + "ld_behavior.proto\032\031google/api/resource.p" + "roto\032$google/bigtable/admin/v2/types.pro" + "to\032\036google/protobuf/duration.proto\032\037goog" - + "le/protobuf/timestamp.proto\032\027google/rpc/" - + "status.proto\"\233\001\n\013RestoreInfo\022@\n\013source_t" - + "ype\030\001 \001(\0162+.google.bigtable.admin.v2.Res" - + "toreSourceType\022;\n\013backup_info\030\002 \001(\0132$.go" - + "ogle.bigtable.admin.v2.BackupInfoH\000B\r\n\013s" - + "ource_info\"I\n\022ChangeStreamConfig\0223\n\020rete" - + "ntion_period\030\001 \001(\0132\031.google.protobuf.Dur" - + "ation\"\326\013\n\005Table\022\014\n\004name\030\001 \001(\t\022O\n\016cluster" - + "_states\030\002 \003(\01322.google.bigtable.admin.v2" - + ".Table.ClusterStatesEntryB\003\340A\003\022L\n\017column" - + "_families\030\003 \003(\01323.google.bigtable.admin." - + "v2.Table.ColumnFamiliesEntry\022N\n\013granular" - + "ity\030\004 \001(\01624.google.bigtable.admin.v2.Tab" - + "le.TimestampGranularityB\003\340A\005\022@\n\014restore_" - + "info\030\006 \001(\0132%.google.bigtable.admin.v2.Re" - + "storeInfoB\003\340A\003\022J\n\024change_stream_config\030\010" - + " \001(\0132,.google.bigtable.admin.v2.ChangeSt" - + "reamConfig\022\033\n\023deletion_protection\030\t \001(\010\022" - + "X\n\027automated_backup_policy\030\r \001(\01325.googl" - + "e.bigtable.admin.v2.Table.AutomatedBacku" - + "pPolicyH\000\032\306\002\n\014ClusterState\022]\n\021replicatio" - + "n_state\030\001 \001(\0162=.google.bigtable.admin.v2" - + ".Table.ClusterState.ReplicationStateB\003\340A" - + "\003\022F\n\017encryption_info\030\002 \003(\0132(.google.bigt" - + "able.admin.v2.EncryptionInfoB\003\340A\003\"\216\001\n\020Re" - + "plicationState\022\023\n\017STATE_NOT_KNOWN\020\000\022\020\n\014I" - + "NITIALIZING\020\001\022\027\n\023PLANNED_MAINTENANCE\020\002\022\031" - + "\n\025UNPLANNED_MAINTENANCE\020\003\022\t\n\005READY\020\004\022\024\n\020" - + "READY_OPTIMIZING\020\005\032\204\001\n\025AutomatedBackupPo" - + "licy\0228\n\020retention_period\030\001 \001(\0132\031.google." - + "protobuf.DurationB\003\340A\002\0221\n\tfrequency\030\002 \001(" - + "\0132\031.google.protobuf.DurationB\003\340A\002\032b\n\022Clu" - + "sterStatesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 " - + "\001(\0132,.google.bigtable.admin.v2.Table.Clu" - + "sterState:\0028\001\032]\n\023ColumnFamiliesEntry\022\013\n\003" - + "key\030\001 \001(\t\0225\n\005value\030\002 \001(\0132&.google.bigtab" - + "le.admin.v2.ColumnFamily:\0028\001\"I\n\024Timestam" - + "pGranularity\022%\n!TIMESTAMP_GRANULARITY_UN" - + "SPECIFIED\020\000\022\n\n\006MILLIS\020\001\"q\n\004View\022\024\n\020VIEW_" - + "UNSPECIFIED\020\000\022\r\n\tNAME_ONLY\020\001\022\017\n\013SCHEMA_V" - + "IEW\020\002\022\024\n\020REPLICATION_VIEW\020\003\022\023\n\017ENCRYPTIO" - + "N_VIEW\020\005\022\010\n\004FULL\020\004:_\352A\\\n\"bigtableadmin.g" - + "oogleapis.com/Table\0226projects/{project}/" - + "instances/{instance}/tables/{table}B\031\n\027a" - + "utomated_backup_config\"\343\005\n\016AuthorizedVie" - + "w\022\021\n\004name\030\001 \001(\tB\003\340A\010\022J\n\013subset_view\030\002 \001(" - + "\01323.google.bigtable.admin.v2.AuthorizedV" - + "iew.SubsetViewH\000\022\014\n\004etag\030\003 \001(\t\022\033\n\023deleti" - + "on_protection\030\004 \001(\010\032?\n\rFamilySubsets\022\022\n\n" - + "qualifiers\030\001 \003(\014\022\032\n\022qualifier_prefixes\030\002" - + " \003(\014\032\360\001\n\nSubsetView\022\024\n\014row_prefixes\030\001 \003(" - + "\014\022^\n\016family_subsets\030\002 \003(\0132F.google.bigta" - + "ble.admin.v2.AuthorizedView.SubsetView.F" - + "amilySubsetsEntry\032l\n\022FamilySubsetsEntry\022" - + "\013\n\003key\030\001 \001(\t\022E\n\005value\030\002 \001(\01326.google.big" - + "table.admin.v2.AuthorizedView.FamilySubs" - + "ets:\0028\001\"Q\n\014ResponseView\022\035\n\031RESPONSE_VIEW" - + "_UNSPECIFIED\020\000\022\r\n\tNAME_ONLY\020\001\022\t\n\005BASIC\020\002" - + "\022\010\n\004FULL\020\003:\254\001\352A\250\001\n+bigtableadmin.googlea" - + "pis.com/AuthorizedView\022Xprojects/{projec" - + "t}/instances/{instance}/tables/{table}/a" - + "uthorizedViews/{authorized_view}*\017author" - + "izedViews2\016authorizedViewB\021\n\017authorized_" - + "view\"u\n\014ColumnFamily\0221\n\007gc_rule\030\001 \001(\0132 ." - + "google.bigtable.admin.v2.GcRule\0222\n\nvalue" - + "_type\030\003 \001(\0132\036.google.bigtable.admin.v2.T" - + "ype\"\325\002\n\006GcRule\022\032\n\020max_num_versions\030\001 \001(\005" - + "H\000\022,\n\007max_age\030\002 \001(\0132\031.google.protobuf.Du" - + "rationH\000\022E\n\014intersection\030\003 \001(\0132-.google." - + "bigtable.admin.v2.GcRule.IntersectionH\000\022" - + "7\n\005union\030\004 \001(\0132&.google.bigtable.admin.v" - + "2.GcRule.UnionH\000\032?\n\014Intersection\022/\n\005rule" - + "s\030\001 \003(\0132 .google.bigtable.admin.v2.GcRul" - + "e\0328\n\005Union\022/\n\005rules\030\001 \003(\0132 .google.bigta" - + "ble.admin.v2.GcRuleB\006\n\004rule\"\331\002\n\016Encrypti" - + "onInfo\022U\n\017encryption_type\030\003 \001(\01627.google" - + ".bigtable.admin.v2.EncryptionInfo.Encryp" - + "tionTypeB\003\340A\003\0222\n\021encryption_status\030\004 \001(\013" - + "2\022.google.rpc.StatusB\003\340A\003\022I\n\017kms_key_ver" - + "sion\030\002 \001(\tB0\340A\003\372A*\n(cloudkms.googleapis." - + "com/CryptoKeyVersion\"q\n\016EncryptionType\022\037" - + "\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\035\n\031GOOGL" - + "E_DEFAULT_ENCRYPTION\020\001\022\037\n\033CUSTOMER_MANAG" - + "ED_ENCRYPTION\020\002\"\340\003\n\010Snapshot\022\014\n\004name\030\001 \001" - + "(\t\022:\n\014source_table\030\002 \001(\0132\037.google.bigtab" - + "le.admin.v2.TableB\003\340A\003\022\034\n\017data_size_byte" - + "s\030\003 \001(\003B\003\340A\003\0224\n\013create_time\030\004 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022/\n\013delete_tim" - + "e\030\005 \001(\0132\032.google.protobuf.Timestamp\022<\n\005s" - + "tate\030\006 \001(\0162(.google.bigtable.admin.v2.Sn" - + "apshot.StateB\003\340A\003\022\023\n\013description\030\007 \001(\t\"5" - + "\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022" - + "\014\n\010CREATING\020\002:{\352Ax\n%bigtableadmin.google" - + "apis.com/Snapshot\022Oprojects/{project}/in" - + "stances/{instance}/clusters/{cluster}/sn" - + "apshots/{snapshot}\"\371\005\n\006Backup\022\014\n\004name\030\001 " - + "\001(\t\022\034\n\014source_table\030\002 \001(\tB\006\340A\005\340A\002\022\032\n\rsou" - + "rce_backup\030\n \001(\tB\003\340A\003\0224\n\013expire_time\030\003 \001" - + "(\0132\032.google.protobuf.TimestampB\003\340A\002\0223\n\ns" - + "tart_time\030\004 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\022\027\n\nsize_bytes\030\006 \001(\003B" - + "\003\340A\003\022:\n\005state\030\007 \001(\0162&.google.bigtable.ad" - + "min.v2.Backup.StateB\003\340A\003\022F\n\017encryption_i" - + "nfo\030\t \001(\0132(.google.bigtable.admin.v2.Enc" - + "ryptionInfoB\003\340A\003\022@\n\013backup_type\030\013 \001(\0162+." - + "google.bigtable.admin.v2.Backup.BackupTy" - + "pe\0228\n\024hot_to_standard_time\030\014 \001(\0132\032.googl" - + "e.protobuf.Timestamp\"7\n\005State\022\025\n\021STATE_U" - + "NSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\"@\n" - + "\nBackupType\022\033\n\027BACKUP_TYPE_UNSPECIFIED\020\000" - + "\022\014\n\010STANDARD\020\001\022\007\n\003HOT\020\002:u\352Ar\n#bigtablead" - + "min.googleapis.com/Backup\022Kprojects/{pro" - + "ject}/instances/{instance}/clusters/{clu" - + "ster}/backups/{backup}\"\300\001\n\nBackupInfo\022\023\n" - + "\006backup\030\001 \001(\tB\003\340A\003\0223\n\nstart_time\030\002 \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\0221\n\010end_t" - + "ime\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\022\031\n\014source_table\030\004 \001(\tB\003\340A\003\022\032\n\rsource_" - + "backup\030\n \001(\tB\003\340A\003*D\n\021RestoreSourceType\022#" - + "\n\037RESTORE_SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n\006B" - + "ACKUP\020\001B\367\002\n\034com.google.bigtable.admin.v2" - + "B\nTableProtoP\001Z8cloud.google.com/go/bigt" + + "le/protobuf/timestamp.proto\032\027google/rpc/status.proto\"\233\001\n" + + "\013RestoreInfo\022@\n" + + "\013source_type\030\001 \001(\0162+.google.bigtable.admin.v2.RestoreSourceType\022;\n" + + "\013backup_info\030\002 \001(\0132$.google.bigtable.admin.v2.BackupInfoH\000B\r\n" + + "\013source_info\"I\n" + + "\022ChangeStreamConfig\0223\n" + + "\020retention_period\030\001 \001(\0132\031.google.protobuf.Duration\"\234\r\n" + + "\005Table\022\014\n" + + "\004name\030\001 \001(\t\022O\n" + + "\016cluster_states\030\002" + + " \003(\01322.google.bigtable.admin.v2.Table.ClusterStatesEntryB\003\340A\003\022L\n" + + "\017column_families\030\003" + + " \003(\01323.google.bigtable.admin.v2.Table.ColumnFamiliesEntry\022N\n" + + "\013granularity\030\004" + + " \001(\01624.google.bigtable.admin.v2.Table.TimestampGranularityB\003\340A\005\022@\n" + + "\014restore_info\030\006" + + " \001(\0132%.google.bigtable.admin.v2.RestoreInfoB\003\340A\003\022J\n" + + "\024change_stream_config\030\010" + + " \001(\0132,.google.bigtable.admin.v2.ChangeStreamConfig\022\033\n" + + "\023deletion_protection\030\t \001(\010\022X\n" + + "\027automated_backup_policy\030\r" + + " \001(\01325.google.bigtable.admin.v2.Table.AutomatedBackupPolicyH\000\022L\n" + + "\025tiered_storage_config\030\016 \001(\013" + + "2-.google.bigtable.admin.v2.TieredStorageConfig\022=\n" + + "\016row_key_schema\030\017" + + " \001(\0132%.google.bigtable.admin.v2.Type.Struct\032\306\002\n" + + "\014ClusterState\022]\n" + + "\021replication_state\030\001 \001(\0162=.goo" + + "gle.bigtable.admin.v2.Table.ClusterState.ReplicationStateB\003\340A\003\022F\n" + + "\017encryption_info\030\002" + + " \003(\0132(.google.bigtable.admin.v2.EncryptionInfoB\003\340A\003\"\216\001\n" + + "\020ReplicationState\022\023\n" + + "\017STATE_NOT_KNOWN\020\000\022\020\n" + + "\014INITIALIZING\020\001\022\027\n" + + "\023PLANNED_MAINTENANCE\020\002\022\031\n" + + "\025UNPLANNED_MAINTENANCE\020\003\022\t\n" + + "\005READY\020\004\022\024\n" + + "\020READY_OPTIMIZING\020\005\032\275\001\n" + + "\025AutomatedBackupPolicy\0228\n" + + "\020retention_period\030\001" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\022,\n" + + "\tfrequency\030\002 \001(\0132\031.google.protobuf.Duration\022<\n" + + "\tlocations\030\003 \003(\tB)\340A\001\372A#\n" + + "!locations.googleapis.com/Location\032b\n" + + "\022ClusterStatesEntry\022\013\n" + + "\003key\030\001 \001(\t\022;\n" + + "\005value\030\002 \001(" + + "\0132,.google.bigtable.admin.v2.Table.ClusterState:\0028\001\032]\n" + + "\023ColumnFamiliesEntry\022\013\n" + + "\003key\030\001 \001(\t\0225\n" + + "\005value\030\002 \001(\0132&.google.bigtable.admin.v2.ColumnFamily:\0028\001\"I\n" + + "\024TimestampGranularity\022%\n" + + "!TIMESTAMP_GRANULARITY_UNSPECIFIED\020\000\022\n\n" + + "\006MILLIS\020\001\"q\n" + + "\004View\022\024\n" + + "\020VIEW_UNSPECIFIED\020\000\022\r\n" + + "\tNAME_ONLY\020\001\022\017\n" + + "\013SCHEMA_VIEW\020\002\022\024\n" + + "\020REPLICATION_VIEW\020\003\022\023\n" + + "\017ENCRYPTION_VIEW\020\005\022\010\n" + + "\004FULL\020\004:_\352A\\\n" + + "\"bigtableadmin.goo" + + "gleapis.com/Table\0226projects/{project}/instances/{instance}/tables/{table}B\031\n" + + "\027automated_backup_config\"\343\005\n" + + "\016AuthorizedView\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022J\n" + + "\013subset_view\030\002 \001(\0132" + + "3.google.bigtable.admin.v2.AuthorizedView.SubsetViewH\000\022\014\n" + + "\004etag\030\003 \001(\t\022\033\n" + + "\023deletion_protection\030\004 \001(\010\032?\n\r" + + "FamilySubsets\022\022\n\n" + + "qualifiers\030\001 \003(\014\022\032\n" + + "\022qualifier_prefixes\030\002 \003(\014\032\360\001\n\n" + + "SubsetView\022\024\n" + + "\014row_prefixes\030\001 \003(\014\022^\n" + + "\016family_subsets\030\002 \003(\0132F.google.bigtabl" + + "e.admin.v2.AuthorizedView.SubsetView.FamilySubsetsEntry\032l\n" + + "\022FamilySubsetsEntry\022\013\n" + + "\003key\030\001 \001(\t\022E\n" + + "\005value\030\002 \001(\01326.google.bigta" + + "ble.admin.v2.AuthorizedView.FamilySubsets:\0028\001\"Q\n" + + "\014ResponseView\022\035\n" + + "\031RESPONSE_VIEW_UNSPECIFIED\020\000\022\r\n" + + "\tNAME_ONLY\020\001\022\t\n" + + "\005BASIC\020\002\022\010\n" + + "\004FULL\020\003:\254\001\352A\250\001\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022Xprojects/{project}" + + "/instances/{instance}/tables/{table}/aut" + + "horizedViews/{authorized_view}*\017authorizedViews2\016authorizedViewB\021\n" + + "\017authorized_view\"u\n" + + "\014ColumnFamily\0221\n" + + "\007gc_rule\030\001 \001(\0132 .google.bigtable.admin.v2.GcRule\0222\n\n" + + "value_type\030\003 \001(\0132\036.google.bigtable.admin.v2.Type\"\325\002\n" + + "\006GcRule\022\032\n" + + "\020max_num_versions\030\001 \001(\005H\000\022,\n" + + "\007max_age\030\002 \001(\0132\031.google.protobuf.DurationH\000\022E\n" + + "\014intersection\030\003" + + " \001(\0132-.google.bigtable.admin.v2.GcRule.IntersectionH\000\0227\n" + + "\005union\030\004 \001(\0132&.google.bigtable.admin.v2.GcRule.UnionH\000\032?\n" + + "\014Intersection\022/\n" + + "\005rules\030\001 \003(\0132 .google.bigtable.admin.v2.GcRule\0328\n" + + "\005Union\022/\n" + + "\005rules\030\001 \003(\0132 .google.bigtable.admin.v2.GcRuleB\006\n" + + "\004rule\"\331\002\n" + + "\016EncryptionInfo\022U\n" + + "\017encryption_type\030\003 \001(\01627.google.b" + + "igtable.admin.v2.EncryptionInfo.EncryptionTypeB\003\340A\003\0222\n" + + "\021encryption_status\030\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\022I\n" + + "\017kms_key_version\030\002 \001(\tB0\340A\003\372A*\n" + + "(cloudkms.googleapis.com/CryptoKeyVersion\"q\n" + + "\016EncryptionType\022\037\n" + + "\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\035\n" + + "\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037\n" + + "\033CUSTOMER_MANAGED_ENCRYPTION\020\002\"\340\003\n" + + "\010Snapshot\022\014\n" + + "\004name\030\001 \001(\t\022:\n" + + "\014source_table\030\002" + + " \001(\0132\037.google.bigtable.admin.v2.TableB\003\340A\003\022\034\n" + + "\017data_size_bytes\030\003 \001(\003B\003\340A\003\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022/\n" + + "\013delete_time\030\005 \001(\0132\032.google.protobuf.Timestamp\022<\n" + + "\005state\030\006" + + " \001(\0162(.google.bigtable.admin.v2.Snapshot.StateB\003\340A\003\022\023\n" + + "\013description\030\007 \001(\t\"5\n" + + "\005State\022\023\n" + + "\017STATE_NOT_KNOWN\020\000\022\t\n" + + "\005READY\020\001\022\014\n" + + "\010CREATING\020\002:{\352Ax\n" + + "%bigtableadmin.googleapis.com/Snapshot\022Oprojects/{project}/inst" + + "ances/{instance}/clusters/{cluster}/snapshots/{snapshot}\"\371\005\n" + + "\006Backup\022\014\n" + + "\004name\030\001 \001(\t\022\034\n" + + "\014source_table\030\002 \001(\tB\006\340A\005\340A\002\022\032\n\r" + + "source_backup\030\n" + + " \001(\tB\003\340A\003\0224\n" + + "\013expire_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0223\n\n" + + "start_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\027\n\n" + + "size_bytes\030\006 \001(\003B\003\340A\003\022:\n" + + "\005state\030\007" + + " \001(\0162&.google.bigtable.admin.v2.Backup.StateB\003\340A\003\022F\n" + + "\017encryption_info\030\t" + + " \001(\0132(.google.bigtable.admin.v2.EncryptionInfoB\003\340A\003\022@\n" + + "\013backup_type\030\013 \001(\0162+.google.bigtable.admin.v2.Backup.BackupType\0228\n" + + "\024hot_to_standard_time\030\014 \001(\0132\032.google.protobuf.Timestamp\"7\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\t\n" + + "\005READY\020\002\"@\n\n" + + "BackupType\022\033\n" + + "\027BACKUP_TYPE_UNSPECIFIED\020\000\022\014\n" + + "\010STANDARD\020\001\022\007\n" + + "\003HOT\020\002:u\352Ar\n" + + "#bigtableadmin.googleapis.com/Backup\022Kprojects/{proje" + + "ct}/instances/{instance}/clusters/{cluster}/backups/{backup}\"\300\001\n\n" + + "BackupInfo\022\023\n" + + "\006backup\030\001 \001(\tB\003\340A\003\0223\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\031\n" + + "\014source_table\030\004 \001(\tB\003\340A\003\022\032\n\r" + + "source_backup\030\n" + + " \001(\tB\003\340A\003\"]\n" + + "\023TieredStorageConfig\022F\n" + + "\021infrequent_access\030\001" + + " \001(\0132+.google.bigtable.admin.v2.TieredStorageRule\"W\n" + + "\021TieredStorageRule\022:\n" + + "\025include_if_older_than\030\001 \001(\0132\031.google.protobuf.DurationH\000B\006\n" + + "\004rule\"-\n" + + "\013ProtoSchema\022\036\n" + + "\021proto_descriptors\030\002 \001(\014B\003\340A\002\"\240\002\n" + + "\014SchemaBundle\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022=\n" + + "\014proto_schema\030\002" + + " \001(\0132%.google.bigtable.admin.v2.ProtoSchemaH\000\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001:\242\001\352A\236\001\n" + + ")bigtableadmin.googleapis.com/SchemaBundle\022Tprojects/{project}/insta" + + "nces/{instance}/tables/{table}/schemaBundles/{schema_bundle}*\r" + + "schemaBundles2\014schemaBundleB\006\n" + + "\004type*D\n" + + "\021RestoreSourceType\022#\n" + + "\037RESTORE_SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006BACKUP\020\001B\367\002\n" + + "\034com.google.bigtable.admin.v2B\n" + + "TableProtoP\001Z8cloud.google.com/go/bigt" + "able/admin/apiv2/adminpb;adminpb\252\002\036Googl" + "e.Cloud.Bigtable.Admin.V2\312\002\036Google\\Cloud" - + "\\Bigtable\\Admin\\V2\352\002\"Google::Cloud::Bigt" - + "able::Admin::V2\352A\246\001\n(cloudkms.googleapis" - + ".com/CryptoKeyVersion\022zprojects/{project" - + "}/locations/{location}/keyRings/{key_rin" - + "g}/cryptoKeys/{crypto_key}/cryptoKeyVers" + + "\\Bigtable\\Admin\\V2\352\002\"Google::Cloud::Bigtable::Admin::V2\352A\246\001\n" + + "(cloudkms.googleapis.com/CryptoKeyVersion\022zprojects/{project" + + "}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVers" + "ions/{crypto_key_version}b\006proto3" }; descriptor = @@ -262,25 +352,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_bigtable_admin_v2_RestoreInfo_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_admin_v2_RestoreInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_RestoreInfo_descriptor, new java.lang.String[] { "SourceType", "BackupInfo", "SourceInfo", }); internal_static_google_bigtable_admin_v2_ChangeStreamConfig_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_bigtable_admin_v2_ChangeStreamConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ChangeStreamConfig_descriptor, new java.lang.String[] { "RetentionPeriod", }); - internal_static_google_bigtable_admin_v2_Table_descriptor = - getDescriptor().getMessageTypes().get(2); + internal_static_google_bigtable_admin_v2_Table_descriptor = getDescriptor().getMessageType(2); internal_static_google_bigtable_admin_v2_Table_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_descriptor, new java.lang.String[] { "Name", @@ -291,118 +380,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ChangeStreamConfig", "DeletionProtection", "AutomatedBackupPolicy", + "TieredStorageConfig", + "RowKeySchema", "AutomatedBackupConfig", }); internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor = - internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Table_ClusterState_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor, new java.lang.String[] { "ReplicationState", "EncryptionInfo", }); internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_descriptor = - internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_AutomatedBackupPolicy_descriptor, new java.lang.String[] { - "RetentionPeriod", "Frequency", + "RetentionPeriod", "Frequency", "Locations", }); internal_static_google_bigtable_admin_v2_Table_ClusterStatesEntry_descriptor = - internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedType(2); internal_static_google_bigtable_admin_v2_Table_ClusterStatesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_ClusterStatesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_admin_v2_Table_ColumnFamiliesEntry_descriptor = - internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedType(3); internal_static_google_bigtable_admin_v2_Table_ColumnFamiliesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_ColumnFamiliesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_bigtable_admin_v2_AuthorizedView_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor, new java.lang.String[] { "Name", "SubsetView", "Etag", "DeletionProtection", "AuthorizedView", }); internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_descriptor = - internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AuthorizedView_FamilySubsets_descriptor, new java.lang.String[] { "Qualifiers", "QualifierPrefixes", }); internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor = - internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_AuthorizedView_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor, new java.lang.String[] { "RowPrefixes", "FamilySubsets", }); internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_FamilySubsetsEntry_descriptor = - internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_descriptor.getNestedType( + 0); internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_FamilySubsetsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_AuthorizedView_SubsetView_FamilySubsetsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_admin_v2_ColumnFamily_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_bigtable_admin_v2_ColumnFamily_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ColumnFamily_descriptor, new java.lang.String[] { "GcRule", "ValueType", }); - internal_static_google_bigtable_admin_v2_GcRule_descriptor = - getDescriptor().getMessageTypes().get(5); + internal_static_google_bigtable_admin_v2_GcRule_descriptor = getDescriptor().getMessageType(5); internal_static_google_bigtable_admin_v2_GcRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GcRule_descriptor, new java.lang.String[] { "MaxNumVersions", "MaxAge", "Intersection", "Union", "Rule", }); internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor = - internal_static_google_bigtable_admin_v2_GcRule_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_GcRule_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_GcRule_Intersection_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor, new java.lang.String[] { "Rules", }); internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor = - internal_static_google_bigtable_admin_v2_GcRule_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_GcRule_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_GcRule_Union_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor, new java.lang.String[] { "Rules", }); internal_static_google_bigtable_admin_v2_EncryptionInfo_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_bigtable_admin_v2_EncryptionInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_EncryptionInfo_descriptor, new java.lang.String[] { "EncryptionType", "EncryptionStatus", "KmsKeyVersion", }); internal_static_google_bigtable_admin_v2_Snapshot_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Snapshot_descriptor, new java.lang.String[] { "Name", @@ -413,10 +502,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "Description", }); - internal_static_google_bigtable_admin_v2_Backup_descriptor = - getDescriptor().getMessageTypes().get(8); + internal_static_google_bigtable_admin_v2_Backup_descriptor = getDescriptor().getMessageType(8); internal_static_google_bigtable_admin_v2_Backup_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Backup_descriptor, new java.lang.String[] { "Name", @@ -432,13 +520,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "HotToStandardTime", }); internal_static_google_bigtable_admin_v2_BackupInfo_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_bigtable_admin_v2_BackupInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_BackupInfo_descriptor, new java.lang.String[] { "Backup", "StartTime", "EndTime", "SourceTable", "SourceBackup", }); + internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_bigtable_admin_v2_TieredStorageConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor, + new java.lang.String[] { + "InfrequentAccess", + }); + internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_bigtable_admin_v2_TieredStorageRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor, + new java.lang.String[] { + "IncludeIfOlderThan", "Rule", + }); + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_bigtable_admin_v2_ProtoSchema_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_ProtoSchema_descriptor, + new java.lang.String[] { + "ProtoDescriptors", + }); + internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_bigtable_admin_v2_SchemaBundle_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_SchemaBundle_descriptor, + new java.lang.String[] { + "Name", "ProtoSchema", "Etag", "Type", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.bigtable.admin.v2.TypesProto.getDescriptor(); + com.google.protobuf.DurationProto.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); @@ -447,12 +574,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.bigtable.admin.v2.TypesProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfig.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfig.java new file mode 100644 index 0000000000..e54e3440fb --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfig.java @@ -0,0 +1,721 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Config for tiered storage.
      + * A valid config must have a valid TieredStorageRule. Otherwise the whole
      + * TieredStorageConfig must be unset.
      + * By default all data is stored in the SSD tier (only SSD instances can
      + * configure tiered storage).
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.TieredStorageConfig} + */ +@com.google.protobuf.Generated +public final class TieredStorageConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.TieredStorageConfig) + TieredStorageConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TieredStorageConfig"); + } + + // Use TieredStorageConfig.newBuilder() to construct. + private TieredStorageConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TieredStorageConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.TieredStorageConfig.class, + com.google.bigtable.admin.v2.TieredStorageConfig.Builder.class); + } + + private int bitField0_; + public static final int INFREQUENT_ACCESS_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.TieredStorageRule infrequentAccess_; + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return Whether the infrequentAccess field is set. + */ + @java.lang.Override + public boolean hasInfrequentAccess() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return The infrequentAccess. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageRule getInfrequentAccess() { + return infrequentAccess_ == null + ? com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance() + : infrequentAccess_; + } + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder getInfrequentAccessOrBuilder() { + return infrequentAccess_ == null + ? com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance() + : infrequentAccess_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInfrequentAccess()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfrequentAccess()); + } + 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.bigtable.admin.v2.TieredStorageConfig)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.TieredStorageConfig other = + (com.google.bigtable.admin.v2.TieredStorageConfig) obj; + + if (hasInfrequentAccess() != other.hasInfrequentAccess()) return false; + if (hasInfrequentAccess()) { + if (!getInfrequentAccess().equals(other.getInfrequentAccess())) 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 (hasInfrequentAccess()) { + hash = (37 * hash) + INFREQUENT_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + getInfrequentAccess().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig 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.bigtable.admin.v2.TieredStorageConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig 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.bigtable.admin.v2.TieredStorageConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig 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.bigtable.admin.v2.TieredStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig 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.bigtable.admin.v2.TieredStorageConfig 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; + } + + /** + * + * + *
      +   * Config for tiered storage.
      +   * A valid config must have a valid TieredStorageRule. Otherwise the whole
      +   * TieredStorageConfig must be unset.
      +   * By default all data is stored in the SSD tier (only SSD instances can
      +   * configure tiered storage).
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.TieredStorageConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.TieredStorageConfig) + com.google.bigtable.admin.v2.TieredStorageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.TieredStorageConfig.class, + com.google.bigtable.admin.v2.TieredStorageConfig.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.TieredStorageConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInfrequentAccessFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + infrequentAccess_ = null; + if (infrequentAccessBuilder_ != null) { + infrequentAccessBuilder_.dispose(); + infrequentAccessBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageConfig_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageConfig getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageConfig build() { + com.google.bigtable.admin.v2.TieredStorageConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageConfig buildPartial() { + com.google.bigtable.admin.v2.TieredStorageConfig result = + new com.google.bigtable.admin.v2.TieredStorageConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.TieredStorageConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.infrequentAccess_ = + infrequentAccessBuilder_ == null ? infrequentAccess_ : infrequentAccessBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.TieredStorageConfig) { + return mergeFrom((com.google.bigtable.admin.v2.TieredStorageConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.TieredStorageConfig other) { + if (other == com.google.bigtable.admin.v2.TieredStorageConfig.getDefaultInstance()) + return this; + if (other.hasInfrequentAccess()) { + mergeInfrequentAccess(other.getInfrequentAccess()); + } + 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( + internalGetInfrequentAccessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.TieredStorageRule infrequentAccess_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageRule, + com.google.bigtable.admin.v2.TieredStorageRule.Builder, + com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder> + infrequentAccessBuilder_; + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return Whether the infrequentAccess field is set. + */ + public boolean hasInfrequentAccess() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return The infrequentAccess. + */ + public com.google.bigtable.admin.v2.TieredStorageRule getInfrequentAccess() { + if (infrequentAccessBuilder_ == null) { + return infrequentAccess_ == null + ? com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance() + : infrequentAccess_; + } else { + return infrequentAccessBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public Builder setInfrequentAccess(com.google.bigtable.admin.v2.TieredStorageRule value) { + if (infrequentAccessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infrequentAccess_ = value; + } else { + infrequentAccessBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public Builder setInfrequentAccess( + com.google.bigtable.admin.v2.TieredStorageRule.Builder builderForValue) { + if (infrequentAccessBuilder_ == null) { + infrequentAccess_ = builderForValue.build(); + } else { + infrequentAccessBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public Builder mergeInfrequentAccess(com.google.bigtable.admin.v2.TieredStorageRule value) { + if (infrequentAccessBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && infrequentAccess_ != null + && infrequentAccess_ + != com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance()) { + getInfrequentAccessBuilder().mergeFrom(value); + } else { + infrequentAccess_ = value; + } + } else { + infrequentAccessBuilder_.mergeFrom(value); + } + if (infrequentAccess_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public Builder clearInfrequentAccess() { + bitField0_ = (bitField0_ & ~0x00000001); + infrequentAccess_ = null; + if (infrequentAccessBuilder_ != null) { + infrequentAccessBuilder_.dispose(); + infrequentAccessBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public com.google.bigtable.admin.v2.TieredStorageRule.Builder getInfrequentAccessBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetInfrequentAccessFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + public com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder getInfrequentAccessOrBuilder() { + if (infrequentAccessBuilder_ != null) { + return infrequentAccessBuilder_.getMessageOrBuilder(); + } else { + return infrequentAccess_ == null + ? com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance() + : infrequentAccess_; + } + } + + /** + * + * + *
      +     * Rule to specify what data is stored in the infrequent access(IA) tier.
      +     * The IA tier allows storing more data per node with reduced performance.
      +     * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageRule, + com.google.bigtable.admin.v2.TieredStorageRule.Builder, + com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder> + internalGetInfrequentAccessFieldBuilder() { + if (infrequentAccessBuilder_ == null) { + infrequentAccessBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.TieredStorageRule, + com.google.bigtable.admin.v2.TieredStorageRule.Builder, + com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder>( + getInfrequentAccess(), getParentForChildren(), isClean()); + infrequentAccess_ = null; + } + return infrequentAccessBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.TieredStorageConfig) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.TieredStorageConfig) + private static final com.google.bigtable.admin.v2.TieredStorageConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.TieredStorageConfig(); + } + + public static com.google.bigtable.admin.v2.TieredStorageConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TieredStorageConfig 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.bigtable.admin.v2.TieredStorageConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfigOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfigOrBuilder.java new file mode 100644 index 0000000000..380f53080d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageConfigOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface TieredStorageConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.TieredStorageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return Whether the infrequentAccess field is set. + */ + boolean hasInfrequentAccess(); + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + * + * @return The infrequentAccess. + */ + com.google.bigtable.admin.v2.TieredStorageRule getInfrequentAccess(); + + /** + * + * + *
      +   * Rule to specify what data is stored in the infrequent access(IA) tier.
      +   * The IA tier allows storing more data per node with reduced performance.
      +   * 
      + * + * .google.bigtable.admin.v2.TieredStorageRule infrequent_access = 1; + */ + com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder getInfrequentAccessOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRule.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRule.java new file mode 100644 index 0000000000..2a78390f88 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRule.java @@ -0,0 +1,801 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Rule to specify what data is stored in a storage tier.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.TieredStorageRule} + */ +@com.google.protobuf.Generated +public final class TieredStorageRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.TieredStorageRule) + TieredStorageRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TieredStorageRule"); + } + + // Use TieredStorageRule.newBuilder() to construct. + private TieredStorageRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TieredStorageRule() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.TieredStorageRule.class, + com.google.bigtable.admin.v2.TieredStorageRule.Builder.class); + } + + private int ruleCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object rule_; + + public enum RuleCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INCLUDE_IF_OLDER_THAN(1), + RULE_NOT_SET(0); + private final int value; + + private RuleCase(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 RuleCase valueOf(int value) { + return forNumber(value); + } + + public static RuleCase forNumber(int value) { + switch (value) { + case 1: + return INCLUDE_IF_OLDER_THAN; + case 0: + return RULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RuleCase getRuleCase() { + return RuleCase.forNumber(ruleCase_); + } + + public static final int INCLUDE_IF_OLDER_THAN_FIELD_NUMBER = 1; + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return Whether the includeIfOlderThan field is set. + */ + @java.lang.Override + public boolean hasIncludeIfOlderThan() { + return ruleCase_ == 1; + } + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return The includeIfOlderThan. + */ + @java.lang.Override + public com.google.protobuf.Duration getIncludeIfOlderThan() { + if (ruleCase_ == 1) { + return (com.google.protobuf.Duration) rule_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIncludeIfOlderThanOrBuilder() { + if (ruleCase_ == 1) { + return (com.google.protobuf.Duration) rule_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (ruleCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Duration) rule_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ruleCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.protobuf.Duration) rule_); + } + 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.bigtable.admin.v2.TieredStorageRule)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.TieredStorageRule other = + (com.google.bigtable.admin.v2.TieredStorageRule) obj; + + if (!getRuleCase().equals(other.getRuleCase())) return false; + switch (ruleCase_) { + case 1: + if (!getIncludeIfOlderThan().equals(other.getIncludeIfOlderThan())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (ruleCase_) { + case 1: + hash = (37 * hash) + INCLUDE_IF_OLDER_THAN_FIELD_NUMBER; + hash = (53 * hash) + getIncludeIfOlderThan().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.TieredStorageRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule 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.bigtable.admin.v2.TieredStorageRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule 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.bigtable.admin.v2.TieredStorageRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule 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.bigtable.admin.v2.TieredStorageRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule 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.bigtable.admin.v2.TieredStorageRule 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; + } + + /** + * + * + *
      +   * Rule to specify what data is stored in a storage tier.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.TieredStorageRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.TieredStorageRule) + com.google.bigtable.admin.v2.TieredStorageRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.TieredStorageRule.class, + com.google.bigtable.admin.v2.TieredStorageRule.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.TieredStorageRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (includeIfOlderThanBuilder_ != null) { + includeIfOlderThanBuilder_.clear(); + } + ruleCase_ = 0; + rule_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TableProto + .internal_static_google_bigtable_admin_v2_TieredStorageRule_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageRule getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageRule build() { + com.google.bigtable.admin.v2.TieredStorageRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.TieredStorageRule buildPartial() { + com.google.bigtable.admin.v2.TieredStorageRule result = + new com.google.bigtable.admin.v2.TieredStorageRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.TieredStorageRule result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.admin.v2.TieredStorageRule result) { + result.ruleCase_ = ruleCase_; + result.rule_ = this.rule_; + if (ruleCase_ == 1 && includeIfOlderThanBuilder_ != null) { + result.rule_ = includeIfOlderThanBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.TieredStorageRule) { + return mergeFrom((com.google.bigtable.admin.v2.TieredStorageRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.TieredStorageRule other) { + if (other == com.google.bigtable.admin.v2.TieredStorageRule.getDefaultInstance()) return this; + switch (other.getRuleCase()) { + case INCLUDE_IF_OLDER_THAN: + { + mergeIncludeIfOlderThan(other.getIncludeIfOlderThan()); + break; + } + case RULE_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( + internalGetIncludeIfOlderThanFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 1; + 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 ruleCase_ = 0; + private java.lang.Object rule_; + + public RuleCase getRuleCase() { + return RuleCase.forNumber(ruleCase_); + } + + public Builder clearRule() { + ruleCase_ = 0; + rule_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + includeIfOlderThanBuilder_; + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return Whether the includeIfOlderThan field is set. + */ + @java.lang.Override + public boolean hasIncludeIfOlderThan() { + return ruleCase_ == 1; + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return The includeIfOlderThan. + */ + @java.lang.Override + public com.google.protobuf.Duration getIncludeIfOlderThan() { + if (includeIfOlderThanBuilder_ == null) { + if (ruleCase_ == 1) { + return (com.google.protobuf.Duration) rule_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (ruleCase_ == 1) { + return includeIfOlderThanBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + public Builder setIncludeIfOlderThan(com.google.protobuf.Duration value) { + if (includeIfOlderThanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + includeIfOlderThanBuilder_.setMessage(value); + } + ruleCase_ = 1; + return this; + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + public Builder setIncludeIfOlderThan(com.google.protobuf.Duration.Builder builderForValue) { + if (includeIfOlderThanBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + includeIfOlderThanBuilder_.setMessage(builderForValue.build()); + } + ruleCase_ = 1; + return this; + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + public Builder mergeIncludeIfOlderThan(com.google.protobuf.Duration value) { + if (includeIfOlderThanBuilder_ == null) { + if (ruleCase_ == 1 && rule_ != com.google.protobuf.Duration.getDefaultInstance()) { + rule_ = + com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + if (ruleCase_ == 1) { + includeIfOlderThanBuilder_.mergeFrom(value); + } else { + includeIfOlderThanBuilder_.setMessage(value); + } + } + ruleCase_ = 1; + return this; + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + public Builder clearIncludeIfOlderThan() { + if (includeIfOlderThanBuilder_ == null) { + if (ruleCase_ == 1) { + ruleCase_ = 0; + rule_ = null; + onChanged(); + } + } else { + if (ruleCase_ == 1) { + ruleCase_ = 0; + rule_ = null; + } + includeIfOlderThanBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + public com.google.protobuf.Duration.Builder getIncludeIfOlderThanBuilder() { + return internalGetIncludeIfOlderThanFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getIncludeIfOlderThanOrBuilder() { + if ((ruleCase_ == 1) && (includeIfOlderThanBuilder_ != null)) { + return includeIfOlderThanBuilder_.getMessageOrBuilder(); + } else { + if (ruleCase_ == 1) { + return (com.google.protobuf.Duration) rule_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + + /** + * + * + *
      +     * Include cells older than the given age.
      +     * For the infrequent access tier, this value must be at least 30 days.
      +     * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetIncludeIfOlderThanFieldBuilder() { + if (includeIfOlderThanBuilder_ == null) { + if (!(ruleCase_ == 1)) { + rule_ = com.google.protobuf.Duration.getDefaultInstance(); + } + includeIfOlderThanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) rule_, getParentForChildren(), isClean()); + rule_ = null; + } + ruleCase_ = 1; + onChanged(); + return includeIfOlderThanBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.TieredStorageRule) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.TieredStorageRule) + private static final com.google.bigtable.admin.v2.TieredStorageRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.TieredStorageRule(); + } + + public static com.google.bigtable.admin.v2.TieredStorageRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TieredStorageRule 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.bigtable.admin.v2.TieredStorageRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRuleOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRuleOrBuilder.java new file mode 100644 index 0000000000..642ec6aac2 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TieredStorageRuleOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/table.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface TieredStorageRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.TieredStorageRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return Whether the includeIfOlderThan field is set. + */ + boolean hasIncludeIfOlderThan(); + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + * + * @return The includeIfOlderThan. + */ + com.google.protobuf.Duration getIncludeIfOlderThan(); + + /** + * + * + *
      +   * Include cells older than the given age.
      +   * For the infrequent access tier, this value must be at least 30 days.
      +   * 
      + * + * .google.protobuf.Duration include_if_older_than = 1; + */ + com.google.protobuf.DurationOrBuilder getIncludeIfOlderThanOrBuilder(); + + com.google.bigtable.admin.v2.TieredStorageRule.RuleCase getRuleCase(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Type.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Type.java index 9a6148053e..e54b272a43 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Type.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Type.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,54 +29,58 @@ * familiarity and consistency across products and features. * * For compatibility with Bigtable's existing untyped APIs, each `Type` includes - * an `Encoding` which describes how to convert to/from the underlying data. + * an `Encoding` which describes how to convert to or from the underlying data. * - * Each encoding also defines the following properties: + * Each encoding can operate in one of two modes: * - * * Order-preserving: Does the encoded value sort consistently with the - * original typed value? Note that Bigtable will always sort data based on - * the raw encoded value, *not* the decoded type. - * - Example: BYTES values sort in the same order as their raw encodings. - * - Counterexample: Encoding INT64 as a fixed-width decimal string does - * *not* preserve sort order when dealing with negative numbers. - * `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. - * * Self-delimiting: If we concatenate two encoded values, can we always tell - * where the first one ends and the second one begins? - * - Example: If we encode INT64s to fixed-width STRINGs, the first value - * will always contain exactly N digits, possibly preceded by a sign. - * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have - * no way to tell where the first one ends. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` + * if and only if `X <= Y`. This is useful anywhere sort order is important, + * for example when encoding keys. + * - Distinct: In this mode, Bigtable guarantees that if `X != Y` then + * `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For + * example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}" + * are valid encodings of the same JSON value. + * + * The API clearly documents which mode is used wherever an encoding can be + * configured. Each encoding also documents which values are supported in which + * modes. For example, when encoding INT64 as a numeric STRING, negative numbers + * cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but + * `STRING("-00001") > STRING("00001")`. * * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } private Type() {} - @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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_fieldAccessorTable @@ -93,7 +98,7 @@ public interface BytesOrBuilder * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -101,11 +106,12 @@ public interface BytesOrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -113,17 +119,19 @@ public interface BytesOrBuilder * @return The encoding. */ com.google.bigtable.admin.v2.Type.Bytes.Encoding getEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; */ com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -134,31 +142,36 @@ public interface BytesOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes} */ - public static final class Bytes extends com.google.protobuf.GeneratedMessageV3 + public static final class Bytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes) BytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bytes"); + } + // Use Bytes.newBuilder() to construct. - private Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Bytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Bytes() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Bytes(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_fieldAccessorTable @@ -184,6 +197,7 @@ public interface EncodingOrBuilder * @return Whether the raw field is set. */ boolean hasRaw(); + /** * * @@ -196,6 +210,7 @@ public interface EncodingOrBuilder * @return The raw. */ com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw(); + /** * * @@ -209,40 +224,46 @@ public interface EncodingOrBuilder com.google.bigtable.admin.v2.Type.Bytes.Encoding.EncodingCase getEncodingCase(); } + /** * * *
      -     * Rules used to convert to/from lower level types.
      +     * Rules used to convert to or from lower level types.
            * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_fieldAccessorTable @@ -255,43 +276,50 @@ public interface RawOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) com.google.protobuf.MessageOrBuilder {} + /** * * *
      -       * Leaves the value "as-is"
      -       * * Order-preserving? Yes
      -       * * Self-delimiting? No
      -       * * Compatibility? N/A
      +       * Leaves the value as-is.
      +       *
      +       * Sorted mode: all values are supported.
      +       *
      +       * Distinct mode: all values are supported.
              * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} */ - public static final class Raw extends com.google.protobuf.GeneratedMessageV3 + public static final class Raw extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) RawOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Raw"); + } + // Use Raw.newBuilder() to construct. - private Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Raw(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Raw() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Raw(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable @@ -393,39 +421,38 @@ public static com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw parseFrom( public static com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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); } @@ -450,24 +477,26 @@ 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; } + /** * * *
      -         * Leaves the value "as-is"
      -         * * Order-preserving? Yes
      -         * * Self-delimiting? No
      -         * * Compatibility? N/A
      +         * Leaves the value as-is.
      +         *
      +         * Sorted mode: all values are supported.
      +         *
      +         * Distinct mode: all values are supported.
                * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes.Encoding.Raw} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Bytes.Encoding.Raw) com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder { @@ -477,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable @@ -489,7 +518,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -527,41 +556,6 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw 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.bigtable.admin.v2.Type.Bytes.Encoding.Raw) { @@ -618,18 +612,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.bigtable.admin.v2.Type.Bytes.Encoding.Raw) } @@ -698,6 +680,7 @@ public enum EncodingCase private EncodingCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -729,6 +712,7 @@ public EncodingCase getEncodingCase() { } public static final int RAW_FIELD_NUMBER = 1; + /** * * @@ -744,6 +728,7 @@ public EncodingCase getEncodingCase() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -762,6 +747,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw() { } return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } + /** * * @@ -895,38 +881,38 @@ public static com.google.bigtable.admin.v2.Type.Bytes.Encoding parseFrom( public static com.google.bigtable.admin.v2.Type.Bytes.Encoding 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.bigtable.admin.v2.Type.Bytes.Encoding 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.bigtable.admin.v2.Type.Bytes.Encoding 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.bigtable.admin.v2.Type.Bytes.Encoding 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.bigtable.admin.v2.Type.Bytes.Encoding 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.bigtable.admin.v2.Type.Bytes.Encoding 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); } @@ -950,21 +936,22 @@ 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; } + /** * * *
      -       * Rules used to convert to/from lower level types.
      +       * Rules used to convert to or from lower level types.
              * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes.Encoding} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Bytes.Encoding) com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder { @@ -974,7 +961,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_fieldAccessorTable @@ -986,7 +973,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.Bytes.Encoding.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1046,41 +1033,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Bytes.Encoding } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.Type.Bytes.Encoding) { @@ -1133,7 +1085,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRawFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRawFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 1; break; } // case 10 @@ -1170,11 +1122,12 @@ public Builder clearEncoding() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder> rawBuilder_; + /** * * @@ -1190,6 +1143,7 @@ public Builder clearEncoding() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -1215,6 +1169,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw getRaw() { return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1237,6 +1192,7 @@ public Builder setRaw(com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw value encodingCase_ = 1; return this; } + /** * * @@ -1257,6 +1213,7 @@ public Builder setRaw( encodingCase_ = 1; return this; } + /** * * @@ -1290,6 +1247,7 @@ public Builder mergeRaw(com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw val encodingCase_ = 1; return this; } + /** * * @@ -1315,6 +1273,7 @@ public Builder clearRaw() { } return this; } + /** * * @@ -1325,8 +1284,9 @@ public Builder clearRaw() { * .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; */ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder getRawBuilder() { - return getRawFieldBuilder().getBuilder(); + return internalGetRawFieldBuilder().getBuilder(); } + /** * * @@ -1347,6 +1307,7 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBui return com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1356,17 +1317,17 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBui * * .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder> - getRawFieldBuilder() { + internalGetRawFieldBuilder() { if (rawBuilder_ == null) { if (!(encodingCase_ == 1)) { encoding_ = com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } rawBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder>( @@ -1380,18 +1341,6 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBui return rawBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Bytes.Encoding) } @@ -1447,11 +1396,12 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding getDefaultInstanceForTyp private int bitField0_; public static final int ENCODING_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type.Bytes.Encoding encoding_; + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1462,11 +1412,12 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding getDefaultInstanceForTyp public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1479,11 +1430,12 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding getEncoding() { ? com.google.bigtable.admin.v2.Type.Bytes.Encoding.getDefaultInstance() : encoding_; } + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1600,38 +1552,38 @@ public static com.google.bigtable.admin.v2.Type.Bytes parseFrom( public static com.google.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes 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); } @@ -1654,11 +1606,11 @@ 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; } + /** * * @@ -1669,8 +1621,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Type.Bytes} */ - 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.bigtable.admin.v2.Type.Bytes) com.google.bigtable.admin.v2.Type.BytesOrBuilder { @@ -1680,7 +1631,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Bytes_fieldAccessorTable @@ -1694,14 +1645,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) { - getEncodingFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } } @@ -1758,41 +1709,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Type.Bytes 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.bigtable.admin.v2.Type.Bytes) { @@ -1836,7 +1752,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getEncodingFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -1860,16 +1777,17 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Type.Bytes.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder> encodingBuilder_; + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1879,11 +1797,12 @@ public Builder mergeFrom( public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1899,11 +1818,12 @@ public com.google.bigtable.admin.v2.Type.Bytes.Encoding getEncoding() { return encodingBuilder_.getMessage(); } } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1921,11 +1841,12 @@ public Builder setEncoding(com.google.bigtable.admin.v2.Type.Bytes.Encoding valu onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1941,11 +1862,12 @@ public Builder setEncoding( onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1969,11 +1891,12 @@ public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.Bytes.Encoding va } return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -1988,11 +1911,12 @@ public Builder clearEncoding() { onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -2000,13 +1924,14 @@ public Builder clearEncoding() { public com.google.bigtable.admin.v2.Type.Bytes.Encoding.Builder getEncodingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getEncodingFieldBuilder().getBuilder(); + return internalGetEncodingFieldBuilder().getBuilder(); } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; @@ -2020,23 +1945,24 @@ public com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBu : encoding_; } } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder> - getEncodingFieldBuilder() { + internalGetEncodingFieldBuilder() { if (encodingBuilder_ == null) { encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes.Encoding, com.google.bigtable.admin.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder>( @@ -2046,18 +1972,6 @@ public com.google.bigtable.admin.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBu return encodingBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Bytes) } @@ -2119,7 +2033,7 @@ public interface StringOrBuilder * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -2127,11 +2041,12 @@ public interface StringOrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -2139,17 +2054,19 @@ public interface StringOrBuilder * @return The encoding. */ com.google.bigtable.admin.v2.Type.String.Encoding getEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; */ com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -2160,31 +2077,36 @@ public interface StringOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.String} */ - public static final class String extends com.google.protobuf.GeneratedMessageV3 + public static final class String extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String) StringOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "String"); + } + // Use String.newBuilder() to construct. - private String(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private String(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private String() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new String(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable @@ -2210,11 +2132,12 @@ public interface EncodingOrBuilder * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return Whether the utf8Raw field is set. */ @java.lang.Deprecated boolean hasUtf8Raw(); + /** * * @@ -2227,11 +2150,12 @@ public interface EncodingOrBuilder * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return The utf8Raw. */ @java.lang.Deprecated com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw(); + /** * * @@ -2258,6 +2182,7 @@ public interface EncodingOrBuilder * @return Whether the utf8Bytes field is set. */ boolean hasUtf8Bytes(); + /** * * @@ -2270,6 +2195,7 @@ public interface EncodingOrBuilder * @return The utf8Bytes. */ com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes(); + /** * * @@ -2283,40 +2209,46 @@ public interface EncodingOrBuilder com.google.bigtable.admin.v2.Type.String.Encoding.EncodingCase getEncodingCase(); } + /** * * *
      -     * Rules used to convert to/from lower level types.
      +     * Rules used to convert to or from lower level types.
            * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable @@ -2330,6 +2262,7 @@ public interface Utf8RawOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -2340,31 +2273,36 @@ public interface Utf8RawOrBuilder * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} */ @java.lang.Deprecated - public static final class Utf8Raw extends com.google.protobuf.GeneratedMessageV3 + public static final class Utf8Raw extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) Utf8RawOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Utf8Raw"); + } + // Use Utf8Raw.newBuilder() to construct. - private Utf8Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Utf8Raw(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Utf8Raw() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Utf8Raw(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable @@ -2466,39 +2404,38 @@ public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw parseFro public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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); } @@ -2523,10 +2460,11 @@ 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; } + /** * * @@ -2537,7 +2475,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder { @@ -2547,7 +2485,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable @@ -2559,7 +2497,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2598,41 +2536,6 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw 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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) { @@ -2691,18 +2594,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.bigtable.admin.v2.Type.String.Encoding.Utf8Raw) } @@ -2762,46 +2653,58 @@ public interface Utf8BytesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) com.google.protobuf.MessageOrBuilder {} + /** * * *
      -       * UTF-8 encoding
      -       * * Order-preserving? Yes (code point order)
      -       * * Self-delimiting? No
      -       * * Compatibility?
      -       *    - BigQuery Federation `TEXT` encoding
      -       *    - HBase `Bytes.toBytes`
      -       *    - Java `String#getBytes(StandardCharsets.UTF_8)`
      +       * UTF-8 encoding.
      +       *
      +       * Sorted mode:
      +       * - All values are supported.
      +       * - Code point order is preserved.
      +       *
      +       * Distinct mode: all values are supported.
      +       *
      +       * Compatible with:
      +       *
      +       * - BigQuery `TEXT` encoding
      +       * - HBase `Bytes.toBytes`
      +       * - Java `String#getBytes(StandardCharsets.UTF_8)`
              * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} */ - public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessageV3 + public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) Utf8BytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Utf8Bytes"); + } + // Use Utf8Bytes.newBuilder() to construct. - private Utf8Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Utf8Bytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Utf8Bytes() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Utf8Bytes(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable @@ -2903,20 +2806,19 @@ public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseF public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes @@ -2924,20 +2826,20 @@ public static com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes parseF 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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); } @@ -2962,27 +2864,34 @@ 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; } + /** * * *
      -         * UTF-8 encoding
      -         * * Order-preserving? Yes (code point order)
      -         * * Self-delimiting? No
      -         * * Compatibility?
      -         *    - BigQuery Federation `TEXT` encoding
      -         *    - HBase `Bytes.toBytes`
      -         *    - Java `String#getBytes(StandardCharsets.UTF_8)`
      +         * UTF-8 encoding.
      +         *
      +         * Sorted mode:
      +         * - All values are supported.
      +         * - Code point order is preserved.
      +         *
      +         * Distinct mode: all values are supported.
      +         *
      +         * Compatible with:
      +         *
      +         * - BigQuery `TEXT` encoding
      +         * - HBase `Bytes.toBytes`
      +         * - Java `String#getBytes(StandardCharsets.UTF_8)`
                * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder { @@ -2992,7 +2901,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable @@ -3005,7 +2914,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3044,41 +2953,6 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) { @@ -3137,18 +3011,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.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes) } @@ -3222,6 +3084,7 @@ public enum EncodingCase private EncodingCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -3255,6 +3118,7 @@ public EncodingCase getEncodingCase() { } public static final int UTF8_RAW_FIELD_NUMBER = 1; + /** * * @@ -3267,7 +3131,7 @@ public EncodingCase getEncodingCase() { * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return Whether the utf8Raw field is set. */ @java.lang.Override @@ -3275,6 +3139,7 @@ public EncodingCase getEncodingCase() { public boolean hasUtf8Raw() { return encodingCase_ == 1; } + /** * * @@ -3287,7 +3152,7 @@ public boolean hasUtf8Raw() { * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return The utf8Raw. */ @java.lang.Override @@ -3298,6 +3163,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { } return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } + /** * * @@ -3320,6 +3186,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { } public static final int UTF8_BYTES_FIELD_NUMBER = 2; + /** * * @@ -3335,6 +3202,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { public boolean hasUtf8Bytes() { return encodingCase_ == 2; } + /** * * @@ -3353,6 +3221,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes( } return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } + /** * * @@ -3504,38 +3373,38 @@ public static com.google.bigtable.admin.v2.Type.String.Encoding parseFrom( public static com.google.bigtable.admin.v2.Type.String.Encoding 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.bigtable.admin.v2.Type.String.Encoding 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.bigtable.admin.v2.Type.String.Encoding 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.bigtable.admin.v2.Type.String.Encoding 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.bigtable.admin.v2.Type.String.Encoding 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.bigtable.admin.v2.Type.String.Encoding 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); } @@ -3560,21 +3429,22 @@ 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; } + /** * * *
      -       * Rules used to convert to/from lower level types.
      +       * Rules used to convert to or from lower level types.
              * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.String.Encoding} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.String.Encoding) com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder { @@ -3584,7 +3454,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable @@ -3596,7 +3466,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.String.Encoding.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3663,48 +3533,13 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.String.Encodin } @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.String.Encoding) { - return mergeFrom((com.google.bigtable.admin.v2.Type.String.Encoding) other); - } else { - super.mergeFrom(other); - return this; - } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.String.Encoding) { + return mergeFrom((com.google.bigtable.admin.v2.Type.String.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } } public Builder mergeFrom(com.google.bigtable.admin.v2.Type.String.Encoding other) { @@ -3754,13 +3589,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getUtf8RawFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUtf8RawFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getUtf8BytesFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUtf8BytesFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 2; break; } // case 18 @@ -3797,11 +3634,12 @@ public Builder clearEncoding() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder> utf8RawBuilder_; + /** * * @@ -3814,7 +3652,7 @@ public Builder clearEncoding() { * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return Whether the utf8Raw field is set. */ @java.lang.Override @@ -3822,6 +3660,7 @@ public Builder clearEncoding() { public boolean hasUtf8Raw() { return encodingCase_ == 1; } + /** * * @@ -3834,7 +3673,7 @@ public boolean hasUtf8Raw() { * * * @deprecated google.bigtable.admin.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/admin/v2/types.proto;l=97 + * google/bigtable/admin/v2/types.proto;l=102 * @return The utf8Raw. */ @java.lang.Override @@ -3852,6 +3691,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } } + /** * * @@ -3877,6 +3717,7 @@ public Builder setUtf8Raw(com.google.bigtable.admin.v2.Type.String.Encoding.Utf8 encodingCase_ = 1; return this; } + /** * * @@ -3900,6 +3741,7 @@ public Builder setUtf8Raw( encodingCase_ = 1; return this; } + /** * * @@ -3938,6 +3780,7 @@ public Builder mergeUtf8Raw( encodingCase_ = 1; return this; } + /** * * @@ -3966,6 +3809,7 @@ public Builder clearUtf8Raw() { } return this; } + /** * * @@ -3980,8 +3824,9 @@ public Builder clearUtf8Raw() { @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder getUtf8RawBuilder() { - return getUtf8RawFieldBuilder().getBuilder(); + return internalGetUtf8RawFieldBuilder().getBuilder(); } + /** * * @@ -4006,6 +3851,7 @@ public Builder clearUtf8Raw() { return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } } + /** * * @@ -4017,18 +3863,18 @@ public Builder clearUtf8Raw() { * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder> - getUtf8RawFieldBuilder() { + internalGetUtf8RawFieldBuilder() { if (utf8RawBuilder_ == null) { if (!(encodingCase_ == 1)) { encoding_ = com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } utf8RawBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8RawOrBuilder>( @@ -4042,11 +3888,12 @@ public Builder clearUtf8Raw() { return utf8RawBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder> utf8BytesBuilder_; + /** * * @@ -4062,6 +3909,7 @@ public Builder clearUtf8Raw() { public boolean hasUtf8Bytes() { return encodingCase_ == 2; } + /** * * @@ -4087,6 +3935,7 @@ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes( return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } } + /** * * @@ -4110,6 +3959,7 @@ public Builder setUtf8Bytes( encodingCase_ = 2; return this; } + /** * * @@ -4130,6 +3980,7 @@ public Builder setUtf8Bytes( encodingCase_ = 2; return this; } + /** * * @@ -4165,6 +4016,7 @@ public Builder mergeUtf8Bytes( encodingCase_ = 2; return this; } + /** * * @@ -4190,6 +4042,7 @@ public Builder clearUtf8Bytes() { } return this; } + /** * * @@ -4201,8 +4054,9 @@ public Builder clearUtf8Bytes() { */ public com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8BytesBuilder() { - return getUtf8BytesFieldBuilder().getBuilder(); + return internalGetUtf8BytesFieldBuilder().getBuilder(); } + /** * * @@ -4224,6 +4078,7 @@ public Builder clearUtf8Bytes() { return com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } } + /** * * @@ -4233,18 +4088,18 @@ public Builder clearUtf8Bytes() { * * .google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder> - getUtf8BytesFieldBuilder() { + internalGetUtf8BytesFieldBuilder() { if (utf8BytesBuilder_ == null) { if (!(encodingCase_ == 2)) { encoding_ = com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } utf8BytesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.admin.v2.Type.String.Encoding.Utf8BytesOrBuilder>( @@ -4258,18 +4113,6 @@ public Builder clearUtf8Bytes() { return utf8BytesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String.Encoding) } @@ -4325,11 +4168,12 @@ public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForTy private int bitField0_; public static final int ENCODING_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type.String.Encoding encoding_; + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4340,11 +4184,12 @@ public com.google.bigtable.admin.v2.Type.String.Encoding getDefaultInstanceForTy public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4357,11 +4202,12 @@ public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { ? com.google.bigtable.admin.v2.Type.String.Encoding.getDefaultInstance() : encoding_; } + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4479,38 +4325,38 @@ public static com.google.bigtable.admin.v2.Type.String parseFrom( public static com.google.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String 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); } @@ -4533,11 +4379,11 @@ 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; } + /** * * @@ -4548,8 +4394,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Type.String} */ - 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.bigtable.admin.v2.Type.String) com.google.bigtable.admin.v2.Type.StringOrBuilder { @@ -4559,7 +4404,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable @@ -4573,14 +4418,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) { - getEncodingFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } } @@ -4637,41 +4482,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Type.String 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.bigtable.admin.v2.Type.String) { @@ -4715,7 +4525,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getEncodingFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -4739,16 +4550,17 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Type.String.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding, com.google.bigtable.admin.v2.Type.String.Encoding.Builder, com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder> encodingBuilder_; + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4758,11 +4570,12 @@ public Builder mergeFrom( public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4778,11 +4591,12 @@ public com.google.bigtable.admin.v2.Type.String.Encoding getEncoding() { return encodingBuilder_.getMessage(); } } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4800,11 +4614,12 @@ public Builder setEncoding(com.google.bigtable.admin.v2.Type.String.Encoding val onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4820,11 +4635,12 @@ public Builder setEncoding( onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4848,11 +4664,12 @@ public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.String.Encoding v } return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4867,11 +4684,12 @@ public Builder clearEncoding() { onChanged(); return this; } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4879,13 +4697,14 @@ public Builder clearEncoding() { public com.google.bigtable.admin.v2.Type.String.Encoding.Builder getEncodingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getEncodingFieldBuilder().getBuilder(); + return internalGetEncodingFieldBuilder().getBuilder(); } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; @@ -4899,23 +4718,24 @@ public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrB : encoding_; } } + /** * * *
      -       * The encoding to use when converting to/from lower level types.
      +       * The encoding to use when converting to or from lower level types.
              * 
      * * .google.bigtable.admin.v2.Type.String.Encoding encoding = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding, com.google.bigtable.admin.v2.Type.String.Encoding.Builder, com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder> - getEncodingFieldBuilder() { + internalGetEncodingFieldBuilder() { if (encodingBuilder_ == null) { encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.String.Encoding, com.google.bigtable.admin.v2.Type.String.Encoding.Builder, com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder>( @@ -4925,18 +4745,6 @@ public com.google.bigtable.admin.v2.Type.String.EncodingOrBuilder getEncodingOrB return encodingBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.String) } @@ -4998,7 +4806,7 @@ public interface Int64OrBuilder * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; @@ -5006,11 +4814,12 @@ public interface Int64OrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; @@ -5018,17 +4827,19 @@ public interface Int64OrBuilder * @return The encoding. */ com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding(); + /** * * *
      -     * The encoding to use when converting to/from lower level types.
      +     * The encoding to use when converting to or from lower level types.
            * 
      * * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; */ com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -5039,31 +4850,36 @@ public interface Int64OrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Int64} */ - public static final class Int64 extends com.google.protobuf.GeneratedMessageV3 + public static final class Int64 extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64) Int64OrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Int64"); + } + // Use Int64.newBuilder() to construct. - private Int64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int64(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Int64() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Int64(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_fieldAccessorTable @@ -5090,6 +4906,7 @@ public interface EncodingOrBuilder * @return Whether the bigEndianBytes field is set. */ boolean hasBigEndianBytes(); + /** * * @@ -5103,6 +4920,7 @@ public interface EncodingOrBuilder * @return The bigEndianBytes. */ com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes(); + /** * * @@ -5116,42 +4934,92 @@ public interface EncodingOrBuilder com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder getBigEndianBytesOrBuilder(); + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + boolean hasOrderedCodeBytes(); + + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes getOrderedCodeBytes(); + + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder(); + com.google.bigtable.admin.v2.Type.Int64.Encoding.EncodingCase getEncodingCase(); } + /** * * *
      -     * Rules used to convert to/from lower level types.
      +     * Rules used to convert to or from lower level types.
            * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_fieldAccessorTable @@ -5172,11 +5040,15 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return Whether the bytesType field is set. */ + @java.lang.Deprecated boolean hasBytesType(); + /** * * @@ -5184,11 +5056,15 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return The bytesType. */ + @java.lang.Deprecated com.google.bigtable.admin.v2.Type.Bytes getBytesType(); + /** * * @@ -5196,51 +5072,61 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder(); } + /** * * *
      -       * Encodes the value as an 8-byte big endian twos complement `Bytes`
      -       * value.
      -       * * Order-preserving? No (positive values only)
      -       * * Self-delimiting? Yes
      -       * * Compatibility?
      -       *    - BigQuery Federation `BINARY` encoding
      -       *    - HBase `Bytes.toBytes`
      -       *    - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
      +       * Encodes the value as an 8-byte big-endian two's complement value.
      +       *
      +       * Sorted mode: non-negative values are supported.
      +       *
      +       * Distinct mode: all values are supported.
      +       *
      +       * Compatible with:
      +       *
      +       * - BigQuery `BINARY` encoding
      +       * - HBase `Bytes.toBytes`
      +       * - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
              * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} */ - public static final class BigEndianBytes extends com.google.protobuf.GeneratedMessageV3 + public static final class BigEndianBytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) BigEndianBytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigEndianBytes"); + } + // Use BigEndianBytes.newBuilder() to construct. - private BigEndianBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BigEndianBytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BigEndianBytes() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BigEndianBytes(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable @@ -5252,6 +5138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int BYTES_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type.Bytes bytesType_; + /** * * @@ -5259,14 +5146,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return Whether the bytesType field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasBytesType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5274,16 +5165,20 @@ public boolean hasBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return The bytesType. */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { return bytesType_ == null ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() : bytesType_; } + /** * * @@ -5291,9 +5186,10 @@ public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { return bytesType_ == null ? com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance() @@ -5407,20 +5303,19 @@ public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes pa public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes @@ -5428,20 +5323,20 @@ public static com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes pa 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes 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); } @@ -5466,28 +5361,32 @@ 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; } + /** * * *
      -         * Encodes the value as an 8-byte big endian twos complement `Bytes`
      -         * value.
      -         * * Order-preserving? No (positive values only)
      -         * * Self-delimiting? Yes
      -         * * Compatibility?
      -         *    - BigQuery Federation `BINARY` encoding
      -         *    - HBase `Bytes.toBytes`
      -         *    - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
      +         * Encodes the value as an 8-byte big-endian two's complement value.
      +         *
      +         * Sorted mode: non-negative values are supported.
      +         *
      +         * Distinct mode: all values are supported.
      +         *
      +         * Compatible with:
      +         *
      +         * - BigQuery `BINARY` encoding
      +         * - HBase `Bytes.toBytes`
      +         * - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
                * 
      * * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder { @@ -5497,7 +5396,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable @@ -5512,14 +5411,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) { - getBytesTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBytesTypeFieldBuilder(); } } @@ -5580,41 +5479,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.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) { @@ -5662,7 +5526,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBytesTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBytesTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -5686,11 +5551,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Type.Bytes bytesType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes, com.google.bigtable.admin.v2.Type.Bytes.Builder, com.google.bigtable.admin.v2.Type.BytesOrBuilder> bytesTypeBuilder_; + /** * * @@ -5698,13 +5564,17 @@ public Builder mergeFrom( * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return Whether the bytesType field is set. */ + @java.lang.Deprecated public boolean hasBytesType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5712,10 +5582,13 @@ public boolean hasBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/admin/v2/types.proto;l=131 * @return The bytesType. */ + @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { if (bytesTypeBuilder_ == null) { return bytesType_ == null @@ -5725,6 +5598,7 @@ public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { return bytesTypeBuilder_.getMessage(); } } + /** * * @@ -5732,8 +5606,9 @@ public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { if (bytesTypeBuilder_ == null) { if (value == null) { @@ -5747,6 +5622,7 @@ public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { onChanged(); return this; } + /** * * @@ -5754,8 +5630,9 @@ public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder setBytesType( com.google.bigtable.admin.v2.Type.Bytes.Builder builderForValue) { if (bytesTypeBuilder_ == null) { @@ -5767,6 +5644,7 @@ public Builder setBytesType( onChanged(); return this; } + /** * * @@ -5774,8 +5652,9 @@ public Builder setBytesType( * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { if (bytesTypeBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) @@ -5794,6 +5673,7 @@ public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { } return this; } + /** * * @@ -5801,8 +5681,9 @@ public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder clearBytesType() { bitField0_ = (bitField0_ & ~0x00000001); bytesType_ = null; @@ -5813,6 +5694,7 @@ public Builder clearBytesType() { onChanged(); return this; } + /** * * @@ -5820,13 +5702,15 @@ public Builder clearBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBytesTypeFieldBuilder().getBuilder(); + return internalGetBytesTypeFieldBuilder().getBuilder(); } + /** * * @@ -5834,8 +5718,9 @@ public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { if (bytesTypeBuilder_ != null) { return bytesTypeBuilder_.getMessageOrBuilder(); @@ -5845,6 +5730,7 @@ public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() : bytesType_; } } + /** * * @@ -5852,16 +5738,16 @@ public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() * Deprecated: ignored if set. * * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes, com.google.bigtable.admin.v2.Type.Bytes.Builder, com.google.bigtable.admin.v2.Type.BytesOrBuilder> - getBytesTypeFieldBuilder() { + internalGetBytesTypeFieldBuilder() { if (bytesTypeBuilder_ == null) { bytesTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Bytes, com.google.bigtable.admin.v2.Type.Bytes.Builder, com.google.bigtable.admin.v2.Type.BytesOrBuilder>( @@ -5871,18 +5757,6 @@ public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() return bytesTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) } @@ -5938,1547 +5812,1625 @@ public com.google.protobuf.Parser getParserForType() { } } - private int encodingCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object encoding_; + public interface OrderedCodeBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + com.google.protobuf.MessageOrBuilder {} - public enum EncodingCase + /** + * + * + *
      +       * Encodes the value in a variable length binary format of up to 10 bytes.
      +       * Values that are closer to zero use fewer bytes.
      +       *
      +       * Sorted mode: all values are supported.
      +       *
      +       * Distinct mode: all values are supported.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} + */ + public static final class OrderedCodeBytes extends com.google.protobuf.GeneratedMessage implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BIG_ENDIAN_BYTES(1), - ENCODING_NOT_SET(0); - private final int value; + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; - private EncodingCase(int value) { - this.value = value; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OrderedCodeBytes"); } - /** - * @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 EncodingCase valueOf(int value) { - return forNumber(value); + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - public static EncodingCase forNumber(int value) { - switch (value) { - case 1: - return BIG_ENDIAN_BYTES; - case 0: - return ENCODING_NOT_SET; - default: - return null; - } + private OrderedCodeBytes() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; } - public int getNumber() { - return this.value; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder.class); } - }; - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); - } + private byte memoizedIsInitialized = -1; - public static final int BIG_ENDIAN_BYTES_FIELD_NUMBER = 1; - /** - * - * - *
      -       * Use `BigEndianBytes` encoding.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return Whether the bigEndianBytes field is set. - */ - @java.lang.Override - public boolean hasBigEndianBytes() { - return encodingCase_ == 1; - } - /** - * - * - *
      -       * Use `BigEndianBytes` encoding.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return The bigEndianBytes. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } - /** - * - * - *
      -       * Use `BigEndianBytes` encoding.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder - getBigEndianBytesOrBuilder() { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes other = + (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) obj; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (encodingCase_ == 1) { - output.writeMessage( - 1, (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - size = 0; - if (encodingCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding)) { - return super.equals(obj); + + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - com.google.bigtable.admin.v2.Type.Int64.Encoding other = - (com.google.bigtable.admin.v2.Type.Int64.Encoding) obj; - if (!getEncodingCase().equals(other.getEncodingCase())) return false; - switch (encodingCase_) { - case 1: - if (!getBigEndianBytes().equals(other.getBigEndianBytes())) return false; - break; - case 0: - default: + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (encodingCase_) { - case 1: - hash = (37 * hash) + BIG_ENDIAN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getBigEndianBytes().hashCode(); - break; - case 0: - default: + + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes 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.bigtable.admin.v2.Type.Int64.Encoding 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.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + 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.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
      +         * Encodes the value in a variable length binary format of up to 10 bytes.
      +         * Values that are closer to zero use fewer bytes.
      +         *
      +         * Sorted mode: all values are supported.
      +         *
      +         * Distinct mode: all values are supported.
      +         * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder + .class); + } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64.Encoding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + // Construct using + // com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.newBuilder() + private Builder() {} - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
      -       * Rules used to convert to/from lower level types.
      -       * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding) - com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Int64.Encoding.class, - com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder.class); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + } - // Construct using com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder() - private Builder() {} + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes build() { + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (bigEndianBytesBuilder_ != null) { - bigEndianBytesBuilder_.clear(); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes buildPartial() { + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes result = + new com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(this); + onBuilt(); + return result; } - encodingCase_ = 0; - encoding_ = null; - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) { + return mergeFrom( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); - } + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes other) { + if (other + == com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding build() { - com.google.bigtable.admin.v2.Type.Int64.Encoding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public final boolean isInitialized() { + return true; } - return result; - } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding buildPartial() { - com.google.bigtable.admin.v2.Type.Int64.Encoding result = - new com.google.bigtable.admin.v2.Type.Int64.Encoding(this); - if (bitField0_ != 0) { - buildPartial0(result); + @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; + 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; } - buildPartialOneofs(result); - onBuilt(); - return result; - } - private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { - int from_bitField0_ = bitField0_; + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) } - private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { - result.encodingCase_ = encodingCase_; - result.encoding_ = this.encoding_; - if (encodingCase_ == 1 && bigEndianBytesBuilder_ != null) { - result.encoding_ = bigEndianBytesBuilder_.build(); - } - } + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + private static final com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + DEFAULT_INSTANCE; - @java.lang.Override - public Builder clone() { - return super.clone(); + static { + DEFAULT_INSTANCE = + new com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes(); } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public static com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderedCodeBytes 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(); + } + }; - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public static com.google.protobuf.Parser parser() { + return PARSER; } @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Int64.Encoding) other); - } else { - super.mergeFrom(other); - return this; - } - } + private int encodingCase_ = 0; - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Int64.Encoding other) { - if (other == com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance()) - return this; - switch (other.getEncodingCase()) { - case BIG_ENDIAN_BYTES: - { - mergeBigEndianBytes(other.getBigEndianBytes()); - break; - } - case ENCODING_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + @SuppressWarnings("serial") + private java.lang.Object encoding_; + + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BIG_ENDIAN_BYTES(1), + ORDERED_CODE_BYTES(2), + ENCODING_NOT_SET(0); + private final int value; + + private EncodingCase(int value) { + this.value = value; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * @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 EncodingCase valueOf(int value) { + return forNumber(value); } - @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 static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return BIG_ENDIAN_BYTES; + case 2: + return ORDERED_CODE_BYTES; + case 0: + return ENCODING_NOT_SET; + default: + return null; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - getBigEndianBytesFieldBuilder().getBuilder(), extensionRegistry); - encodingCase_ = 1; - 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 encodingCase_ = 0; - private java.lang.Object encoding_; + public int getNumber() { + return this.value; + } + }; - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public static final int BIG_ENDIAN_BYTES_FIELD_NUMBER = 1; + + /** + * + * + *
      +       * Use `BigEndianBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return Whether the bigEndianBytes field is set. + */ + @java.lang.Override + public boolean hasBigEndianBytes() { + return encodingCase_ == 1; + } + + /** + * + * + *
      +       * Use `BigEndianBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return The bigEndianBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } - public Builder clearEncoding() { - encodingCase_ = 0; - encoding_ = null; - onChanged(); - return this; + /** + * + * + *
      +       * Use `BigEndianBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder + getBigEndianBytesOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } - private int bitField0_; + public static final int ORDERED_CODE_BYTES_FIELD_NUMBER = 2; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> - bigEndianBytesBuilder_; - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return Whether the bigEndianBytes field is set. - */ - @java.lang.Override - public boolean hasBigEndianBytes() { - return encodingCase_ == 1; + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getOrderedCodeBytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * - * @return The bigEndianBytes. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; - } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance(); - } else { - if (encodingCase_ == 1) { - return bigEndianBytesBuilder_.getMessage(); - } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance(); - } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + /** + * + * + *
      +       * Use `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - public Builder setBigEndianBytes( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes value) { - if (bigEndianBytesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encoding_ = value; - onChanged(); - } else { - bigEndianBytesBuilder_.setMessage(value); - } - encodingCase_ = 1; - return this; - } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - public Builder setBigEndianBytes( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder - builderForValue) { - if (bigEndianBytesBuilder_ == null) { - encoding_ = builderForValue.build(); - onChanged(); - } else { - bigEndianBytesBuilder_.setMessage(builderForValue.build()); - } - encodingCase_ = 1; - return this; + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage( + 1, (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - public Builder mergeBigEndianBytes( - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes value) { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1 - && encoding_ - != com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance()) { - encoding_ = - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder( - (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) - encoding_) - .mergeFrom(value) - .buildPartial(); - } else { - encoding_ = value; - } - onChanged(); - } else { - if (encodingCase_ == 1) { - bigEndianBytesBuilder_.mergeFrom(value); - } else { - bigEndianBytesBuilder_.setMessage(value); - } - } - encodingCase_ = 1; - return this; + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - public Builder clearBigEndianBytes() { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; - onChanged(); - } - } else { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; - } - bigEndianBytesBuilder_.clear(); - } - return this; + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder - getBigEndianBytesBuilder() { - return getBigEndianBytesFieldBuilder().getBuilder(); + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder - getBigEndianBytesOrBuilder() { - if ((encodingCase_ == 1) && (bigEndianBytesBuilder_ != null)) { - return bigEndianBytesBuilder_.getMessageOrBuilder(); - } else { - if (encodingCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; - } - return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance(); - } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * - * - *
      -         * Use `BigEndianBytes` encoding.
      -         * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> - getBigEndianBytesFieldBuilder() { - if (bigEndianBytesBuilder_ == null) { - if (!(encodingCase_ == 1)) { - encoding_ = - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance(); - } - bigEndianBytesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder>( - (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_, - getParentForChildren(), - isClean()); - encoding_ = null; - } - encodingCase_ = 1; - onChanged(); - return bigEndianBytesBuilder_; + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding)) { + return super.equals(obj); } + com.google.bigtable.admin.v2.Type.Int64.Encoding other = + (com.google.bigtable.admin.v2.Type.Int64.Encoding) obj; - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getBigEndianBytes().equals(other.getBigEndianBytes())) return false; + break; + case 2: + if (!getOrderedCodeBytes().equals(other.getOrderedCodeBytes())) return false; + break; + case 0: + default: } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding) + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + BIG_ENDIAN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getBigEndianBytes().hashCode(); + break; + case 2: + hash = (37 * hash) + ORDERED_CODE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getOrderedCodeBytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64.Encoding) - private static final com.google.bigtable.admin.v2.Type.Int64.Encoding DEFAULT_INSTANCE; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64.Encoding(); + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstance() { - return DEFAULT_INSTANCE; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Encoding 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; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - } - - private int bitField0_; - public static final int ENCODING_FIELD_NUMBER = 1; - private com.google.bigtable.admin.v2.Type.Int64.Encoding encoding_; - /** - * - * - *
      -     * The encoding to use when converting to/from lower level types.
      -     * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return Whether the encoding field is set. - */ - @java.lang.Override - public boolean hasEncoding() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
      -     * The encoding to use when converting to/from lower level types.
      -     * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding() { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } - /** - * - * - *
      -     * The encoding to use when converting to/from lower level types.
      -     * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } - private byte memoizedIsInitialized = -1; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getEncoding()); + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + public static com.google.bigtable.admin.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Int64)) { - return super.equals(obj); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - com.google.bigtable.admin.v2.Type.Int64 other = (com.google.bigtable.admin.v2.Type.Int64) obj; - if (hasEncoding() != other.hasEncoding()) return false; - if (hasEncoding()) { - if (!getEncoding().equals(other.getEncoding())) return false; + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEncoding()) { - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + getEncoding().hashCode(); + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
      +       * Rules used to convert to or from lower level types.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64.Encoding) + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; + } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Int64.Encoding.class, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder.class); + } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + // Construct using com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder() + private Builder() {} - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigEndianBytesBuilder_ != null) { + bigEndianBytesBuilder_.clear(); + } + if (orderedCodeBytesBuilder_ != null) { + orderedCodeBytesBuilder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; + } - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Int64 parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Int64 parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
      -     * Int64
      -     * Values of type `Int64` are stored in `Value.int_value`.
      -     * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Int64} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64) - com.google.bigtable.admin.v2.Type.Int64OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Int64.class, - com.google.bigtable.admin.v2.Type.Int64.Builder.class); - } - - // Construct using com.google.bigtable.admin.v2.Type.Int64.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding build() { + com.google.bigtable.admin.v2.Type.Int64.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncodingFieldBuilder(); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding buildPartial() { + com.google.bigtable.admin.v2.Type.Int64.Encoding result = + new com.google.bigtable.admin.v2.Type.Int64.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - encoding_ = null; - if (encodingBuilder_ != null) { - encodingBuilder_.dispose(); - encodingBuilder_ = null; + private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { + int from_bitField0_ = bitField0_; } - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; - } + private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Int64.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && bigEndianBytesBuilder_ != null) { + result.encoding_ = bigEndianBytesBuilder_.build(); + } + if (encodingCase_ == 2 && orderedCodeBytesBuilder_ != null) { + result.encoding_ = orderedCodeBytesBuilder_.build(); + } + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Int64.Encoding) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Int64.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 build() { - com.google.bigtable.admin.v2.Type.Int64 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Int64.Encoding other) { + if (other == com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case BIG_ENDIAN_BYTES: + { + mergeBigEndianBytes(other.getBigEndianBytes()); + break; + } + case ORDERED_CODE_BYTES: + { + mergeOrderedCodeBytes(other.getOrderedCodeBytes()); + break; + } + case ENCODING_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - return result; - } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 buildPartial() { - com.google.bigtable.admin.v2.Type.Int64 result = - new com.google.bigtable.admin.v2.Type.Int64(this); - if (bitField0_ != 0) { - buildPartial0(result); + @java.lang.Override + public final boolean isInitialized() { + return true; } - onBuilt(); - return result; - } - private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); - to_bitField0_ |= 0x00000001; + @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( + internalGetBigEndianBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetOrderedCodeBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 2; + 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; } - result.bitField0_ |= to_bitField0_; - } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + private int encodingCase_ = 0; + private java.lang.Object encoding_; - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + private int bitField0_; - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> + bigEndianBytesBuilder_; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return Whether the bigEndianBytes field is set. + */ + @java.lang.Override + public boolean hasBigEndianBytes() { + return encodingCase_ == 1; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Int64) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Int64) other); - } else { - super.mergeFrom(other); + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * + * @return The bigEndianBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return bigEndianBytesBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + public Builder setBigEndianBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes value) { + if (bigEndianBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + bigEndianBytesBuilder_.setMessage(value); + } + encodingCase_ = 1; return this; } - } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Int64 other) { - if (other == com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance()) return this; - if (other.hasEncoding()) { - mergeEncoding(other.getEncoding()); + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + public Builder setBigEndianBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder + builderForValue) { + if (bigEndianBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + bigEndianBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + public Builder mergeBigEndianBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes value) { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) + encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + bigEndianBytesBuilder_.mergeFrom(value); + } else { + bigEndianBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; + } - @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(); + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + public Builder clearBigEndianBytes() { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + bigEndianBytesBuilder_.clear(); + } + return this; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getEncodingFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder + getBigEndianBytesBuilder() { + return internalGetBigEndianBytesFieldBuilder().getBuilder(); + } - private com.google.bigtable.admin.v2.Type.Int64.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding, - com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> - encodingBuilder_; - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return Whether the encoding field is set. - */ - public boolean hasEncoding() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. - */ - public com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding() { - if (encodingBuilder_ == null) { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } else { - return encodingBuilder_.getMessage(); - } - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder setEncoding(com.google.bigtable.admin.v2.Type.Int64.Encoding value) { - if (encodingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encoding_ = value; - } else { - encodingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder setEncoding( - com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder builderForValue) { - if (encodingBuilder_ == null) { - encoding_ = builderForValue.build(); - } else { - encodingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.Int64.Encoding value) { - if (encodingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && encoding_ != null - && encoding_ - != com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance()) { - getEncodingBuilder().mergeFrom(value); + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder + getBigEndianBytesOrBuilder() { + if ((encodingCase_ == 1) && (bigEndianBytesBuilder_ != null)) { + return bigEndianBytesBuilder_.getMessageOrBuilder(); } else { - encoding_ = value; + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance(); } - } else { - encodingBuilder_.mergeFrom(value); } - if (encoding_ != null) { - bitField0_ |= 0x00000001; + + /** + * + * + *
      +         * Use `BigEndianBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> + internalGetBigEndianBytesFieldBuilder() { + if (bigEndianBytesBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance(); + } + bigEndianBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder>( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; onChanged(); + return bigEndianBytesBuilder_; } - return this; - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder clearEncoding() { - bitField0_ = (bitField0_ & ~0x00000001); - encoding_ = null; - if (encodingBuilder_ != null) { - encodingBuilder_.dispose(); - encodingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder getEncodingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getEncodingFieldBuilder().getBuilder(); - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { - if (encodingBuilder_ != null) { - return encodingBuilder_.getMessageOrBuilder(); - } else { - return encoding_ == null - ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } - } - /** - * - * - *
      -       * The encoding to use when converting to/from lower level types.
      -       * 
      - * - * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding, - com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> - getEncodingFieldBuilder() { - if (encodingBuilder_ == null) { - encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64.Encoding, - com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder>( - getEncoding(), getParentForChildren(), isClean()); - encoding_ = null; - } - return encodingBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64) - } - - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64) - private static final com.google.bigtable.admin.v2.Type.Int64 DEFAULT_INSTANCE; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder> + orderedCodeBytesBuilder_; - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64(); - } - - public static com.google.bigtable.admin.v2.Type.Int64 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 2; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64 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()); + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + getOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; } - return builder.buildPartial(); + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return orderedCodeBytesBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + encodingCase_ = 2; + return this; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder + builderForValue) { + if (orderedCodeBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 2; + return this; + } - public interface BoolOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Bool) - com.google.protobuf.MessageOrBuilder {} - /** - * - * - *
      -   * bool
      -   * Values of type `Bool` are stored in `Value.bool_value`.
      -   * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Bool} - */ - public static final class Bool extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bool) - BoolOrBuilder { - private static final long serialVersionUID = 0L; - // Use Bool.newBuilder() to construct. - private Bool(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder mergeOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.newBuilder( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) + encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + orderedCodeBytesBuilder_.mergeFrom(value); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 2; + return this; + } - private Bool() {} + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder clearOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + orderedCodeBytesBuilder_.clear(); + } + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Bool(); - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder + getOrderedCodeBytesBuilder() { + return internalGetOrderedCodeBytesFieldBuilder().getBuilder(); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if ((encodingCase_ == 2) && (orderedCodeBytesBuilder_ != null)) { + return orderedCodeBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Bool.class, - com.google.bigtable.admin.v2.Type.Bool.Builder.class); - } + /** + * + * + *
      +         * Use `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder> + internalGetOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder>( + (com.google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 2; + onChanged(); + return orderedCodeBytesBuilder_; + } - private byte memoizedIsInitialized = -1; + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64.Encoding) + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64.Encoding) + private static final com.google.bigtable.admin.v2.Type.Int64.Encoding DEFAULT_INSTANCE; - memoizedIsInitialized = 1; - return true; - } + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64.Encoding(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } + public static com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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(); + } + }; - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Bool)) { - return super.equals(obj); + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - com.google.bigtable.admin.v2.Type.Bool other = (com.google.bigtable.admin.v2.Type.Bool) obj; + } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type.Int64.Encoding encoding_; + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + @java.lang.Override + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEncoding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + } + 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.bigtable.admin.v2.Type.Int64)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Int64 other = (com.google.bigtable.admin.v2.Type.Int64) obj; + + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7489,80 +7441,84 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.admin.v2.Type.Int64 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseFrom(byte[] data) + public static com.google.bigtable.admin.v2.Type.Int64 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Bool parseFrom(java.io.InputStream input) + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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.bigtable.admin.v2.Type.Bool parseFrom( + public static com.google.bigtable.admin.v2.Type.Int64 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); } @@ -7575,7 +7531,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Bool prototype) { + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Int64 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7585,68 +7541,82 @@ 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; } + /** * * *
      -     * bool
      -     * Values of type `Bool` are stored in `Value.bool_value`.
      +     * Int64
      +     * Values of type `Int64` are stored in `Value.int_value`.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Bool} + * Protobuf type {@code google.bigtable.admin.v2.Type.Int64} */ - 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.bigtable.admin.v2.Type.Bool) - com.google.bigtable.admin.v2.Type.BoolOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Int64) + com.google.bigtable.admin.v2.Type.Int64OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Int64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Bool.class, - com.google.bigtable.admin.v2.Type.Bool.Builder.class); + com.google.bigtable.admin.v2.Type.Int64.class, + com.google.bigtable.admin.v2.Type.Int64.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Bool.newBuilder() - private Builder() {} + // Construct using com.google.bigtable.admin.v2.Type.Int64.newBuilder() + 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) { + internalGetEncodingFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bool getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + public com.google.bigtable.admin.v2.Type.Int64 getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bool build() { - com.google.bigtable.admin.v2.Type.Bool result = buildPartial(); + public com.google.bigtable.admin.v2.Type.Int64 build() { + com.google.bigtable.admin.v2.Type.Int64 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7654,60 +7624,41 @@ public com.google.bigtable.admin.v2.Type.Bool build() { } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bool buildPartial() { - com.google.bigtable.admin.v2.Type.Bool result = - new com.google.bigtable.admin.v2.Type.Bool(this); + public com.google.bigtable.admin.v2.Type.Int64 buildPartial() { + com.google.bigtable.admin.v2.Type.Int64 result = + new com.google.bigtable.admin.v2.Type.Int64(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(com.google.bigtable.admin.v2.Type.Int64 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Bool) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Bool) other); + if (other instanceof com.google.bigtable.admin.v2.Type.Int64) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Int64) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Bool other) { - if (other == com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Int64 other) { + if (other == com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance()) return this; + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7734,6 +7685,13 @@ public Builder mergeFrom( case 0: done = true; break; + case 10: + { + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7751,36 +7709,222 @@ 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); - } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Bool) - } + private com.google.bigtable.admin.v2.Type.Int64.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> + encodingBuilder_; - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Bool) - private static final com.google.bigtable.admin.v2.Type.Bool DEFAULT_INSTANCE; + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Bool(); + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.admin.v2.Type.Int64.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.admin.v2.Type.Int64.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.Int64.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ + != com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; + } + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Int64) } - public static com.google.bigtable.admin.v2.Type.Bool getDefaultInstance() { + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Int64) + private static final com.google.bigtable.admin.v2.Type.Int64 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Int64(); + } + + public static com.google.bigtable.admin.v2.Type.Int64 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Bool parsePartialFrom( + public Int64 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7800,66 +7944,72 @@ public Bool parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bool getDefaultInstanceForType() { + public com.google.bigtable.admin.v2.Type.Int64 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Float32OrBuilder + public interface BoolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float32) + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Bool) com.google.protobuf.MessageOrBuilder {} + /** * * *
      -   * Float32
      -   * Values of type `Float32` are stored in `Value.float_value`.
      +   * bool
      +   * Values of type `Bool` are stored in `Value.bool_value`.
          * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} + * Protobuf type {@code google.bigtable.admin.v2.Type.Bool} */ - public static final class Float32 extends com.google.protobuf.GeneratedMessageV3 + public static final class Bool extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Float32) - Float32OrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Bool) + BoolOrBuilder { private static final long serialVersionUID = 0L; - // Use Float32.newBuilder() to construct. - private Float32(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Float32() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bool"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Float32(); + // Use Bool.newBuilder() to construct. + private Bool(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Bool() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Float32.class, - com.google.bigtable.admin.v2.Type.Float32.Builder.class); + com.google.bigtable.admin.v2.Type.Bool.class, + com.google.bigtable.admin.v2.Type.Bool.Builder.class); } private byte memoizedIsInitialized = -1; @@ -7895,11 +8045,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Float32)) { + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Bool)) { return super.equals(obj); } - com.google.bigtable.admin.v2.Type.Float32 other = - (com.google.bigtable.admin.v2.Type.Float32) obj; + com.google.bigtable.admin.v2.Type.Bool other = (com.google.bigtable.admin.v2.Type.Bool) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -7917,75 +8066,75 @@ public int hashCode() { return hash; } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.admin.v2.Type.Bool parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseFrom(byte[] data) + public static com.google.bigtable.admin.v2.Type.Bool parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Float32 parseFrom(java.io.InputStream input) + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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.bigtable.admin.v2.Type.Float32 parseFrom( + public static com.google.bigtable.admin.v2.Type.Bool 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); } @@ -7998,7 +8147,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Float32 prototype) { + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Bool prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8008,45 +8157,44 @@ 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; } + /** * * *
      -     * Float32
      -     * Values of type `Float32` are stored in `Value.float_value`.
      +     * bool
      +     * Values of type `Bool` are stored in `Value.bool_value`.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} + * Protobuf type {@code google.bigtable.admin.v2.Type.Bool} */ - 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.bigtable.admin.v2.Type.Float32) - com.google.bigtable.admin.v2.Type.Float32OrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Bool) + com.google.bigtable.admin.v2.Type.BoolOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Float32.class, - com.google.bigtable.admin.v2.Type.Float32.Builder.class); + com.google.bigtable.admin.v2.Type.Bool.class, + com.google.bigtable.admin.v2.Type.Bool.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Float32.newBuilder() + // Construct using com.google.bigtable.admin.v2.Type.Bool.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8059,17 +8207,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32 getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + public com.google.bigtable.admin.v2.Type.Bool getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32 build() { - com.google.bigtable.admin.v2.Type.Float32 result = buildPartial(); + public com.google.bigtable.admin.v2.Type.Bool build() { + com.google.bigtable.admin.v2.Type.Bool result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8077,60 +8225,25 @@ public com.google.bigtable.admin.v2.Type.Float32 build() { } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32 buildPartial() { - com.google.bigtable.admin.v2.Type.Float32 result = - new com.google.bigtable.admin.v2.Type.Float32(this); + public com.google.bigtable.admin.v2.Type.Bool buildPartial() { + com.google.bigtable.admin.v2.Type.Bool result = + new com.google.bigtable.admin.v2.Type.Bool(this); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Float32) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Float32) other); + if (other instanceof com.google.bigtable.admin.v2.Type.Bool) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Bool) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Float32 other) { - if (other == com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Bool other) { + if (other == com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8174,36 +8287,24 @@ 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.bigtable.admin.v2.Type.Float32) + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Bool) } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Float32) - private static final com.google.bigtable.admin.v2.Type.Float32 DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Bool) + private static final com.google.bigtable.admin.v2.Type.Bool DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Float32(); + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Bool(); } - public static com.google.bigtable.admin.v2.Type.Float32 getDefaultInstance() { + public static com.google.bigtable.admin.v2.Type.Bool getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Float32 parsePartialFrom( + public Bool parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8223,66 +8324,72 @@ public Float32 parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32 getDefaultInstanceForType() { + public com.google.bigtable.admin.v2.Type.Bool getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Float64OrBuilder + public interface Float32OrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float64) + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float32) com.google.protobuf.MessageOrBuilder {} + /** * * *
      -   * Float64
      -   * Values of type `Float64` are stored in `Value.float_value`.
      +   * Float32
      +   * Values of type `Float32` are stored in `Value.float_value`.
          * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} + * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} */ - public static final class Float64 extends com.google.protobuf.GeneratedMessageV3 + public static final class Float32 extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Float64) - Float64OrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Float32) + Float32OrBuilder { private static final long serialVersionUID = 0L; - // Use Float64.newBuilder() to construct. - private Float64(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Float64() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Float32"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Float64(); + // Use Float32.newBuilder() to construct. + private Float32(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Float32() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Float64.class, - com.google.bigtable.admin.v2.Type.Float64.Builder.class); + com.google.bigtable.admin.v2.Type.Float32.class, + com.google.bigtable.admin.v2.Type.Float32.Builder.class); } private byte memoizedIsInitialized = -1; @@ -8318,11 +8425,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Float64)) { + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Float32)) { return super.equals(obj); } - com.google.bigtable.admin.v2.Type.Float64 other = - (com.google.bigtable.admin.v2.Type.Float64) obj; + com.google.bigtable.admin.v2.Type.Float32 other = + (com.google.bigtable.admin.v2.Type.Float32) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -8340,75 +8447,75 @@ public int hashCode() { return hash; } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.admin.v2.Type.Float32 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseFrom(byte[] data) + public static com.google.bigtable.admin.v2.Type.Float32 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Float64 parseFrom(java.io.InputStream input) + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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.bigtable.admin.v2.Type.Float64 parseFrom( + public static com.google.bigtable.admin.v2.Type.Float32 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); } @@ -8421,7 +8528,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Float64 prototype) { + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Float32 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8431,45 +8538,44 @@ 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; } + /** * * *
      -     * Float64
      -     * Values of type `Float64` are stored in `Value.float_value`.
      +     * Float32
      +     * Values of type `Float32` are stored in `Value.float_value`.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} + * Protobuf type {@code google.bigtable.admin.v2.Type.Float32} */ - 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.bigtable.admin.v2.Type.Float64) - com.google.bigtable.admin.v2.Type.Float64OrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Float32) + com.google.bigtable.admin.v2.Type.Float32OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Float64.class, - com.google.bigtable.admin.v2.Type.Float64.Builder.class); + com.google.bigtable.admin.v2.Type.Float32.class, + com.google.bigtable.admin.v2.Type.Float32.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Float64.newBuilder() + // Construct using com.google.bigtable.admin.v2.Type.Float32.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8482,17 +8588,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64 getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + public com.google.bigtable.admin.v2.Type.Float32 getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64 build() { - com.google.bigtable.admin.v2.Type.Float64 result = buildPartial(); + public com.google.bigtable.admin.v2.Type.Float32 build() { + com.google.bigtable.admin.v2.Type.Float32 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8500,60 +8606,25 @@ public com.google.bigtable.admin.v2.Type.Float64 build() { } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64 buildPartial() { - com.google.bigtable.admin.v2.Type.Float64 result = - new com.google.bigtable.admin.v2.Type.Float64(this); + public com.google.bigtable.admin.v2.Type.Float32 buildPartial() { + com.google.bigtable.admin.v2.Type.Float32 result = + new com.google.bigtable.admin.v2.Type.Float32(this); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Float64) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Float64) other); + if (other instanceof com.google.bigtable.admin.v2.Type.Float32) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Float32) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Float64 other) { - if (other == com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Float32 other) { + if (other == com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8597,36 +8668,24 @@ 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.bigtable.admin.v2.Type.Float64) + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Float32) } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Float64) - private static final com.google.bigtable.admin.v2.Type.Float64 DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Float32) + private static final com.google.bigtable.admin.v2.Type.Float32 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Float64(); + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Float32(); } - public static com.google.bigtable.admin.v2.Type.Float64 getDefaultInstance() { + public static com.google.bigtable.admin.v2.Type.Float32 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Float64 parsePartialFrom( + public Float32 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8646,66 +8705,72 @@ public Float64 parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64 getDefaultInstanceForType() { + public com.google.bigtable.admin.v2.Type.Float32 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface TimestampOrBuilder + public interface Float64OrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Timestamp) + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Float64) com.google.protobuf.MessageOrBuilder {} + /** * * *
      -   * Timestamp
      -   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
      +   * Float64
      +   * Values of type `Float64` are stored in `Value.float_value`.
          * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp} + * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} */ - public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 + public static final class Float64 extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Timestamp) - TimestampOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Float64) + Float64OrBuilder { private static final long serialVersionUID = 0L; - // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Timestamp() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Float64"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Timestamp(); + // Use Float64.newBuilder() to construct. + private Float64(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Float64() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Timestamp.class, - com.google.bigtable.admin.v2.Type.Timestamp.Builder.class); + com.google.bigtable.admin.v2.Type.Float64.class, + com.google.bigtable.admin.v2.Type.Float64.Builder.class); } private byte memoizedIsInitialized = -1; @@ -8741,11 +8806,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Timestamp)) { + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Float64)) { return super.equals(obj); } - com.google.bigtable.admin.v2.Type.Timestamp other = - (com.google.bigtable.admin.v2.Type.Timestamp) obj; + com.google.bigtable.admin.v2.Type.Float64 other = + (com.google.bigtable.admin.v2.Type.Float64) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -8763,75 +8828,75 @@ public int hashCode() { return hash; } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.admin.v2.Type.Float64 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseFrom(byte[] data) + public static com.google.bigtable.admin.v2.Type.Float64 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(java.io.InputStream input) + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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.bigtable.admin.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.admin.v2.Type.Float64 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); } @@ -8844,7 +8909,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Timestamp prototype) { + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Float64 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8854,45 +8919,44 @@ 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; } + /** * * *
      -     * Timestamp
      -     * Values of type `Timestamp` are stored in `Value.timestamp_value`.
      +     * Float64
      +     * Values of type `Float64` are stored in `Value.float_value`.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp} + * Protobuf type {@code google.bigtable.admin.v2.Type.Float64} */ - 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.bigtable.admin.v2.Type.Timestamp) - com.google.bigtable.admin.v2.Type.TimestampOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Float64) + com.google.bigtable.admin.v2.Type.Float64OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Timestamp.class, - com.google.bigtable.admin.v2.Type.Timestamp.Builder.class); + com.google.bigtable.admin.v2.Type.Float64.class, + com.google.bigtable.admin.v2.Type.Float64.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Timestamp.newBuilder() + // Construct using com.google.bigtable.admin.v2.Type.Float64.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8905,17 +8969,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Timestamp getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + public com.google.bigtable.admin.v2.Type.Float64 getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Timestamp build() { - com.google.bigtable.admin.v2.Type.Timestamp result = buildPartial(); + public com.google.bigtable.admin.v2.Type.Float64 build() { + com.google.bigtable.admin.v2.Type.Float64 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8923,60 +8987,25 @@ public com.google.bigtable.admin.v2.Type.Timestamp build() { } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Timestamp buildPartial() { - com.google.bigtable.admin.v2.Type.Timestamp result = - new com.google.bigtable.admin.v2.Type.Timestamp(this); + public com.google.bigtable.admin.v2.Type.Float64 buildPartial() { + com.google.bigtable.admin.v2.Type.Float64 result = + new com.google.bigtable.admin.v2.Type.Float64(this); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Timestamp) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Timestamp) other); + if (other instanceof com.google.bigtable.admin.v2.Type.Float64) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Float64) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Timestamp other) { - if (other == com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Float64 other) { + if (other == com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -9020,36 +9049,24 @@ 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.bigtable.admin.v2.Type.Timestamp) + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Float64) } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Timestamp) - private static final com.google.bigtable.admin.v2.Type.Timestamp DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Float64) + private static final com.google.bigtable.admin.v2.Type.Float64 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Timestamp(); + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Float64(); } - public static com.google.bigtable.admin.v2.Type.Timestamp getDefaultInstance() { + public static com.google.bigtable.admin.v2.Type.Float64 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Timestamp parsePartialFrom( + public Float64 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9069,1572 +9086,8354 @@ public Timestamp parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Timestamp getDefaultInstanceForType() { + public com.google.bigtable.admin.v2.Type.Float64 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface DateOrBuilder + public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Date) - com.google.protobuf.MessageOrBuilder {} + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Timestamp) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.admin.v2.Type.Timestamp.Encoding getEncoding(); + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder(); + } + /** * * *
      -   * Date
      -   * Values of type `Date` are stored in `Value.date_value`.
      +   * Timestamp
      +   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
          * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Date} + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp} */ - public static final class Date extends com.google.protobuf.GeneratedMessageV3 + public static final class Timestamp extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Date) - DateOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Timestamp) + TimestampOrBuilder { private static final long serialVersionUID = 0L; - // Use Date.newBuilder() to construct. - private Date(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Date() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Timestamp"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Date(); + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Timestamp() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Date.class, - com.google.bigtable.admin.v2.Type.Date.Builder.class); + com.google.bigtable.admin.v2.Type.Timestamp.class, + com.google.bigtable.admin.v2.Type.Timestamp.Builder.class); } - private byte memoizedIsInitialized = -1; + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Timestamp.Encoding) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ + boolean hasUnixMicrosInt64(); - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ + com.google.bigtable.admin.v2.Type.Int64.Encoding getUnixMicrosInt64(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder getUnixMicrosInt64OrBuilder(); + + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.EncodingCase getEncodingCase(); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - 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.bigtable.admin.v2.Type.Date)) { - return super.equals(obj); - } - com.google.bigtable.admin.v2.Type.Date other = (com.google.bigtable.admin.v2.Type.Date) obj; - - 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 = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Date 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.bigtable.admin.v2.Type.Date parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Date parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Date parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.admin.v2.Type.Date parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Date prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } /** * * *
      -     * Date
      -     * Values of type `Date` are stored in `Value.date_value`.
      +     * Rules used to convert to or from lower level types.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Date} + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp.Encoding} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Date) - com.google.bigtable.admin.v2.Type.DateOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Timestamp.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Encoding() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Date.class, - com.google.bigtable.admin.v2.Type.Date.Builder.class); + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.class, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Date.newBuilder() - private Builder() {} + private int encodingCase_ = 0; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + @SuppressWarnings("serial") + private java.lang.Object encoding_; - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UNIX_MICROS_INT64(1), + ENCODING_NOT_SET(0); + private final int value; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; - } + private EncodingCase(int value) { + this.value = value; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Date getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); - } + /** + * @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 EncodingCase valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Date build() { - com.google.bigtable.admin.v2.Type.Date result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return UNIX_MICROS_INT64; + case 0: + return ENCODING_NOT_SET; + default: + return null; + } } - return result; - } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Date buildPartial() { - com.google.bigtable.admin.v2.Type.Date result = - new com.google.bigtable.admin.v2.Type.Date(this); - onBuilt(); - return result; - } + public int getNumber() { + return this.value; + } + }; - @java.lang.Override - public Builder clone() { - return super.clone(); + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static final int UNIX_MICROS_INT64_FIELD_NUMBER = 1; + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public boolean hasUnixMicrosInt64() { + return encodingCase_ == 1; } + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.bigtable.admin.v2.Type.Int64.Encoding getUnixMicrosInt64() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); } + /** + * + * + *
      +       * Encodes the number of microseconds since the Unix epoch using the
      +       * given `Int64` encoding. Values must be microsecond-aligned.
      +       *
      +       * Compatible with:
      +       *
      +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder + getUnixMicrosInt64OrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); } + private byte memoizedIsInitialized = -1; + @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + 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 Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Date) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Date) other); - } else { - super.mergeFrom(other); - return this; + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_); } + getUnknownFields().writeTo(output); } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Date other) { - if (other == com.google.bigtable.admin.v2.Type.Date.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final boolean isInitialized() { + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Timestamp.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Timestamp.Encoding other = + (com.google.bigtable.admin.v2.Type.Timestamp.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getUnixMicrosInt64().equals(other.getUnixMicrosInt64())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override - public Builder mergeFrom( + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + UNIX_MICROS_INT64_FIELD_NUMBER; + hash = (53 * hash) + getUnixMicrosInt64().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding 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.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding 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.bigtable.admin.v2.Type.Timestamp.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding 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.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding parseFrom( 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; - 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; + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.bigtable.admin.v2.Type.Timestamp.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Date) - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Date) - private static final com.google.bigtable.admin.v2.Type.Date DEFAULT_INSTANCE; + /** + * + * + *
      +       * Rules used to convert to or from lower level types.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Timestamp.Encoding) + com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor; + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Date(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.class, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder.class); + } - public static com.google.bigtable.admin.v2.Type.Date getDefaultInstance() { - return DEFAULT_INSTANCE; - } + // Construct using com.google.bigtable.admin.v2.Type.Timestamp.Encoding.newBuilder() + private Builder() {} - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Date 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(); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (unixMicrosInt64Builder_ != null) { + unixMicrosInt64Builder_.clear(); } - }; + encodingCase_ = 0; + encoding_ = null; + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance(); + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Date getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding build() { + com.google.bigtable.admin.v2.Type.Timestamp.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public interface StructOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding buildPartial() { + com.google.bigtable.admin.v2.Type.Timestamp.Encoding result = + new com.google.bigtable.admin.v2.Type.Timestamp.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - /** - * - * - *
      -     * The names and types of the fields in this struct.
      -     * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - java.util.List getFieldsList(); - /** - * - * - *
      -     * The names and types of the fields in this struct.
      -     * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index); - /** - * - * - *
      -     * The names and types of the fields in this struct.
      -     * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - int getFieldsCount(); - /** - * - * - *
      -     * The names and types of the fields in this struct.
      -     * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - java.util.List - getFieldsOrBuilderList(); - /** - * - * - *
      -     * The names and types of the fields in this struct.
      -     * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index); - } - /** - * - * - *
      -   * A structured data value, consisting of fields which map to dynamically
      -   * typed values.
      -   * Values of type `Struct` are stored in `Value.array_value` where entries are
      -   * in the same order and number as `field_types`.
      -   * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Struct} - */ - public static final class Struct extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct) - StructOrBuilder { - private static final long serialVersionUID = 0L; - // Use Struct.newBuilder() to construct. - private Struct(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + private void buildPartial0(com.google.bigtable.admin.v2.Type.Timestamp.Encoding result) { + int from_bitField0_ = bitField0_; + } - private Struct() { - fields_ = java.util.Collections.emptyList(); - } + private void buildPartialOneofs( + com.google.bigtable.admin.v2.Type.Timestamp.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && unixMicrosInt64Builder_ != null) { + result.encoding_ = unixMicrosInt64Builder_.build(); + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Struct(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Timestamp.Encoding) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Timestamp.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; - } + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Timestamp.Encoding other) { + if (other == com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case UNIX_MICROS_INT64: + { + mergeUnixMicrosInt64(other.getUnixMicrosInt64()); + break; + } + case ENCODING_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Struct.class, - com.google.bigtable.admin.v2.Type.Struct.Builder.class); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public interface FieldOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Field) - com.google.protobuf.MessageOrBuilder { + @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( + internalGetUnixMicrosInt64FieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + 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; + } - /** - * - * - *
      -       * The field name (optional). Fields without a `field_name` are considered
      -       * anonymous and cannot be referenced by name.
      -       * 
      - * - * string field_name = 1; - * - * @return The fieldName. - */ - java.lang.String getFieldName(); - /** - * - * - *
      -       * The field name (optional). Fields without a `field_name` are considered
      -       * anonymous and cannot be referenced by name.
      -       * 
      - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - com.google.protobuf.ByteString getFieldNameBytes(); + private int encodingCase_ = 0; + private java.lang.Object encoding_; - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return The type. - */ - com.google.bigtable.admin.v2.Type getType(); - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder(); - } - /** - * - * - *
      -     * A struct field and its type.
      -     * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Field} - */ - public static final class Field extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Field) - FieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use Field.newBuilder() to construct. - private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - private Field() { - fieldName_ = ""; - } + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Field(); - } + private int bitField0_; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> + unixMicrosInt64Builder_; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Struct.Field.class, - com.google.bigtable.admin.v2.Type.Struct.Field.Builder.class); - } - - private int bitField0_; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object fieldName_ = ""; - /** - * - * - *
      -       * The field name (optional). Fields without a `field_name` are considered
      -       * anonymous and cannot be referenced by name.
      -       * 
      - * - * string field_name = 1; - * - * @return The fieldName. - */ - @java.lang.Override - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - 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(); - fieldName_ = s; - return s; - } - } - /** - * - * - *
      -       * The field name (optional). Fields without a `field_name` are considered
      -       * anonymous and cannot be referenced by name.
      -       * 
      - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private com.google.bigtable.admin.v2.Type type_; - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - @java.lang.Override - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return The type. - */ - @java.lang.Override - public com.google.bigtable.admin.v2.Type getType() { - return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; - } - /** - * - * - *
      -       * The type of values in this field.
      -       * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - @java.lang.Override - public com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder() { - return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getType()); + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ + @java.lang.Override + public boolean hasUnixMicrosInt64() { + return encodingCase_ == 1; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.Encoding getUnixMicrosInt64() { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return unixMicrosInt64Builder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } } - 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.bigtable.admin.v2.Type.Struct.Field)) { - return super.equals(obj); + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder setUnixMicrosInt64(com.google.bigtable.admin.v2.Type.Int64.Encoding value) { + if (unixMicrosInt64Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + unixMicrosInt64Builder_.setMessage(value); + } + encodingCase_ = 1; + return this; } - com.google.bigtable.admin.v2.Type.Struct.Field other = - (com.google.bigtable.admin.v2.Type.Struct.Field) obj; - if (!getFieldName().equals(other.getFieldName())) return false; - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (!getType().equals(other.getType())) return false; + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder setUnixMicrosInt64( + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder builderForValue) { + if (unixMicrosInt64Builder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + unixMicrosInt64Builder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; } - 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) + FIELD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFieldName().hashCode(); - if (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder mergeUnixMicrosInt64( + com.google.bigtable.admin.v2.Type.Int64.Encoding value) { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Int64.Encoding.newBuilder( + (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + unixMicrosInt64Builder_.mergeFrom(value); + } else { + unixMicrosInt64Builder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder clearUnixMicrosInt64() { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + unixMicrosInt64Builder_.clear(); + } + return this; + } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder + getUnixMicrosInt64Builder() { + return internalGetUnixMicrosInt64FieldBuilder().getBuilder(); + } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder + getUnixMicrosInt64OrBuilder() { + if ((encodingCase_ == 1) && (unixMicrosInt64Builder_ != null)) { + return unixMicrosInt64Builder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } + } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
      +         * Encodes the number of microseconds since the Unix epoch using the
      +         * given `Int64` encoding. Values must be microsecond-aligned.
      +         *
      +         * Compatible with:
      +         *
      +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder> + internalGetUnixMicrosInt64FieldBuilder() { + if (unixMicrosInt64Builder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = com.google.bigtable.admin.v2.Type.Int64.Encoding.getDefaultInstance(); + } + unixMicrosInt64Builder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64.Encoding, + com.google.bigtable.admin.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Int64.EncodingOrBuilder>( + (com.google.bigtable.admin.v2.Type.Int64.Encoding) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return unixMicrosInt64Builder_; + } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Timestamp.Encoding) } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Timestamp.Encoding) + private static final com.google.bigtable.admin.v2.Type.Timestamp.Encoding DEFAULT_INSTANCE; - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Timestamp.Encoding(); } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.bigtable.admin.v2.Type.Timestamp.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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.bigtable.admin.v2.Type.Struct.Field parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Type.Timestamp.Encoding encoding_; - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Struct.Field prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + @java.lang.Override + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
      -       * A struct field and its type.
      -       * 
      - * - * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Field} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Field) - com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; - } + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Struct.Field.class, - com.google.bigtable.admin.v2.Type.Struct.Field.Builder.class); - } + private byte memoizedIsInitialized = -1; - // Construct using com.google.bigtable.admin.v2.Type.Struct.Field.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + memoizedIsInitialized = 1; + return true; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEncoding()); + } + getUnknownFields().writeTo(output); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fieldName_ = ""; - type_ = null; - if (typeBuilder_ != null) { - typeBuilder_.dispose(); - typeBuilder_ = null; - } - return this; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; - } + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.Field getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Timestamp)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Timestamp other = + (com.google.bigtable.admin.v2.Type.Timestamp) obj; - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.Field build() { - com.google.bigtable.admin.v2.Type.Struct.Field result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.Field buildPartial() { - com.google.bigtable.admin.v2.Type.Struct.Field result = - new com.google.bigtable.admin.v2.Type.Struct.Field(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - private void buildPartial0(com.google.bigtable.admin.v2.Type.Struct.Field result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fieldName_ = fieldName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type.Struct.Field) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Struct.Field) other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Struct.Field other) { - if (other == com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()) - return this; - if (!other.getFieldName().isEmpty()) { - fieldName_ = other.fieldName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasType()) { - mergeType(other.getType()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @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: - { - fieldName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - private int bitField0_; + public static com.google.bigtable.admin.v2.Type.Timestamp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private java.lang.Object fieldName_ = ""; - /** - * - * - *
      -         * The field name (optional). Fields without a `field_name` are considered
      -         * anonymous and cannot be referenced by name.
      -         * 
      - * - * string field_name = 1; - * - * @return The fieldName. - */ - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
      -         * The field name (optional). Fields without a `field_name` are considered
      -         * anonymous and cannot be referenced by name.
      -         * 
      - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
      -         * The field name (optional). Fields without a `field_name` are considered
      -         * anonymous and cannot be referenced by name.
      -         * 
      - * - * string field_name = 1; - * - * @param value The fieldName to set. - * @return This builder for chaining. - */ - public Builder setFieldName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - fieldName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Timestamp 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; + } + + /** + * + * + *
      +     * Timestamp
      +     * Values of type `Timestamp` are stored in `Value.timestamp_value`.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Timestamp} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Timestamp) + com.google.bigtable.admin.v2.Type.TimestampOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Timestamp.class, + com.google.bigtable.admin.v2.Type.Timestamp.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Timestamp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } - /** - * - * - *
      -         * The field name (optional). Fields without a `field_name` are considered
      -         * anonymous and cannot be referenced by name.
      -         * 
      - * - * string field_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearFieldName() { - fieldName_ = getDefaultInstance().getFieldName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; } - /** - * - * - *
      -         * The field name (optional). Fields without a `field_name` are considered
      -         * anonymous and cannot be referenced by name.
      -         * 
      - * - * string field_name = 1; - * - * @param value The bytes for fieldName to set. - * @return This builder for chaining. - */ - public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - fieldName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp build() { + com.google.bigtable.admin.v2.Type.Timestamp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - private com.google.bigtable.admin.v2.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder> - typeBuilder_; - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) != 0); + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Timestamp buildPartial() { + com.google.bigtable.admin.v2.Type.Timestamp result = + new com.google.bigtable.admin.v2.Type.Timestamp(this); + if (bitField0_ != 0) { + buildPartial0(result); } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - * - * @return The type. - */ - public com.google.bigtable.admin.v2.Type getType() { - if (typeBuilder_ == null) { - return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; - } else { - return typeBuilder_.getMessage(); - } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Timestamp result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public Builder setType(com.google.bigtable.admin.v2.Type value) { - if (typeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - } else { - typeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Timestamp) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Timestamp) other); + } else { + super.mergeFrom(other); return this; } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public Builder setType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { - if (typeBuilder_ == null) { - type_ = builderForValue.build(); + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Timestamp other) { + if (other == com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance()) return this; + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } + 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( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.Type.Timestamp.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp.Encoding, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder> + encodingBuilder_; + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.admin.v2.Type.Timestamp.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.Timestamp.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ + != com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); } else { - typeBuilder_.setMessage(builderForValue.build()); + encoding_ = value; } - bitField0_ |= 0x00000002; + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { + bitField0_ |= 0x00000001; onChanged(); - return this; } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public Builder mergeType(com.google.bigtable.admin.v2.Type value) { - if (typeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && type_ != null - && type_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { - getTypeBuilder().mergeFrom(value); - } else { - type_ = value; - } - } else { - typeBuilder_.mergeFrom(value); - } - if (type_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + public com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Timestamp.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp.Encoding, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp.Encoding, + com.google.bigtable.admin.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Timestamp.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Timestamp) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Timestamp) + private static final com.google.bigtable.admin.v2.Type.Timestamp DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Timestamp(); + } + + public static com.google.bigtable.admin.v2.Type.Timestamp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Timestamp 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.bigtable.admin.v2.Type.Timestamp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Date) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
      +   * Date
      +   * Values of type `Date` are stored in `Value.date_value`.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Date} + */ + public static final class Date extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Date) + DateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Date"); + } + + // Use Date.newBuilder() to construct. + private Date(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Date() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Date.class, + com.google.bigtable.admin.v2.Type.Date.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.admin.v2.Type.Date)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Date other = (com.google.bigtable.admin.v2.Type.Date) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Date parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Date parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Date parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Date 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.bigtable.admin.v2.Type.Date parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Date parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Date parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Date 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.bigtable.admin.v2.Type.Date parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Date 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.bigtable.admin.v2.Type.Date parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Date 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.bigtable.admin.v2.Type.Date 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; + } + + /** + * + * + *
      +     * Date
      +     * Values of type `Date` are stored in `Value.date_value`.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Date} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Date) + com.google.bigtable.admin.v2.Type.DateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Date.class, + com.google.bigtable.admin.v2.Type.Date.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Date.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Date_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Date getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Date build() { + com.google.bigtable.admin.v2.Type.Date result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Date buildPartial() { + com.google.bigtable.admin.v2.Type.Date result = + new com.google.bigtable.admin.v2.Type.Date(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Date) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Date) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Date other) { + if (other == com.google.bigtable.admin.v2.Type.Date.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Date) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Date) + private static final com.google.bigtable.admin.v2.Type.Date DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Date(); + } + + public static com.google.bigtable.admin.v2.Type.Date getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Date 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.bigtable.admin.v2.Type.Date getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StructOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + java.util.List getFieldsList(); + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index); + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + int getFieldsCount(); + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + java.util.List + getFieldsOrBuilderList(); + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index); + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding getEncoding(); + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder(); + } + + /** + * + * + *
      +   * A structured data value, consisting of fields which map to dynamically
      +   * typed values.
      +   * Values of type `Struct` are stored in `Value.array_value` where entries are
      +   * in the same order and number as `field_types`.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct} + */ + public static final class Struct extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct) + StructOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Struct"); + } + + // Use Struct.newBuilder() to construct. + private Struct(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Struct() { + fields_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.class, + com.google.bigtable.admin.v2.Type.Struct.Builder.class); + } + + public interface FieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +       * The field name (optional). Fields without a `field_name` are considered
      +       * anonymous and cannot be referenced by name.
      +       * 
      + * + * string field_name = 1; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + + /** + * + * + *
      +       * The field name (optional). Fields without a `field_name` are considered
      +       * anonymous and cannot be referenced by name.
      +       * 
      + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return The type. + */ + com.google.bigtable.admin.v2.Type getType(); + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder(); + } + + /** + * + * + *
      +     * A struct field and its type.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Field} + */ + public static final class Field extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.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.GeneratedMessage.Builder builder) { + super(builder); + } + + private Field() { + fieldName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Field.class, + com.google.bigtable.admin.v2.Type.Struct.Field.Builder.class); + } + + private int bitField0_; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + + /** + * + * + *
      +       * The field name (optional). Fields without a `field_name` are considered
      +       * anonymous and cannot be referenced by name.
      +       * 
      + * + * string field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + + /** + * + * + *
      +       * The field name (optional). Fields without a `field_name` are considered
      +       * anonymous and cannot be referenced by name.
      +       * 
      + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.admin.v2.Type type_; + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type getType() { + return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; + } + + /** + * + * + *
      +       * The type of values in this field.
      +       * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getType()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Struct.Field)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct.Field other = + (com.google.bigtable.admin.v2.Type.Struct.Field) obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field 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.bigtable.admin.v2.Type.Struct.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field 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.bigtable.admin.v2.Type.Struct.Field parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field 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.bigtable.admin.v2.Type.Struct.Field parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field 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.bigtable.admin.v2.Type.Struct.Field 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 struct field and its type.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Field} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Field) + com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Field.class, + com.google.bigtable.admin.v2.Type.Struct.Field.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Struct.Field.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; + fieldName_ = ""; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Field getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Field build() { + com.google.bigtable.admin.v2.Type.Struct.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Field buildPartial() { + com.google.bigtable.admin.v2.Type.Struct.Field result = + new com.google.bigtable.admin.v2.Type.Struct.Field(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Struct.Field result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Struct.Field) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Struct.Field) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Struct.Field other) { + if (other == com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()) + return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldName_ = ""; + + /** + * + * + *
      +         * The field name (optional). Fields without a `field_name` are considered
      +         * anonymous and cannot be referenced by name.
      +         * 
      + * + * string field_name = 1; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +         * The field name (optional). Fields without a `field_name` are considered
      +         * anonymous and cannot be referenced by name.
      +         * 
      + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +         * The field name (optional). Fields without a `field_name` are considered
      +         * anonymous and cannot be referenced by name.
      +         * 
      + * + * string field_name = 1; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +         * The field name (optional). Fields without a `field_name` are considered
      +         * anonymous and cannot be referenced by name.
      +         * 
      + * + * string field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +         * The field name (optional). Fields without a `field_name` are considered
      +         * anonymous and cannot be referenced by name.
      +         * 
      + * + * string field_name = 1; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.bigtable.admin.v2.Type type_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + typeBuilder_; + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + * + * @return The type. + */ + public com.google.bigtable.admin.v2.Type getType() { + if (typeBuilder_ == null) { + return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; + } else { + return typeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public Builder setType(com.google.bigtable.admin.v2.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + } else { + typeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public Builder setType(com.google.bigtable.admin.v2.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public Builder mergeType(com.google.bigtable.admin.v2.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && type_ != null + && type_ != com.google.bigtable.admin.v2.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + if (type_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public com.google.bigtable.admin.v2.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + public com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; + } + } + + /** + * + * + *
      +         * The type of values in this field.
      +         * 
      + * + * .google.bigtable.admin.v2.Type type = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder> + internalGetTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type, + com.google.bigtable.admin.v2.Type.Builder, + com.google.bigtable.admin.v2.TypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Field) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Field) + private static final com.google.bigtable.admin.v2.Type.Struct.Field DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct.Field(); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field 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.bigtable.admin.v2.Type.Struct.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + boolean hasSingleton(); + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton getSingleton(); + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder getSingletonOrBuilder(); + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return Whether the delimitedBytes field is set. + */ + boolean hasDelimitedBytes(); + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return The delimitedBytes. + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes getDelimitedBytes(); + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder(); + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + boolean hasOrderedCodeBytes(); + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes getOrderedCodeBytes(); + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder(); + + com.google.bigtable.admin.v2.Type.Struct.Encoding.EncodingCase getEncodingCase(); + } + + /** + * + * + *
      +     * Rules used to convert to or from lower level types.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Encoding() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder.class); + } + + public interface SingletonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
      +       * Uses the encoding of `fields[0].type` as-is.
      +       * Only valid if `fields.size == 1`.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} + */ + public static final class Singleton extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + SingletonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Singleton"); + } + + // Use Singleton.newBuilder() to construct. + private Singleton(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Singleton() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton other = + (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton 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; + } + + /** + * + * + *
      +         * Uses the encoding of `fields[0].type` as-is.
      +         * Only valid if `fields.size == 1`.
      +         * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.Singleton} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder.class); + } + + // Construct using + // com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton build() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton buildPartial() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton result = + new com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton other) { + if (other + == com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) + private static final com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton(); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Singleton 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.bigtable.admin.v2.Type.Struct.Encoding.Singleton + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DelimitedBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +         * Byte sequence used to delimit concatenated fields. The delimiter must
      +         * contain at least 1 character and at most 50 characters.
      +         * 
      + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + com.google.protobuf.ByteString getDelimiter(); + } + + /** + * + * + *
      +       * Fields are encoded independently and concatenated with a configurable
      +       * `delimiter` in between.
      +       *
      +       * A struct with no fields defined is encoded as a single `delimiter`.
      +       *
      +       * Sorted mode:
      +       *
      +       * - Fields are encoded in sorted mode.
      +       * - Encoded field values must not contain any bytes <= `delimiter[0]`
      +       * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
      +       * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
      +       *
      +       * Distinct mode:
      +       *
      +       * - Fields are encoded in distinct mode.
      +       * - Encoded field values must not contain `delimiter[0]`.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} + */ + public static final class DelimitedBytes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + DelimitedBytesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DelimitedBytes"); + } + + // Use DelimitedBytes.newBuilder() to construct. + private DelimitedBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DelimitedBytes() { + delimiter_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder.class); + } + + public static final int DELIMITER_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString delimiter_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
      +         * Byte sequence used to delimit concatenated fields. The delimiter must
      +         * contain at least 1 character and at most 50 characters.
      +         * 
      + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelimiter() { + return delimiter_; + } + + 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 (!delimiter_.isEmpty()) { + output.writeBytes(1, delimiter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!delimiter_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, delimiter_); + } + 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes other = + (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) obj; + + if (!getDelimiter().equals(other.getDelimiter())) 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) + DELIMITER_FIELD_NUMBER; + hash = (53 * hash) + getDelimiter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes 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; + } + + /** + * + * + *
      +         * Fields are encoded independently and concatenated with a configurable
      +         * `delimiter` in between.
      +         *
      +         * A struct with no fields defined is encoded as a single `delimiter`.
      +         *
      +         * Sorted mode:
      +         *
      +         * - Fields are encoded in sorted mode.
      +         * - Encoded field values must not contain any bytes <= `delimiter[0]`
      +         * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
      +         * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
      +         *
      +         * Distinct mode:
      +         *
      +         * - Fields are encoded in distinct mode.
      +         * - Encoded field values must not contain `delimiter[0]`.
      +         * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder.class); + } + + // Construct using + // com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + delimiter_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes build() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes buildPartial() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes result = + new com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.delimiter_ = delimiter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) { + return mergeFrom( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes other) { + if (other + == com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance()) return this; + if (!other.getDelimiter().isEmpty()) { + setDelimiter(other.getDelimiter()); + } + 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: + { + delimiter_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString delimiter_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
      +           * Byte sequence used to delimit concatenated fields. The delimiter must
      +           * contain at least 1 character and at most 50 characters.
      +           * 
      + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelimiter() { + return delimiter_; + } + + /** + * + * + *
      +           * Byte sequence used to delimit concatenated fields. The delimiter must
      +           * contain at least 1 character and at most 50 characters.
      +           * 
      + * + * bytes delimiter = 1; + * + * @param value The delimiter to set. + * @return This builder for chaining. + */ + public Builder setDelimiter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + delimiter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +           * Byte sequence used to delimit concatenated fields. The delimiter must
      +           * contain at least 1 character and at most 50 characters.
      +           * 
      + * + * bytes delimiter = 1; + * + * @return This builder for chaining. + */ + public Builder clearDelimiter() { + bitField0_ = (bitField0_ & ~0x00000001); + delimiter_ = getDefaultInstance().getDelimiter(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + private static final com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes(); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DelimitedBytes 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.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OrderedCodeBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
      +       * Fields are encoded independently and concatenated with the fixed byte
      +       * pair {0x00, 0x01} in between.
      +       *
      +       * Any null (0x00) byte in an encoded field is replaced by the fixed byte
      +       * pair {0x00, 0xFF}.
      +       *
      +       * Fields that encode to the empty string "" have special handling:
      +       *
      +       * - If *every* field encodes to "", or if the STRUCT has no fields
      +       * defined, then the STRUCT is encoded as the fixed byte pair
      +       * {0x00, 0x00}.
      +       * - Otherwise, the STRUCT only encodes until the last non-empty field,
      +       * omitting any trailing empty fields. Any empty fields that aren't
      +       * omitted are replaced with the fixed byte pair {0x00, 0x00}.
      +       *
      +       * Examples:
      +       *
      +       * - STRUCT()             -> "\00\00"
      +       * - STRUCT("")           -> "\00\00"
      +       * - STRUCT("", "")       -> "\00\00"
      +       * - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
      +       * - STRUCT("A", "")      -> "A"
      +       * - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
      +       * - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
      +       *
      +       *
      +       * Since null bytes are always escaped, this encoding can cause size
      +       * blowup for encodings like `Int64.BigEndianBytes` that are likely to
      +       * produce many such bytes.
      +       *
      +       * Sorted mode:
      +       *
      +       * - Fields are encoded in sorted mode.
      +       * - All values supported by the field encodings are allowed
      +       * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
      +       * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
      +       *
      +       * Distinct mode:
      +       *
      +       * - Fields are encoded in distinct mode.
      +       * - All values supported by the field encodings are allowed.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} + */ + public static final class OrderedCodeBytes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OrderedCodeBytes"); + } + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OrderedCodeBytes() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes other = + (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes 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; + } + + /** + * + * + *
      +         * Fields are encoded independently and concatenated with the fixed byte
      +         * pair {0x00, 0x01} in between.
      +         *
      +         * Any null (0x00) byte in an encoded field is replaced by the fixed byte
      +         * pair {0x00, 0xFF}.
      +         *
      +         * Fields that encode to the empty string "" have special handling:
      +         *
      +         * - If *every* field encodes to "", or if the STRUCT has no fields
      +         * defined, then the STRUCT is encoded as the fixed byte pair
      +         * {0x00, 0x00}.
      +         * - Otherwise, the STRUCT only encodes until the last non-empty field,
      +         * omitting any trailing empty fields. Any empty fields that aren't
      +         * omitted are replaced with the fixed byte pair {0x00, 0x00}.
      +         *
      +         * Examples:
      +         *
      +         * - STRUCT()             -> "\00\00"
      +         * - STRUCT("")           -> "\00\00"
      +         * - STRUCT("", "")       -> "\00\00"
      +         * - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
      +         * - STRUCT("A", "")      -> "A"
      +         * - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
      +         * - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
      +         *
      +         *
      +         * Since null bytes are always escaped, this encoding can cause size
      +         * blowup for encodings like `Int64.BigEndianBytes` that are likely to
      +         * produce many such bytes.
      +         *
      +         * Sorted mode:
      +         *
      +         * - Fields are encoded in sorted mode.
      +         * - All values supported by the field encodings are allowed
      +         * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
      +         * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
      +         *
      +         * Distinct mode:
      +         *
      +         * - Fields are encoded in distinct mode.
      +         * - All values supported by the field encodings are allowed.
      +         * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder + .class); + } + + // Construct using + // com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes build() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes buildPartial() { + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes result = + new com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) { + return mergeFrom( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes other) { + if (other + == com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + private static final com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes(); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderedCodeBytes 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.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int encodingCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object encoding_; + + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SINGLETON(1), + DELIMITED_BYTES(2), + ORDERED_CODE_BYTES(3), + ENCODING_NOT_SET(0); + private final int value; + + private EncodingCase(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 EncodingCase valueOf(int value) { + return forNumber(value); + } + + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return SINGLETON; + case 2: + return DELIMITED_BYTES; + case 3: + return ORDERED_CODE_BYTES; + case 0: + return ENCODING_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public static final int SINGLETON_FIELD_NUMBER = 1; + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + @java.lang.Override + public boolean hasSingleton() { + return encodingCase_ == 1; + } + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton getSingleton() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + /** + * + * + *
      +       * Use `Singleton` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder + getSingletonOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + public static final int DELIMITED_BYTES_FIELD_NUMBER = 2; + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return Whether the delimitedBytes field is set. + */ + @java.lang.Override + public boolean hasDelimitedBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return The delimitedBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes getDelimitedBytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + + /** + * + * + *
      +       * Use `DelimitedBytes` encoding.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + + public static final int ORDERED_CODE_BYTES_FIELD_NUMBER = 3; + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 3; + } + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + getOrderedCodeBytes() { + if (encodingCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + /** + * + * + *
      +       * User `OrderedCodeBytes` encoding.
      +       * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if (encodingCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage( + 1, (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_); + } + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_); + } + if (encodingCase_ == 3) { + output.writeMessage( + 3, (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_); + } + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_); + } + if (encodingCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_); + } + 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.bigtable.admin.v2.Type.Struct.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct.Encoding other = + (com.google.bigtable.admin.v2.Type.Struct.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getSingleton().equals(other.getSingleton())) return false; + break; + case 2: + if (!getDelimitedBytes().equals(other.getDelimitedBytes())) return false; + break; + case 3: + if (!getOrderedCodeBytes().equals(other.getOrderedCodeBytes())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + SINGLETON_FIELD_NUMBER; + hash = (53 * hash) + getSingleton().hashCode(); + break; + case 2: + hash = (37 * hash) + DELIMITED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getDelimitedBytes().hashCode(); + break; + case 3: + hash = (37 * hash) + ORDERED_CODE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getOrderedCodeBytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding 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.bigtable.admin.v2.Type.Struct.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding 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.bigtable.admin.v2.Type.Struct.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding 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.bigtable.admin.v2.Type.Struct.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding 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.bigtable.admin.v2.Type.Struct.Encoding 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; + } + + /** + * + * + *
      +       * Rules used to convert to or from lower level types.
      +       * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct.Encoding) + com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.Encoding.class, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Struct.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (singletonBuilder_ != null) { + singletonBuilder_.clear(); + } + if (delimitedBytesBuilder_ != null) { + delimitedBytesBuilder_.clear(); + } + if (orderedCodeBytesBuilder_ != null) { + orderedCodeBytesBuilder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding build() { + com.google.bigtable.admin.v2.Type.Struct.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding buildPartial() { + com.google.bigtable.admin.v2.Type.Struct.Encoding result = + new com.google.bigtable.admin.v2.Type.Struct.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Struct.Encoding result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Struct.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && singletonBuilder_ != null) { + result.encoding_ = singletonBuilder_.build(); + } + if (encodingCase_ == 2 && delimitedBytesBuilder_ != null) { + result.encoding_ = delimitedBytesBuilder_.build(); + } + if (encodingCase_ == 3 && orderedCodeBytesBuilder_ != null) { + result.encoding_ = orderedCodeBytesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Struct.Encoding) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Struct.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Struct.Encoding other) { + if (other == com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case SINGLETON: + { + mergeSingleton(other.getSingleton()); + break; + } + case DELIMITED_BYTES: + { + mergeDelimitedBytes(other.getDelimitedBytes()); + break; + } + case ORDERED_CODE_BYTES: + { + mergeOrderedCodeBytes(other.getOrderedCodeBytes()); + break; + } + case ENCODING_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( + internalGetSingletonFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDelimitedBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetOrderedCodeBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int encodingCase_ = 0; + private java.lang.Object encoding_; + + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder> + singletonBuilder_; + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + @java.lang.Override + public boolean hasSingleton() { + return encodingCase_ == 1; + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton getSingleton() { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return singletonBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder setSingleton( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton value) { + if (singletonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + singletonBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder setSingleton( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder builderForValue) { + if (singletonBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + singletonBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder mergeSingleton( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton value) { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.newBuilder( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + singletonBuilder_.mergeFrom(value); + } else { + singletonBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder clearSingleton() { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + singletonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder + getSingletonBuilder() { + return internalGetSingletonFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder + getSingletonOrBuilder() { + if ((encodingCase_ == 1) && (singletonBuilder_ != null)) { + return singletonBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + } + + /** + * + * + *
      +         * Use `Singleton` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder> + internalGetSingletonFieldBuilder() { + if (singletonBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + singletonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.SingletonOrBuilder>( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.Singleton) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return singletonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder> + delimitedBytesBuilder_; + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return Whether the delimitedBytes field is set. + */ + @java.lang.Override + public boolean hasDelimitedBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * + * @return The delimitedBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + getDelimitedBytes() { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return delimitedBytesBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + public Builder setDelimitedBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes value) { + if (delimitedBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + delimitedBytesBuilder_.setMessage(value); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + public Builder setDelimitedBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder + builderForValue) { + if (delimitedBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + delimitedBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + public Builder mergeDelimitedBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes value) { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.newBuilder( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) + encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + delimitedBytesBuilder_.mergeFrom(value); + } else { + delimitedBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + public Builder clearDelimitedBytes() { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + delimitedBytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder + getDelimitedBytesBuilder() { + return internalGetDelimitedBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder() { + if ((encodingCase_ == 2) && (delimitedBytesBuilder_ != null)) { + return delimitedBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
      +         * Use `DelimitedBytes` encoding.
      +         * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder> + internalGetDelimitedBytesFieldBuilder() { + if (delimitedBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance(); + } + delimitedBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder>( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 2; + onChanged(); + return delimitedBytesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder> + orderedCodeBytesBuilder_; + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 3; + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + getOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } else { + if (encodingCase_ == 3) { + return orderedCodeBytesBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder + builderForValue) { + if (orderedCodeBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder mergeOrderedCodeBytes( + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3 + && encoding_ + != com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.newBuilder( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) + encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 3) { + orderedCodeBytesBuilder_.mergeFrom(value); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder clearOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 3) { + encodingCase_ = 0; + encoding_ = null; + } + orderedCodeBytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder + getOrderedCodeBytesBuilder() { + return internalGetOrderedCodeBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if ((encodingCase_ == 3) && (orderedCodeBytesBuilder_ != null)) { + return orderedCodeBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
      +         * User `OrderedCodeBytes` encoding.
      +         * 
      + * + * + * .google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder> + internalGetOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 3)) { + encoding_ = + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder>( + (com.google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 3; + onChanged(); + return orderedCodeBytesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Encoding) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Encoding) + private static final com.google.bigtable.admin.v2.Type.Struct.Encoding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct.Encoding(); + } + + public static com.google.bigtable.admin.v2.Type.Struct.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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.bigtable.admin.v2.Type.Struct.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FIELDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List fields_; + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index) { + return fields_.get(index); + } + + /** + * + * + *
      +     * The names and types of the fields in this struct.
      +     * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + public static final int ENCODING_FIELD_NUMBER = 2; + private com.google.bigtable.admin.v2.Type.Struct.Encoding encoding_; + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + @java.lang.Override + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + + /** + * + * + *
      +     * The encoding to use when converting to or from lower level types.
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + + 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 < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getEncoding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEncoding()); + } + 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.bigtable.admin.v2.Type.Struct)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Struct other = + (com.google.bigtable.admin.v2.Type.Struct) obj; + + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) 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 (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Struct parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct 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.bigtable.admin.v2.Type.Struct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Struct parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct 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.bigtable.admin.v2.Type.Struct parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct 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.bigtable.admin.v2.Type.Struct parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Struct 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.bigtable.admin.v2.Type.Struct 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 structured data value, consisting of fields which map to dynamically
      +     * typed values.
      +     * Values of type `Struct` are stored in `Value.array_value` where entries are
      +     * in the same order and number as `field_types`.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Struct} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Struct) + com.google.bigtable.admin.v2.Type.StructOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Struct.class, + com.google.bigtable.admin.v2.Type.Struct.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Struct.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFieldsFieldBuilder(); + internalGetEncodingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + } else { + fields_ = null; + fieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct build() { + com.google.bigtable.admin.v2.Type.Struct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Struct buildPartial() { + com.google.bigtable.admin.v2.Type.Struct result = + new com.google.bigtable.admin.v2.Type.Struct(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.admin.v2.Type.Struct result) { + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Struct result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Struct) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Struct) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Struct other) { + if (other == com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance()) return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } + 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.bigtable.admin.v2.Type.Struct.Field m = + input.readMessage( + com.google.bigtable.admin.v2.Type.Struct.Field.parser(), + extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = + new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Field, + com.google.bigtable.admin.v2.Type.Struct.Field.Builder, + com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder> + fieldsBuilder_; + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder setFields(int index, com.google.bigtable.admin.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder setFields( + int index, com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields(com.google.bigtable.admin.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields(int index, com.google.bigtable.admin.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields( + com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields( + int index, com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.Field.Builder getFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.Field.Builder addFieldsBuilder() { + return internalGetFieldsFieldBuilder() + .addBuilder(com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()); + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.admin.v2.Type.Struct.Field.Builder addFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder() + .addBuilder(index, com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()); + } + + /** + * + * + *
      +       * The names and types of the fields in this struct.
      +       * 
      + * + * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + */ + public java.util.List + getFieldsBuilderList() { + return internalGetFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Field, + com.google.bigtable.admin.v2.Type.Struct.Field.Builder, + com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder> + internalGetFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Field, + com.google.bigtable.admin.v2.Type.Struct.Field.Builder, + com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder>( + fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private com.google.bigtable.admin.v2.Type.Struct.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder> + encodingBuilder_; + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + public com.google.bigtable.admin.v2.Type.Struct.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder setEncoding(com.google.bigtable.admin.v2.Type.Struct.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder setEncoding( + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder mergeEncoding(com.google.bigtable.admin.v2.Type.Struct.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && encoding_ != null + && encoding_ + != com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; + } + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000002); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + public com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.admin.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
      +       * The encoding to use when converting to or from lower level types.
      +       * 
      + * + * .google.bigtable.admin.v2.Type.Struct.Encoding encoding = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct.Encoding, + com.google.bigtable.admin.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.admin.v2.Type.Struct.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct) + private static final com.google.bigtable.admin.v2.Type.Struct DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct(); + } + + public static com.google.bigtable.admin.v2.Type.Struct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Struct 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.bigtable.admin.v2.Type.Struct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ProtoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Proto) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * The ID of the schema bundle that this proto is defined in.
      +     * 
      + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + java.lang.String getSchemaBundleId(); + + /** + * + * + *
      +     * The ID of the schema bundle that this proto is defined in.
      +     * 
      + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + com.google.protobuf.ByteString getSchemaBundleIdBytes(); + + /** + * + * + *
      +     * The fully qualified name of the protobuf message, including package. In
      +     * the format of "foo.bar.Message".
      +     * 
      + * + * string message_name = 2; + * + * @return The messageName. + */ + java.lang.String getMessageName(); + + /** + * + * + *
      +     * The fully qualified name of the protobuf message, including package. In
      +     * the format of "foo.bar.Message".
      +     * 
      + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + com.google.protobuf.ByteString getMessageNameBytes(); + } + + /** + * + * + *
      +   * A protobuf message type.
      +   * Values of type `Proto` are stored in `Value.bytes_value`.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Proto} + */ + public static final class Proto extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Proto) + ProtoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Proto"); + } + + // Use Proto.newBuilder() to construct. + private Proto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Proto() { + schemaBundleId_ = ""; + messageName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Proto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Proto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Proto.class, + com.google.bigtable.admin.v2.Type.Proto.Builder.class); + } + + public static final int SCHEMA_BUNDLE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
      +     * The ID of the schema bundle that this proto is defined in.
      +     * 
      + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + @java.lang.Override + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + 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(); + schemaBundleId_ = s; + return s; + } + } + + /** + * + * + *
      +     * The ID of the schema bundle that this proto is defined in.
      +     * 
      + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object messageName_ = ""; + + /** + * + * + *
      +     * The fully qualified name of the protobuf message, including package. In
      +     * the format of "foo.bar.Message".
      +     * 
      + * + * string message_name = 2; + * + * @return The messageName. + */ + @java.lang.Override + public java.lang.String getMessageName() { + java.lang.Object ref = messageName_; + 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(); + messageName_ = s; + return s; + } + } + + /** + * + * + *
      +     * The fully qualified name of the protobuf message, including package. In
      +     * the format of "foo.bar.Message".
      +     * 
      + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageNameBytes() { + java.lang.Object ref = messageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageName_); + } + 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(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageName_); + } + 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.bigtable.admin.v2.Type.Proto)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.Type.Proto other = (com.google.bigtable.admin.v2.Type.Proto) obj; + + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getMessageName().equals(other.getMessageName())) 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_BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundleId().hashCode(); + hash = (37 * hash) + MESSAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMessageName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.Type.Proto parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Proto parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Proto parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Proto 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.bigtable.admin.v2.Type.Proto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.Type.Proto parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.Type.Proto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Proto 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.bigtable.admin.v2.Type.Proto parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Proto 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.bigtable.admin.v2.Type.Proto parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.Type.Proto 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.bigtable.admin.v2.Type.Proto 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 protobuf message type.
      +     * Values of type `Proto` are stored in `Value.bytes_value`.
      +     * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Proto} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Proto) + com.google.bigtable.admin.v2.Type.ProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Proto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Proto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Proto.class, + com.google.bigtable.admin.v2.Type.Proto.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.Type.Proto.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schemaBundleId_ = ""; + messageName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Proto_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto build() { + com.google.bigtable.admin.v2.Type.Proto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto buildPartial() { + com.google.bigtable.admin.v2.Type.Proto result = + new com.google.bigtable.admin.v2.Type.Proto(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type.Proto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageName_ = messageName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Proto) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Proto) other); + } else { + super.mergeFrom(other); return this; } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000002); - type_ = null; - if (typeBuilder_ != null) { - typeBuilder_.dispose(); - typeBuilder_ = null; - } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Proto other) { + if (other == com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance()) return this; + if (!other.getSchemaBundleId().isEmpty()) { + schemaBundleId_ = other.schemaBundleId_; + bitField0_ |= 0x00000001; onChanged(); - return this; } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public com.google.bigtable.admin.v2.Type.Builder getTypeBuilder() { + if (!other.getMessageName().isEmpty()) { + messageName_ = other.messageName_; bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - public com.google.bigtable.admin.v2.TypeOrBuilder getTypeOrBuilder() { - if (typeBuilder_ != null) { - return typeBuilder_.getMessageOrBuilder(); - } else { - return type_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : type_; - } + 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(); } - /** - * - * - *
      -         * The type of values in this field.
      -         * 
      - * - * .google.bigtable.admin.v2.Type type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder> - getTypeFieldBuilder() { - if (typeBuilder_ == null) { - typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type, - com.google.bigtable.admin.v2.Type.Builder, - com.google.bigtable.admin.v2.TypeOrBuilder>( - getType(), getParentForChildren(), isClean()); - type_ = null; - } - return typeBuilder_; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + schemaBundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + messageName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
      +       * The ID of the schema bundle that this proto is defined in.
      +       * 
      + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaBundleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +       * The ID of the schema bundle that this proto is defined in.
      +       * 
      + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +       * The ID of the schema bundle that this proto is defined in.
      +       * 
      + * + * string schema_bundle_id = 1; + * + * @param value The schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The ID of the schema bundle that this proto is defined in.
      +       * 
      + * + * string schema_bundle_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearSchemaBundleId() { + schemaBundleId_ = getDefaultInstance().getSchemaBundleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +       * The ID of the schema bundle that this proto is defined in.
      +       * 
      + * + * string schema_bundle_id = 1; + * + * @param value The bytes for schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object messageName_ = ""; + + /** + * + * + *
      +       * The fully qualified name of the protobuf message, including package. In
      +       * the format of "foo.bar.Message".
      +       * 
      + * + * string message_name = 2; + * + * @return The messageName. + */ + public java.lang.String getMessageName() { + java.lang.Object ref = messageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +       * The fully qualified name of the protobuf message, including package. In
      +       * the format of "foo.bar.Message".
      +       * 
      + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + public com.google.protobuf.ByteString getMessageNameBytes() { + java.lang.Object ref = messageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + /** + * + * + *
      +       * The fully qualified name of the protobuf message, including package. In
      +       * the format of "foo.bar.Message".
      +       * 
      + * + * string message_name = 2; + * + * @param value The messageName to set. + * @return This builder for chaining. + */ + public Builder setMessageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + messageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + /** + * + * + *
      +       * The fully qualified name of the protobuf message, including package. In
      +       * the format of "foo.bar.Message".
      +       * 
      + * + * string message_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessageName() { + messageName_ = getDefaultInstance().getMessageName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct.Field) + /** + * + * + *
      +       * The fully qualified name of the protobuf message, including package. In
      +       * the format of "foo.bar.Message".
      +       * 
      + * + * string message_name = 2; + * + * @param value The bytes for messageName to set. + * @return This builder for chaining. + */ + public Builder setMessageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + messageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct.Field) - private static final com.google.bigtable.admin.v2.Type.Struct.Field DEFAULT_INSTANCE; + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Proto) + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct.Field(); - } + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Proto) + private static final com.google.bigtable.admin.v2.Type.Proto DEFAULT_INSTANCE; - public static com.google.bigtable.admin.v2.Type.Struct.Field getDefaultInstance() { - return DEFAULT_INSTANCE; - } + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Proto(); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Field 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.bigtable.admin.v2.Type.Proto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Proto 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; - } + 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.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.Field getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int FIELDS_FIELD_NUMBER = 1; + public interface EnumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Enum) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.util.List fields_; /** * * *
      -     * The names and types of the fields in this struct.
      +     * The ID of the schema bundle that this enum is defined in.
            * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + java.lang.String getSchemaBundleId(); + + /** + * + * + *
      +     * The ID of the schema bundle that this enum is defined in.
      +     * 
      + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + com.google.protobuf.ByteString getSchemaBundleIdBytes(); + + /** + * + * + *
      +     * The fully qualified name of the protobuf enum message, including package.
      +     * In the format of "foo.bar.EnumMessage".
      +     * 
      + * + * string enum_name = 2; + * + * @return The enumName. + */ + java.lang.String getEnumName(); + + /** + * + * + *
      +     * The fully qualified name of the protobuf enum message, including package.
      +     * In the format of "foo.bar.EnumMessage".
      +     * 
      + * + * string enum_name = 2; + * + * @return The bytes for enumName. */ + com.google.protobuf.ByteString getEnumNameBytes(); + } + + /** + * + * + *
      +   * A protobuf enum type.
      +   * Values of type `Enum` are stored in `Value.int_value`.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.Type.Enum} + */ + public static final class Enum extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Enum) + EnumOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Enum"); + } + + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Enum() { + schemaBundleId_ = ""; + enumName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Enum_descriptor; + } + @java.lang.Override - public java.util.List getFieldsList() { - return fields_; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.Type.Enum.class, + com.google.bigtable.admin.v2.Type.Enum.Builder.class); } + + public static final int SCHEMA_BUNDLE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaBundleId_ = ""; + /** * * *
      -     * The names and types of the fields in this struct.
      +     * The ID of the schema bundle that this enum is defined in.
            * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. */ @java.lang.Override - public java.util.List - getFieldsOrBuilderList() { - return fields_; + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + 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(); + schemaBundleId_ = s; + return s; + } } + /** * * *
      -     * The names and types of the fields in this struct.
      +     * The ID of the schema bundle that this enum is defined in.
            * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. */ @java.lang.Override - public int getFieldsCount() { - return fields_.size(); + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int ENUM_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object enumName_ = ""; + /** * * *
      -     * The names and types of the fields in this struct.
      +     * The fully qualified name of the protobuf enum message, including package.
      +     * In the format of "foo.bar.EnumMessage".
            * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The enumName. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index) { - return fields_.get(index); + public java.lang.String getEnumName() { + java.lang.Object ref = enumName_; + 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(); + enumName_ = s; + return s; + } } + /** * * *
      -     * The names and types of the fields in this struct.
      +     * The fully qualified name of the protobuf enum message, including package.
      +     * In the format of "foo.bar.EnumMessage".
            * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The bytes for enumName. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { - return fields_.get(index); + public com.google.protobuf.ByteString getEnumNameBytes() { + java.lang.Object ref = enumName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enumName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -10651,8 +17450,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(1, fields_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enumName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, enumName_); } getUnknownFields().writeTo(output); } @@ -10663,8 +17465,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enumName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, enumName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -10676,13 +17481,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.admin.v2.Type.Struct)) { + if (!(obj instanceof com.google.bigtable.admin.v2.Type.Enum)) { return super.equals(obj); } - com.google.bigtable.admin.v2.Type.Struct other = - (com.google.bigtable.admin.v2.Type.Struct) obj; + com.google.bigtable.admin.v2.Type.Enum other = (com.google.bigtable.admin.v2.Type.Enum) obj; - if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getEnumName().equals(other.getEnumName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10694,84 +17499,84 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } + hash = (37 * hash) + SCHEMA_BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundleId().hashCode(); + hash = (37 * hash) + ENUM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEnumName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.admin.v2.Type.Enum parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseFrom(byte[] data) + public static com.google.bigtable.admin.v2.Type.Enum parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.admin.v2.Type.Struct parseFrom(java.io.InputStream input) + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseDelimitedFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct parseFrom( + public static com.google.bigtable.admin.v2.Type.Enum 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); } @@ -10784,7 +17589,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Struct prototype) { + public static Builder newBuilder(com.google.bigtable.admin.v2.Type.Enum prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -10794,47 +17599,44 @@ 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; } + /** * * *
      -     * A structured data value, consisting of fields which map to dynamically
      -     * typed values.
      -     * Values of type `Struct` are stored in `Value.array_value` where entries are
      -     * in the same order and number as `field_types`.
      +     * A protobuf enum type.
      +     * Values of type `Enum` are stored in `Value.int_value`.
            * 
      * - * Protobuf type {@code google.bigtable.admin.v2.Type.Struct} + * Protobuf type {@code google.bigtable.admin.v2.Type.Enum} */ - 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.bigtable.admin.v2.Type.Struct) - com.google.bigtable.admin.v2.Type.StructOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Enum) + com.google.bigtable.admin.v2.Type.EnumOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Enum_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable + .internal_static_google_bigtable_admin_v2_Type_Enum_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.admin.v2.Type.Struct.class, - com.google.bigtable.admin.v2.Type.Struct.Builder.class); + com.google.bigtable.admin.v2.Type.Enum.class, + com.google.bigtable.admin.v2.Type.Enum.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.Struct.newBuilder() + // Construct using com.google.bigtable.admin.v2.Type.Enum.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -10842,30 +17644,25 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - } else { - fields_ = null; - fieldsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); + schemaBundleId_ = ""; + enumName_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; + .internal_static_google_bigtable_admin_v2_Type_Enum_descriptor; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + public com.google.bigtable.admin.v2.Type.Enum getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct build() { - com.google.bigtable.admin.v2.Type.Struct result = buildPartial(); + public com.google.bigtable.admin.v2.Type.Enum build() { + com.google.bigtable.admin.v2.Type.Enum result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -10873,10 +17670,9 @@ public com.google.bigtable.admin.v2.Type.Struct build() { } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct buildPartial() { - com.google.bigtable.admin.v2.Type.Struct result = - new com.google.bigtable.admin.v2.Type.Struct(this); - buildPartialRepeatedFields(result); + public com.google.bigtable.admin.v2.Type.Enum buildPartial() { + com.google.bigtable.admin.v2.Type.Enum result = + new com.google.bigtable.admin.v2.Type.Enum(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -10884,536 +17680,340 @@ public com.google.bigtable.admin.v2.Type.Struct buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.bigtable.admin.v2.Type.Struct result) { - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - } - - private void buildPartial0(com.google.bigtable.admin.v2.Type.Struct result) { + private void buildPartial0(com.google.bigtable.admin.v2.Type.Enum 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.bigtable.admin.v2.Type.Struct) { - return mergeFrom((com.google.bigtable.admin.v2.Type.Struct) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Struct other) { - if (other == com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFieldsFieldBuilder() - : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - 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(); + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Type.Struct.Field m = - input.readMessage( - com.google.bigtable.admin.v2.Type.Struct.Field.parser(), - extensionRegistry); - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(m); - } else { - fieldsBuilder_.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 fields_ = - java.util.Collections.emptyList(); - - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList(fields_); - bitField0_ |= 0x00000001; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enumName_ = enumName_; } } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct.Field, - com.google.bigtable.admin.v2.Type.Struct.Field.Builder, - com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder> - fieldsBuilder_; - - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public java.util.List getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.admin.v2.Type.Struct.Field getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public Builder setFields(int index, com.google.bigtable.admin.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public Builder setFields( - int index, com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type.Enum) { + return mergeFrom((com.google.bigtable.admin.v2.Type.Enum) other); } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); + super.mergeFrom(other); + return this; } - return this; } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public Builder addFields(com.google.bigtable.admin.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type.Enum other) { + if (other == com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance()) return this; + if (!other.getSchemaBundleId().isEmpty()) { + schemaBundleId_ = other.schemaBundleId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEnumName().isEmpty()) { + enumName_ = other.enumName_; + bitField0_ |= 0x00000002; onChanged(); - } else { - fieldsBuilder_.addMessage(value); } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public Builder addFields(int index, com.google.bigtable.admin.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); + + @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: + { + schemaBundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + enumName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally return this; } + + private int bitField0_; + + private java.lang.Object schemaBundleId_ = ""; + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The ID of the schema bundle that this enum is defined in.
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. */ - public Builder addFields( - com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaBundleId_ = s; + return s; } else { - fieldsBuilder_.addMessage(builderForValue.build()); + return (java.lang.String) ref; } - return this; } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The ID of the schema bundle that this enum is defined in.
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. */ - public Builder addFields( - int index, com.google.bigtable.admin.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - return this; } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The ID of the schema bundle that this enum is defined in.
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @param value The schemaBundleId to set. + * @return This builder for chaining. */ - public Builder addAllFields( - java.lang.Iterable values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); + public Builder setSchemaBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The ID of the schema bundle that this enum is defined in.
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return This builder for chaining. */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } + public Builder clearSchemaBundleId() { + schemaBundleId_ = getDefaultInstance().getSchemaBundleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); return this; } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The ID of the schema bundle that this enum is defined in.
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @param value The bytes for schemaBundleId to set. + * @return This builder for chaining. */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); + public Builder setSchemaBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } + + private java.lang.Object enumName_ = ""; + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The fully qualified name of the protobuf enum message, including package.
      +       * In the format of "foo.bar.EnumMessage".
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.admin.v2.Type.Struct.Field.Builder getFieldsBuilder(int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - * + * string enum_name = 2; * - *
      -       * The names and types of the fields in this struct.
      -       * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * @return The enumName. */ - public com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); + public java.lang.String getEnumName() { + java.lang.Object ref = enumName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enumName_ = s; + return s; } else { - return fieldsBuilder_.getMessageOrBuilder(index); + return (java.lang.String) ref; } } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The fully qualified name of the protobuf enum message, including package.
      +       * In the format of "foo.bar.EnumMessage".
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The bytes for enumName. */ - public java.util.List - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.ByteString getEnumNameBytes() { + java.lang.Object ref = enumName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enumName_ = b; + return b; } else { - return java.util.Collections.unmodifiableList(fields_); + return (com.google.protobuf.ByteString) ref; } } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The fully qualified name of the protobuf enum message, including package.
      +       * In the format of "foo.bar.EnumMessage".
              * 
      * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.admin.v2.Type.Struct.Field.Builder addFieldsBuilder() { - return getFieldsFieldBuilder() - .addBuilder(com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()); - } - /** - * - * - *
      -       * The names and types of the fields in this struct.
      -       * 
      + * string enum_name = 2; * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; + * @param value The enumName to set. + * @return This builder for chaining. */ - public com.google.bigtable.admin.v2.Type.Struct.Field.Builder addFieldsBuilder(int index) { - return getFieldsFieldBuilder() - .addBuilder(index, com.google.bigtable.admin.v2.Type.Struct.Field.getDefaultInstance()); + public Builder setEnumName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } + /** * * *
      -       * The names and types of the fields in this struct.
      +       * The fully qualified name of the protobuf enum message, including package.
      +       * In the format of "foo.bar.EnumMessage".
              * 
      - * - * repeated .google.bigtable.admin.v2.Type.Struct.Field fields = 1; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct.Field, - com.google.bigtable.admin.v2.Type.Struct.Field.Builder, - com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct.Field, - com.google.bigtable.admin.v2.Type.Struct.Field.Builder, - com.google.bigtable.admin.v2.Type.Struct.FieldOrBuilder>( - fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + * + * string enum_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnumName() { + enumName_ = getDefaultInstance().getEnumName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
      +       * The fully qualified name of the protobuf enum message, including package.
      +       * In the format of "foo.bar.EnumMessage".
      +       * 
      + * + * string enum_name = 2; + * + * @param value The bytes for enumName to set. + * @return This builder for chaining. + */ + public Builder setEnumNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Struct) + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Enum) } - // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Struct) - private static final com.google.bigtable.admin.v2.Type.Struct DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Type.Enum) + private static final com.google.bigtable.admin.v2.Type.Enum DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Struct(); + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.Type.Enum(); } - public static com.google.bigtable.admin.v2.Type.Struct getDefaultInstance() { + public static com.google.bigtable.admin.v2.Type.Enum getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Struct parsePartialFrom( + public Enum parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11433,17 +18033,17 @@ public Struct parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct getDefaultInstanceForType() { + public com.google.bigtable.admin.v2.Type.Enum getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -11465,6 +18065,7 @@ public interface ArrayOrBuilder * @return Whether the elementType field is set. */ boolean hasElementType(); + /** * * @@ -11477,6 +18078,7 @@ public interface ArrayOrBuilder * @return The elementType. */ com.google.bigtable.admin.v2.Type getElementType(); + /** * * @@ -11488,6 +18090,7 @@ public interface ArrayOrBuilder */ com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder(); } + /** * * @@ -11498,31 +18101,36 @@ public interface ArrayOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Array} */ - public static final class Array extends com.google.protobuf.GeneratedMessageV3 + public static final class Array extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Array) ArrayOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Array"); + } + // Use Array.newBuilder() to construct. - private Array(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Array(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Array() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Array(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Array_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable @@ -11534,6 +18142,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ELEMENT_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type elementType_; + /** * * @@ -11549,6 +18158,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasElementType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -11566,6 +18176,7 @@ public com.google.bigtable.admin.v2.Type getElementType() { ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : elementType_; } + /** * * @@ -11687,38 +18298,38 @@ public static com.google.bigtable.admin.v2.Type.Array parseFrom( public static com.google.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array 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); } @@ -11741,11 +18352,11 @@ 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; } + /** * * @@ -11756,8 +18367,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Type.Array} */ - 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.bigtable.admin.v2.Type.Array) com.google.bigtable.admin.v2.Type.ArrayOrBuilder { @@ -11767,7 +18377,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable @@ -11781,14 +18391,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) { - getElementTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetElementTypeFieldBuilder(); } } @@ -11846,41 +18456,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Type.Array 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.bigtable.admin.v2.Type.Array) { @@ -11924,7 +18499,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getElementTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetElementTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -11948,11 +18524,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Type elementType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> elementTypeBuilder_; + /** * * @@ -11967,6 +18544,7 @@ public Builder mergeFrom( public boolean hasElementType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -11987,6 +18565,7 @@ public com.google.bigtable.admin.v2.Type getElementType() { return elementTypeBuilder_.getMessage(); } } + /** * * @@ -12009,6 +18588,7 @@ public Builder setElementType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -12028,6 +18608,7 @@ public Builder setElementType(com.google.bigtable.admin.v2.Type.Builder builderF onChanged(); return this; } + /** * * @@ -12055,6 +18636,7 @@ public Builder mergeElementType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -12074,6 +18656,7 @@ public Builder clearElementType() { onChanged(); return this; } + /** * * @@ -12086,8 +18669,9 @@ public Builder clearElementType() { public com.google.bigtable.admin.v2.Type.Builder getElementTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getElementTypeFieldBuilder().getBuilder(); + return internalGetElementTypeFieldBuilder().getBuilder(); } + /** * * @@ -12106,6 +18690,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder() { : elementType_; } } + /** * * @@ -12115,14 +18700,14 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder() { * * .google.bigtable.admin.v2.Type element_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getElementTypeFieldBuilder() { + internalGetElementTypeFieldBuilder() { if (elementTypeBuilder_ == null) { elementTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -12132,18 +18717,6 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getElementTypeOrBuilder() { return elementTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Array) } @@ -12214,6 +18787,7 @@ public interface MapOrBuilder * @return Whether the keyType field is set. */ boolean hasKeyType(); + /** * * @@ -12227,6 +18801,7 @@ public interface MapOrBuilder * @return The keyType. */ com.google.bigtable.admin.v2.Type getKeyType(); + /** * * @@ -12251,6 +18826,7 @@ public interface MapOrBuilder * @return Whether the valueType field is set. */ boolean hasValueType(); + /** * * @@ -12263,6 +18839,7 @@ public interface MapOrBuilder * @return The valueType. */ com.google.bigtable.admin.v2.Type getValueType(); + /** * * @@ -12274,6 +18851,7 @@ public interface MapOrBuilder */ com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder(); } + /** * * @@ -12289,31 +18867,36 @@ public interface MapOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Map} */ - public static final class Map extends com.google.protobuf.GeneratedMessageV3 + public static final class Map extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Map) MapOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Map"); + } + // Use Map.newBuilder() to construct. - private Map(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Map(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Map() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Map(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Map_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable @@ -12325,6 +18908,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int KEY_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type keyType_; + /** * * @@ -12341,6 +18925,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasKeyType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -12357,6 +18942,7 @@ public boolean hasKeyType() { public com.google.bigtable.admin.v2.Type getKeyType() { return keyType_ == null ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : keyType_; } + /** * * @@ -12374,6 +18960,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { public static final int VALUE_TYPE_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.Type valueType_; + /** * * @@ -12389,6 +18976,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -12406,6 +18994,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : valueType_; } + /** * * @@ -12541,38 +19130,38 @@ public static com.google.bigtable.admin.v2.Type.Map parseFrom( public static com.google.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map 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); } @@ -12595,11 +19184,11 @@ 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; } + /** * * @@ -12615,8 +19204,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Type.Map} */ - 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.bigtable.admin.v2.Type.Map) com.google.bigtable.admin.v2.Type.MapOrBuilder { @@ -12626,7 +19214,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable @@ -12640,15 +19228,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) { - getKeyTypeFieldBuilder(); - getValueTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeyTypeFieldBuilder(); + internalGetValueTypeFieldBuilder(); } } @@ -12714,41 +19302,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.Type.Map 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.bigtable.admin.v2.Type.Map) { @@ -12795,13 +19348,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getKeyTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetKeyTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getValueTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetValueTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -12825,11 +19380,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Type keyType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> keyTypeBuilder_; + /** * * @@ -12845,6 +19401,7 @@ public Builder mergeFrom( public boolean hasKeyType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -12866,6 +19423,7 @@ public com.google.bigtable.admin.v2.Type getKeyType() { return keyTypeBuilder_.getMessage(); } } + /** * * @@ -12889,6 +19447,7 @@ public Builder setKeyType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -12909,6 +19468,7 @@ public Builder setKeyType(com.google.bigtable.admin.v2.Type.Builder builderForVa onChanged(); return this; } + /** * * @@ -12937,6 +19497,7 @@ public Builder mergeKeyType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -12957,6 +19518,7 @@ public Builder clearKeyType() { onChanged(); return this; } + /** * * @@ -12970,8 +19532,9 @@ public Builder clearKeyType() { public com.google.bigtable.admin.v2.Type.Builder getKeyTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getKeyTypeFieldBuilder().getBuilder(); + return internalGetKeyTypeFieldBuilder().getBuilder(); } + /** * * @@ -12991,6 +19554,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { : keyType_; } } + /** * * @@ -13001,14 +19565,14 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { * * .google.bigtable.admin.v2.Type key_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getKeyTypeFieldBuilder() { + internalGetKeyTypeFieldBuilder() { if (keyTypeBuilder_ == null) { keyTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -13019,11 +19583,12 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { } private com.google.bigtable.admin.v2.Type valueType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> valueTypeBuilder_; + /** * * @@ -13038,6 +19603,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getKeyTypeOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -13058,6 +19624,7 @@ public com.google.bigtable.admin.v2.Type getValueType() { return valueTypeBuilder_.getMessage(); } } + /** * * @@ -13080,6 +19647,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -13099,6 +19667,7 @@ public Builder setValueType(com.google.bigtable.admin.v2.Type.Builder builderFor onChanged(); return this; } + /** * * @@ -13126,6 +19695,7 @@ public Builder mergeValueType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -13145,6 +19715,7 @@ public Builder clearValueType() { onChanged(); return this; } + /** * * @@ -13157,8 +19728,9 @@ public Builder clearValueType() { public com.google.bigtable.admin.v2.Type.Builder getValueTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getValueTypeFieldBuilder().getBuilder(); + return internalGetValueTypeFieldBuilder().getBuilder(); } + /** * * @@ -13177,6 +19749,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { : valueType_; } } + /** * * @@ -13186,14 +19759,14 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { * * .google.bigtable.admin.v2.Type value_type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getValueTypeFieldBuilder() { + internalGetValueTypeFieldBuilder() { if (valueTypeBuilder_ == null) { valueTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -13203,18 +19776,6 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getValueTypeOrBuilder() { return valueTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Map) } @@ -13286,6 +19847,7 @@ public interface AggregateOrBuilder * @return Whether the inputType field is set. */ boolean hasInputType(); + /** * * @@ -13300,6 +19862,7 @@ public interface AggregateOrBuilder * @return The inputType. */ com.google.bigtable.admin.v2.Type getInputType(); + /** * * @@ -13329,6 +19892,7 @@ public interface AggregateOrBuilder * @return Whether the stateType field is set. */ boolean hasStateType(); + /** * * @@ -13345,6 +19909,7 @@ public interface AggregateOrBuilder * @return The stateType. */ com.google.bigtable.admin.v2.Type getStateType(); + /** * * @@ -13372,6 +19937,7 @@ public interface AggregateOrBuilder * @return Whether the sum field is set. */ boolean hasSum(); + /** * * @@ -13384,6 +19950,7 @@ public interface AggregateOrBuilder * @return The sum. */ com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum(); + /** * * @@ -13409,6 +19976,7 @@ public interface AggregateOrBuilder * @return Whether the hllppUniqueCount field is set. */ boolean hasHllppUniqueCount(); + /** * * @@ -13424,6 +19992,7 @@ public interface AggregateOrBuilder */ com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount getHllppUniqueCount(); + /** * * @@ -13450,6 +20019,7 @@ public interface AggregateOrBuilder * @return Whether the max field is set. */ boolean hasMax(); + /** * * @@ -13462,6 +20032,7 @@ public interface AggregateOrBuilder * @return The max. */ com.google.bigtable.admin.v2.Type.Aggregate.Max getMax(); + /** * * @@ -13485,6 +20056,7 @@ public interface AggregateOrBuilder * @return Whether the min field is set. */ boolean hasMin(); + /** * * @@ -13497,6 +20069,7 @@ public interface AggregateOrBuilder * @return The min. */ com.google.bigtable.admin.v2.Type.Aggregate.Min getMin(); + /** * * @@ -13510,6 +20083,7 @@ public interface AggregateOrBuilder com.google.bigtable.admin.v2.Type.Aggregate.AggregatorCase getAggregatorCase(); } + /** * * @@ -13523,31 +20097,36 @@ public interface AggregateOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} */ - public static final class Aggregate extends com.google.protobuf.GeneratedMessageV3 + public static final class Aggregate extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate) AggregateOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Aggregate"); + } + // Use Aggregate.newBuilder() to construct. - private Aggregate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Aggregate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Aggregate() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Aggregate(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable @@ -13560,6 +20139,7 @@ public interface SumOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Sum) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -13571,31 +20151,36 @@ public interface SumOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} */ - public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + public static final class Sum extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) SumOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Sum"); + } + // Use Sum.newBuilder() to construct. - private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Sum(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Sum() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Sum(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable @@ -13696,38 +20281,38 @@ public static com.google.bigtable.admin.v2.Type.Aggregate.Sum parseFrom( public static com.google.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum 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); } @@ -13751,10 +20336,11 @@ 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; } + /** * * @@ -13767,7 +20353,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Sum} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Sum) com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder { @@ -13777,7 +20363,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable @@ -13789,7 +20375,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Sum.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -13827,41 +20413,6 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Sum 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.bigtable.admin.v2.Type.Aggregate.Sum) { @@ -13918,18 +20469,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.bigtable.admin.v2.Type.Aggregate.Sum) } @@ -13986,6 +20525,7 @@ public interface MaxOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Max) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -13997,31 +20537,36 @@ public interface MaxOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Max} */ - public static final class Max extends com.google.protobuf.GeneratedMessageV3 + public static final class Max extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Max) MaxOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Max"); + } + // Use Max.newBuilder() to construct. - private Max(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Max(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Max() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Max(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable @@ -14122,38 +20667,38 @@ public static com.google.bigtable.admin.v2.Type.Aggregate.Max parseFrom( public static com.google.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max 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); } @@ -14177,10 +20722,11 @@ 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; } + /** * * @@ -14193,7 +20739,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Max} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Max) com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder { @@ -14203,7 +20749,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable @@ -14215,7 +20761,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Max.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14253,41 +20799,6 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Max 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.bigtable.admin.v2.Type.Aggregate.Max) { @@ -14344,18 +20855,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.bigtable.admin.v2.Type.Aggregate.Max) } @@ -14412,6 +20911,7 @@ public interface MinOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.Min) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -14423,31 +20923,36 @@ public interface MinOrBuilder * * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Min} */ - public static final class Min extends com.google.protobuf.GeneratedMessageV3 + public static final class Min extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.Min) MinOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Min"); + } + // Use Min.newBuilder() to construct. - private Min(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Min(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Min() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Min(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable @@ -14548,38 +21053,38 @@ public static com.google.bigtable.admin.v2.Type.Aggregate.Min parseFrom( public static com.google.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min 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); } @@ -14603,10 +21108,11 @@ 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; } + /** * * @@ -14619,7 +21125,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.Min} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.Min) com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder { @@ -14629,7 +21135,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable @@ -14641,7 +21147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.Type.Aggregate.Min.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14679,41 +21185,6 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Min 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.bigtable.admin.v2.Type.Aggregate.Min) { @@ -14770,18 +21241,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.bigtable.admin.v2.Type.Aggregate.Min) } @@ -14838,6 +21297,7 @@ public interface HyperLogLogPlusPlusUniqueCountOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -14854,32 +21314,37 @@ public interface HyperLogLogPlusPlusUniqueCountOrBuilder * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} */ public static final class HyperLogLogPlusPlusUniqueCount - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) HyperLogLogPlusPlusUniqueCountOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HyperLogLogPlusPlusUniqueCount"); + } + // Use HyperLogLogPlusPlusUniqueCount.newBuilder() to construct. private HyperLogLogPlusPlusUniqueCount( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private HyperLogLogPlusPlusUniqueCount() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HyperLogLogPlusPlusUniqueCount(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable @@ -14986,7 +21451,7 @@ public int hashCode() { public static com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount @@ -14994,13 +21459,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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount @@ -15008,13 +21473,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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount @@ -15022,7 +21487,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); } @@ -15047,10 +21512,11 @@ 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; } + /** * * @@ -15068,7 +21534,7 @@ protected Builder newBuilderForType( * google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder { @@ -15078,7 +21544,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable @@ -15092,7 +21558,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -15134,41 +21600,6 @@ public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCoun 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 @@ -15230,18 +21661,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.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) } @@ -15319,6 +21738,7 @@ public enum AggregatorCase private AggregatorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -15357,6 +21777,7 @@ public AggregatorCase getAggregatorCase() { public static final int INPUT_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Type inputType_; + /** * * @@ -15374,6 +21795,7 @@ public AggregatorCase getAggregatorCase() { public boolean hasInputType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -15393,6 +21815,7 @@ public com.google.bigtable.admin.v2.Type getInputType() { ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : inputType_; } + /** * * @@ -15413,6 +21836,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { public static final int STATE_TYPE_FIELD_NUMBER = 2; private com.google.bigtable.admin.v2.Type stateType_; + /** * * @@ -15432,6 +21856,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { public boolean hasStateType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -15453,6 +21878,7 @@ public com.google.bigtable.admin.v2.Type getStateType() { ? com.google.bigtable.admin.v2.Type.getDefaultInstance() : stateType_; } + /** * * @@ -15474,6 +21900,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { } public static final int SUM_FIELD_NUMBER = 4; + /** * * @@ -15489,6 +21916,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { public boolean hasSum() { return aggregatorCase_ == 4; } + /** * * @@ -15507,6 +21935,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { } return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); } + /** * * @@ -15525,6 +21954,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( } public static final int HLLPP_UNIQUE_COUNT_FIELD_NUMBER = 5; + /** * * @@ -15542,6 +21972,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( public boolean hasHllppUniqueCount() { return aggregatorCase_ == 5; } + /** * * @@ -15565,6 +21996,7 @@ public boolean hasHllppUniqueCount() { return com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount .getDefaultInstance(); } + /** * * @@ -15588,6 +22020,7 @@ public boolean hasHllppUniqueCount() { } public static final int MAX_FIELD_NUMBER = 6; + /** * * @@ -15603,6 +22036,7 @@ public boolean hasHllppUniqueCount() { public boolean hasMax() { return aggregatorCase_ == 6; } + /** * * @@ -15621,6 +22055,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Max getMax() { } return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); } + /** * * @@ -15639,6 +22074,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( } public static final int MIN_FIELD_NUMBER = 7; + /** * * @@ -15654,6 +22090,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( public boolean hasMin() { return aggregatorCase_ == 7; } + /** * * @@ -15672,6 +22109,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Min getMin() { } return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); } + /** * * @@ -15883,38 +22321,38 @@ public static com.google.bigtable.admin.v2.Type.Aggregate parseFrom( public static com.google.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate 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); } @@ -15937,11 +22375,11 @@ 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; } + /** * * @@ -15955,8 +22393,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.admin.v2.Type.Aggregate} */ - 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.bigtable.admin.v2.Type.Aggregate) com.google.bigtable.admin.v2.Type.AggregateOrBuilder { @@ -15966,7 +22403,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable @@ -15980,15 +22417,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) { - getInputTypeFieldBuilder(); - getStateTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInputTypeFieldBuilder(); + internalGetStateTypeFieldBuilder(); } } @@ -16086,41 +22523,6 @@ private void buildPartialOneofs(com.google.bigtable.admin.v2.Type.Aggregate 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.bigtable.admin.v2.Type.Aggregate) { @@ -16193,38 +22595,40 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInputTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInputTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStateTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStateTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 34: { - input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSumFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); + internalGetHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 5; break; } // case 42 case 50: { - input.readMessage(getMaxFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMaxFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 6; break; } // case 50 case 58: { - input.readMessage(getMinFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMinFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 7; break; } // case 58 @@ -16262,11 +22666,12 @@ public Builder clearAggregator() { private int bitField0_; private com.google.bigtable.admin.v2.Type inputType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> inputTypeBuilder_; + /** * * @@ -16283,6 +22688,7 @@ public Builder clearAggregator() { public boolean hasInputType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -16305,6 +22711,7 @@ public com.google.bigtable.admin.v2.Type getInputType() { return inputTypeBuilder_.getMessage(); } } + /** * * @@ -16329,6 +22736,7 @@ public Builder setInputType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -16350,6 +22758,7 @@ public Builder setInputType(com.google.bigtable.admin.v2.Type.Builder builderFor onChanged(); return this; } + /** * * @@ -16379,6 +22788,7 @@ public Builder mergeInputType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -16400,6 +22810,7 @@ public Builder clearInputType() { onChanged(); return this; } + /** * * @@ -16414,8 +22825,9 @@ public Builder clearInputType() { public com.google.bigtable.admin.v2.Type.Builder getInputTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInputTypeFieldBuilder().getBuilder(); + return internalGetInputTypeFieldBuilder().getBuilder(); } + /** * * @@ -16436,6 +22848,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { : inputType_; } } + /** * * @@ -16447,14 +22860,14 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { * * .google.bigtable.admin.v2.Type input_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getInputTypeFieldBuilder() { + internalGetInputTypeFieldBuilder() { if (inputTypeBuilder_ == null) { inputTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -16465,11 +22878,12 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { } private com.google.bigtable.admin.v2.Type stateType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> stateTypeBuilder_; + /** * * @@ -16488,6 +22902,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getInputTypeOrBuilder() { public boolean hasStateType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -16512,6 +22927,7 @@ public com.google.bigtable.admin.v2.Type getStateType() { return stateTypeBuilder_.getMessage(); } } + /** * * @@ -16538,6 +22954,7 @@ public Builder setStateType(com.google.bigtable.admin.v2.Type value) { onChanged(); return this; } + /** * * @@ -16561,6 +22978,7 @@ public Builder setStateType(com.google.bigtable.admin.v2.Type.Builder builderFor onChanged(); return this; } + /** * * @@ -16592,6 +23010,7 @@ public Builder mergeStateType(com.google.bigtable.admin.v2.Type value) { } return this; } + /** * * @@ -16615,6 +23034,7 @@ public Builder clearStateType() { onChanged(); return this; } + /** * * @@ -16631,8 +23051,9 @@ public Builder clearStateType() { public com.google.bigtable.admin.v2.Type.Builder getStateTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStateTypeFieldBuilder().getBuilder(); + return internalGetStateTypeFieldBuilder().getBuilder(); } + /** * * @@ -16655,6 +23076,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { : stateType_; } } + /** * * @@ -16668,14 +23090,14 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { * .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder> - getStateTypeFieldBuilder() { + internalGetStateTypeFieldBuilder() { if (stateTypeBuilder_ == null) { stateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type, com.google.bigtable.admin.v2.Type.Builder, com.google.bigtable.admin.v2.TypeOrBuilder>( @@ -16685,11 +23107,12 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { return stateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Sum, com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder> sumBuilder_; + /** * * @@ -16705,6 +23128,7 @@ public com.google.bigtable.admin.v2.TypeOrBuilder getStateTypeOrBuilder() { public boolean hasSum() { return aggregatorCase_ == 4; } + /** * * @@ -16730,6 +23154,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Sum getSum() { return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); } } + /** * * @@ -16752,6 +23177,7 @@ public Builder setSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { aggregatorCase_ = 4; return this; } + /** * * @@ -16772,6 +23198,7 @@ public Builder setSum( aggregatorCase_ = 4; return this; } + /** * * @@ -16805,6 +23232,7 @@ public Builder mergeSum(com.google.bigtable.admin.v2.Type.Aggregate.Sum value) { aggregatorCase_ = 4; return this; } + /** * * @@ -16830,6 +23258,7 @@ public Builder clearSum() { } return this; } + /** * * @@ -16840,8 +23269,9 @@ public Builder clearSum() { * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; */ public com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder getSumBuilder() { - return getSumFieldBuilder().getBuilder(); + return internalGetSumFieldBuilder().getBuilder(); } + /** * * @@ -16862,6 +23292,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( return com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); } } + /** * * @@ -16871,17 +23302,17 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( * * .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Sum, com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder> - getSumFieldBuilder() { + internalGetSumFieldBuilder() { if (sumBuilder_ == null) { if (!(aggregatorCase_ == 4)) { aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Sum.getDefaultInstance(); } sumBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Sum, com.google.bigtable.admin.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder>( @@ -16895,11 +23326,12 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( return sumBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> hllppUniqueCountBuilder_; + /** * * @@ -16917,6 +23349,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder( public boolean hasHllppUniqueCount() { return aggregatorCase_ == 5; } + /** * * @@ -16948,6 +23381,7 @@ public boolean hasHllppUniqueCount() { .getDefaultInstance(); } } + /** * * @@ -16973,6 +23407,7 @@ public Builder setHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -16996,6 +23431,7 @@ public Builder setHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -17035,6 +23471,7 @@ public Builder mergeHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -17062,6 +23499,7 @@ public Builder clearHllppUniqueCount() { } return this; } + /** * * @@ -17075,8 +23513,9 @@ public Builder clearHllppUniqueCount() { */ public com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder getHllppUniqueCountBuilder() { - return getHllppUniqueCountFieldBuilder().getBuilder(); + return internalGetHllppUniqueCountFieldBuilder().getBuilder(); } + /** * * @@ -17102,6 +23541,7 @@ public Builder clearHllppUniqueCount() { .getDefaultInstance(); } } + /** * * @@ -17113,11 +23553,11 @@ public Builder clearHllppUniqueCount() { * .google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> - getHllppUniqueCountFieldBuilder() { + internalGetHllppUniqueCountFieldBuilder() { if (hllppUniqueCountBuilder_ == null) { if (!(aggregatorCase_ == 5)) { aggregator_ = @@ -17125,7 +23565,7 @@ public Builder clearHllppUniqueCount() { .getDefaultInstance(); } hllppUniqueCountBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount .Builder, @@ -17142,11 +23582,12 @@ public Builder clearHllppUniqueCount() { return hllppUniqueCountBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Max, com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder> maxBuilder_; + /** * * @@ -17162,6 +23603,7 @@ public Builder clearHllppUniqueCount() { public boolean hasMax() { return aggregatorCase_ == 6; } + /** * * @@ -17187,6 +23629,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Max getMax() { return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); } } + /** * * @@ -17209,6 +23652,7 @@ public Builder setMax(com.google.bigtable.admin.v2.Type.Aggregate.Max value) { aggregatorCase_ = 6; return this; } + /** * * @@ -17229,6 +23673,7 @@ public Builder setMax( aggregatorCase_ = 6; return this; } + /** * * @@ -17262,6 +23707,7 @@ public Builder mergeMax(com.google.bigtable.admin.v2.Type.Aggregate.Max value) { aggregatorCase_ = 6; return this; } + /** * * @@ -17287,6 +23733,7 @@ public Builder clearMax() { } return this; } + /** * * @@ -17297,8 +23744,9 @@ public Builder clearMax() { * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; */ public com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder getMaxBuilder() { - return getMaxFieldBuilder().getBuilder(); + return internalGetMaxFieldBuilder().getBuilder(); } + /** * * @@ -17319,6 +23767,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( return com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); } } + /** * * @@ -17328,17 +23777,17 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( * * .google.bigtable.admin.v2.Type.Aggregate.Max max = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Max, com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder> - getMaxFieldBuilder() { + internalGetMaxFieldBuilder() { if (maxBuilder_ == null) { if (!(aggregatorCase_ == 6)) { aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Max.getDefaultInstance(); } maxBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Max, com.google.bigtable.admin.v2.Type.Aggregate.Max.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder>( @@ -17352,11 +23801,12 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( return maxBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Min, com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder> minBuilder_; + /** * * @@ -17372,6 +23822,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder( public boolean hasMin() { return aggregatorCase_ == 7; } + /** * * @@ -17397,6 +23848,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.Min getMin() { return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); } } + /** * * @@ -17419,6 +23871,7 @@ public Builder setMin(com.google.bigtable.admin.v2.Type.Aggregate.Min value) { aggregatorCase_ = 7; return this; } + /** * * @@ -17439,6 +23892,7 @@ public Builder setMin( aggregatorCase_ = 7; return this; } + /** * * @@ -17472,6 +23926,7 @@ public Builder mergeMin(com.google.bigtable.admin.v2.Type.Aggregate.Min value) { aggregatorCase_ = 7; return this; } + /** * * @@ -17497,6 +23952,7 @@ public Builder clearMin() { } return this; } + /** * * @@ -17507,8 +23963,9 @@ public Builder clearMin() { * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; */ public com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder getMinBuilder() { - return getMinFieldBuilder().getBuilder(); + return internalGetMinFieldBuilder().getBuilder(); } + /** * * @@ -17529,6 +23986,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder( return com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); } } + /** * * @@ -17538,17 +23996,17 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder( * * .google.bigtable.admin.v2.Type.Aggregate.Min min = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Min, com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder> - getMinFieldBuilder() { + internalGetMinFieldBuilder() { if (minBuilder_ == null) { if (!(aggregatorCase_ == 7)) { aggregator_ = com.google.bigtable.admin.v2.Type.Aggregate.Min.getDefaultInstance(); } minBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Type.Aggregate.Min, com.google.bigtable.admin.v2.Type.Aggregate.Min.Builder, com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder>( @@ -17562,18 +24020,6 @@ public com.google.bigtable.admin.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder( return minBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type.Aggregate) } @@ -17647,12 +24093,15 @@ public enum KindCase STRUCT_TYPE(7), ARRAY_TYPE(3), MAP_TYPE(4), + PROTO_TYPE(13), + ENUM_TYPE(14), KIND_NOT_SET(0); private final int value; private KindCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -17689,6 +24138,10 @@ public static KindCase forNumber(int value) { return ARRAY_TYPE; case 4: return MAP_TYPE; + case 13: + return PROTO_TYPE; + case 14: + return ENUM_TYPE; case 0: return KIND_NOT_SET; default: @@ -17706,6 +24159,7 @@ public KindCase getKindCase() { } public static final int BYTES_TYPE_FIELD_NUMBER = 1; + /** * * @@ -17721,6 +24175,7 @@ public KindCase getKindCase() { public boolean hasBytesType() { return kindCase_ == 1; } + /** * * @@ -17739,6 +24194,7 @@ public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { } return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); } + /** * * @@ -17757,6 +24213,7 @@ public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() } public static final int STRING_TYPE_FIELD_NUMBER = 2; + /** * * @@ -17772,6 +24229,7 @@ public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() public boolean hasStringType() { return kindCase_ == 2; } + /** * * @@ -17790,6 +24248,7 @@ public com.google.bigtable.admin.v2.Type.String getStringType() { } return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); } + /** * * @@ -17808,6 +24267,7 @@ public com.google.bigtable.admin.v2.Type.StringOrBuilder getStringTypeOrBuilder( } public static final int INT64_TYPE_FIELD_NUMBER = 5; + /** * * @@ -17823,6 +24283,7 @@ public com.google.bigtable.admin.v2.Type.StringOrBuilder getStringTypeOrBuilder( public boolean hasInt64Type() { return kindCase_ == 5; } + /** * * @@ -17841,6 +24302,7 @@ public com.google.bigtable.admin.v2.Type.Int64 getInt64Type() { } return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } + /** * * @@ -17859,6 +24321,7 @@ public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() } public static final int FLOAT32_TYPE_FIELD_NUMBER = 12; + /** * * @@ -17874,6 +24337,7 @@ public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() public boolean hasFloat32Type() { return kindCase_ == 12; } + /** * * @@ -17892,6 +24356,7 @@ public com.google.bigtable.admin.v2.Type.Float32 getFloat32Type() { } return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } + /** * * @@ -17910,6 +24375,7 @@ public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilde } public static final int FLOAT64_TYPE_FIELD_NUMBER = 9; + /** * * @@ -17925,6 +24391,7 @@ public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilde public boolean hasFloat64Type() { return kindCase_ == 9; } + /** * * @@ -17943,6 +24410,7 @@ public com.google.bigtable.admin.v2.Type.Float64 getFloat64Type() { } return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } + /** * * @@ -17961,6 +24429,7 @@ public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilde } public static final int BOOL_TYPE_FIELD_NUMBER = 8; + /** * * @@ -17976,6 +24445,7 @@ public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilde public boolean hasBoolType() { return kindCase_ == 8; } + /** * * @@ -17994,6 +24464,7 @@ public com.google.bigtable.admin.v2.Type.Bool getBoolType() { } return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } + /** * * @@ -18012,6 +24483,7 @@ public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { } public static final int TIMESTAMP_TYPE_FIELD_NUMBER = 10; + /** * * @@ -18027,6 +24499,7 @@ public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { public boolean hasTimestampType() { return kindCase_ == 10; } + /** * * @@ -18045,6 +24518,7 @@ public com.google.bigtable.admin.v2.Type.Timestamp getTimestampType() { } return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); } + /** * * @@ -18063,6 +24537,7 @@ public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBu } public static final int DATE_TYPE_FIELD_NUMBER = 11; + /** * * @@ -18078,6 +24553,7 @@ public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBu public boolean hasDateType() { return kindCase_ == 11; } + /** * * @@ -18096,6 +24572,7 @@ public com.google.bigtable.admin.v2.Type.Date getDateType() { } return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } + /** * * @@ -18114,6 +24591,7 @@ public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { } public static final int AGGREGATE_TYPE_FIELD_NUMBER = 6; + /** * * @@ -18129,6 +24607,7 @@ public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { public boolean hasAggregateType() { return kindCase_ == 6; } + /** * * @@ -18147,6 +24626,7 @@ public com.google.bigtable.admin.v2.Type.Aggregate getAggregateType() { } return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } + /** * * @@ -18165,6 +24645,7 @@ public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBu } public static final int STRUCT_TYPE_FIELD_NUMBER = 7; + /** * * @@ -18180,6 +24661,7 @@ public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBu public boolean hasStructType() { return kindCase_ == 7; } + /** * * @@ -18198,6 +24680,7 @@ public com.google.bigtable.admin.v2.Type.Struct getStructType() { } return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); } + /** * * @@ -18216,6 +24699,7 @@ public com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder( } public static final int ARRAY_TYPE_FIELD_NUMBER = 3; + /** * * @@ -18231,6 +24715,7 @@ public com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder( public boolean hasArrayType() { return kindCase_ == 3; } + /** * * @@ -18249,6 +24734,7 @@ public com.google.bigtable.admin.v2.Type.Array getArrayType() { } return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } + /** * * @@ -18267,6 +24753,7 @@ public com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() } public static final int MAP_TYPE_FIELD_NUMBER = 4; + /** * * @@ -18282,6 +24769,7 @@ public com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() public boolean hasMapType() { return kindCase_ == 4; } + /** * * @@ -18300,6 +24788,7 @@ public com.google.bigtable.admin.v2.Type.Map getMapType() { } return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } + /** * * @@ -18317,6 +24806,114 @@ public com.google.bigtable.admin.v2.Type.MapOrBuilder getMapTypeOrBuilder() { return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } + public static final int PROTO_TYPE_FIELD_NUMBER = 13; + + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + * + * @return Whether the protoType field is set. + */ + @java.lang.Override + public boolean hasProtoType() { + return kindCase_ == 13; + } + + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + * + * @return The protoType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Proto getProtoType() { + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; + } + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); + } + + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder() { + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; + } + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); + } + + public static final int ENUM_TYPE_FIELD_NUMBER = 14; + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + * + * @return Whether the enumType field is set. + */ + @java.lang.Override + public boolean hasEnumType() { + return kindCase_ == 14; + } + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + * + * @return The enumType. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.Enum getEnumType() { + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; + } + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); + } + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.EnumOrBuilder getEnumTypeOrBuilder() { + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; + } + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -18367,6 +24964,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 12) { output.writeMessage(12, (com.google.bigtable.admin.v2.Type.Float32) kind_); } + if (kindCase_ == 13) { + output.writeMessage(13, (com.google.bigtable.admin.v2.Type.Proto) kind_); + } + if (kindCase_ == 14) { + output.writeMessage(14, (com.google.bigtable.admin.v2.Type.Enum) kind_); + } getUnknownFields().writeTo(output); } @@ -18436,6 +25039,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 12, (com.google.bigtable.admin.v2.Type.Float32) kind_); } + if (kindCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.bigtable.admin.v2.Type.Proto) kind_); + } + if (kindCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.bigtable.admin.v2.Type.Enum) kind_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18489,6 +25102,12 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getMapType().equals(other.getMapType())) return false; break; + case 13: + if (!getProtoType().equals(other.getProtoType())) return false; + break; + case 14: + if (!getEnumType().equals(other.getEnumType())) return false; + break; case 0: default: } @@ -18552,6 +25171,14 @@ public int hashCode() { hash = (37 * hash) + MAP_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMapType().hashCode(); break; + case 13: + hash = (37 * hash) + PROTO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getProtoType().hashCode(); + break; + case 14: + hash = (37 * hash) + ENUM_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEnumType().hashCode(); + break; case 0: default: } @@ -18596,38 +25223,38 @@ public static com.google.bigtable.admin.v2.Type parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -18650,10 +25277,11 @@ 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; } + /** * * @@ -18663,30 +25291,28 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * familiarity and consistency across products and features. * * For compatibility with Bigtable's existing untyped APIs, each `Type` includes - * an `Encoding` which describes how to convert to/from the underlying data. + * an `Encoding` which describes how to convert to or from the underlying data. + * + * Each encoding can operate in one of two modes: * - * Each encoding also defines the following properties: + * - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` + * if and only if `X <= Y`. This is useful anywhere sort order is important, + * for example when encoding keys. + * - Distinct: In this mode, Bigtable guarantees that if `X != Y` then + * `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For + * example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}" + * are valid encodings of the same JSON value. * - * * Order-preserving: Does the encoded value sort consistently with the - * original typed value? Note that Bigtable will always sort data based on - * the raw encoded value, *not* the decoded type. - * - Example: BYTES values sort in the same order as their raw encodings. - * - Counterexample: Encoding INT64 as a fixed-width decimal string does - * *not* preserve sort order when dealing with negative numbers. - * `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. - * * Self-delimiting: If we concatenate two encoded values, can we always tell - * where the first one ends and the second one begins? - * - Example: If we encode INT64s to fixed-width STRINGs, the first value - * will always contain exactly N digits, possibly preceded by a sign. - * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have - * no way to tell where the first one ends. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * The API clearly documents which mode is used wherever an encoding can be + * configured. Each encoding also documents which values are supported in which + * modes. For example, when encoding INT64 as a numeric STRING, negative numbers + * cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but + * `STRING("-00001") > STRING("00001")`. * * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.Type) com.google.bigtable.admin.v2.TypeOrBuilder { @@ -18696,7 +25322,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.bigtable.admin.v2.TypesProto .internal_static_google_bigtable_admin_v2_Type_fieldAccessorTable @@ -18705,478 +25331,929 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.admin.v2.Type.Builder.class); } - // Construct using com.google.bigtable.admin.v2.Type.newBuilder() - private Builder() {} + // Construct using com.google.bigtable.admin.v2.Type.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.clear(); + } + if (stringTypeBuilder_ != null) { + stringTypeBuilder_.clear(); + } + if (int64TypeBuilder_ != null) { + int64TypeBuilder_.clear(); + } + if (float32TypeBuilder_ != null) { + float32TypeBuilder_.clear(); + } + if (float64TypeBuilder_ != null) { + float64TypeBuilder_.clear(); + } + if (boolTypeBuilder_ != null) { + boolTypeBuilder_.clear(); + } + if (timestampTypeBuilder_ != null) { + timestampTypeBuilder_.clear(); + } + if (dateTypeBuilder_ != null) { + dateTypeBuilder_.clear(); + } + if (aggregateTypeBuilder_ != null) { + aggregateTypeBuilder_.clear(); + } + if (structTypeBuilder_ != null) { + structTypeBuilder_.clear(); + } + if (arrayTypeBuilder_ != null) { + arrayTypeBuilder_.clear(); + } + if (mapTypeBuilder_ != null) { + mapTypeBuilder_.clear(); + } + if (protoTypeBuilder_ != null) { + protoTypeBuilder_.clear(); + } + if (enumTypeBuilder_ != null) { + enumTypeBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.TypesProto + .internal_static_google_bigtable_admin_v2_Type_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.Type.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type build() { + com.google.bigtable.admin.v2.Type result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.Type buildPartial() { + com.google.bigtable.admin.v2.Type result = new com.google.bigtable.admin.v2.Type(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.Type result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.admin.v2.Type result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && bytesTypeBuilder_ != null) { + result.kind_ = bytesTypeBuilder_.build(); + } + if (kindCase_ == 2 && stringTypeBuilder_ != null) { + result.kind_ = stringTypeBuilder_.build(); + } + if (kindCase_ == 5 && int64TypeBuilder_ != null) { + result.kind_ = int64TypeBuilder_.build(); + } + if (kindCase_ == 12 && float32TypeBuilder_ != null) { + result.kind_ = float32TypeBuilder_.build(); + } + if (kindCase_ == 9 && float64TypeBuilder_ != null) { + result.kind_ = float64TypeBuilder_.build(); + } + if (kindCase_ == 8 && boolTypeBuilder_ != null) { + result.kind_ = boolTypeBuilder_.build(); + } + if (kindCase_ == 10 && timestampTypeBuilder_ != null) { + result.kind_ = timestampTypeBuilder_.build(); + } + if (kindCase_ == 11 && dateTypeBuilder_ != null) { + result.kind_ = dateTypeBuilder_.build(); + } + if (kindCase_ == 6 && aggregateTypeBuilder_ != null) { + result.kind_ = aggregateTypeBuilder_.build(); + } + if (kindCase_ == 7 && structTypeBuilder_ != null) { + result.kind_ = structTypeBuilder_.build(); + } + if (kindCase_ == 3 && arrayTypeBuilder_ != null) { + result.kind_ = arrayTypeBuilder_.build(); + } + if (kindCase_ == 4 && mapTypeBuilder_ != null) { + result.kind_ = mapTypeBuilder_.build(); + } + if (kindCase_ == 13 && protoTypeBuilder_ != null) { + result.kind_ = protoTypeBuilder_.build(); + } + if (kindCase_ == 14 && enumTypeBuilder_ != null) { + result.kind_ = enumTypeBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.Type) { + return mergeFrom((com.google.bigtable.admin.v2.Type) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.Type other) { + if (other == com.google.bigtable.admin.v2.Type.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case BYTES_TYPE: + { + mergeBytesType(other.getBytesType()); + break; + } + case STRING_TYPE: + { + mergeStringType(other.getStringType()); + break; + } + case INT64_TYPE: + { + mergeInt64Type(other.getInt64Type()); + break; + } + case FLOAT32_TYPE: + { + mergeFloat32Type(other.getFloat32Type()); + break; + } + case FLOAT64_TYPE: + { + mergeFloat64Type(other.getFloat64Type()); + break; + } + case BOOL_TYPE: + { + mergeBoolType(other.getBoolType()); + break; + } + case TIMESTAMP_TYPE: + { + mergeTimestampType(other.getTimestampType()); + break; + } + case DATE_TYPE: + { + mergeDateType(other.getDateType()); + break; + } + case AGGREGATE_TYPE: + { + mergeAggregateType(other.getAggregateType()); + break; + } + case STRUCT_TYPE: + { + mergeStructType(other.getStructType()); + break; + } + case ARRAY_TYPE: + { + mergeArrayType(other.getArrayType()); + break; + } + case MAP_TYPE: + { + mergeMapType(other.getMapType()); + break; + } + case PROTO_TYPE: + { + mergeProtoType(other.getProtoType()); + break; + } + case ENUM_TYPE: + { + mergeEnumType(other.getEnumType()); + break; + } + case KIND_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( + internalGetBytesTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStringTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetArrayTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetMapTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetInt64TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetAggregateTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetStructTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetBoolTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetFloat64TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetTimestampTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetDateTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetFloat32TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetProtoTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetEnumTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 14; + break; + } // case 114 + 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 kindCase_ = 0; + private java.lang.Object kind_; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (bytesTypeBuilder_ != null) { - bytesTypeBuilder_.clear(); - } - if (stringTypeBuilder_ != null) { - stringTypeBuilder_.clear(); - } - if (int64TypeBuilder_ != null) { - int64TypeBuilder_.clear(); - } - if (float32TypeBuilder_ != null) { - float32TypeBuilder_.clear(); - } - if (float64TypeBuilder_ != null) { - float64TypeBuilder_.clear(); - } - if (boolTypeBuilder_ != null) { - boolTypeBuilder_.clear(); - } - if (timestampTypeBuilder_ != null) { - timestampTypeBuilder_.clear(); - } - if (dateTypeBuilder_ != null) { - dateTypeBuilder_.clear(); - } - if (aggregateTypeBuilder_ != null) { - aggregateTypeBuilder_.clear(); - } - if (structTypeBuilder_ != null) { - structTypeBuilder_.clear(); - } - if (arrayTypeBuilder_ != null) { - arrayTypeBuilder_.clear(); - } - if (mapTypeBuilder_ != null) { - mapTypeBuilder_.clear(); - } + public Builder clearKind() { kindCase_ = 0; kind_ = null; + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.admin.v2.TypesProto - .internal_static_google_bigtable_admin_v2_Type_descriptor; - } + private int bitField0_; - @java.lang.Override - public com.google.bigtable.admin.v2.Type getDefaultInstanceForType() { - return com.google.bigtable.admin.v2.Type.getDefaultInstance(); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bytes, + com.google.bigtable.admin.v2.Type.Bytes.Builder, + com.google.bigtable.admin.v2.Type.BytesOrBuilder> + bytesTypeBuilder_; + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ @java.lang.Override - public com.google.bigtable.admin.v2.Type build() { - com.google.bigtable.admin.v2.Type result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public boolean hasBytesType() { + return kindCase_ == 1; } + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ @java.lang.Override - public com.google.bigtable.admin.v2.Type buildPartial() { - com.google.bigtable.admin.v2.Type result = new com.google.bigtable.admin.v2.Type(this); - if (bitField0_ != 0) { - buildPartial0(result); + public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + } + return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return bytesTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); } - buildPartialOneofs(result); - onBuilt(); - return result; } - private void buildPartial0(com.google.bigtable.admin.v2.Type result) { - int from_bitField0_ = bitField0_; + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { + if (bytesTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bytesTypeBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; } - private void buildPartialOneofs(com.google.bigtable.admin.v2.Type result) { - result.kindCase_ = kindCase_; - result.kind_ = this.kind_; - if (kindCase_ == 1 && bytesTypeBuilder_ != null) { - result.kind_ = bytesTypeBuilder_.build(); - } - if (kindCase_ == 2 && stringTypeBuilder_ != null) { - result.kind_ = stringTypeBuilder_.build(); - } - if (kindCase_ == 5 && int64TypeBuilder_ != null) { - result.kind_ = int64TypeBuilder_.build(); - } - if (kindCase_ == 12 && float32TypeBuilder_ != null) { - result.kind_ = float32TypeBuilder_.build(); - } - if (kindCase_ == 9 && float64TypeBuilder_ != null) { - result.kind_ = float64TypeBuilder_.build(); - } - if (kindCase_ == 8 && boolTypeBuilder_ != null) { - result.kind_ = boolTypeBuilder_.build(); - } - if (kindCase_ == 10 && timestampTypeBuilder_ != null) { - result.kind_ = timestampTypeBuilder_.build(); - } - if (kindCase_ == 11 && dateTypeBuilder_ != null) { - result.kind_ = dateTypeBuilder_.build(); - } - if (kindCase_ == 6 && aggregateTypeBuilder_ != null) { - result.kind_ = aggregateTypeBuilder_.build(); - } - if (kindCase_ == 7 && structTypeBuilder_ != null) { - result.kind_ = structTypeBuilder_.build(); - } - if (kindCase_ == 3 && arrayTypeBuilder_ != null) { - result.kind_ = arrayTypeBuilder_.build(); + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes.Builder builderForValue) { + if (bytesTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bytesTypeBuilder_.setMessage(builderForValue.build()); } - if (kindCase_ == 4 && mapTypeBuilder_ != null) { - result.kind_ = mapTypeBuilder_.build(); + kindCase_ = 1; + return this; + } + + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1 + && kind_ != com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance()) { + kind_ = + com.google.bigtable.admin.v2.Type.Bytes.newBuilder( + (com.google.bigtable.admin.v2.Type.Bytes) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + bytesTypeBuilder_.mergeFrom(value); + } else { + bytesTypeBuilder_.setMessage(value); + } } + kindCase_ = 1; + return this; } - @java.lang.Override - public Builder clone() { - return super.clone(); + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public Builder clearBytesType() { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + bytesTypeBuilder_.clear(); + } + return this; } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { + return internalGetBytesTypeFieldBuilder().getBuilder(); } + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + if ((kindCase_ == 1) && (bytesTypeBuilder_ != null)) { + return bytesTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + } + return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + } } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
      +     * Bytes
      +     * 
      + * + * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bytes, + com.google.bigtable.admin.v2.Type.Bytes.Builder, + com.google.bigtable.admin.v2.Type.BytesOrBuilder> + internalGetBytesTypeFieldBuilder() { + if (bytesTypeBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + } + bytesTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bytes, + com.google.bigtable.admin.v2.Type.Bytes.Builder, + com.google.bigtable.admin.v2.Type.BytesOrBuilder>( + (com.google.bigtable.admin.v2.Type.Bytes) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 1; + onChanged(); + return bytesTypeBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.String, + com.google.bigtable.admin.v2.Type.String.Builder, + com.google.bigtable.admin.v2.Type.StringOrBuilder> + stringTypeBuilder_; + + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public boolean hasStringType() { + return kindCase_ == 2; } + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + * + * @return The stringType. + */ @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public com.google.bigtable.admin.v2.Type.String getStringType() { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String) kind_; + } + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return stringTypeBuilder_.getMessage(); + } + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.admin.v2.Type) { - return mergeFrom((com.google.bigtable.admin.v2.Type) other); + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public Builder setStringType(com.google.bigtable.admin.v2.Type.String value) { + if (stringTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); } else { - super.mergeFrom(other); - return this; + stringTypeBuilder_.setMessage(value); } + kindCase_ = 2; + return this; } - public Builder mergeFrom(com.google.bigtable.admin.v2.Type other) { - if (other == com.google.bigtable.admin.v2.Type.getDefaultInstance()) return this; - switch (other.getKindCase()) { - case BYTES_TYPE: - { - mergeBytesType(other.getBytesType()); - break; - } - case STRING_TYPE: - { - mergeStringType(other.getStringType()); - break; - } - case INT64_TYPE: - { - mergeInt64Type(other.getInt64Type()); - break; - } - case FLOAT32_TYPE: - { - mergeFloat32Type(other.getFloat32Type()); - break; - } - case FLOAT64_TYPE: - { - mergeFloat64Type(other.getFloat64Type()); - break; - } - case BOOL_TYPE: - { - mergeBoolType(other.getBoolType()); - break; - } - case TIMESTAMP_TYPE: - { - mergeTimestampType(other.getTimestampType()); - break; - } - case DATE_TYPE: - { - mergeDateType(other.getDateType()); - break; - } - case AGGREGATE_TYPE: - { - mergeAggregateType(other.getAggregateType()); - break; - } - case STRUCT_TYPE: - { - mergeStructType(other.getStructType()); - break; - } - case ARRAY_TYPE: - { - mergeArrayType(other.getArrayType()); - break; - } - case MAP_TYPE: - { - mergeMapType(other.getMapType()); - break; - } - case KIND_NOT_SET: - { - break; - } + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public Builder setStringType(com.google.bigtable.admin.v2.Type.String.Builder builderForValue) { + if (stringTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + stringTypeBuilder_.setMessage(builderForValue.build()); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); + kindCase_ = 2; return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public Builder mergeStringType(com.google.bigtable.admin.v2.Type.String value) { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2 + && kind_ != com.google.bigtable.admin.v2.Type.String.getDefaultInstance()) { + kind_ = + com.google.bigtable.admin.v2.Type.String.newBuilder( + (com.google.bigtable.admin.v2.Type.String) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 2) { + stringTypeBuilder_.mergeFrom(value); + } else { + stringTypeBuilder_.setMessage(value); + } + } + kindCase_ = 2; + return this; } - @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(); + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public Builder clearStringType() { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + stringTypeBuilder_.clear(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getBytesTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage(getStringTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getArrayTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(getMapTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage(getInt64TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 5; - break; - } // case 42 - case 50: - { - input.readMessage(getAggregateTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage(getStructTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage(getBoolTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage(getFloat64TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(getTimestampTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage(getDateTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 11; - break; - } // case 90 - case 98: - { - input.readMessage(getFloat32TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 12; - break; - } // case 98 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally return this; } - private int kindCase_ = 0; - private java.lang.Object kind_; + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + public com.google.bigtable.admin.v2.Type.String.Builder getStringTypeBuilder() { + return internalGetStringTypeFieldBuilder().getBuilder(); + } - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Type.StringOrBuilder getStringTypeOrBuilder() { + if ((kindCase_ == 2) && (stringTypeBuilder_ != null)) { + return stringTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.bigtable.admin.v2.Type.String) kind_; + } + return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } } - public Builder clearKind() { - kindCase_ = 0; - kind_ = null; + /** + * + * + *
      +     * String
      +     * 
      + * + * .google.bigtable.admin.v2.Type.String string_type = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.String, + com.google.bigtable.admin.v2.Type.String.Builder, + com.google.bigtable.admin.v2.Type.StringOrBuilder> + internalGetStringTypeFieldBuilder() { + if (stringTypeBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + } + stringTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.String, + com.google.bigtable.admin.v2.Type.String.Builder, + com.google.bigtable.admin.v2.Type.StringOrBuilder>( + (com.google.bigtable.admin.v2.Type.String) kind_, + getParentForChildren(), + isClean()); + kind_ = null; + } + kindCase_ = 2; onChanged(); - return this; + return stringTypeBuilder_; } - private int bitField0_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64, + com.google.bigtable.admin.v2.Type.Int64.Builder, + com.google.bigtable.admin.v2.Type.Int64OrBuilder> + int64TypeBuilder_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bytes, - com.google.bigtable.admin.v2.Type.Bytes.Builder, - com.google.bigtable.admin.v2.Type.BytesOrBuilder> - bytesTypeBuilder_; /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; * - * @return Whether the bytesType field is set. + * @return Whether the int64Type field is set. */ @java.lang.Override - public boolean hasBytesType() { - return kindCase_ == 1; + public boolean hasInt64Type() { + return kindCase_ == 5; } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; * - * @return The bytesType. + * @return The int64Type. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bytes getBytesType() { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + public com.google.bigtable.admin.v2.Type.Int64 getInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Int64) kind_; } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } else { - if (kindCase_ == 1) { - return bytesTypeBuilder_.getMessage(); + if (kindCase_ == 5) { + return int64TypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == null) { + public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - bytesTypeBuilder_.setMessage(value); + int64TypeBuilder_.setMessage(value); } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - public Builder setBytesType(com.google.bigtable.admin.v2.Type.Bytes.Builder builderForValue) { - if (bytesTypeBuilder_ == null) { + public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64.Builder builderForValue) { + if (int64TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - bytesTypeBuilder_.setMessage(builderForValue.build()); + int64TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1 - && kind_ != com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance()) { + public Builder mergeInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5 + && kind_ != com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Bytes.newBuilder( - (com.google.bigtable.admin.v2.Type.Bytes) kind_) + com.google.bigtable.admin.v2.Type.Int64.newBuilder( + (com.google.bigtable.admin.v2.Type.Int64) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19184,205 +26261,215 @@ public Builder mergeBytesType(com.google.bigtable.admin.v2.Type.Bytes value) { } onChanged(); } else { - if (kindCase_ == 1) { - bytesTypeBuilder_.mergeFrom(value); + if (kindCase_ == 5) { + int64TypeBuilder_.mergeFrom(value); } else { - bytesTypeBuilder_.setMessage(value); + int64TypeBuilder_.setMessage(value); } } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - public Builder clearBytesType() { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1) { + public Builder clearInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 1) { + if (kindCase_ == 5) { kindCase_ = 0; kind_ = null; } - bytesTypeBuilder_.clear(); + int64TypeBuilder_.clear(); } return this; } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - public com.google.bigtable.admin.v2.Type.Bytes.Builder getBytesTypeBuilder() { - return getBytesTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Int64.Builder getInt64TypeBuilder() { + return internalGetInt64TypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { - if ((kindCase_ == 1) && (bytesTypeBuilder_ != null)) { - return bytesTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { + return int64TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 1) { - return (com.google.bigtable.admin.v2.Type.Bytes) kind_; + if (kindCase_ == 5) { + return (com.google.bigtable.admin.v2.Type.Int64) kind_; } - return com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } } + /** * * *
      -     * Bytes
      +     * Int64
            * 
      * - * .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bytes, - com.google.bigtable.admin.v2.Type.Bytes.Builder, - com.google.bigtable.admin.v2.Type.BytesOrBuilder> - getBytesTypeFieldBuilder() { - if (bytesTypeBuilder_ == null) { - if (!(kindCase_ == 1)) { - kind_ = com.google.bigtable.admin.v2.Type.Bytes.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64, + com.google.bigtable.admin.v2.Type.Int64.Builder, + com.google.bigtable.admin.v2.Type.Int64OrBuilder> + internalGetInt64TypeFieldBuilder() { + if (int64TypeBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); } - bytesTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bytes, - com.google.bigtable.admin.v2.Type.Bytes.Builder, - com.google.bigtable.admin.v2.Type.BytesOrBuilder>( - (com.google.bigtable.admin.v2.Type.Bytes) kind_, getParentForChildren(), isClean()); + int64TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Int64, + com.google.bigtable.admin.v2.Type.Int64.Builder, + com.google.bigtable.admin.v2.Type.Int64OrBuilder>( + (com.google.bigtable.admin.v2.Type.Int64) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 1; + kindCase_ = 5; onChanged(); - return bytesTypeBuilder_; + return int64TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.String, - com.google.bigtable.admin.v2.Type.String.Builder, - com.google.bigtable.admin.v2.Type.StringOrBuilder> - stringTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float32, + com.google.bigtable.admin.v2.Type.Float32.Builder, + com.google.bigtable.admin.v2.Type.Float32OrBuilder> + float32TypeBuilder_; + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; * - * @return Whether the stringType field is set. + * @return Whether the float32Type field is set. */ @java.lang.Override - public boolean hasStringType() { - return kindCase_ == 2; + public boolean hasFloat32Type() { + return kindCase_ == 12; } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; * - * @return The stringType. + * @return The float32Type. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.String getStringType() { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2) { - return (com.google.bigtable.admin.v2.Type.String) kind_; + public com.google.bigtable.admin.v2.Type.Float32 getFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { + return (com.google.bigtable.admin.v2.Type.Float32) kind_; } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } else { - if (kindCase_ == 2) { - return stringTypeBuilder_.getMessage(); + if (kindCase_ == 12) { + return float32TypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - public Builder setStringType(com.google.bigtable.admin.v2.Type.String value) { - if (stringTypeBuilder_ == null) { + public Builder setFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - stringTypeBuilder_.setMessage(value); + float32TypeBuilder_.setMessage(value); } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - public Builder setStringType(com.google.bigtable.admin.v2.Type.String.Builder builderForValue) { - if (stringTypeBuilder_ == null) { + public Builder setFloat32Type( + com.google.bigtable.admin.v2.Type.Float32.Builder builderForValue) { + if (float32TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - stringTypeBuilder_.setMessage(builderForValue.build()); + float32TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - public Builder mergeStringType(com.google.bigtable.admin.v2.Type.String value) { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2 - && kind_ != com.google.bigtable.admin.v2.Type.String.getDefaultInstance()) { + public Builder mergeFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12 + && kind_ != com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.String.newBuilder( - (com.google.bigtable.admin.v2.Type.String) kind_) + com.google.bigtable.admin.v2.Type.Float32.newBuilder( + (com.google.bigtable.admin.v2.Type.Float32) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19390,207 +26477,217 @@ public Builder mergeStringType(com.google.bigtable.admin.v2.Type.String value) { } onChanged(); } else { - if (kindCase_ == 2) { - stringTypeBuilder_.mergeFrom(value); + if (kindCase_ == 12) { + float32TypeBuilder_.mergeFrom(value); } else { - stringTypeBuilder_.setMessage(value); + float32TypeBuilder_.setMessage(value); } } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - public Builder clearStringType() { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2) { + public Builder clearFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 2) { + if (kindCase_ == 12) { kindCase_ = 0; kind_ = null; } - stringTypeBuilder_.clear(); + float32TypeBuilder_.clear(); } return this; } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - public com.google.bigtable.admin.v2.Type.String.Builder getStringTypeBuilder() { - return getStringTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Float32.Builder getFloat32TypeBuilder() { + return internalGetFloat32TypeFieldBuilder().getBuilder(); } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.StringOrBuilder getStringTypeOrBuilder() { - if ((kindCase_ == 2) && (stringTypeBuilder_ != null)) { - return stringTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { + return float32TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 2) { - return (com.google.bigtable.admin.v2.Type.String) kind_; + if (kindCase_ == 12) { + return (com.google.bigtable.admin.v2.Type.Float32) kind_; } - return com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } } + /** * * *
      -     * String
      +     * Float32
            * 
      * - * .google.bigtable.admin.v2.Type.String string_type = 2; + * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.String, - com.google.bigtable.admin.v2.Type.String.Builder, - com.google.bigtable.admin.v2.Type.StringOrBuilder> - getStringTypeFieldBuilder() { - if (stringTypeBuilder_ == null) { - if (!(kindCase_ == 2)) { - kind_ = com.google.bigtable.admin.v2.Type.String.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float32, + com.google.bigtable.admin.v2.Type.Float32.Builder, + com.google.bigtable.admin.v2.Type.Float32OrBuilder> + internalGetFloat32TypeFieldBuilder() { + if (float32TypeBuilder_ == null) { + if (!(kindCase_ == 12)) { + kind_ = com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); } - stringTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.String, - com.google.bigtable.admin.v2.Type.String.Builder, - com.google.bigtable.admin.v2.Type.StringOrBuilder>( - (com.google.bigtable.admin.v2.Type.String) kind_, + float32TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float32, + com.google.bigtable.admin.v2.Type.Float32.Builder, + com.google.bigtable.admin.v2.Type.Float32OrBuilder>( + (com.google.bigtable.admin.v2.Type.Float32) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 2; + kindCase_ = 12; onChanged(); - return stringTypeBuilder_; + return float32TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64, - com.google.bigtable.admin.v2.Type.Int64.Builder, - com.google.bigtable.admin.v2.Type.Int64OrBuilder> - int64TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float64, + com.google.bigtable.admin.v2.Type.Float64.Builder, + com.google.bigtable.admin.v2.Type.Float64OrBuilder> + float64TypeBuilder_; + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; * - * @return Whether the int64Type field is set. + * @return Whether the float64Type field is set. */ @java.lang.Override - public boolean hasInt64Type() { - return kindCase_ == 5; + public boolean hasFloat64Type() { + return kindCase_ == 9; } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; * - * @return The int64Type. + * @return The float64Type. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64 getInt64Type() { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5) { - return (com.google.bigtable.admin.v2.Type.Int64) kind_; + public com.google.bigtable.admin.v2.Type.Float64 getFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { + return (com.google.bigtable.admin.v2.Type.Float64) kind_; } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } else { - if (kindCase_ == 5) { - return int64TypeBuilder_.getMessage(); + if (kindCase_ == 9) { + return float64TypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { - if (int64TypeBuilder_ == null) { + public Builder setFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - int64TypeBuilder_.setMessage(value); + float64TypeBuilder_.setMessage(value); } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - public Builder setInt64Type(com.google.bigtable.admin.v2.Type.Int64.Builder builderForValue) { - if (int64TypeBuilder_ == null) { + public Builder setFloat64Type( + com.google.bigtable.admin.v2.Type.Float64.Builder builderForValue) { + if (float64TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - int64TypeBuilder_.setMessage(builderForValue.build()); + float64TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - public Builder mergeInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5 - && kind_ != com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance()) { + public Builder mergeFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9 + && kind_ != com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Int64.newBuilder( - (com.google.bigtable.admin.v2.Type.Int64) kind_) + com.google.bigtable.admin.v2.Type.Float64.newBuilder( + (com.google.bigtable.admin.v2.Type.Float64) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19598,206 +26695,216 @@ public Builder mergeInt64Type(com.google.bigtable.admin.v2.Type.Int64 value) { } onChanged(); } else { - if (kindCase_ == 5) { - int64TypeBuilder_.mergeFrom(value); + if (kindCase_ == 9) { + float64TypeBuilder_.mergeFrom(value); } else { - int64TypeBuilder_.setMessage(value); + float64TypeBuilder_.setMessage(value); } } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - public Builder clearInt64Type() { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5) { + public Builder clearFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 5) { + if (kindCase_ == 9) { kindCase_ = 0; kind_ = null; } - int64TypeBuilder_.clear(); + float64TypeBuilder_.clear(); } return this; } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - public com.google.bigtable.admin.v2.Type.Int64.Builder getInt64TypeBuilder() { - return getInt64TypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Float64.Builder getFloat64TypeBuilder() { + return internalGetFloat64TypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { - if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { - return int64TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { + return float64TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 5) { - return (com.google.bigtable.admin.v2.Type.Int64) kind_; + if (kindCase_ == 9) { + return (com.google.bigtable.admin.v2.Type.Float64) kind_; } - return com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } } + /** * * *
      -     * Int64
      +     * Float64
            * 
      * - * .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64, - com.google.bigtable.admin.v2.Type.Int64.Builder, - com.google.bigtable.admin.v2.Type.Int64OrBuilder> - getInt64TypeFieldBuilder() { - if (int64TypeBuilder_ == null) { - if (!(kindCase_ == 5)) { - kind_ = com.google.bigtable.admin.v2.Type.Int64.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float64, + com.google.bigtable.admin.v2.Type.Float64.Builder, + com.google.bigtable.admin.v2.Type.Float64OrBuilder> + internalGetFloat64TypeFieldBuilder() { + if (float64TypeBuilder_ == null) { + if (!(kindCase_ == 9)) { + kind_ = com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); } - int64TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Int64, - com.google.bigtable.admin.v2.Type.Int64.Builder, - com.google.bigtable.admin.v2.Type.Int64OrBuilder>( - (com.google.bigtable.admin.v2.Type.Int64) kind_, getParentForChildren(), isClean()); + float64TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Float64, + com.google.bigtable.admin.v2.Type.Float64.Builder, + com.google.bigtable.admin.v2.Type.Float64OrBuilder>( + (com.google.bigtable.admin.v2.Type.Float64) kind_, + getParentForChildren(), + isClean()); kind_ = null; } - kindCase_ = 5; + kindCase_ = 9; onChanged(); - return int64TypeBuilder_; + return float64TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float32, - com.google.bigtable.admin.v2.Type.Float32.Builder, - com.google.bigtable.admin.v2.Type.Float32OrBuilder> - float32TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bool, + com.google.bigtable.admin.v2.Type.Bool.Builder, + com.google.bigtable.admin.v2.Type.BoolOrBuilder> + boolTypeBuilder_; + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; * - * @return Whether the float32Type field is set. + * @return Whether the boolType field is set. */ @java.lang.Override - public boolean hasFloat32Type() { - return kindCase_ == 12; + public boolean hasBoolType() { + return kindCase_ == 8; } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; * - * @return The float32Type. + * @return The boolType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32 getFloat32Type() { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12) { - return (com.google.bigtable.admin.v2.Type.Float32) kind_; + public com.google.bigtable.admin.v2.Type.Bool getBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { + return (com.google.bigtable.admin.v2.Type.Bool) kind_; } - return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } else { - if (kindCase_ == 12) { - return float32TypeBuilder_.getMessage(); + if (kindCase_ == 8) { + return boolTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - public Builder setFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) { - if (float32TypeBuilder_ == null) { + public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - float32TypeBuilder_.setMessage(value); + boolTypeBuilder_.setMessage(value); } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - public Builder setFloat32Type( - com.google.bigtable.admin.v2.Type.Float32.Builder builderForValue) { - if (float32TypeBuilder_ == null) { + public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool.Builder builderForValue) { + if (boolTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - float32TypeBuilder_.setMessage(builderForValue.build()); + boolTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - public Builder mergeFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12 - && kind_ != com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance()) { + public Builder mergeBoolType(com.google.bigtable.admin.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8 + && kind_ != com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Float32.newBuilder( - (com.google.bigtable.admin.v2.Type.Float32) kind_) + com.google.bigtable.admin.v2.Type.Bool.newBuilder( + (com.google.bigtable.admin.v2.Type.Bool) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19805,208 +26912,215 @@ public Builder mergeFloat32Type(com.google.bigtable.admin.v2.Type.Float32 value) } onChanged(); } else { - if (kindCase_ == 12) { - float32TypeBuilder_.mergeFrom(value); + if (kindCase_ == 8) { + boolTypeBuilder_.mergeFrom(value); } else { - float32TypeBuilder_.setMessage(value); + boolTypeBuilder_.setMessage(value); } } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - public Builder clearFloat32Type() { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12) { + public Builder clearBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 12) { + if (kindCase_ == 8) { kindCase_ = 0; kind_ = null; } - float32TypeBuilder_.clear(); + boolTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - public com.google.bigtable.admin.v2.Type.Float32.Builder getFloat32TypeBuilder() { - return getFloat32TypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Bool.Builder getBoolTypeBuilder() { + return internalGetBoolTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { - if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { - return float32TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { + return boolTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 12) { - return (com.google.bigtable.admin.v2.Type.Float32) kind_; + if (kindCase_ == 8) { + return (com.google.bigtable.admin.v2.Type.Bool) kind_; } - return com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } } + /** * * *
      -     * Float32
      +     * Bool
            * 
      * - * .google.bigtable.admin.v2.Type.Float32 float32_type = 12; + * .google.bigtable.admin.v2.Type.Bool bool_type = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float32, - com.google.bigtable.admin.v2.Type.Float32.Builder, - com.google.bigtable.admin.v2.Type.Float32OrBuilder> - getFloat32TypeFieldBuilder() { - if (float32TypeBuilder_ == null) { - if (!(kindCase_ == 12)) { - kind_ = com.google.bigtable.admin.v2.Type.Float32.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bool, + com.google.bigtable.admin.v2.Type.Bool.Builder, + com.google.bigtable.admin.v2.Type.BoolOrBuilder> + internalGetBoolTypeFieldBuilder() { + if (boolTypeBuilder_ == null) { + if (!(kindCase_ == 8)) { + kind_ = com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); } - float32TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float32, - com.google.bigtable.admin.v2.Type.Float32.Builder, - com.google.bigtable.admin.v2.Type.Float32OrBuilder>( - (com.google.bigtable.admin.v2.Type.Float32) kind_, - getParentForChildren(), - isClean()); + boolTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Bool, + com.google.bigtable.admin.v2.Type.Bool.Builder, + com.google.bigtable.admin.v2.Type.BoolOrBuilder>( + (com.google.bigtable.admin.v2.Type.Bool) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 12; + kindCase_ = 8; onChanged(); - return float32TypeBuilder_; + return boolTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float64, - com.google.bigtable.admin.v2.Type.Float64.Builder, - com.google.bigtable.admin.v2.Type.Float64OrBuilder> - float64TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp, + com.google.bigtable.admin.v2.Type.Timestamp.Builder, + com.google.bigtable.admin.v2.Type.TimestampOrBuilder> + timestampTypeBuilder_; + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; * - * @return Whether the float64Type field is set. + * @return Whether the timestampType field is set. */ @java.lang.Override - public boolean hasFloat64Type() { - return kindCase_ == 9; + public boolean hasTimestampType() { + return kindCase_ == 10; } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; * - * @return The float64Type. + * @return The timestampType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64 getFloat64Type() { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9) { - return (com.google.bigtable.admin.v2.Type.Float64) kind_; + public com.google.bigtable.admin.v2.Type.Timestamp getTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { + return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; } - return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); } else { - if (kindCase_ == 9) { - return float64TypeBuilder_.getMessage(); + if (kindCase_ == 10) { + return timestampTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); } } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ - public Builder setFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) { - if (float64TypeBuilder_ == null) { + public Builder setTimestampType(com.google.bigtable.admin.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - float64TypeBuilder_.setMessage(value); + timestampTypeBuilder_.setMessage(value); } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ - public Builder setFloat64Type( - com.google.bigtable.admin.v2.Type.Float64.Builder builderForValue) { - if (float64TypeBuilder_ == null) { + public Builder setTimestampType( + com.google.bigtable.admin.v2.Type.Timestamp.Builder builderForValue) { + if (timestampTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - float64TypeBuilder_.setMessage(builderForValue.build()); + timestampTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ - public Builder mergeFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9 - && kind_ != com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance()) { + public Builder mergeTimestampType(com.google.bigtable.admin.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10 + && kind_ != com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Float64.newBuilder( - (com.google.bigtable.admin.v2.Type.Float64) kind_) + com.google.bigtable.admin.v2.Type.Timestamp.newBuilder( + (com.google.bigtable.admin.v2.Type.Timestamp) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20014,207 +27128,216 @@ public Builder mergeFloat64Type(com.google.bigtable.admin.v2.Type.Float64 value) } onChanged(); } else { - if (kindCase_ == 9) { - float64TypeBuilder_.mergeFrom(value); + if (kindCase_ == 10) { + timestampTypeBuilder_.mergeFrom(value); } else { - float64TypeBuilder_.setMessage(value); + timestampTypeBuilder_.setMessage(value); } } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ - public Builder clearFloat64Type() { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9) { + public Builder clearTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 9) { + if (kindCase_ == 10) { kindCase_ = 0; kind_ = null; } - float64TypeBuilder_.clear(); + timestampTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ - public com.google.bigtable.admin.v2.Type.Float64.Builder getFloat64TypeBuilder() { - return getFloat64TypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { + return internalGetTimestampTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { - if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { - return float64TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { + return timestampTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 9) { - return (com.google.bigtable.admin.v2.Type.Float64) kind_; + if (kindCase_ == 10) { + return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; } - return com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); } } + /** * * *
      -     * Float64
      +     * Timestamp
            * 
      * - * .google.bigtable.admin.v2.Type.Float64 float64_type = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float64, - com.google.bigtable.admin.v2.Type.Float64.Builder, - com.google.bigtable.admin.v2.Type.Float64OrBuilder> - getFloat64TypeFieldBuilder() { - if (float64TypeBuilder_ == null) { - if (!(kindCase_ == 9)) { - kind_ = com.google.bigtable.admin.v2.Type.Float64.getDefaultInstance(); + * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp, + com.google.bigtable.admin.v2.Type.Timestamp.Builder, + com.google.bigtable.admin.v2.Type.TimestampOrBuilder> + internalGetTimestampTypeFieldBuilder() { + if (timestampTypeBuilder_ == null) { + if (!(kindCase_ == 10)) { + kind_ = com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); } - float64TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Float64, - com.google.bigtable.admin.v2.Type.Float64.Builder, - com.google.bigtable.admin.v2.Type.Float64OrBuilder>( - (com.google.bigtable.admin.v2.Type.Float64) kind_, + timestampTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Timestamp, + com.google.bigtable.admin.v2.Type.Timestamp.Builder, + com.google.bigtable.admin.v2.Type.TimestampOrBuilder>( + (com.google.bigtable.admin.v2.Type.Timestamp) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 9; + kindCase_ = 10; onChanged(); - return float64TypeBuilder_; + return timestampTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bool, - com.google.bigtable.admin.v2.Type.Bool.Builder, - com.google.bigtable.admin.v2.Type.BoolOrBuilder> - boolTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Date, + com.google.bigtable.admin.v2.Type.Date.Builder, + com.google.bigtable.admin.v2.Type.DateOrBuilder> + dateTypeBuilder_; + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; * - * @return Whether the boolType field is set. + * @return Whether the dateType field is set. */ @java.lang.Override - public boolean hasBoolType() { - return kindCase_ == 8; + public boolean hasDateType() { + return kindCase_ == 11; } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; * - * @return The boolType. + * @return The dateType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Bool getBoolType() { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8) { - return (com.google.bigtable.admin.v2.Type.Bool) kind_; + public com.google.bigtable.admin.v2.Type.Date getDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { + return (com.google.bigtable.admin.v2.Type.Date) kind_; } - return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } else { - if (kindCase_ == 8) { - return boolTypeBuilder_.getMessage(); + if (kindCase_ == 11) { + return dateTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool value) { - if (boolTypeBuilder_ == null) { + public Builder setDateType(com.google.bigtable.admin.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - boolTypeBuilder_.setMessage(value); + dateTypeBuilder_.setMessage(value); } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - public Builder setBoolType(com.google.bigtable.admin.v2.Type.Bool.Builder builderForValue) { - if (boolTypeBuilder_ == null) { + public Builder setDateType(com.google.bigtable.admin.v2.Type.Date.Builder builderForValue) { + if (dateTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - boolTypeBuilder_.setMessage(builderForValue.build()); + dateTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - public Builder mergeBoolType(com.google.bigtable.admin.v2.Type.Bool value) { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8 - && kind_ != com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance()) { + public Builder mergeDateType(com.google.bigtable.admin.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11 + && kind_ != com.google.bigtable.admin.v2.Type.Date.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Bool.newBuilder( - (com.google.bigtable.admin.v2.Type.Bool) kind_) + com.google.bigtable.admin.v2.Type.Date.newBuilder( + (com.google.bigtable.admin.v2.Type.Date) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20222,206 +27345,215 @@ public Builder mergeBoolType(com.google.bigtable.admin.v2.Type.Bool value) { } onChanged(); } else { - if (kindCase_ == 8) { - boolTypeBuilder_.mergeFrom(value); + if (kindCase_ == 11) { + dateTypeBuilder_.mergeFrom(value); } else { - boolTypeBuilder_.setMessage(value); + dateTypeBuilder_.setMessage(value); } } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - public Builder clearBoolType() { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8) { + public Builder clearDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 8) { + if (kindCase_ == 11) { kindCase_ = 0; kind_ = null; } - boolTypeBuilder_.clear(); + dateTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - public com.google.bigtable.admin.v2.Type.Bool.Builder getBoolTypeBuilder() { - return getBoolTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Date.Builder getDateTypeBuilder() { + return internalGetDateTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { - if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { - return boolTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { + return dateTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 8) { - return (com.google.bigtable.admin.v2.Type.Bool) kind_; + if (kindCase_ == 11) { + return (com.google.bigtable.admin.v2.Type.Date) kind_; } - return com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } } + /** * * *
      -     * Bool
      +     * Date
            * 
      * - * .google.bigtable.admin.v2.Type.Bool bool_type = 8; + * .google.bigtable.admin.v2.Type.Date date_type = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bool, - com.google.bigtable.admin.v2.Type.Bool.Builder, - com.google.bigtable.admin.v2.Type.BoolOrBuilder> - getBoolTypeFieldBuilder() { - if (boolTypeBuilder_ == null) { - if (!(kindCase_ == 8)) { - kind_ = com.google.bigtable.admin.v2.Type.Bool.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Date, + com.google.bigtable.admin.v2.Type.Date.Builder, + com.google.bigtable.admin.v2.Type.DateOrBuilder> + internalGetDateTypeFieldBuilder() { + if (dateTypeBuilder_ == null) { + if (!(kindCase_ == 11)) { + kind_ = com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); } - boolTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Bool, - com.google.bigtable.admin.v2.Type.Bool.Builder, - com.google.bigtable.admin.v2.Type.BoolOrBuilder>( - (com.google.bigtable.admin.v2.Type.Bool) kind_, getParentForChildren(), isClean()); + dateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Date, + com.google.bigtable.admin.v2.Type.Date.Builder, + com.google.bigtable.admin.v2.Type.DateOrBuilder>( + (com.google.bigtable.admin.v2.Type.Date) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 8; + kindCase_ = 11; onChanged(); - return boolTypeBuilder_; + return dateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Timestamp, - com.google.bigtable.admin.v2.Type.Timestamp.Builder, - com.google.bigtable.admin.v2.Type.TimestampOrBuilder> - timestampTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Aggregate, + com.google.bigtable.admin.v2.Type.Aggregate.Builder, + com.google.bigtable.admin.v2.Type.AggregateOrBuilder> + aggregateTypeBuilder_; + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; * - * @return Whether the timestampType field is set. + * @return Whether the aggregateType field is set. */ @java.lang.Override - public boolean hasTimestampType() { - return kindCase_ == 10; + public boolean hasAggregateType() { + return kindCase_ == 6; } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; * - * @return The timestampType. + * @return The aggregateType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Timestamp getTimestampType() { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10) { - return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; + public com.google.bigtable.admin.v2.Type.Aggregate getAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; } - return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } else { - if (kindCase_ == 10) { - return timestampTypeBuilder_.getMessage(); + if (kindCase_ == 6) { + return aggregateTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - public Builder setTimestampType(com.google.bigtable.admin.v2.Type.Timestamp value) { - if (timestampTypeBuilder_ == null) { + public Builder setAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - timestampTypeBuilder_.setMessage(value); + aggregateTypeBuilder_.setMessage(value); } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - public Builder setTimestampType( - com.google.bigtable.admin.v2.Type.Timestamp.Builder builderForValue) { - if (timestampTypeBuilder_ == null) { + public Builder setAggregateType( + com.google.bigtable.admin.v2.Type.Aggregate.Builder builderForValue) { + if (aggregateTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - timestampTypeBuilder_.setMessage(builderForValue.build()); + aggregateTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - public Builder mergeTimestampType(com.google.bigtable.admin.v2.Type.Timestamp value) { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10 - && kind_ != com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance()) { + public Builder mergeAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6 + && kind_ != com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Timestamp.newBuilder( - (com.google.bigtable.admin.v2.Type.Timestamp) kind_) + com.google.bigtable.admin.v2.Type.Aggregate.newBuilder( + (com.google.bigtable.admin.v2.Type.Aggregate) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20429,207 +27561,216 @@ public Builder mergeTimestampType(com.google.bigtable.admin.v2.Type.Timestamp va } onChanged(); } else { - if (kindCase_ == 10) { - timestampTypeBuilder_.mergeFrom(value); + if (kindCase_ == 6) { + aggregateTypeBuilder_.mergeFrom(value); } else { - timestampTypeBuilder_.setMessage(value); + aggregateTypeBuilder_.setMessage(value); } } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - public Builder clearTimestampType() { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10) { + public Builder clearAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 10) { + if (kindCase_ == 6) { kindCase_ = 0; kind_ = null; } - timestampTypeBuilder_.clear(); + aggregateTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - public com.google.bigtable.admin.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { - return getTimestampTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { + return internalGetAggregateTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { - if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { - return timestampTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { + return aggregateTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 10) { - return (com.google.bigtable.admin.v2.Type.Timestamp) kind_; + if (kindCase_ == 6) { + return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; } - return com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } } + /** * * *
      -     * Timestamp
      +     * Aggregate
            * 
      * - * .google.bigtable.admin.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Timestamp, - com.google.bigtable.admin.v2.Type.Timestamp.Builder, - com.google.bigtable.admin.v2.Type.TimestampOrBuilder> - getTimestampTypeFieldBuilder() { - if (timestampTypeBuilder_ == null) { - if (!(kindCase_ == 10)) { - kind_ = com.google.bigtable.admin.v2.Type.Timestamp.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Aggregate, + com.google.bigtable.admin.v2.Type.Aggregate.Builder, + com.google.bigtable.admin.v2.Type.AggregateOrBuilder> + internalGetAggregateTypeFieldBuilder() { + if (aggregateTypeBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); } - timestampTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Timestamp, - com.google.bigtable.admin.v2.Type.Timestamp.Builder, - com.google.bigtable.admin.v2.Type.TimestampOrBuilder>( - (com.google.bigtable.admin.v2.Type.Timestamp) kind_, + aggregateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Aggregate, + com.google.bigtable.admin.v2.Type.Aggregate.Builder, + com.google.bigtable.admin.v2.Type.AggregateOrBuilder>( + (com.google.bigtable.admin.v2.Type.Aggregate) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 10; + kindCase_ = 6; onChanged(); - return timestampTypeBuilder_; + return aggregateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Date, - com.google.bigtable.admin.v2.Type.Date.Builder, - com.google.bigtable.admin.v2.Type.DateOrBuilder> - dateTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + structTypeBuilder_; + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; * - * @return Whether the dateType field is set. + * @return Whether the structType field is set. */ @java.lang.Override - public boolean hasDateType() { - return kindCase_ == 11; + public boolean hasStructType() { + return kindCase_ == 7; } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; * - * @return The dateType. + * @return The structType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Date getDateType() { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11) { - return (com.google.bigtable.admin.v2.Type.Date) kind_; + public com.google.bigtable.admin.v2.Type.Struct getStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Struct) kind_; } - return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); } else { - if (kindCase_ == 11) { - return dateTypeBuilder_.getMessage(); + if (kindCase_ == 7) { + return structTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); } } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - public Builder setDateType(com.google.bigtable.admin.v2.Type.Date value) { - if (dateTypeBuilder_ == null) { + public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - dateTypeBuilder_.setMessage(value); + structTypeBuilder_.setMessage(value); } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - public Builder setDateType(com.google.bigtable.admin.v2.Type.Date.Builder builderForValue) { - if (dateTypeBuilder_ == null) { + public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct.Builder builderForValue) { + if (structTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - dateTypeBuilder_.setMessage(builderForValue.build()); + structTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - public Builder mergeDateType(com.google.bigtable.admin.v2.Type.Date value) { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11 - && kind_ != com.google.bigtable.admin.v2.Type.Date.getDefaultInstance()) { + public Builder mergeStructType(com.google.bigtable.admin.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7 + && kind_ != com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Date.newBuilder( - (com.google.bigtable.admin.v2.Type.Date) kind_) + com.google.bigtable.admin.v2.Type.Struct.newBuilder( + (com.google.bigtable.admin.v2.Type.Struct) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20637,206 +27778,216 @@ public Builder mergeDateType(com.google.bigtable.admin.v2.Type.Date value) { } onChanged(); } else { - if (kindCase_ == 11) { - dateTypeBuilder_.mergeFrom(value); + if (kindCase_ == 7) { + structTypeBuilder_.mergeFrom(value); } else { - dateTypeBuilder_.setMessage(value); + structTypeBuilder_.setMessage(value); } } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - public Builder clearDateType() { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11) { + public Builder clearStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 11) { + if (kindCase_ == 7) { kindCase_ = 0; kind_ = null; } - dateTypeBuilder_.clear(); + structTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - public com.google.bigtable.admin.v2.Type.Date.Builder getDateTypeBuilder() { - return getDateTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Struct.Builder getStructTypeBuilder() { + return internalGetStructTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.DateOrBuilder getDateTypeOrBuilder() { - if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { - return dateTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { + return structTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 11) { - return (com.google.bigtable.admin.v2.Type.Date) kind_; + if (kindCase_ == 7) { + return (com.google.bigtable.admin.v2.Type.Struct) kind_; } - return com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); } } + /** * * *
      -     * Date
      +     * Struct
            * 
      * - * .google.bigtable.admin.v2.Type.Date date_type = 11; + * .google.bigtable.admin.v2.Type.Struct struct_type = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Date, - com.google.bigtable.admin.v2.Type.Date.Builder, - com.google.bigtable.admin.v2.Type.DateOrBuilder> - getDateTypeFieldBuilder() { - if (dateTypeBuilder_ == null) { - if (!(kindCase_ == 11)) { - kind_ = com.google.bigtable.admin.v2.Type.Date.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder> + internalGetStructTypeFieldBuilder() { + if (structTypeBuilder_ == null) { + if (!(kindCase_ == 7)) { + kind_ = com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); } - dateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Date, - com.google.bigtable.admin.v2.Type.Date.Builder, - com.google.bigtable.admin.v2.Type.DateOrBuilder>( - (com.google.bigtable.admin.v2.Type.Date) kind_, getParentForChildren(), isClean()); + structTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Struct, + com.google.bigtable.admin.v2.Type.Struct.Builder, + com.google.bigtable.admin.v2.Type.StructOrBuilder>( + (com.google.bigtable.admin.v2.Type.Struct) kind_, + getParentForChildren(), + isClean()); kind_ = null; } - kindCase_ = 11; + kindCase_ = 7; onChanged(); - return dateTypeBuilder_; + return structTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Aggregate, - com.google.bigtable.admin.v2.Type.Aggregate.Builder, - com.google.bigtable.admin.v2.Type.AggregateOrBuilder> - aggregateTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Array, + com.google.bigtable.admin.v2.Type.Array.Builder, + com.google.bigtable.admin.v2.Type.ArrayOrBuilder> + arrayTypeBuilder_; + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; * - * @return Whether the aggregateType field is set. + * @return Whether the arrayType field is set. */ @java.lang.Override - public boolean hasAggregateType() { - return kindCase_ == 6; + public boolean hasArrayType() { + return kindCase_ == 3; } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; * - * @return The aggregateType. + * @return The arrayType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Aggregate getAggregateType() { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6) { - return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + public com.google.bigtable.admin.v2.Type.Array getArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } else { - if (kindCase_ == 6) { - return aggregateTypeBuilder_.getMessage(); + if (kindCase_ == 3) { + return arrayTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder setAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { - if (aggregateTypeBuilder_ == null) { + public Builder setArrayType(com.google.bigtable.admin.v2.Type.Array value) { + if (arrayTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - aggregateTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder setAggregateType( - com.google.bigtable.admin.v2.Type.Aggregate.Builder builderForValue) { - if (aggregateTypeBuilder_ == null) { + public Builder setArrayType(com.google.bigtable.admin.v2.Type.Array.Builder builderForValue) { + if (arrayTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - aggregateTypeBuilder_.setMessage(builderForValue.build()); + arrayTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder mergeAggregateType(com.google.bigtable.admin.v2.Type.Aggregate value) { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6 - && kind_ != com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance()) { + public Builder mergeArrayType(com.google.bigtable.admin.v2.Type.Array value) { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3 + && kind_ != com.google.bigtable.admin.v2.Type.Array.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Aggregate.newBuilder( - (com.google.bigtable.admin.v2.Type.Aggregate) kind_) + com.google.bigtable.admin.v2.Type.Array.newBuilder( + (com.google.bigtable.admin.v2.Type.Array) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20844,207 +27995,213 @@ public Builder mergeAggregateType(com.google.bigtable.admin.v2.Type.Aggregate va } onChanged(); } else { - if (kindCase_ == 6) { - aggregateTypeBuilder_.mergeFrom(value); + if (kindCase_ == 3) { + arrayTypeBuilder_.mergeFrom(value); } else { - aggregateTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public Builder clearAggregateType() { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6) { + public Builder clearArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 6) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; } - aggregateTypeBuilder_.clear(); + arrayTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - public com.google.bigtable.admin.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { - return getAggregateTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Array.Builder getArrayTypeBuilder() { + return internalGetArrayTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { - if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { - return aggregateTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { + if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { + return arrayTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 6) { - return (com.google.bigtable.admin.v2.Type.Aggregate) kind_; + if (kindCase_ == 3) { + return (com.google.bigtable.admin.v2.Type.Array) kind_; } - return com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } } + /** * * *
      -     * Aggregate
      +     * Array
            * 
      * - * .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.admin.v2.Type.Array array_type = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Aggregate, - com.google.bigtable.admin.v2.Type.Aggregate.Builder, - com.google.bigtable.admin.v2.Type.AggregateOrBuilder> - getAggregateTypeFieldBuilder() { - if (aggregateTypeBuilder_ == null) { - if (!(kindCase_ == 6)) { - kind_ = com.google.bigtable.admin.v2.Type.Aggregate.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Array, + com.google.bigtable.admin.v2.Type.Array.Builder, + com.google.bigtable.admin.v2.Type.ArrayOrBuilder> + internalGetArrayTypeFieldBuilder() { + if (arrayTypeBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); } - aggregateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Aggregate, - com.google.bigtable.admin.v2.Type.Aggregate.Builder, - com.google.bigtable.admin.v2.Type.AggregateOrBuilder>( - (com.google.bigtable.admin.v2.Type.Aggregate) kind_, - getParentForChildren(), - isClean()); + arrayTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Array, + com.google.bigtable.admin.v2.Type.Array.Builder, + com.google.bigtable.admin.v2.Type.ArrayOrBuilder>( + (com.google.bigtable.admin.v2.Type.Array) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 6; + kindCase_ = 3; onChanged(); - return aggregateTypeBuilder_; + return arrayTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct, - com.google.bigtable.admin.v2.Type.Struct.Builder, - com.google.bigtable.admin.v2.Type.StructOrBuilder> - structTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Map, + com.google.bigtable.admin.v2.Type.Map.Builder, + com.google.bigtable.admin.v2.Type.MapOrBuilder> + mapTypeBuilder_; + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; * - * @return Whether the structType field is set. + * @return Whether the mapType field is set. */ @java.lang.Override - public boolean hasStructType() { - return kindCase_ == 7; + public boolean hasMapType() { + return kindCase_ == 4; } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; * - * @return The structType. + * @return The mapType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Struct getStructType() { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7) { - return (com.google.bigtable.admin.v2.Type.Struct) kind_; + public com.google.bigtable.admin.v2.Type.Map getMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Map) kind_; } - return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } else { - if (kindCase_ == 7) { - return structTypeBuilder_.getMessage(); + if (kindCase_ == 4) { + return mapTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct value) { - if (structTypeBuilder_ == null) { + public Builder setMapType(com.google.bigtable.admin.v2.Type.Map value) { + if (mapTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - structTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder setStructType(com.google.bigtable.admin.v2.Type.Struct.Builder builderForValue) { - if (structTypeBuilder_ == null) { + public Builder setMapType(com.google.bigtable.admin.v2.Type.Map.Builder builderForValue) { + if (mapTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - structTypeBuilder_.setMessage(builderForValue.build()); + mapTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder mergeStructType(com.google.bigtable.admin.v2.Type.Struct value) { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7 - && kind_ != com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance()) { + public Builder mergeMapType(com.google.bigtable.admin.v2.Type.Map value) { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4 && kind_ != com.google.bigtable.admin.v2.Type.Map.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Struct.newBuilder( - (com.google.bigtable.admin.v2.Type.Struct) kind_) + com.google.bigtable.admin.v2.Type.Map.newBuilder( + (com.google.bigtable.admin.v2.Type.Map) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -21052,207 +28209,214 @@ public Builder mergeStructType(com.google.bigtable.admin.v2.Type.Struct value) { } onChanged(); } else { - if (kindCase_ == 7) { - structTypeBuilder_.mergeFrom(value); + if (kindCase_ == 4) { + mapTypeBuilder_.mergeFrom(value); } else { - structTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public Builder clearStructType() { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7) { + public Builder clearMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 7) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; } - structTypeBuilder_.clear(); + mapTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - public com.google.bigtable.admin.v2.Type.Struct.Builder getStructTypeBuilder() { - return getStructTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Map.Builder getMapTypeBuilder() { + return internalGetMapTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.StructOrBuilder getStructTypeOrBuilder() { - if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { - return structTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.MapOrBuilder getMapTypeOrBuilder() { + if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { + return mapTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 7) { - return (com.google.bigtable.admin.v2.Type.Struct) kind_; + if (kindCase_ == 4) { + return (com.google.bigtable.admin.v2.Type.Map) kind_; } - return com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } } + /** * * *
      -     * Struct
      +     * Map
            * 
      * - * .google.bigtable.admin.v2.Type.Struct struct_type = 7; + * .google.bigtable.admin.v2.Type.Map map_type = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct, - com.google.bigtable.admin.v2.Type.Struct.Builder, - com.google.bigtable.admin.v2.Type.StructOrBuilder> - getStructTypeFieldBuilder() { - if (structTypeBuilder_ == null) { - if (!(kindCase_ == 7)) { - kind_ = com.google.bigtable.admin.v2.Type.Struct.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Map, + com.google.bigtable.admin.v2.Type.Map.Builder, + com.google.bigtable.admin.v2.Type.MapOrBuilder> + internalGetMapTypeFieldBuilder() { + if (mapTypeBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); } - structTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Struct, - com.google.bigtable.admin.v2.Type.Struct.Builder, - com.google.bigtable.admin.v2.Type.StructOrBuilder>( - (com.google.bigtable.admin.v2.Type.Struct) kind_, - getParentForChildren(), - isClean()); + mapTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Map, + com.google.bigtable.admin.v2.Type.Map.Builder, + com.google.bigtable.admin.v2.Type.MapOrBuilder>( + (com.google.bigtable.admin.v2.Type.Map) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 7; + kindCase_ = 4; onChanged(); - return structTypeBuilder_; + return mapTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Array, - com.google.bigtable.admin.v2.Type.Array.Builder, - com.google.bigtable.admin.v2.Type.ArrayOrBuilder> - arrayTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Proto, + com.google.bigtable.admin.v2.Type.Proto.Builder, + com.google.bigtable.admin.v2.Type.ProtoOrBuilder> + protoTypeBuilder_; + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; * - * @return Whether the arrayType field is set. + * @return Whether the protoType field is set. */ @java.lang.Override - public boolean hasArrayType() { - return kindCase_ == 3; + public boolean hasProtoType() { + return kindCase_ == 13; } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; * - * @return The arrayType. + * @return The protoType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Array getArrayType() { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3) { - return (com.google.bigtable.admin.v2.Type.Array) kind_; + public com.google.bigtable.admin.v2.Type.Proto getProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; } - return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } else { - if (kindCase_ == 3) { - return arrayTypeBuilder_.getMessage(); + if (kindCase_ == 13) { + return protoTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder setArrayType(com.google.bigtable.admin.v2.Type.Array value) { - if (arrayTypeBuilder_ == null) { + public Builder setProtoType(com.google.bigtable.admin.v2.Type.Proto value) { + if (protoTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - arrayTypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder setArrayType(com.google.bigtable.admin.v2.Type.Array.Builder builderForValue) { - if (arrayTypeBuilder_ == null) { + public Builder setProtoType(com.google.bigtable.admin.v2.Type.Proto.Builder builderForValue) { + if (protoTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - arrayTypeBuilder_.setMessage(builderForValue.build()); + protoTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder mergeArrayType(com.google.bigtable.admin.v2.Type.Array value) { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3 - && kind_ != com.google.bigtable.admin.v2.Type.Array.getDefaultInstance()) { + public Builder mergeProtoType(com.google.bigtable.admin.v2.Type.Proto value) { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13 + && kind_ != com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Array.newBuilder( - (com.google.bigtable.admin.v2.Type.Array) kind_) + com.google.bigtable.admin.v2.Type.Proto.newBuilder( + (com.google.bigtable.admin.v2.Type.Proto) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -21260,204 +28424,214 @@ public Builder mergeArrayType(com.google.bigtable.admin.v2.Type.Array value) { } onChanged(); } else { - if (kindCase_ == 3) { - arrayTypeBuilder_.mergeFrom(value); + if (kindCase_ == 13) { + protoTypeBuilder_.mergeFrom(value); } else { - arrayTypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public Builder clearArrayType() { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3) { + public Builder clearProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 3) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; } - arrayTypeBuilder_.clear(); + protoTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - public com.google.bigtable.admin.v2.Type.Array.Builder getArrayTypeBuilder() { - return getArrayTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Proto.Builder getProtoTypeBuilder() { + return internalGetProtoTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { - if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { - return arrayTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder() { + if ((kindCase_ == 13) && (protoTypeBuilder_ != null)) { + return protoTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 3) { - return (com.google.bigtable.admin.v2.Type.Array) kind_; + if (kindCase_ == 13) { + return (com.google.bigtable.admin.v2.Type.Proto) kind_; } - return com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
      -     * Array
      +     * Proto
            * 
      * - * .google.bigtable.admin.v2.Type.Array array_type = 3; + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Array, - com.google.bigtable.admin.v2.Type.Array.Builder, - com.google.bigtable.admin.v2.Type.ArrayOrBuilder> - getArrayTypeFieldBuilder() { - if (arrayTypeBuilder_ == null) { - if (!(kindCase_ == 3)) { - kind_ = com.google.bigtable.admin.v2.Type.Array.getDefaultInstance(); - } - arrayTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Array, - com.google.bigtable.admin.v2.Type.Array.Builder, - com.google.bigtable.admin.v2.Type.ArrayOrBuilder>( - (com.google.bigtable.admin.v2.Type.Array) kind_, getParentForChildren(), isClean()); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Proto, + com.google.bigtable.admin.v2.Type.Proto.Builder, + com.google.bigtable.admin.v2.Type.ProtoOrBuilder> + internalGetProtoTypeFieldBuilder() { + if (protoTypeBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.bigtable.admin.v2.Type.Proto.getDefaultInstance(); + } + protoTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Proto, + com.google.bigtable.admin.v2.Type.Proto.Builder, + com.google.bigtable.admin.v2.Type.ProtoOrBuilder>( + (com.google.bigtable.admin.v2.Type.Proto) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 3; + kindCase_ = 13; onChanged(); - return arrayTypeBuilder_; + return protoTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Map, - com.google.bigtable.admin.v2.Type.Map.Builder, - com.google.bigtable.admin.v2.Type.MapOrBuilder> - mapTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Enum, + com.google.bigtable.admin.v2.Type.Enum.Builder, + com.google.bigtable.admin.v2.Type.EnumOrBuilder> + enumTypeBuilder_; + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; * - * @return Whether the mapType field is set. + * @return Whether the enumType field is set. */ @java.lang.Override - public boolean hasMapType() { - return kindCase_ == 4; + public boolean hasEnumType() { + return kindCase_ == 14; } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; * - * @return The mapType. + * @return The enumType. */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.Map getMapType() { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Map) kind_; + public com.google.bigtable.admin.v2.Type.Enum getEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; } - return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } else { - if (kindCase_ == 4) { - return mapTypeBuilder_.getMessage(); + if (kindCase_ == 14) { + return enumTypeBuilder_.getMessage(); } - return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder setMapType(com.google.bigtable.admin.v2.Type.Map value) { - if (mapTypeBuilder_ == null) { + public Builder setEnumType(com.google.bigtable.admin.v2.Type.Enum value) { + if (enumTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - mapTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder setMapType(com.google.bigtable.admin.v2.Type.Map.Builder builderForValue) { - if (mapTypeBuilder_ == null) { + public Builder setEnumType(com.google.bigtable.admin.v2.Type.Enum.Builder builderForValue) { + if (enumTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - mapTypeBuilder_.setMessage(builderForValue.build()); + enumTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder mergeMapType(com.google.bigtable.admin.v2.Type.Map value) { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4 && kind_ != com.google.bigtable.admin.v2.Type.Map.getDefaultInstance()) { + public Builder mergeEnumType(com.google.bigtable.admin.v2.Type.Enum value) { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14 + && kind_ != com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance()) { kind_ = - com.google.bigtable.admin.v2.Type.Map.newBuilder( - (com.google.bigtable.admin.v2.Type.Map) kind_) + com.google.bigtable.admin.v2.Type.Enum.newBuilder( + (com.google.bigtable.admin.v2.Type.Enum) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -21465,112 +28639,105 @@ public Builder mergeMapType(com.google.bigtable.admin.v2.Type.Map value) { } onChanged(); } else { - if (kindCase_ == 4) { - mapTypeBuilder_.mergeFrom(value); + if (kindCase_ == 14) { + enumTypeBuilder_.mergeFrom(value); } else { - mapTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public Builder clearMapType() { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4) { + public Builder clearEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 4) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; } - mapTypeBuilder_.clear(); + enumTypeBuilder_.clear(); } return this; } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - public com.google.bigtable.admin.v2.Type.Map.Builder getMapTypeBuilder() { - return getMapTypeFieldBuilder().getBuilder(); + public com.google.bigtable.admin.v2.Type.Enum.Builder getEnumTypeBuilder() { + return internalGetEnumTypeFieldBuilder().getBuilder(); } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ @java.lang.Override - public com.google.bigtable.admin.v2.Type.MapOrBuilder getMapTypeOrBuilder() { - if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { - return mapTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.admin.v2.Type.EnumOrBuilder getEnumTypeOrBuilder() { + if ((kindCase_ == 14) && (enumTypeBuilder_ != null)) { + return enumTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 4) { - return (com.google.bigtable.admin.v2.Type.Map) kind_; + if (kindCase_ == 14) { + return (com.google.bigtable.admin.v2.Type.Enum) kind_; } - return com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
      -     * Map
      +     * Enum
            * 
      * - * .google.bigtable.admin.v2.Type.Map map_type = 4; + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Map, - com.google.bigtable.admin.v2.Type.Map.Builder, - com.google.bigtable.admin.v2.Type.MapOrBuilder> - getMapTypeFieldBuilder() { - if (mapTypeBuilder_ == null) { - if (!(kindCase_ == 4)) { - kind_ = com.google.bigtable.admin.v2.Type.Map.getDefaultInstance(); - } - mapTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.admin.v2.Type.Map, - com.google.bigtable.admin.v2.Type.Map.Builder, - com.google.bigtable.admin.v2.Type.MapOrBuilder>( - (com.google.bigtable.admin.v2.Type.Map) kind_, getParentForChildren(), isClean()); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Enum, + com.google.bigtable.admin.v2.Type.Enum.Builder, + com.google.bigtable.admin.v2.Type.EnumOrBuilder> + internalGetEnumTypeFieldBuilder() { + if (enumTypeBuilder_ == null) { + if (!(kindCase_ == 14)) { + kind_ = com.google.bigtable.admin.v2.Type.Enum.getDefaultInstance(); + } + enumTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.Type.Enum, + com.google.bigtable.admin.v2.Type.Enum.Builder, + com.google.bigtable.admin.v2.Type.EnumOrBuilder>( + (com.google.bigtable.admin.v2.Type.Enum) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 4; + kindCase_ = 14; onChanged(); - return mapTypeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.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 enumTypeBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.Type) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypeOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypeOrBuilder.java index 999f5dc258..7e7bf4902b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypeOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface TypeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.Type) @@ -36,6 +38,7 @@ public interface TypeOrBuilder * @return Whether the bytesType field is set. */ boolean hasBytesType(); + /** * * @@ -48,6 +51,7 @@ public interface TypeOrBuilder * @return The bytesType. */ com.google.bigtable.admin.v2.Type.Bytes getBytesType(); + /** * * @@ -71,6 +75,7 @@ public interface TypeOrBuilder * @return Whether the stringType field is set. */ boolean hasStringType(); + /** * * @@ -83,6 +88,7 @@ public interface TypeOrBuilder * @return The stringType. */ com.google.bigtable.admin.v2.Type.String getStringType(); + /** * * @@ -106,6 +112,7 @@ public interface TypeOrBuilder * @return Whether the int64Type field is set. */ boolean hasInt64Type(); + /** * * @@ -118,6 +125,7 @@ public interface TypeOrBuilder * @return The int64Type. */ com.google.bigtable.admin.v2.Type.Int64 getInt64Type(); + /** * * @@ -141,6 +149,7 @@ public interface TypeOrBuilder * @return Whether the float32Type field is set. */ boolean hasFloat32Type(); + /** * * @@ -153,6 +162,7 @@ public interface TypeOrBuilder * @return The float32Type. */ com.google.bigtable.admin.v2.Type.Float32 getFloat32Type(); + /** * * @@ -176,6 +186,7 @@ public interface TypeOrBuilder * @return Whether the float64Type field is set. */ boolean hasFloat64Type(); + /** * * @@ -188,6 +199,7 @@ public interface TypeOrBuilder * @return The float64Type. */ com.google.bigtable.admin.v2.Type.Float64 getFloat64Type(); + /** * * @@ -211,6 +223,7 @@ public interface TypeOrBuilder * @return Whether the boolType field is set. */ boolean hasBoolType(); + /** * * @@ -223,6 +236,7 @@ public interface TypeOrBuilder * @return The boolType. */ com.google.bigtable.admin.v2.Type.Bool getBoolType(); + /** * * @@ -246,6 +260,7 @@ public interface TypeOrBuilder * @return Whether the timestampType field is set. */ boolean hasTimestampType(); + /** * * @@ -258,6 +273,7 @@ public interface TypeOrBuilder * @return The timestampType. */ com.google.bigtable.admin.v2.Type.Timestamp getTimestampType(); + /** * * @@ -281,6 +297,7 @@ public interface TypeOrBuilder * @return Whether the dateType field is set. */ boolean hasDateType(); + /** * * @@ -293,6 +310,7 @@ public interface TypeOrBuilder * @return The dateType. */ com.google.bigtable.admin.v2.Type.Date getDateType(); + /** * * @@ -316,6 +334,7 @@ public interface TypeOrBuilder * @return Whether the aggregateType field is set. */ boolean hasAggregateType(); + /** * * @@ -328,6 +347,7 @@ public interface TypeOrBuilder * @return The aggregateType. */ com.google.bigtable.admin.v2.Type.Aggregate getAggregateType(); + /** * * @@ -351,6 +371,7 @@ public interface TypeOrBuilder * @return Whether the structType field is set. */ boolean hasStructType(); + /** * * @@ -363,6 +384,7 @@ public interface TypeOrBuilder * @return The structType. */ com.google.bigtable.admin.v2.Type.Struct getStructType(); + /** * * @@ -386,6 +408,7 @@ public interface TypeOrBuilder * @return Whether the arrayType field is set. */ boolean hasArrayType(); + /** * * @@ -398,6 +421,7 @@ public interface TypeOrBuilder * @return The arrayType. */ com.google.bigtable.admin.v2.Type.Array getArrayType(); + /** * * @@ -421,6 +445,7 @@ public interface TypeOrBuilder * @return Whether the mapType field is set. */ boolean hasMapType(); + /** * * @@ -433,6 +458,7 @@ public interface TypeOrBuilder * @return The mapType. */ com.google.bigtable.admin.v2.Type.Map getMapType(); + /** * * @@ -444,5 +470,79 @@ public interface TypeOrBuilder */ com.google.bigtable.admin.v2.Type.MapOrBuilder getMapTypeOrBuilder(); + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + * + * @return Whether the protoType field is set. + */ + boolean hasProtoType(); + + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + * + * @return The protoType. + */ + com.google.bigtable.admin.v2.Type.Proto getProtoType(); + + /** + * + * + *
      +   * Proto
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Proto proto_type = 13; + */ + com.google.bigtable.admin.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder(); + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + * + * @return Whether the enumType field is set. + */ + boolean hasEnumType(); + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + * + * @return The enumType. + */ + com.google.bigtable.admin.v2.Type.Enum getEnumType(); + + /** + * + * + *
      +   * Enum
      +   * 
      + * + * .google.bigtable.admin.v2.Type.Enum enum_type = 14; + */ + com.google.bigtable.admin.v2.Type.EnumOrBuilder getEnumTypeOrBuilder(); + com.google.bigtable.admin.v2.Type.KindCase getKindCase(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypesProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypesProto.java index 3b40dd9719..cb4756344d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypesProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TypesProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; -public final class TypesProto { +@com.google.protobuf.Generated +public final class TypesProto extends com.google.protobuf.GeneratedFile { private TypesProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TypesProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,103 +42,135 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Bytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_String_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Int64_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Int64_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Bool_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Float32_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Float64_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Date_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Struct_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Proto_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Proto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_Type_Enum_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_admin_v2_Type_Enum_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Array_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Map_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -139,7 +183,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n$google/bigtable/admin/v2/types.proto\022\030" + "google.bigtable.admin.v2\032\037google/api/fie" - + "ld_behavior.proto\"\232\022\n\004Type\022:\n\nbytes_type" + + "ld_behavior.proto\"\307\031\n\004Type\022:\n\nbytes_type" + "\030\001 \001(\0132$.google.bigtable.admin.v2.Type.B" + "ytesH\000\022<\n\013string_type\030\002 \001(\0132%.google.big" + "table.admin.v2.Type.StringH\000\022:\n\nint64_ty" @@ -158,52 +202,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.StructH\000\022:\n\narray_type\030\003 \001(\0132$.google." + "bigtable.admin.v2.Type.ArrayH\000\0226\n\010map_ty" + "pe\030\004 \001(\0132\".google.bigtable.admin.v2.Type" - + ".MapH\000\032\251\001\n\005Bytes\022?\n\010encoding\030\001 \001(\0132-.goo" - + "gle.bigtable.admin.v2.Type.Bytes.Encodin" - + "g\032_\n\010Encoding\022@\n\003raw\030\001 \001(\01321.google.bigt" - + "able.admin.v2.Type.Bytes.Encoding.RawH\000\032" - + "\005\n\003RawB\n\n\010encoding\032\237\002\n\006String\022@\n\010encodin" - + "g\030\001 \001(\0132..google.bigtable.admin.v2.Type." - + "String.Encoding\032\322\001\n\010Encoding\022N\n\010utf8_raw" - + "\030\001 \001(\01326.google.bigtable.admin.v2.Type.S" - + "tring.Encoding.Utf8RawB\002\030\001H\000\022N\n\nutf8_byt" - + "es\030\002 \001(\01328.google.bigtable.admin.v2.Type" - + ".String.Encoding.Utf8BytesH\000\032\r\n\007Utf8Raw:" - + "\002\030\001\032\013\n\tUtf8BytesB\n\n\010encoding\032\207\002\n\005Int64\022?" - + "\n\010encoding\030\001 \001(\0132-.google.bigtable.admin" - + ".v2.Type.Int64.Encoding\032\274\001\n\010Encoding\022X\n\020" - + "big_endian_bytes\030\001 \001(\0132<.google.bigtable" - + ".admin.v2.Type.Int64.Encoding.BigEndianB" - + "ytesH\000\032J\n\016BigEndianBytes\0228\n\nbytes_type\030\001" - + " \001(\0132$.google.bigtable.admin.v2.Type.Byt" - + "esB\n\n\010encoding\032\006\n\004Bool\032\t\n\007Float32\032\t\n\007Flo" - + "at64\032\013\n\tTimestamp\032\006\n\004Date\032\220\001\n\006Struct\022;\n\006" - + "fields\030\001 \003(\0132+.google.bigtable.admin.v2." - + "Type.Struct.Field\032I\n\005Field\022\022\n\nfield_name" - + "\030\001 \001(\t\022,\n\004type\030\002 \001(\0132\036.google.bigtable.a" - + "dmin.v2.Type\032=\n\005Array\0224\n\014element_type\030\001 " - + "\001(\0132\036.google.bigtable.admin.v2.Type\032k\n\003M" - + "ap\0220\n\010key_type\030\001 \001(\0132\036.google.bigtable.a" - + "dmin.v2.Type\0222\n\nvalue_type\030\002 \001(\0132\036.googl" - + "e.bigtable.admin.v2.Type\032\333\003\n\tAggregate\0222" - + "\n\ninput_type\030\001 \001(\0132\036.google.bigtable.adm" - + "in.v2.Type\0227\n\nstate_type\030\002 \001(\0132\036.google." - + "bigtable.admin.v2.TypeB\003\340A\003\022;\n\003sum\030\004 \001(\013" - + "2,.google.bigtable.admin.v2.Type.Aggrega" - + "te.SumH\000\022e\n\022hllpp_unique_count\030\005 \001(\0132G.g" - + "oogle.bigtable.admin.v2.Type.Aggregate.H" - + "yperLogLogPlusPlusUniqueCountH\000\022;\n\003max\030\006" - + " \001(\0132,.google.bigtable.admin.v2.Type.Agg" - + "regate.MaxH\000\022;\n\003min\030\007 \001(\0132,.google.bigta" - + "ble.admin.v2.Type.Aggregate.MinH\000\032\005\n\003Sum" - + "\032\005\n\003Max\032\005\n\003Min\032 \n\036HyperLogLogPlusPlusUni" - + "queCountB\014\n\naggregatorB\006\n\004kindB\315\001\n\034com.g" - + "oogle.bigtable.admin.v2B\nTypesProtoP\001Z8c" - + "loud.google.com/go/bigtable/admin/apiv2/" - + "adminpb;adminpb\252\002\036Google.Cloud.Bigtable." - + "Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V" - + "2\352\002\"Google::Cloud::Bigtable::Admin::V2b\006" - + "proto3" + + ".MapH\000\022:\n\nproto_type\030\r \001(\0132$.google.bigt" + + "able.admin.v2.Type.ProtoH\000\0228\n\tenum_type\030" + + "\016 \001(\0132#.google.bigtable.admin.v2.Type.En" + + "umH\000\032\251\001\n\005Bytes\022?\n\010encoding\030\001 \001(\0132-.googl" + + "e.bigtable.admin.v2.Type.Bytes.Encoding\032" + + "_\n\010Encoding\022@\n\003raw\030\001 \001(\01321.google.bigtab" + + "le.admin.v2.Type.Bytes.Encoding.RawH\000\032\005\n" + + "\003RawB\n\n\010encoding\032\237\002\n\006String\022@\n\010encoding\030" + + "\001 \001(\0132..google.bigtable.admin.v2.Type.St" + + "ring.Encoding\032\322\001\n\010Encoding\022N\n\010utf8_raw\030\001" + + " \001(\01326.google.bigtable.admin.v2.Type.Str" + + "ing.Encoding.Utf8RawB\002\030\001H\000\022N\n\nutf8_bytes" + + "\030\002 \001(\01328.google.bigtable.admin.v2.Type.S" + + "tring.Encoding.Utf8BytesH\000\032\r\n\007Utf8Raw:\002\030" + + "\001\032\013\n\tUtf8BytesB\n\n\010encoding\032\375\002\n\005Int64\022?\n\010" + + "encoding\030\001 \001(\0132-.google.bigtable.admin.v" + + "2.Type.Int64.Encoding\032\262\002\n\010Encoding\022X\n\020bi" + + "g_endian_bytes\030\001 \001(\0132<.google.bigtable.a" + + "dmin.v2.Type.Int64.Encoding.BigEndianByt" + + "esH\000\022\\\n\022ordered_code_bytes\030\002 \001(\0132>.googl" + + "e.bigtable.admin.v2.Type.Int64.Encoding." + + "OrderedCodeBytesH\000\032N\n\016BigEndianBytes\022<\n\n" + + "bytes_type\030\001 \001(\0132$.google.bigtable.admin" + + ".v2.Type.BytesB\002\030\001\032\022\n\020OrderedCodeBytesB\n" + + "\n\010encoding\032\006\n\004Bool\032\t\n\007Float32\032\t\n\007Float64" + + "\032\264\001\n\tTimestamp\022C\n\010encoding\030\001 \001(\01321.googl" + + "e.bigtable.admin.v2.Type.Timestamp.Encod" + + "ing\032b\n\010Encoding\022J\n\021unix_micros_int64\030\001 \001" + + "(\0132-.google.bigtable.admin.v2.Type.Int64" + + ".EncodingH\000B\n\n\010encoding\032\006\n\004Date\032\271\004\n\006Stru" + + "ct\022;\n\006fields\030\001 \003(\0132+.google.bigtable.adm" + + "in.v2.Type.Struct.Field\022@\n\010encoding\030\002 \001(" + + "\0132..google.bigtable.admin.v2.Type.Struct" + + ".Encoding\032I\n\005Field\022\022\n\nfield_name\030\001 \001(\t\022," + + "\n\004type\030\002 \001(\0132\036.google.bigtable.admin.v2." + + "Type\032\344\002\n\010Encoding\022M\n\tsingleton\030\001 \001(\01328.g" + + "oogle.bigtable.admin.v2.Type.Struct.Enco" + + "ding.SingletonH\000\022X\n\017delimited_bytes\030\002 \001(" + + "\0132=.google.bigtable.admin.v2.Type.Struct" + + ".Encoding.DelimitedBytesH\000\022]\n\022ordered_co" + + "de_bytes\030\003 \001(\0132?.google.bigtable.admin.v" + + "2.Type.Struct.Encoding.OrderedCodeBytesH" + + "\000\032\013\n\tSingleton\032#\n\016DelimitedBytes\022\021\n\tdeli" + + "miter\030\001 \001(\014\032\022\n\020OrderedCodeBytesB\n\n\010encod" + + "ing\0327\n\005Proto\022\030\n\020schema_bundle_id\030\001 \001(\t\022\024" + + "\n\014message_name\030\002 \001(\t\0323\n\004Enum\022\030\n\020schema_b" + + "undle_id\030\001 \001(\t\022\021\n\tenum_name\030\002 \001(\t\032=\n\005Arr" + + "ay\0224\n\014element_type\030\001 \001(\0132\036.google.bigtab" + + "le.admin.v2.Type\032k\n\003Map\0220\n\010key_type\030\001 \001(" + + "\0132\036.google.bigtable.admin.v2.Type\0222\n\nval" + + "ue_type\030\002 \001(\0132\036.google.bigtable.admin.v2" + + ".Type\032\333\003\n\tAggregate\0222\n\ninput_type\030\001 \001(\0132" + + "\036.google.bigtable.admin.v2.Type\0227\n\nstate" + + "_type\030\002 \001(\0132\036.google.bigtable.admin.v2.T" + + "ypeB\003\340A\003\022;\n\003sum\030\004 \001(\0132,.google.bigtable." + + "admin.v2.Type.Aggregate.SumH\000\022e\n\022hllpp_u" + + "nique_count\030\005 \001(\0132G.google.bigtable.admi" + + "n.v2.Type.Aggregate.HyperLogLogPlusPlusU" + + "niqueCountH\000\022;\n\003max\030\006 \001(\0132,.google.bigta" + + "ble.admin.v2.Type.Aggregate.MaxH\000\022;\n\003min" + + "\030\007 \001(\0132,.google.bigtable.admin.v2.Type.A" + + "ggregate.MinH\000\032\005\n\003Sum\032\005\n\003Max\032\005\n\003Min\032 \n\036H" + + "yperLogLogPlusPlusUniqueCountB\014\n\naggrega" + + "torB\006\n\004kindB\315\001\n\034com.google.bigtable.admi" + + "n.v2B\nTypesProtoP\001Z8cloud.google.com/go/" + + "bigtable/admin/apiv2/adminpb;adminpb\252\002\036G" + + "oogle.Cloud.Bigtable.Admin.V2\312\002\036Google\\C" + + "loud\\Bigtable\\Admin\\V2\352\002\"Google::Cloud::" + + "Bigtable::Admin::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -211,10 +278,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), }); - internal_static_google_bigtable_admin_v2_Type_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_descriptor = getDescriptor().getMessageType(0); internal_static_google_bigtable_admin_v2_Type_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_descriptor, new java.lang.String[] { "BytesType", @@ -229,190 +295,245 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StructType", "ArrayType", "MapType", + "ProtoType", + "EnumType", "Kind", }); internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Bytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor = - internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_Bytes_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor, new java.lang.String[] { "Raw", "Encoding", }); internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_descriptor = - internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Bytes_Encoding_Raw_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_String_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_Type_String_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_String_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor = - internal_static_google_bigtable_admin_v2_Type_String_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_String_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_String_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor, new java.lang.String[] { "Utf8Raw", "Utf8Bytes", "Encoding", }); internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor = - internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Raw_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_descriptor = - internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor - .getNestedTypes() - .get(1); + internal_static_google_bigtable_admin_v2_Type_String_Encoding_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_String_Encoding_Utf8Bytes_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Int64_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(2); internal_static_google_bigtable_admin_v2_Type_Int64_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Int64_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor = - internal_static_google_bigtable_admin_v2_Type_Int64_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_Int64_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor, new java.lang.String[] { - "BigEndianBytes", "Encoding", + "BigEndianBytes", "OrderedCodeBytes", "Encoding", }); internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_descriptor = - internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_BigEndianBytes_descriptor, new java.lang.String[] { "BytesType", }); + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor = + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_descriptor.getNestedType(1); + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor, + new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Bool_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(3); internal_static_google_bigtable_admin_v2_Type_Bool_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Bool_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Float32_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(4); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(4); internal_static_google_bigtable_admin_v2_Type_Float32_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Float32_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Float64_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(5); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(5); internal_static_google_bigtable_admin_v2_Type_Float64_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Float64_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(6); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(6); internal_static_google_bigtable_admin_v2_Type_Timestamp_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "Encoding", + }); + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor = + internal_static_google_bigtable_admin_v2_Type_Timestamp_descriptor.getNestedType(0); + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Timestamp_Encoding_descriptor, + new java.lang.String[] { + "UnixMicrosInt64", "Encoding", + }); internal_static_google_bigtable_admin_v2_Type_Date_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(7); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(7); internal_static_google_bigtable_admin_v2_Type_Date_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Date_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Struct_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(8); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(8); internal_static_google_bigtable_admin_v2_Type_Struct_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Struct_descriptor, new java.lang.String[] { - "Fields", + "Fields", "Encoding", }); internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor = - internal_static_google_bigtable_admin_v2_Type_Struct_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_Struct_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Struct_Field_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Struct_Field_descriptor, new java.lang.String[] { "FieldName", "Type", }); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor = + internal_static_google_bigtable_admin_v2_Type_Struct_descriptor.getNestedType(1); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor, + new java.lang.String[] { + "Singleton", "DelimitedBytes", "OrderedCodeBytes", "Encoding", + }); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor = + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor.getNestedType(0); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_Singleton_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor = + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor.getNestedType(1); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_DelimitedBytes_descriptor, + new java.lang.String[] { + "Delimiter", + }); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor = + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_descriptor.getNestedType(2); + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_admin_v2_Type_Proto_descriptor = + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(9); + internal_static_google_bigtable_admin_v2_Type_Proto_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Proto_descriptor, + new java.lang.String[] { + "SchemaBundleId", "MessageName", + }); + internal_static_google_bigtable_admin_v2_Type_Enum_descriptor = + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(10); + internal_static_google_bigtable_admin_v2_Type_Enum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_Type_Enum_descriptor, + new java.lang.String[] { + "SchemaBundleId", "EnumName", + }); internal_static_google_bigtable_admin_v2_Type_Array_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(9); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(11); internal_static_google_bigtable_admin_v2_Type_Array_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Array_descriptor, new java.lang.String[] { "ElementType", }); internal_static_google_bigtable_admin_v2_Type_Map_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(10); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(12); internal_static_google_bigtable_admin_v2_Type_Map_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Map_descriptor, new java.lang.String[] { "KeyType", "ValueType", }); internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor = - internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedTypes().get(11); + internal_static_google_bigtable_admin_v2_Type_descriptor.getNestedType(13); internal_static_google_bigtable_admin_v2_Type_Aggregate_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor, new java.lang.String[] { "InputType", "StateType", "Sum", "HllppUniqueCount", "Max", "Min", "Aggregator", }); internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_descriptor = - internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedType(0); internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_Sum_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_descriptor = - internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedType(1); internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_Max_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_descriptor = - internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedType(2); internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_Min_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor = - internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_admin_v2_Type_Aggregate_descriptor.getNestedType(3); internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor, new java.lang.String[] {}); + 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-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java index f41626d3c8..16897c8633 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableMetadata} */ -public final class UndeleteTableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UndeleteTableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableMetadata) UndeleteTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UndeleteTableMetadata"); + } + // Use UndeleteTableMetadata.newBuilder() to construct. - private UndeleteTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UndeleteTableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private UndeleteTableMetadata() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UndeleteTableMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -92,6 +100,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -118,6 +127,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -133,6 +143,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -148,6 +159,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -164,6 +176,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -179,6 +192,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -194,6 +208,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -222,8 +237,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()); @@ -240,8 +255,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()); @@ -337,38 +352,38 @@ public static com.google.bigtable.admin.v2.UndeleteTableMetadata parseFrom( public static com.google.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata 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,10 +406,11 @@ 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; } + /** * * @@ -405,7 +421,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableMetadata} */ - 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.bigtable.admin.v2.UndeleteTableMetadata) com.google.bigtable.admin.v2.UndeleteTableMetadataOrBuilder { @@ -415,7 +431,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable @@ -429,15 +445,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(); } } @@ -507,39 +523,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UndeleteTableMetadata 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.bigtable.admin.v2.UndeleteTableMetadata) { @@ -598,13 +581,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 @@ -628,6 +612,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -650,6 +635,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -672,6 +658,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -693,6 +680,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -710,6 +698,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -734,11 +723,12 @@ 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> startTimeBuilder_; + /** * * @@ -753,6 +743,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -771,6 +762,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -793,6 +785,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -812,6 +805,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -839,6 +833,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -858,6 +853,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -870,8 +866,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -888,6 +885,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -897,14 +895,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>( @@ -915,11 +913,12 @@ 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> endTimeBuilder_; + /** * * @@ -934,6 +933,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -952,6 +952,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -974,6 +975,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -993,6 +995,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1020,6 +1023,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1039,6 +1043,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1051,8 +1056,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1069,6 +1075,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1078,14 +1085,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>( @@ -1095,17 +1102,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.bigtable.admin.v2.UndeleteTableMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java index 9fbd40e5cb..45364c362a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UndeleteTableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UndeleteTableMetadata) @@ -36,6 +38,7 @@ public interface UndeleteTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface UndeleteTableMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -73,6 +77,7 @@ public interface UndeleteTableMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -96,6 +101,7 @@ public interface UndeleteTableMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -108,6 +114,7 @@ public interface UndeleteTableMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java index 477f40b596..77244fd815 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableRequest} */ -public final class UndeleteTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UndeleteTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UndeleteTableRequest) UndeleteTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UndeleteTableRequest"); + } + // Use UndeleteTableRequest.newBuilder() to construct. - private UndeleteTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UndeleteTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private UndeleteTableRequest() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UndeleteTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -137,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); } @@ -149,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; @@ -224,38 +233,38 @@ public static com.google.bigtable.admin.v2.UndeleteTableRequest parseFrom( public static com.google.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest 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,10 +287,11 @@ 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 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UndeleteTableRequest} */ - 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.bigtable.admin.v2.UndeleteTableRequest) com.google.bigtable.admin.v2.UndeleteTableRequestOrBuilder { @@ -302,7 +312,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable @@ -314,7 +324,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.UndeleteTableRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -364,39 +374,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UndeleteTableRequest 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.bigtable.admin.v2.UndeleteTableRequest) { @@ -467,6 +444,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -493,6 +471,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -519,6 +498,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -544,6 +524,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -565,6 +546,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -592,17 +574,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.bigtable.admin.v2.UndeleteTableRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java index 93469398fe..851e6d771d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UndeleteTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UndeleteTableRequest) @@ -40,6 +42,7 @@ public interface UndeleteTableRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java index 5615e62068..f439b09ac5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateAppProfileMetadata} */ -public final class UpdateAppProfileMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateAppProfileMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAppProfileMetadata) UpdateAppProfileMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAppProfileMetadata"); + } + // Use UpdateAppProfileMetadata.newBuilder() to construct. - private UpdateAppProfileMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateAppProfileMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateAppProfileMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAppProfileMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_fieldAccessorTable @@ -153,38 +160,38 @@ public static com.google.bigtable.admin.v2.UpdateAppProfileMetadata parseFrom( public static com.google.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata 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); } @@ -208,10 +215,11 @@ 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; } + /** * * @@ -221,7 +229,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateAppProfileMetadata} */ - 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.bigtable.admin.v2.UpdateAppProfileMetadata) com.google.bigtable.admin.v2.UpdateAppProfileMetadataOrBuilder { @@ -231,7 +239,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_fieldAccessorTable @@ -243,7 +251,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.admin.v2.UpdateAppProfileMetadata.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -281,39 +289,6 @@ public com.google.bigtable.admin.v2.UpdateAppProfileMetadata 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.bigtable.admin.v2.UpdateAppProfileMetadata) { @@ -370,17 +345,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.bigtable.admin.v2.UpdateAppProfileMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadataOrBuilder.java index a2513d9a0c..08d2ad5a71 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateAppProfileMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateAppProfileMetadata) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java index b4bcb04ee8..1eea319039 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateAppProfileRequest} */ -public final class UpdateAppProfileRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateAppProfileRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAppProfileRequest) UpdateAppProfileRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAppProfileRequest"); + } + // Use UpdateAppProfileRequest.newBuilder() to construct. - private UpdateAppProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateAppProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateAppProfileRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAppProfileRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int APP_PROFILE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.AppProfile appProfile_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +109,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { ? com.google.bigtable.admin.v2.AppProfile.getDefaultInstance() : appProfile_; } + /** * * @@ -120,6 +130,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -137,6 +148,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -154,6 +166,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -172,6 +185,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -317,38 +331,38 @@ public static com.google.bigtable.admin.v2.UpdateAppProfileRequest parseFrom( public static com.google.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest 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,10 +385,11 @@ 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 +399,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateAppProfileRequest} */ - 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.bigtable.admin.v2.UpdateAppProfileRequest) com.google.bigtable.admin.v2.UpdateAppProfileRequestOrBuilder { @@ -394,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_fieldAccessorTable @@ -408,15 +423,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) { - getAppProfileFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAppProfileFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -486,39 +501,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateAppProfileRequest 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.bigtable.admin.v2.UpdateAppProfileRequest) { @@ -569,13 +551,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getAppProfileFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAppProfileFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -605,11 +589,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.AppProfile appProfile_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> appProfileBuilder_; + /** * * @@ -626,6 +611,7 @@ public Builder mergeFrom( public boolean hasAppProfile() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -648,6 +634,7 @@ public com.google.bigtable.admin.v2.AppProfile getAppProfile() { return appProfileBuilder_.getMessage(); } } + /** * * @@ -672,6 +659,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile value) { onChanged(); return this; } + /** * * @@ -693,6 +681,7 @@ public Builder setAppProfile(com.google.bigtable.admin.v2.AppProfile.Builder bui onChanged(); return this; } + /** * * @@ -722,6 +711,7 @@ public Builder mergeAppProfile(com.google.bigtable.admin.v2.AppProfile value) { } return this; } + /** * * @@ -743,6 +733,7 @@ public Builder clearAppProfile() { onChanged(); return this; } + /** * * @@ -757,8 +748,9 @@ public Builder clearAppProfile() { public com.google.bigtable.admin.v2.AppProfile.Builder getAppProfileBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getAppProfileFieldBuilder().getBuilder(); + return internalGetAppProfileFieldBuilder().getBuilder(); } + /** * * @@ -779,6 +771,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() : appProfile_; } } + /** * * @@ -790,14 +783,14 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() * .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder> - getAppProfileFieldBuilder() { + internalGetAppProfileFieldBuilder() { if (appProfileBuilder_ == null) { appProfileBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AppProfile, com.google.bigtable.admin.v2.AppProfile.Builder, com.google.bigtable.admin.v2.AppProfileOrBuilder>( @@ -808,11 +801,12 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() } 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> updateMaskBuilder_; + /** * * @@ -829,6 +823,7 @@ public com.google.bigtable.admin.v2.AppProfileOrBuilder getAppProfileOrBuilder() public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -851,6 +846,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -875,6 +871,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -896,6 +893,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -925,6 +923,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -946,6 +945,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -960,8 +960,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -982,6 +983,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -993,14 +995,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>( @@ -1011,6 +1013,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private boolean ignoreWarnings_; + /** * * @@ -1026,6 +1029,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1045,6 +1049,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * @@ -1063,17 +1068,6 @@ public Builder clearIgnoreWarnings() { 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.bigtable.admin.v2.UpdateAppProfileRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequestOrBuilder.java index 5aba1da113..9f0908e247 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateAppProfileRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateAppProfileRequest) @@ -38,6 +40,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return Whether the appProfile field is set. */ boolean hasAppProfile(); + /** * * @@ -52,6 +55,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return The appProfile. */ com.google.bigtable.admin.v2.AppProfile getAppProfile(); + /** * * @@ -79,6 +83,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -93,6 +98,7 @@ public interface UpdateAppProfileRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadata.java index 0ef790cf97..b4df5538ea 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} */ -public final class UpdateAuthorizedViewMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateAuthorizedViewMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) UpdateAuthorizedViewMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAuthorizedViewMetadata"); + } + // Use UpdateAuthorizedViewMetadata.newBuilder() to construct. - private UpdateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateAuthorizedViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateAuthorizedViewMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAuthorizedViewMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewMetadata_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest originalRequest_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +108,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque ? com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -119,6 +129,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -134,6 +145,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -149,6 +161,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -165,6 +178,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -180,6 +194,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -195,6 +210,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -343,38 +359,38 @@ public static com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata parseFro public static com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata 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,10 +414,11 @@ 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 +429,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateAuthorizedViewMetadata} */ - 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata) com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadataOrBuilder { @@ -422,7 +439,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewMetadata_fieldAccessorTable @@ -436,16 +453,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -522,39 +539,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateAuthorizedViewMeta 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.bigtable.admin.v2.UpdateAuthorizedViewMetadata) { @@ -605,19 +589,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -641,11 +628,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -661,6 +649,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -682,6 +671,7 @@ public com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalReque return originalRequestBuilder_.getMessage(); } } + /** * * @@ -706,6 +696,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -727,6 +718,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -757,6 +749,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -777,6 +770,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -791,8 +785,9 @@ public Builder clearOriginalRequest() { getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -813,6 +808,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -823,14 +819,14 @@ public Builder clearOriginalRequest() { * * .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.Builder, com.google.bigtable.admin.v2.UpdateAuthorizedViewRequestOrBuilder>( @@ -841,11 +837,12 @@ public Builder clearOriginalRequest() { } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -860,6 +857,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -880,6 +878,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -902,6 +901,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -921,6 +921,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -948,6 +949,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -967,6 +969,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -979,8 +982,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -999,6 +1003,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -1008,14 +1013,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1026,11 +1031,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1045,6 +1051,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1065,6 +1072,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1087,6 +1095,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1106,6 +1115,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1133,6 +1143,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1152,6 +1163,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1164,8 +1176,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1184,6 +1197,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1193,14 +1207,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1210,17 +1224,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadataOrBuilder.java index 009a0fe40d..bf2557d7a9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateAuthorizedViewMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateAuthorizedViewMetadata) @@ -37,6 +39,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -50,6 +53,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest getOriginalRequest(); + /** * * @@ -74,6 +78,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -86,6 +91,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -109,6 +115,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -121,6 +128,7 @@ public interface UpdateAuthorizedViewMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequest.java index 07eb034ea6..ad0831fc6d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateAuthorizedViewRequest} */ -public final class UpdateAuthorizedViewRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateAuthorizedViewRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateAuthorizedViewRequest) UpdateAuthorizedViewRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAuthorizedViewRequest"); + } + // Use UpdateAuthorizedViewRequest.newBuilder() to construct. - private UpdateAuthorizedViewRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateAuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateAuthorizedViewRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAuthorizedViewRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewRequest_fieldAccessorTable @@ -65,14 +72,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int AUTHORIZED_VIEW_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.AuthorizedView authorizedView_; + /** * * *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -85,14 +93,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -107,14 +116,15 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { ? com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance() : authorizedView_; } + /** * * *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -130,6 +140,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -152,6 +163,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -174,6 +186,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -197,6 +210,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; private boolean ignoreWarnings_ = false; + /** * * @@ -343,38 +357,38 @@ public static com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest parseFrom public static com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest 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.bigtable.admin.v2.UpdateAuthorizedViewRequest 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.bigtable.admin.v2.UpdateAuthorizedViewRequest 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.bigtable.admin.v2.UpdateAuthorizedViewRequest 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.bigtable.admin.v2.UpdateAuthorizedViewRequest 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.bigtable.admin.v2.UpdateAuthorizedViewRequest 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,10 +412,11 @@ 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 +427,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateAuthorizedViewRequest} */ - 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.bigtable.admin.v2.UpdateAuthorizedViewRequest) com.google.bigtable.admin.v2.UpdateAuthorizedViewRequestOrBuilder { @@ -422,7 +437,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateAuthorizedViewRequest_fieldAccessorTable @@ -436,15 +451,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) { - getAuthorizedViewFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAuthorizedViewFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -515,39 +530,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateAuthorizedViewRequ 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.bigtable.admin.v2.UpdateAuthorizedViewRequest) { @@ -598,13 +580,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getAuthorizedViewFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAuthorizedViewFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -634,19 +618,20 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.AuthorizedView authorizedView_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> authorizedViewBuilder_; + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -658,14 +643,15 @@ public Builder mergeFrom( public boolean hasAuthorizedView() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -683,14 +669,15 @@ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView() { return authorizedViewBuilder_.getMessage(); } } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -710,14 +697,15 @@ public Builder setAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView val onChanged(); return this; } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -735,14 +723,15 @@ public Builder setAuthorizedView( onChanged(); return this; } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -768,14 +757,15 @@ public Builder mergeAuthorizedView(com.google.bigtable.admin.v2.AuthorizedView v } return this; } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -792,14 +782,15 @@ public Builder clearAuthorizedView() { onChanged(); return this; } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -809,16 +800,17 @@ public Builder clearAuthorizedView() { public com.google.bigtable.admin.v2.AuthorizedView.Builder getAuthorizedViewBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getAuthorizedViewFieldBuilder().getBuilder(); + return internalGetAuthorizedViewFieldBuilder().getBuilder(); } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * @@ -834,28 +826,29 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB : authorizedView_; } } + /** * * *
            * Required. The AuthorizedView to update. The `name` in `authorized_view` is
            * used to identify the AuthorizedView. AuthorizedView name must in this
      -     * format
      -     * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +     * format:
      +     * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
            * 
      * * * .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder> - getAuthorizedViewFieldBuilder() { + internalGetAuthorizedViewFieldBuilder() { if (authorizedViewBuilder_ == null) { authorizedViewBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.AuthorizedView, com.google.bigtable.admin.v2.AuthorizedView.Builder, com.google.bigtable.admin.v2.AuthorizedViewOrBuilder>( @@ -866,11 +859,12 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB } 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> updateMaskBuilder_; + /** * * @@ -892,6 +886,7 @@ public com.google.bigtable.admin.v2.AuthorizedViewOrBuilder getAuthorizedViewOrB public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -919,6 +914,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -948,6 +944,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -974,6 +971,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -1008,6 +1006,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -1034,6 +1033,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1053,8 +1053,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1080,6 +1081,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1096,14 +1098,14 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ - 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>( @@ -1114,6 +1116,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private boolean ignoreWarnings_; + /** * * @@ -1130,6 +1133,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { public boolean getIgnoreWarnings() { return ignoreWarnings_; } + /** * * @@ -1150,6 +1154,7 @@ public Builder setIgnoreWarnings(boolean value) { onChanged(); return this; } + /** * * @@ -1169,17 +1174,6 @@ public Builder clearIgnoreWarnings() { 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.bigtable.admin.v2.UpdateAuthorizedViewRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequestOrBuilder.java index 785d683f8c..20e32a1a9d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateAuthorizedViewRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateAuthorizedViewRequest) @@ -30,8 +32,8 @@ public interface UpdateAuthorizedViewRequestOrBuilder *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -41,14 +43,15 @@ public interface UpdateAuthorizedViewRequestOrBuilder * @return Whether the authorizedView field is set. */ boolean hasAuthorizedView(); + /** * * *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -58,14 +61,15 @@ public interface UpdateAuthorizedViewRequestOrBuilder * @return The authorizedView. */ com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView(); + /** * * *
          * Required. The AuthorizedView to update. The `name` in `authorized_view` is
          * used to identify the AuthorizedView. AuthorizedView name must in this
      -   * format
      -   * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
      +   * format:
      +   * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
          * 
      * * @@ -93,6 +97,7 @@ public interface UpdateAuthorizedViewRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -112,6 +117,7 @@ public interface UpdateAuthorizedViewRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java index 156c9ae15e..c5eeeffd25 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateBackupRequest_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int BACKUP_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Backup backup_; + /** * * @@ -73,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -85,6 +93,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -93,7 +102,7 @@ public boolean hasBackup() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -105,6 +114,7 @@ public boolean hasBackup() { public com.google.bigtable.admin.v2.Backup getBackup() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } + /** * * @@ -113,7 +123,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -126,6 +136,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -146,6 +157,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -166,6 +178,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -305,38 +318,38 @@ public static com.google.bigtable.admin.v2.UpdateBackupRequest parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -359,10 +372,11 @@ 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; } + /** * * @@ -373,7 +387,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.UpdateBackupRequest) com.google.bigtable.admin.v2.UpdateBackupRequestOrBuilder { @@ -383,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateBackupRequest_fieldAccessorTable @@ -397,15 +411,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(); } } @@ -471,39 +485,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateBackupRequest 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.bigtable.admin.v2.UpdateBackupRequest) { @@ -551,13 +532,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 @@ -581,11 +563,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Backup backup_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> backupBuilder_; + /** * * @@ -594,7 +577,7 @@ public Builder mergeFrom( * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -605,6 +588,7 @@ public Builder mergeFrom( public boolean hasBackup() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -613,7 +597,7 @@ public boolean hasBackup() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -628,6 +612,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { return backupBuilder_.getMessage(); } } + /** * * @@ -636,7 +621,7 @@ public com.google.bigtable.admin.v2.Backup getBackup() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -655,6 +640,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup value) { onChanged(); return this; } + /** * * @@ -663,7 +649,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup value) { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -679,6 +665,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup.Builder builderForV onChanged(); return this; } + /** * * @@ -687,7 +674,7 @@ public Builder setBackup(com.google.bigtable.admin.v2.Backup.Builder builderForV * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -711,6 +698,7 @@ public Builder mergeBackup(com.google.bigtable.admin.v2.Backup value) { } return this; } + /** * * @@ -719,7 +707,7 @@ public Builder mergeBackup(com.google.bigtable.admin.v2.Backup value) { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -735,6 +723,7 @@ public Builder clearBackup() { onChanged(); return this; } + /** * * @@ -743,7 +732,7 @@ public Builder clearBackup() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -752,8 +741,9 @@ public Builder clearBackup() { public com.google.bigtable.admin.v2.Backup.Builder getBackupBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBackupFieldBuilder().getBuilder(); + return internalGetBackupFieldBuilder().getBuilder(); } + /** * * @@ -762,7 +752,7 @@ public com.google.bigtable.admin.v2.Backup.Builder getBackupBuilder() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -775,6 +765,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { return backup_ == null ? com.google.bigtable.admin.v2.Backup.getDefaultInstance() : backup_; } } + /** * * @@ -783,20 +774,20 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder> - getBackupFieldBuilder() { + internalGetBackupFieldBuilder() { if (backupBuilder_ == null) { backupBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Backup, com.google.bigtable.admin.v2.Backup.Builder, com.google.bigtable.admin.v2.BackupOrBuilder>( @@ -807,11 +798,12 @@ public com.google.bigtable.admin.v2.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> updateMaskBuilder_; + /** * * @@ -831,6 +823,7 @@ public com.google.bigtable.admin.v2.BackupOrBuilder getBackupOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -856,6 +849,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -883,6 +877,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -907,6 +902,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -939,6 +935,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -963,6 +960,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -980,8 +978,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1005,6 +1004,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1019,14 +1019,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>( @@ -1036,17 +1036,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.bigtable.admin.v2.UpdateBackupRequest) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequestOrBuilder.java index bc5102834a..ee8c3d4eb6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateBackupRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateBackupRequest) @@ -32,7 +34,7 @@ public interface UpdateBackupRequestOrBuilder * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -41,6 +43,7 @@ public interface UpdateBackupRequestOrBuilder * @return Whether the backup field is set. */ boolean hasBackup(); + /** * * @@ -49,7 +52,7 @@ public interface UpdateBackupRequestOrBuilder * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -58,6 +61,7 @@ public interface UpdateBackupRequestOrBuilder * @return The backup. */ com.google.bigtable.admin.v2.Backup getBackup(); + /** * * @@ -66,7 +70,7 @@ public interface UpdateBackupRequestOrBuilder * 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.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -91,6 +95,7 @@ public interface UpdateBackupRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -108,6 +113,7 @@ public interface UpdateBackupRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java index 18ca2f8282..7ceddedbd9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateClusterMetadata} */ -public final class UpdateClusterMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateClusterMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateClusterMetadata) UpdateClusterMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateClusterMetadata"); + } + // Use UpdateClusterMetadata.newBuilder() to construct. - private UpdateClusterMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateClusterMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateClusterMetadata() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateClusterMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Cluster originalRequest_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +105,7 @@ public com.google.bigtable.admin.v2.Cluster getOriginalRequest() { ? com.google.bigtable.admin.v2.Cluster.getDefaultInstance() : originalRequest_; } + /** * * @@ -114,6 +124,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -129,6 +140,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -144,6 +156,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -160,6 +173,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -175,6 +189,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -190,6 +205,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -338,38 +354,38 @@ public static com.google.bigtable.admin.v2.UpdateClusterMetadata parseFrom( public static com.google.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata 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); } @@ -392,10 +408,11 @@ 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; } + /** * * @@ -405,7 +422,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateClusterMetadata} */ - 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.bigtable.admin.v2.UpdateClusterMetadata) com.google.bigtable.admin.v2.UpdateClusterMetadataOrBuilder { @@ -415,7 +432,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_fieldAccessorTable @@ -429,16 +446,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -515,39 +532,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateClusterMetadata 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.bigtable.admin.v2.UpdateClusterMetadata) { @@ -598,19 +582,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -634,11 +621,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Cluster originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> originalRequestBuilder_; + /** * * @@ -653,6 +641,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -673,6 +662,7 @@ public com.google.bigtable.admin.v2.Cluster getOriginalRequest() { return originalRequestBuilder_.getMessage(); } } + /** * * @@ -695,6 +685,7 @@ public Builder setOriginalRequest(com.google.bigtable.admin.v2.Cluster value) { onChanged(); return this; } + /** * * @@ -715,6 +706,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -742,6 +734,7 @@ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.Cluster value) } return this; } + /** * * @@ -761,6 +754,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -773,8 +767,9 @@ public Builder clearOriginalRequest() { public com.google.bigtable.admin.v2.Cluster.Builder getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -793,6 +788,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder : originalRequest_; } } + /** * * @@ -802,14 +798,14 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder * * .google.bigtable.admin.v2.Cluster original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Cluster, com.google.bigtable.admin.v2.Cluster.Builder, com.google.bigtable.admin.v2.ClusterOrBuilder>( @@ -820,11 +816,12 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -839,6 +836,7 @@ public com.google.bigtable.admin.v2.ClusterOrBuilder getOriginalRequestOrBuilder public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -859,6 +857,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -881,6 +880,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -900,6 +900,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -927,6 +928,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -946,6 +948,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -958,8 +961,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -978,6 +982,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -987,14 +992,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1005,11 +1010,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1024,6 +1030,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1044,6 +1051,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1066,6 +1074,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1085,6 +1094,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1112,6 +1122,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1131,6 +1142,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1143,8 +1155,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1163,6 +1176,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1172,14 +1186,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1189,17 +1203,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateClusterMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadataOrBuilder.java index ae050fc122..c78882a254 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateClusterMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateClusterMetadata) @@ -36,6 +38,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +51,7 @@ public interface UpdateClusterMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.Cluster getOriginalRequest(); + /** * * @@ -71,6 +75,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +88,7 @@ public interface UpdateClusterMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +112,7 @@ public interface UpdateClusterMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +125,7 @@ public interface UpdateClusterMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java index 5db221a33a..f20fd29125 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.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); } private UpdateInstanceMetadata() {} - @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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.PartialUpdateInstanceRequest originalRequest_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -96,6 +105,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ ? com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.getDefaultInstance() : originalRequest_; } + /** * * @@ -115,6 +125,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ public static final int REQUEST_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp requestTime_; + /** * * @@ -130,6 +141,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -145,6 +157,7 @@ public boolean hasRequestTime() { public com.google.protobuf.Timestamp getRequestTime() { return requestTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : requestTime_; } + /** * * @@ -161,6 +174,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public static final int FINISH_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp finishTime_; + /** * * @@ -176,6 +190,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -191,6 +206,7 @@ public boolean hasFinishTime() { public com.google.protobuf.Timestamp getFinishTime() { return finishTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : finishTime_; } + /** * * @@ -339,38 +355,38 @@ public static com.google.bigtable.admin.v2.UpdateInstanceMetadata parseFrom( public static com.google.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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.bigtable.admin.v2.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); } @@ -393,10 +409,11 @@ 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 +423,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.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.bigtable.admin.v2.UpdateInstanceMetadata) com.google.bigtable.admin.v2.UpdateInstanceMetadataOrBuilder { @@ -416,7 +433,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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_fieldAccessorTable @@ -430,16 +447,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) { - getOriginalRequestFieldBuilder(); - getRequestTimeFieldBuilder(); - getFinishTimeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetRequestTimeFieldBuilder(); + internalGetFinishTimeFieldBuilder(); } } @@ -516,39 +533,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateInstanceMetadata 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.bigtable.admin.v2.UpdateInstanceMetadata) { @@ -599,19 +583,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFinishTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -635,11 +622,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.PartialUpdateInstanceRequest originalRequest_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateInstanceRequest, com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateInstanceRequestOrBuilder> originalRequestBuilder_; + /** * * @@ -654,6 +642,7 @@ public Builder mergeFrom( public boolean hasOriginalRequest() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -674,6 +663,7 @@ public com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequ return originalRequestBuilder_.getMessage(); } } + /** * * @@ -697,6 +687,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -717,6 +708,7 @@ public Builder setOriginalRequest( onChanged(); return this; } + /** * * @@ -746,6 +738,7 @@ public Builder mergeOriginalRequest( } return this; } + /** * * @@ -765,6 +758,7 @@ public Builder clearOriginalRequest() { onChanged(); return this; } + /** * * @@ -778,8 +772,9 @@ public Builder clearOriginalRequest() { getOriginalRequestBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getOriginalRequestFieldBuilder().getBuilder(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); } + /** * * @@ -799,6 +794,7 @@ public Builder clearOriginalRequest() { : originalRequest_; } } + /** * * @@ -808,14 +804,14 @@ public Builder clearOriginalRequest() { * * .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateInstanceRequest, com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateInstanceRequestOrBuilder> - getOriginalRequestFieldBuilder() { + internalGetOriginalRequestFieldBuilder() { if (originalRequestBuilder_ == null) { originalRequestBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.PartialUpdateInstanceRequest, com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.Builder, com.google.bigtable.admin.v2.PartialUpdateInstanceRequestOrBuilder>( @@ -826,11 +822,12 @@ public Builder clearOriginalRequest() { } private com.google.protobuf.Timestamp requestTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> requestTimeBuilder_; + /** * * @@ -845,6 +842,7 @@ public Builder clearOriginalRequest() { public boolean hasRequestTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -865,6 +863,7 @@ public com.google.protobuf.Timestamp getRequestTime() { return requestTimeBuilder_.getMessage(); } } + /** * * @@ -887,6 +886,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -906,6 +906,7 @@ public Builder setRequestTime(com.google.protobuf.Timestamp.Builder builderForVa onChanged(); return this; } + /** * * @@ -933,6 +934,7 @@ public Builder mergeRequestTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -952,6 +954,7 @@ public Builder clearRequestTime() { onChanged(); return this; } + /** * * @@ -964,8 +967,9 @@ public Builder clearRequestTime() { public com.google.protobuf.Timestamp.Builder getRequestTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestTimeFieldBuilder().getBuilder(); + return internalGetRequestTimeFieldBuilder().getBuilder(); } + /** * * @@ -984,6 +988,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { : requestTime_; } } + /** * * @@ -993,14 +998,14 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { * * .google.protobuf.Timestamp request_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> - getRequestTimeFieldBuilder() { + internalGetRequestTimeFieldBuilder() { if (requestTimeBuilder_ == null) { requestTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1011,11 +1016,12 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { } private com.google.protobuf.Timestamp finishTime_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> finishTimeBuilder_; + /** * * @@ -1030,6 +1036,7 @@ public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder() { public boolean hasFinishTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1050,6 +1057,7 @@ public com.google.protobuf.Timestamp getFinishTime() { return finishTimeBuilder_.getMessage(); } } + /** * * @@ -1072,6 +1080,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -1091,6 +1100,7 @@ public Builder setFinishTime(com.google.protobuf.Timestamp.Builder builderForVal onChanged(); return this; } + /** * * @@ -1118,6 +1128,7 @@ public Builder mergeFinishTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1137,6 +1148,7 @@ public Builder clearFinishTime() { onChanged(); return this; } + /** * * @@ -1149,8 +1161,9 @@ public Builder clearFinishTime() { public com.google.protobuf.Timestamp.Builder getFinishTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFinishTimeFieldBuilder().getBuilder(); + return internalGetFinishTimeFieldBuilder().getBuilder(); } + /** * * @@ -1169,6 +1182,7 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { : finishTime_; } } + /** * * @@ -1178,14 +1192,14 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { * * .google.protobuf.Timestamp finish_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> - getFinishTimeFieldBuilder() { + internalGetFinishTimeFieldBuilder() { if (finishTimeBuilder_ == null) { finishTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1195,17 +1209,6 @@ public com.google.protobuf.TimestampOrBuilder getFinishTimeOrBuilder() { return finishTimeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateInstanceMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadataOrBuilder.java index e32f45f624..bad74afac7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateInstanceMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateInstanceMetadata) @@ -36,6 +38,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the originalRequest field is set. */ boolean hasOriginalRequest(); + /** * * @@ -48,6 +51,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return The originalRequest. */ com.google.bigtable.admin.v2.PartialUpdateInstanceRequest getOriginalRequest(); + /** * * @@ -71,6 +75,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the requestTime field is set. */ boolean hasRequestTime(); + /** * * @@ -83,6 +88,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return The requestTime. */ com.google.protobuf.Timestamp getRequestTime(); + /** * * @@ -106,6 +112,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return Whether the finishTime field is set. */ boolean hasFinishTime(); + /** * * @@ -118,6 +125,7 @@ public interface UpdateInstanceMetadataOrBuilder * @return The finishTime. */ com.google.protobuf.Timestamp getFinishTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadata.java new file mode 100644 index 0000000000..3917774755 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadata.java @@ -0,0 +1,1263 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by UpdateLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewMetadata} + */ +@com.google.protobuf.Generated +public final class UpdateLogicalViewMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + UpdateLogicalViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateLogicalViewMetadata"); + } + + // Use UpdateLogicalViewMetadata.newBuilder() to construct. + private UpdateLogicalViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateLogicalViewMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.class, + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.Builder.class); + } + + private int bitField0_; + public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.UpdateLogicalViewRequest originalRequest_; + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + @java.lang.Override + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest getOriginalRequest() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder + getOriginalRequestOrBuilder() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.UpdateLogicalViewMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata other = + (com.google.bigtable.admin.v2.UpdateLogicalViewMetadata) obj; + + if (hasOriginalRequest() != other.hasOriginalRequest()) return false; + if (hasOriginalRequest()) { + if (!getOriginalRequest().equals(other.getOriginalRequest())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!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 (hasOriginalRequest()) { + hash = (37 * hash) + ORIGINAL_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getOriginalRequest().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata 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.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata 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.bigtable.admin.v2.UpdateLogicalViewMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata 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.bigtable.admin.v2.UpdateLogicalViewMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata 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.bigtable.admin.v2.UpdateLogicalViewMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by UpdateLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + com.google.bigtable.admin.v2.UpdateLogicalViewMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.class, + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewMetadata build() { + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewMetadata buildPartial() { + com.google.bigtable.admin.v2.UpdateLogicalViewMetadata result = + new com.google.bigtable.admin.v2.UpdateLogicalViewMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateLogicalViewMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.originalRequest_ = + originalRequestBuilder_ == null ? originalRequest_ : originalRequestBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateLogicalViewMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateLogicalViewMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateLogicalViewMetadata other) { + if (other == com.google.bigtable.admin.v2.UpdateLogicalViewMetadata.getDefaultInstance()) + return this; + if (other.hasOriginalRequest()) { + mergeOriginalRequest(other.getOriginalRequest()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.UpdateLogicalViewRequest originalRequest_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder> + originalRequestBuilder_; + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest getOriginalRequest() { + if (originalRequestBuilder_ == null) { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } else { + return originalRequestBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public Builder setOriginalRequest(com.google.bigtable.admin.v2.UpdateLogicalViewRequest value) { + if (originalRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalRequest_ = value; + } else { + originalRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder builderForValue) { + if (originalRequestBuilder_ == null) { + originalRequest_ = builderForValue.build(); + } else { + originalRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public Builder mergeOriginalRequest( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest value) { + if (originalRequestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && originalRequest_ != null + && originalRequest_ + != com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance()) { + getOriginalRequestBuilder().mergeFrom(value); + } else { + originalRequest_ = value; + } + } else { + originalRequestBuilder_.mergeFrom(value); + } + if (originalRequest_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public Builder clearOriginalRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder + getOriginalRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder + getOriginalRequestOrBuilder() { + if (originalRequestBuilder_ != null) { + return originalRequestBuilder_.getMessageOrBuilder(); + } else { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance() + : originalRequest_; + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateLogicalView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder> + internalGetOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateLogicalViewRequest, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder>( + getOriginalRequest(), getParentForChildren(), isClean()); + originalRequest_ = null; + } + return originalRequestBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + private static final com.google.bigtable.admin.v2.UpdateLogicalViewMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateLogicalViewMetadata(); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLogicalViewMetadata 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.bigtable.admin.v2.UpdateLogicalViewMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadataOrBuilder.java new file mode 100644 index 0000000000..fa959e16cc --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewMetadataOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateLogicalViewMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateLogicalViewMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + boolean hasOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + * + * @return The originalRequest. + */ + com.google.bigtable.admin.v2.UpdateLogicalViewRequest getOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateLogicalView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateLogicalViewRequest original_request = 1; + */ + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder getOriginalRequestOrBuilder(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequest.java new file mode 100644 index 0000000000..1c5587f231 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequest.java @@ -0,0 +1,1062 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.UpdateLogicalView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewRequest} + */ +@com.google.protobuf.Generated +public final class UpdateLogicalViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateLogicalViewRequest) + UpdateLogicalViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateLogicalViewRequest"); + } + + // Use UpdateLogicalViewRequest.newBuilder() to construct. + private UpdateLogicalViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateLogicalViewRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.class, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder.class); + } + + private int bitField0_; + public static final int LOGICAL_VIEW_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.LogicalView logicalView_; + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + @java.lang.Override + public boolean hasLogicalView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalView getLogicalView() { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder() { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLogicalView()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLogicalView()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.bigtable.admin.v2.UpdateLogicalViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateLogicalViewRequest other = + (com.google.bigtable.admin.v2.UpdateLogicalViewRequest) obj; + + if (hasLogicalView() != other.hasLogicalView()) return false; + if (hasLogicalView()) { + if (!getLogicalView().equals(other.getLogicalView())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasLogicalView()) { + hash = (37 * hash) + LOGICAL_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getLogicalView().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest 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.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest 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.bigtable.admin.v2.UpdateLogicalViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest 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.bigtable.admin.v2.UpdateLogicalViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest 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.bigtable.admin.v2.UpdateLogicalViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.UpdateLogicalView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateLogicalViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateLogicalViewRequest) + com.google.bigtable.admin.v2.UpdateLogicalViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.class, + com.google.bigtable.admin.v2.UpdateLogicalViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateLogicalViewRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLogicalViewFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + logicalView_ = null; + if (logicalViewBuilder_ != null) { + logicalViewBuilder_.dispose(); + logicalViewBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateLogicalViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest build() { + com.google.bigtable.admin.v2.UpdateLogicalViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateLogicalViewRequest buildPartial() { + com.google.bigtable.admin.v2.UpdateLogicalViewRequest result = + new com.google.bigtable.admin.v2.UpdateLogicalViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateLogicalViewRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.logicalView_ = + logicalViewBuilder_ == null ? logicalView_ : logicalViewBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateLogicalViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateLogicalViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateLogicalViewRequest other) { + if (other == com.google.bigtable.admin.v2.UpdateLogicalViewRequest.getDefaultInstance()) + return this; + if (other.hasLogicalView()) { + mergeLogicalView(other.getLogicalView()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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( + internalGetLogicalViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.LogicalView logicalView_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + logicalViewBuilder_; + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + public boolean hasLogicalView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + public com.google.bigtable.admin.v2.LogicalView getLogicalView() { + if (logicalViewBuilder_ == null) { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } else { + return logicalViewBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLogicalView(com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logicalView_ = value; + } else { + logicalViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLogicalView( + com.google.bigtable.admin.v2.LogicalView.Builder builderForValue) { + if (logicalViewBuilder_ == null) { + logicalView_ = builderForValue.build(); + } else { + logicalViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLogicalView(com.google.bigtable.admin.v2.LogicalView value) { + if (logicalViewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && logicalView_ != null + && logicalView_ != com.google.bigtable.admin.v2.LogicalView.getDefaultInstance()) { + getLogicalViewBuilder().mergeFrom(value); + } else { + logicalView_ = value; + } + } else { + logicalViewBuilder_.mergeFrom(value); + } + if (logicalView_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLogicalView() { + bitField0_ = (bitField0_ & ~0x00000001); + logicalView_ = null; + if (logicalViewBuilder_ != null) { + logicalViewBuilder_.dispose(); + logicalViewBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.LogicalView.Builder getLogicalViewBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLogicalViewFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder() { + if (logicalViewBuilder_ != null) { + return logicalViewBuilder_.getMessageOrBuilder(); + } else { + return logicalView_ == null + ? com.google.bigtable.admin.v2.LogicalView.getDefaultInstance() + : logicalView_; + } + } + + /** + * + * + *
      +     * Required. The logical view to update.
      +     *
      +     * The logical view's `name` field is used to identify the view to update.
      +     * Format:
      +     * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder> + internalGetLogicalViewFieldBuilder() { + if (logicalViewBuilder_ == null) { + logicalViewBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.LogicalView, + com.google.bigtable.admin.v2.LogicalView.Builder, + com.google.bigtable.admin.v2.LogicalViewOrBuilder>( + getLogicalView(), getParentForChildren(), isClean()); + logicalView_ = null; + } + return logicalViewBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateLogicalViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateLogicalViewRequest) + private static final com.google.bigtable.admin.v2.UpdateLogicalViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateLogicalViewRequest(); + } + + public static com.google.bigtable.admin.v2.UpdateLogicalViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLogicalViewRequest 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.bigtable.admin.v2.UpdateLogicalViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequestOrBuilder.java new file mode 100644 index 0000000000..32369b623d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateLogicalViewRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateLogicalViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateLogicalViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the logicalView field is set. + */ + boolean hasLogicalView(); + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The logicalView. + */ + com.google.bigtable.admin.v2.LogicalView getLogicalView(); + + /** + * + * + *
      +   * Required. The logical view to update.
      +   *
      +   * The logical view's `name` field is used to identify the view to update.
      +   * Format:
      +   * `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.LogicalView logical_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.LogicalViewOrBuilder getLogicalViewOrBuilder(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadata.java new file mode 100644 index 0000000000..ed4e1c5756 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadata.java @@ -0,0 +1,1265 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by UpdateMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewMetadata} + */ +@com.google.protobuf.Generated +public final class UpdateMaterializedViewMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + UpdateMaterializedViewMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateMaterializedViewMetadata"); + } + + // Use UpdateMaterializedViewMetadata.newBuilder() to construct. + private UpdateMaterializedViewMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateMaterializedViewMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.class, + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.Builder.class); + } + + private int bitField0_; + public static final int ORIGINAL_REQUEST_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.UpdateMaterializedViewRequest originalRequest_; + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + @java.lang.Override + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest getOriginalRequest() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder + getOriginalRequestOrBuilder() { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOriginalRequest()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.UpdateMaterializedViewMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata other = + (com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata) obj; + + if (hasOriginalRequest() != other.hasOriginalRequest()) return false; + if (hasOriginalRequest()) { + if (!getOriginalRequest().equals(other.getOriginalRequest())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!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 (hasOriginalRequest()) { + hash = (37 * hash) + ORIGINAL_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getOriginalRequest().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata 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.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata 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.bigtable.admin.v2.UpdateMaterializedViewMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata 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.bigtable.admin.v2.UpdateMaterializedViewMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata 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.bigtable.admin.v2.UpdateMaterializedViewMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by UpdateMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.class, + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOriginalRequestFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata build() { + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata buildPartial() { + com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata result = + new com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.originalRequest_ = + originalRequestBuilder_ == null ? originalRequest_ : originalRequestBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata other) { + if (other == com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata.getDefaultInstance()) + return this; + if (other.hasOriginalRequest()) { + mergeOriginalRequest(other.getOriginalRequest()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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( + internalGetOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.UpdateMaterializedViewRequest originalRequest_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder> + originalRequestBuilder_; + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + public boolean hasOriginalRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest getOriginalRequest() { + if (originalRequestBuilder_ == null) { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } else { + return originalRequestBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest value) { + if (originalRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalRequest_ = value; + } else { + originalRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public Builder setOriginalRequest( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder builderForValue) { + if (originalRequestBuilder_ == null) { + originalRequest_ = builderForValue.build(); + } else { + originalRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public Builder mergeOriginalRequest( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest value) { + if (originalRequestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && originalRequest_ != null + && originalRequest_ + != com.google.bigtable.admin.v2.UpdateMaterializedViewRequest + .getDefaultInstance()) { + getOriginalRequestBuilder().mergeFrom(value); + } else { + originalRequest_ = value; + } + } else { + originalRequestBuilder_.mergeFrom(value); + } + if (originalRequest_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public Builder clearOriginalRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + originalRequest_ = null; + if (originalRequestBuilder_ != null) { + originalRequestBuilder_.dispose(); + originalRequestBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder + getOriginalRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOriginalRequestFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder + getOriginalRequestOrBuilder() { + if (originalRequestBuilder_ != null) { + return originalRequestBuilder_.getMessageOrBuilder(); + } else { + return originalRequest_ == null + ? com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance() + : originalRequest_; + } + } + + /** + * + * + *
      +     * The request that prompted the initiation of this UpdateMaterializedView
      +     * operation.
      +     * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder> + internalGetOriginalRequestFieldBuilder() { + if (originalRequestBuilder_ == null) { + originalRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder>( + getOriginalRequest(), getParentForChildren(), isClean()); + originalRequest_ = null; + } + return originalRequestBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation was started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + private static final com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata(); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMaterializedViewMetadata 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.bigtable.admin.v2.UpdateMaterializedViewMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadataOrBuilder.java new file mode 100644 index 0000000000..efa2fcbd51 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewMetadataOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateMaterializedViewMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateMaterializedViewMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return Whether the originalRequest field is set. + */ + boolean hasOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + * + * @return The originalRequest. + */ + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest getOriginalRequest(); + + /** + * + * + *
      +   * The request that prompted the initiation of this UpdateMaterializedView
      +   * operation.
      +   * 
      + * + * .google.bigtable.admin.v2.UpdateMaterializedViewRequest original_request = 1; + */ + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder getOriginalRequestOrBuilder(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation was started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequest.java new file mode 100644 index 0000000000..4b779d8fc5 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequest.java @@ -0,0 +1,1063 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * Request message for BigtableInstanceAdmin.UpdateMaterializedView.
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class UpdateMaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + UpdateMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateMaterializedViewRequest"); + } + + // Use UpdateMaterializedViewRequest.newBuilder() to construct. + private UpdateMaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateMaterializedViewRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.class, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder.class); + } + + private int bitField0_; + public static final int MATERIALIZED_VIEW_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.MaterializedView materializedView_; + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + @java.lang.Override + public boolean hasMaterializedView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView() { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder() { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMaterializedView()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMaterializedView()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.bigtable.admin.v2.UpdateMaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest other = + (com.google.bigtable.admin.v2.UpdateMaterializedViewRequest) obj; + + if (hasMaterializedView() != other.hasMaterializedView()) return false; + if (hasMaterializedView()) { + if (!getMaterializedView().equals(other.getMaterializedView())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasMaterializedView()) { + hash = (37 * hash) + MATERIALIZED_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedView().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest 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.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest 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.bigtable.admin.v2.UpdateMaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest 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.bigtable.admin.v2.UpdateMaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest 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.bigtable.admin.v2.UpdateMaterializedViewRequest 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; + } + + /** + * + * + *
      +   * Request message for BigtableInstanceAdmin.UpdateMaterializedView.
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateMaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + com.google.bigtable.admin.v2.UpdateMaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.class, + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMaterializedViewFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + materializedView_ = null; + if (materializedViewBuilder_ != null) { + materializedViewBuilder_.dispose(); + materializedViewBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableInstanceAdminProto + .internal_static_google_bigtable_admin_v2_UpdateMaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest build() { + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateMaterializedViewRequest buildPartial() { + com.google.bigtable.admin.v2.UpdateMaterializedViewRequest result = + new com.google.bigtable.admin.v2.UpdateMaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateMaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.materializedView_ = + materializedViewBuilder_ == null ? materializedView_ : materializedViewBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateMaterializedViewRequest) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateMaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateMaterializedViewRequest other) { + if (other == com.google.bigtable.admin.v2.UpdateMaterializedViewRequest.getDefaultInstance()) + return this; + if (other.hasMaterializedView()) { + mergeMaterializedView(other.getMaterializedView()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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( + internalGetMaterializedViewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.admin.v2.MaterializedView materializedView_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + materializedViewBuilder_; + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + public boolean hasMaterializedView() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + public com.google.bigtable.admin.v2.MaterializedView getMaterializedView() { + if (materializedViewBuilder_ == null) { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } else { + return materializedViewBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaterializedView(com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + materializedView_ = value; + } else { + materializedViewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMaterializedView( + com.google.bigtable.admin.v2.MaterializedView.Builder builderForValue) { + if (materializedViewBuilder_ == null) { + materializedView_ = builderForValue.build(); + } else { + materializedViewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMaterializedView(com.google.bigtable.admin.v2.MaterializedView value) { + if (materializedViewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && materializedView_ != null + && materializedView_ + != com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance()) { + getMaterializedViewBuilder().mergeFrom(value); + } else { + materializedView_ = value; + } + } else { + materializedViewBuilder_.mergeFrom(value); + } + if (materializedView_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMaterializedView() { + bitField0_ = (bitField0_ & ~0x00000001); + materializedView_ = null; + if (materializedViewBuilder_ != null) { + materializedViewBuilder_.dispose(); + materializedViewBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.MaterializedView.Builder getMaterializedViewBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetMaterializedViewFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder() { + if (materializedViewBuilder_ != null) { + return materializedViewBuilder_.getMessageOrBuilder(); + } else { + return materializedView_ == null + ? com.google.bigtable.admin.v2.MaterializedView.getDefaultInstance() + : materializedView_; + } + } + + /** + * + * + *
      +     * Required. The materialized view to update.
      +     *
      +     * The materialized view's `name` field is used to identify the view to
      +     * update. Format:
      +     * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +     * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder> + internalGetMaterializedViewFieldBuilder() { + if (materializedViewBuilder_ == null) { + materializedViewBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.MaterializedView, + com.google.bigtable.admin.v2.MaterializedView.Builder, + com.google.bigtable.admin.v2.MaterializedViewOrBuilder>( + getMaterializedView(), getParentForChildren(), isClean()); + materializedView_ = null; + } + return materializedViewBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + private static final com.google.bigtable.admin.v2.UpdateMaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateMaterializedViewRequest(); + } + + public static com.google.bigtable.admin.v2.UpdateMaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMaterializedViewRequest 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.bigtable.admin.v2.UpdateMaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..624d0b7155 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateMaterializedViewRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_instance_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateMaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateMaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the materializedView field is set. + */ + boolean hasMaterializedView(); + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The materializedView. + */ + com.google.bigtable.admin.v2.MaterializedView getMaterializedView(); + + /** + * + * + *
      +   * Required. The materialized view to update.
      +   *
      +   * The materialized view's `name` field is used to identify the view to
      +   * update. Format:
      +   * `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
      +   * 
      + * + * + * .google.bigtable.admin.v2.MaterializedView materialized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.MaterializedViewOrBuilder getMaterializedViewOrBuilder(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadata.java new file mode 100644 index 0000000000..38250e4c02 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadata.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The metadata for the Operation returned by
      + * [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateSchemaBundleMetadata} + */ +@com.google.protobuf.Generated +public final class UpdateSchemaBundleMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + UpdateSchemaBundleMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSchemaBundleMetadata"); + } + + // Use UpdateSchemaBundleMetadata.newBuilder() to construct. + private UpdateSchemaBundleMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSchemaBundleMetadata() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.class, + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + 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.bigtable.admin.v2.UpdateSchemaBundleMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata other = + (com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata 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.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata 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.bigtable.admin.v2.UpdateSchemaBundleMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata 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.bigtable.admin.v2.UpdateSchemaBundleMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata 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.bigtable.admin.v2.UpdateSchemaBundleMetadata 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; + } + + /** + * + * + *
      +   * The metadata for the Operation returned by
      +   * [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateSchemaBundleMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.class, + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata build() { + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata buildPartial() { + com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata result = + new com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata other) { + if (other == com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +     * The unique name identifying this schema bundle.
      +     * Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
      +     * The time at which this operation started.
      +     * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
      +     * If set, the time at which this operation finished or was canceled.
      +     * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + private static final com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata(); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSchemaBundleMetadata 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.bigtable.admin.v2.UpdateSchemaBundleMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadataOrBuilder.java new file mode 100644 index 0000000000..bf78446362 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleMetadataOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateSchemaBundleMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateSchemaBundleMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
      +   * The unique name identifying this schema bundle.
      +   * Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
      +   * The time at which this operation started.
      +   * 
      + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
      +   * If set, the time at which this operation finished or was canceled.
      +   * 
      + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequest.java new file mode 100644 index 0000000000..20bb973b6a --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequest.java @@ -0,0 +1,1173 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +/** + * + * + *
      + * The request for
      + * [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
      + * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateSchemaBundleRequest} + */ +@com.google.protobuf.Generated +public final class UpdateSchemaBundleRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + UpdateSchemaBundleRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSchemaBundleRequest"); + } + + // Use UpdateSchemaBundleRequest.newBuilder() to construct. + private UpdateSchemaBundleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSchemaBundleRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.class, + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.Builder.class); + } + + private int bitField0_; + public static final int SCHEMA_BUNDLE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.SchemaBundle schemaBundle_; + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + @java.lang.Override + public boolean hasSchemaBundle() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle() { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder() { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; + private boolean ignoreWarnings_ = false; + + /** + * + * + *
      +   * Optional. If set, ignore the safety checks when updating the Schema Bundle.
      +   * The safety checks are:
      +   * - The new Schema Bundle is backwards compatible with the existing Schema
      +   * Bundle.
      +   * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ + @java.lang.Override + public boolean getIgnoreWarnings() { + return ignoreWarnings_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSchemaBundle()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (ignoreWarnings_ != false) { + output.writeBool(3, ignoreWarnings_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSchemaBundle()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (ignoreWarnings_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreWarnings_); + } + 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.bigtable.admin.v2.UpdateSchemaBundleRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest other = + (com.google.bigtable.admin.v2.UpdateSchemaBundleRequest) obj; + + if (hasSchemaBundle() != other.hasSchemaBundle()) return false; + if (hasSchemaBundle()) { + if (!getSchemaBundle().equals(other.getSchemaBundle())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (getIgnoreWarnings() != other.getIgnoreWarnings()) 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 (hasSchemaBundle()) { + hash = (37 * hash) + SCHEMA_BUNDLE_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundle().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest 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.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest 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.bigtable.admin.v2.UpdateSchemaBundleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest 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.bigtable.admin.v2.UpdateSchemaBundleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest 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.bigtable.admin.v2.UpdateSchemaBundleRequest 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; + } + + /** + * + * + *
      +   * The request for
      +   * [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
      +   * 
      + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateSchemaBundleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + com.google.bigtable.admin.v2.UpdateSchemaBundleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.class, + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSchemaBundleFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schemaBundle_ = null; + if (schemaBundleBuilder_ != null) { + schemaBundleBuilder_.dispose(); + schemaBundleBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + ignoreWarnings_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateSchemaBundleRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleRequest build() { + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateSchemaBundleRequest buildPartial() { + com.google.bigtable.admin.v2.UpdateSchemaBundleRequest result = + new com.google.bigtable.admin.v2.UpdateSchemaBundleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.admin.v2.UpdateSchemaBundleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundle_ = + schemaBundleBuilder_ == null ? schemaBundle_ : schemaBundleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreWarnings_ = ignoreWarnings_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateSchemaBundleRequest) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateSchemaBundleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateSchemaBundleRequest other) { + if (other == com.google.bigtable.admin.v2.UpdateSchemaBundleRequest.getDefaultInstance()) + return this; + if (other.hasSchemaBundle()) { + mergeSchemaBundle(other.getSchemaBundle()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.getIgnoreWarnings() != false) { + setIgnoreWarnings(other.getIgnoreWarnings()); + } + 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( + internalGetSchemaBundleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + ignoreWarnings_ = 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 com.google.bigtable.admin.v2.SchemaBundle schemaBundle_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + schemaBundleBuilder_; + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + public boolean hasSchemaBundle() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + public com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle() { + if (schemaBundleBuilder_ == null) { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } else { + return schemaBundleBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchemaBundle(com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schemaBundle_ = value; + } else { + schemaBundleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchemaBundle( + com.google.bigtable.admin.v2.SchemaBundle.Builder builderForValue) { + if (schemaBundleBuilder_ == null) { + schemaBundle_ = builderForValue.build(); + } else { + schemaBundleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSchemaBundle(com.google.bigtable.admin.v2.SchemaBundle value) { + if (schemaBundleBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && schemaBundle_ != null + && schemaBundle_ != com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance()) { + getSchemaBundleBuilder().mergeFrom(value); + } else { + schemaBundle_ = value; + } + } else { + schemaBundleBuilder_.mergeFrom(value); + } + if (schemaBundle_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSchemaBundle() { + bitField0_ = (bitField0_ & ~0x00000001); + schemaBundle_ = null; + if (schemaBundleBuilder_ != null) { + schemaBundleBuilder_.dispose(); + schemaBundleBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.SchemaBundle.Builder getSchemaBundleBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSchemaBundleFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder() { + if (schemaBundleBuilder_ != null) { + return schemaBundleBuilder_.getMessageOrBuilder(); + } else { + return schemaBundle_ == null + ? com.google.bigtable.admin.v2.SchemaBundle.getDefaultInstance() + : schemaBundle_; + } + } + + /** + * + * + *
      +     * Required. The schema bundle to update.
      +     *
      +     * The schema bundle's `name` field is used to identify the schema bundle to
      +     * update. Values are of the form
      +     * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +     * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder> + internalGetSchemaBundleFieldBuilder() { + if (schemaBundleBuilder_ == null) { + schemaBundleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.admin.v2.SchemaBundle, + com.google.bigtable.admin.v2.SchemaBundle.Builder, + com.google.bigtable.admin.v2.SchemaBundleOrBuilder>( + getSchemaBundle(), getParentForChildren(), isClean()); + schemaBundle_ = null; + } + return schemaBundleBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
      +     * Optional. The list of fields to update.
      +     * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private boolean ignoreWarnings_; + + /** + * + * + *
      +     * Optional. If set, ignore the safety checks when updating the Schema Bundle.
      +     * The safety checks are:
      +     * - The new Schema Bundle is backwards compatible with the existing Schema
      +     * Bundle.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ + @java.lang.Override + public boolean getIgnoreWarnings() { + return ignoreWarnings_; + } + + /** + * + * + *
      +     * Optional. If set, ignore the safety checks when updating the Schema Bundle.
      +     * The safety checks are:
      +     * - The new Schema Bundle is backwards compatible with the existing Schema
      +     * Bundle.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreWarnings to set. + * @return This builder for chaining. + */ + public Builder setIgnoreWarnings(boolean value) { + + ignoreWarnings_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. If set, ignore the safety checks when updating the Schema Bundle.
      +     * The safety checks are:
      +     * - The new Schema Bundle is backwards compatible with the existing Schema
      +     * Bundle.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreWarnings() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreWarnings_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + private static final com.google.bigtable.admin.v2.UpdateSchemaBundleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateSchemaBundleRequest(); + } + + public static com.google.bigtable.admin.v2.UpdateSchemaBundleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSchemaBundleRequest 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.bigtable.admin.v2.UpdateSchemaBundleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequestOrBuilder.java new file mode 100644 index 0000000000..80e8ed22df --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateSchemaBundleRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2026 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.admin.v2; + +@com.google.protobuf.Generated +public interface UpdateSchemaBundleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateSchemaBundleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schemaBundle field is set. + */ + boolean hasSchemaBundle(); + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schemaBundle. + */ + com.google.bigtable.admin.v2.SchemaBundle getSchemaBundle(); + + /** + * + * + *
      +   * Required. The schema bundle to update.
      +   *
      +   * The schema bundle's `name` field is used to identify the schema bundle to
      +   * update. Values are of the form
      +   * `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
      +   * 
      + * + * + * .google.bigtable.admin.v2.SchemaBundle schema_bundle = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.SchemaBundleOrBuilder getSchemaBundleOrBuilder(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
      +   * Optional. The list of fields to update.
      +   * 
      + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
      +   * Optional. If set, ignore the safety checks when updating the Schema Bundle.
      +   * The safety checks are:
      +   * - The new Schema Bundle is backwards compatible with the existing Schema
      +   * Bundle.
      +   * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ + boolean getIgnoreWarnings(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java index 1e6c2b00f4..17a344f2b8 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateTableMetadata} */ -public final class UpdateTableMetadata extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateTableMetadata extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableMetadata) UpdateTableMetadataOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateTableMetadata"); + } + // Use UpdateTableMetadata.newBuilder() to construct. - private UpdateTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateTableMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private UpdateTableMetadata() { name_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateTableMetadata(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -92,6 +100,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -118,6 +127,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int START_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp startTime_; + /** * * @@ -133,6 +143,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasStartTime() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -148,6 +159,7 @@ public boolean hasStartTime() { public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } + /** * * @@ -164,6 +176,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public static final int END_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -179,6 +192,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -194,6 +208,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -222,8 +237,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()); @@ -240,8 +255,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()); @@ -337,38 +352,38 @@ public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( public static com.google.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata 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,10 +406,11 @@ 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; } + /** * * @@ -405,7 +421,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateTableMetadata} */ - 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.bigtable.admin.v2.UpdateTableMetadata) com.google.bigtable.admin.v2.UpdateTableMetadataOrBuilder { @@ -415,7 +431,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable @@ -429,15 +445,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(); } } @@ -507,39 +523,6 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata) { @@ -598,13 +581,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 @@ -628,6 +612,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -650,6 +635,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -672,6 +658,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -693,6 +680,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -710,6 +698,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -734,11 +723,12 @@ 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> startTimeBuilder_; + /** * * @@ -753,6 +743,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -771,6 +762,7 @@ public com.google.protobuf.Timestamp getStartTime() { return startTimeBuilder_.getMessage(); } } + /** * * @@ -793,6 +785,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -812,6 +805,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu onChanged(); return this; } + /** * * @@ -839,6 +833,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -858,6 +853,7 @@ public Builder clearStartTime() { onChanged(); return this; } + /** * * @@ -870,8 +866,9 @@ public Builder clearStartTime() { public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -888,6 +885,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } } + /** * * @@ -897,14 +895,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>( @@ -915,11 +913,12 @@ 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> endTimeBuilder_; + /** * * @@ -934,6 +933,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasEndTime() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -952,6 +952,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -974,6 +975,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -993,6 +995,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -1020,6 +1023,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -1039,6 +1043,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -1051,8 +1056,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -1069,6 +1075,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -1078,14 +1085,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>( @@ -1095,17 +1102,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.bigtable.admin.v2.UpdateTableMetadata) } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java index 717f42c09d..4c18c689af 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateTableMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateTableMetadata) @@ -36,6 +38,7 @@ public interface UpdateTableMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface UpdateTableMetadataOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -73,6 +77,7 @@ public interface UpdateTableMetadataOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -96,6 +101,7 @@ public interface UpdateTableMetadataOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -108,6 +114,7 @@ public interface UpdateTableMetadataOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java index bbae399359..64d1b72290 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.admin.v2.UpdateTableRequest} */ -public final class UpdateTableRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class UpdateTableRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableRequest) UpdateTableRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateTableRequest"); + } + // Use UpdateTableRequest.newBuilder() to construct. - private UpdateTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private UpdateTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private UpdateTableRequest() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateTableRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int TABLE_FIELD_NUMBER = 1; private com.google.bigtable.admin.v2.Table table_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +108,7 @@ public boolean hasTable() { public com.google.bigtable.admin.v2.Table getTable() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } + /** * * @@ -117,6 +127,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public static final int UPDATE_MASK_FIELD_NUMBER = 2; private com.google.protobuf.FieldMask updateMask_; + /** * * @@ -130,6 +141,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -144,6 +156,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -157,6 +170,7 @@ public boolean hasUpdateMask() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -171,6 +185,7 @@ public boolean hasUpdateMask() { public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + /** * * @@ -184,6 +199,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -197,6 +213,25 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } + public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3; + private boolean ignoreWarnings_ = false; + + /** + * + * + *
      +   * Optional. If true, ignore safety checks when updating the table.
      +   * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ + @java.lang.Override + public boolean getIgnoreWarnings() { + return ignoreWarnings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -217,6 +252,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getUpdateMask()); } + if (ignoreWarnings_ != false) { + output.writeBool(3, ignoreWarnings_); + } getUnknownFields().writeTo(output); } @@ -232,6 +270,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } + if (ignoreWarnings_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreWarnings_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -256,6 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } + if (getIgnoreWarnings() != other.getIgnoreWarnings()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -275,6 +317,8 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } + hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -317,38 +361,38 @@ public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom( public static com.google.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest 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,10 +415,11 @@ 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; } + /** * * @@ -385,7 +430,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.admin.v2.UpdateTableRequest} */ - 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.bigtable.admin.v2.UpdateTableRequest) com.google.bigtable.admin.v2.UpdateTableRequestOrBuilder { @@ -395,7 +440,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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable @@ -409,15 +454,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) { - getTableFieldBuilder(); - getUpdateMaskFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTableFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); } } @@ -435,6 +480,7 @@ public Builder clear() { updateMaskBuilder_.dispose(); updateMaskBuilder_ = null; } + ignoreWarnings_ = false; return this; } @@ -480,42 +526,12 @@ private void buildPartial0(com.google.bigtable.admin.v2.UpdateTableRequest resul result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreWarnings_ = ignoreWarnings_; + } 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.bigtable.admin.v2.UpdateTableRequest) { @@ -535,6 +551,9 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateTableRequest other) if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } + if (other.getIgnoreWarnings() != false) { + setIgnoreWarnings(other.getIgnoreWarnings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -563,16 +582,23 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getTableFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTableFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 + case 24: + { + ignoreWarnings_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -593,11 +619,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.admin.v2.Table table_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> tableBuilder_; + /** * * @@ -614,6 +641,7 @@ public Builder mergeFrom( public boolean hasTable() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -634,6 +662,7 @@ public com.google.bigtable.admin.v2.Table getTable() { return tableBuilder_.getMessage(); } } + /** * * @@ -658,6 +687,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table value) { onChanged(); return this; } + /** * * @@ -679,6 +709,7 @@ public Builder setTable(com.google.bigtable.admin.v2.Table.Builder builderForVal onChanged(); return this; } + /** * * @@ -708,6 +739,7 @@ public Builder mergeTable(com.google.bigtable.admin.v2.Table value) { } return this; } + /** * * @@ -729,6 +761,7 @@ public Builder clearTable() { onChanged(); return this; } + /** * * @@ -743,8 +776,9 @@ public Builder clearTable() { public com.google.bigtable.admin.v2.Table.Builder getTableBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getTableFieldBuilder().getBuilder(); + return internalGetTableFieldBuilder().getBuilder(); } + /** * * @@ -763,6 +797,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; } } + /** * * @@ -774,14 +809,14 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> - getTableFieldBuilder() { + internalGetTableFieldBuilder() { if (tableBuilder_ == null) { tableBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder>( @@ -792,11 +827,12 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { } 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> updateMaskBuilder_; + /** * * @@ -810,6 +846,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -823,6 +860,7 @@ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { public boolean hasUpdateMask() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -836,6 +874,7 @@ public boolean hasUpdateMask() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -855,6 +894,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { return updateMaskBuilder_.getMessage(); } } + /** * * @@ -868,6 +908,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -889,6 +930,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { onChanged(); return this; } + /** * * @@ -902,6 +944,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -920,6 +963,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal onChanged(); return this; } + /** * * @@ -933,6 +977,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -959,6 +1004,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } return this; } + /** * * @@ -972,6 +1018,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -990,6 +1037,7 @@ public Builder clearUpdateMask() { onChanged(); return this; } + /** * * @@ -1003,6 +1051,7 @@ public Builder clearUpdateMask() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -1014,8 +1063,9 @@ public Builder clearUpdateMask() { public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); } + /** * * @@ -1029,6 +1079,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -1046,6 +1097,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { : updateMask_; } } + /** * * @@ -1059,6 +1111,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -1067,14 +1120,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>( @@ -1084,15 +1137,60 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return updateMaskBuilder_; } + private boolean ignoreWarnings_; + + /** + * + * + *
      +     * Optional. If true, ignore safety checks when updating the table.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getIgnoreWarnings() { + return ignoreWarnings_; } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
      +     * Optional. If true, ignore safety checks when updating the table.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreWarnings to set. + * @return This builder for chaining. + */ + public Builder setIgnoreWarnings(boolean value) { + + ignoreWarnings_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. If true, ignore safety checks when updating the table.
      +     * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreWarnings() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreWarnings_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateTableRequest) diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java index f4555b2b21..c5faaf7d2b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/admin/v2/bigtable_table_admin.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.admin.v2; +@com.google.protobuf.Generated public interface UpdateTableRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateTableRequest) @@ -38,6 +40,7 @@ public interface UpdateTableRequestOrBuilder * @return Whether the table field is set. */ boolean hasTable(); + /** * * @@ -52,6 +55,7 @@ public interface UpdateTableRequestOrBuilder * @return The table. */ com.google.bigtable.admin.v2.Table getTable(); + /** * * @@ -78,6 +82,7 @@ public interface UpdateTableRequestOrBuilder * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -89,6 +94,7 @@ public interface UpdateTableRequestOrBuilder * @return Whether the updateMask field is set. */ boolean hasUpdateMask(); + /** * * @@ -102,6 +108,7 @@ public interface UpdateTableRequestOrBuilder * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -113,6 +120,7 @@ public interface UpdateTableRequestOrBuilder * @return The updateMask. */ com.google.protobuf.FieldMask getUpdateMask(); + /** * * @@ -126,6 +134,7 @@ public interface UpdateTableRequestOrBuilder * * `change_stream_config` * * `change_stream_config.retention_period` * * `deletion_protection` + * * `row_key_schema` * * If `column_families` is set in `update_mask`, it will return an * UNIMPLEMENTED error. @@ -135,4 +144,17 @@ public interface UpdateTableRequestOrBuilder *
      */ com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
      +   * Optional. If true, ignore safety checks when updating the table.
      +   * 
      + * + * bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreWarnings. + */ + boolean getIgnoreWarnings(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_instance_admin.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_instance_admin.proto index 5e3fe7affe..a800f990da 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_instance_admin.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -252,6 +252,7 @@ service BigtableInstanceAdmin { delete: "/v2/{name=projects/*/instances/*/appProfiles/*}" }; option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,ignore_warnings"; } // Gets the access control policy for an instance resource. Returns an empty @@ -261,6 +262,14 @@ service BigtableInstanceAdmin { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:getIamPolicy" body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:getIamPolicy" + body: "*" + } }; option (google.api.method_signature) = "resource"; } @@ -272,6 +281,14 @@ service BigtableInstanceAdmin { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:setIamPolicy" body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:setIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:setIamPolicy" + body: "*" + } }; option (google.api.method_signature) = "resource,policy"; } @@ -282,6 +299,14 @@ service BigtableInstanceAdmin { option (google.api.http) = { post: "/v2/{resource=projects/*/instances/*}:testIamPermissions" body: "*" + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/materializedViews/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/logicalViews/*}:testIamPermissions" + body: "*" + } }; option (google.api.method_signature) = "resource,permissions"; } @@ -294,6 +319,117 @@ service BigtableInstanceAdmin { }; option (google.api.method_signature) = "parent"; } + + // Creates a logical view within an instance. + rpc CreateLogicalView(CreateLogicalViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/logicalViews" + body: "logical_view" + }; + option (google.api.method_signature) = + "parent,logical_view,logical_view_id"; + option (google.longrunning.operation_info) = { + response_type: "LogicalView" + metadata_type: "CreateLogicalViewMetadata" + }; + } + + // Gets information about a logical view. + rpc GetLogicalView(GetLogicalViewRequest) returns (LogicalView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/logicalViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about logical views in an instance. + rpc ListLogicalViews(ListLogicalViewsRequest) + returns (ListLogicalViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/logicalViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a logical view within an instance. + rpc UpdateLogicalView(UpdateLogicalViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{logical_view.name=projects/*/instances/*/logicalViews/*}" + body: "logical_view" + }; + option (google.api.method_signature) = "logical_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "LogicalView" + metadata_type: "UpdateLogicalViewMetadata" + }; + } + + // Deletes a logical view from an instance. + rpc DeleteLogicalView(DeleteLogicalViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/logicalViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a materialized view within an instance. + rpc CreateMaterializedView(CreateMaterializedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*}/materializedViews" + body: "materialized_view" + }; + option (google.api.method_signature) = + "parent,materialized_view,materialized_view_id"; + option (google.longrunning.operation_info) = { + response_type: "MaterializedView" + metadata_type: "CreateMaterializedViewMetadata" + }; + } + + // Gets information about a materialized view. + rpc GetMaterializedView(GetMaterializedViewRequest) + returns (MaterializedView) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/materializedViews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists information about materialized views in an instance. + rpc ListMaterializedViews(ListMaterializedViewsRequest) + returns (ListMaterializedViewsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*}/materializedViews" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a materialized view within an instance. + rpc UpdateMaterializedView(UpdateMaterializedViewRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{materialized_view.name=projects/*/instances/*/materializedViews/*}" + body: "materialized_view" + }; + option (google.api.method_signature) = "materialized_view,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MaterializedView" + metadata_type: "UpdateMaterializedViewMetadata" + }; + } + + // Deletes a materialized view from an instance. + rpc DeleteMaterializedView(DeleteMaterializedViewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/materializedViews/*}" + }; + option (google.api.method_signature) = "name"; + } } // Request message for BigtableInstanceAdmin.CreateInstance. @@ -320,7 +456,6 @@ message CreateInstanceRequest { // cluster ID, e.g., just `mycluster` rather than // `projects/myproject/instances/myinstance/clusters/mycluster`. // Fields marked `OutputOnly` must be left blank. - // Currently, at most four clusters can be specified. map clusters = 4 [(google.api.field_behavior) = REQUIRED]; } @@ -749,3 +884,254 @@ message ListHotTabletsResponse { // page of results. string next_page_token = 2; } + +// Request message for BigtableInstanceAdmin.CreateLogicalView. +message CreateLogicalViewRequest { + // Required. The parent instance where this logical view will be created. + // Format: `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to use for the logical view, which will become the final + // component of the logical view's resource name. + string logical_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical view to create. + LogicalView logical_view = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateLogicalView. +message CreateLogicalViewMetadata { + // The request that prompted the initiation of this CreateLogicalView + // operation. + CreateLogicalViewRequest original_request = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.GetLogicalView. +message GetLogicalViewRequest { + // Required. The unique name of the requested logical view. Values are of the + // form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListLogicalViews. +message ListLogicalViewsRequest { + // Required. The unique name of the instance for which the list of logical + // views is requested. Values are of the form + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; + + // Optional. The maximum number of logical views to return. The service may + // return fewer than this value + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLogicalViews` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListLogicalViews` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for BigtableInstanceAdmin.ListLogicalViews. +message ListLogicalViewsResponse { + // The list of requested logical views. + repeated LogicalView logical_views = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for BigtableInstanceAdmin.UpdateLogicalView. +message UpdateLogicalViewRequest { + // Required. The logical view to update. + // + // The logical view's `name` field is used to identify the view to update. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + LogicalView logical_view = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by UpdateLogicalView. +message UpdateLogicalViewMetadata { + // The request that prompted the initiation of this UpdateLogicalView + // operation. + UpdateLogicalViewRequest original_request = 1; + + // The time at which this operation was started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteLogicalView. +message DeleteLogicalViewRequest { + // Required. The unique name of the logical view to be deleted. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/LogicalView" + } + ]; + + // Optional. The current etag of the logical view. + // If an etag is provided and does not match the current etag of the + // logical view, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for BigtableInstanceAdmin.CreateMaterializedView. +message CreateMaterializedViewRequest { + // Required. The parent instance where this materialized view will be created. + // Format: `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Required. The ID to use for the materialized view, which will become the + // final component of the materialized view's resource name. + string materialized_view_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The materialized view to create. + MaterializedView materialized_view = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by CreateMaterializedView. +message CreateMaterializedViewMetadata { + // The request that prompted the initiation of this CreateMaterializedView + // operation. + CreateMaterializedViewRequest original_request = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.GetMaterializedView. +message GetMaterializedViewRequest { + // Required. The unique name of the requested materialized view. Values are of + // the form + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; +} + +// Request message for BigtableInstanceAdmin.ListMaterializedViews. +message ListMaterializedViewsRequest { + // Required. The unique name of the instance for which the list of + // materialized views is requested. Values are of the form + // `projects/{project}/instances/{instance}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // Optional. The maximum number of materialized views to return. The service + // may return fewer than this value + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListMaterializedViews` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMaterializedViews` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for BigtableInstanceAdmin.ListMaterializedViews. +message ListMaterializedViewsResponse { + // The list of requested materialized views. + repeated MaterializedView materialized_views = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for BigtableInstanceAdmin.UpdateMaterializedView. +message UpdateMaterializedViewRequest { + // Required. The materialized view to update. + // + // The materialized view's `name` field is used to identify the view to + // update. Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + MaterializedView materialized_view = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by UpdateMaterializedView. +message UpdateMaterializedViewMetadata { + // The request that prompted the initiation of this UpdateMaterializedView + // operation. + UpdateMaterializedViewRequest original_request = 1; + + // The time at which this operation was started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// Request message for BigtableInstanceAdmin.DeleteMaterializedView. +message DeleteMaterializedViewRequest { + // Required. The unique name of the materialized view to be deleted. + // Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + + // Optional. The current etag of the materialized view. + // If an etag is provided and does not match the current etag of the + // materialized view, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto index 1fdcefa4a0..6267fa9097 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -389,7 +389,7 @@ service BigtableTableAdmin { }; } - // Gets the access control policy for a Table or Backup resource. + // Gets the access control policy for a Bigtable resource. // Returns an empty policy if the resource exists but does not have a policy // set. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) @@ -401,11 +401,19 @@ service BigtableTableAdmin { post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy" body: "*" } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:getIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:getIamPolicy" + body: "*" + } }; option (google.api.method_signature) = "resource"; } - // Sets the access control policy on a Table or Backup resource. + // Sets the access control policy on a Bigtable resource. // Replaces any existing policy. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { @@ -416,11 +424,19 @@ service BigtableTableAdmin { post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy" body: "*" } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:setIamPolicy" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:setIamPolicy" + body: "*" + } }; option (google.api.method_signature) = "resource,policy"; } - // Returns permissions that the caller has on the specified Table or Backup + // Returns permissions that the caller has on the specified Bigtable // resource. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { @@ -431,9 +447,72 @@ service BigtableTableAdmin { post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions" body: "*" } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/authorizedViews/*}:testIamPermissions" + body: "*" + } + additional_bindings { + post: "/v2/{resource=projects/*/instances/*/tables/*/schemaBundles/*}:testIamPermissions" + body: "*" + } }; option (google.api.method_signature) = "resource,permissions"; } + + // Creates a new schema bundle in the specified table. + rpc CreateSchemaBundle(CreateSchemaBundleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles" + body: "schema_bundle" + }; + option (google.api.method_signature) = + "parent,schema_bundle_id,schema_bundle"; + option (google.longrunning.operation_info) = { + response_type: "SchemaBundle" + metadata_type: "CreateSchemaBundleMetadata" + }; + } + + // Updates a schema bundle in the specified table. + rpc UpdateSchemaBundle(UpdateSchemaBundleRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{schema_bundle.name=projects/*/instances/*/tables/*/schemaBundles/*}" + body: "schema_bundle" + }; + option (google.api.method_signature) = "schema_bundle,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "SchemaBundle" + metadata_type: "UpdateSchemaBundleMetadata" + }; + } + + // Gets metadata information about the specified schema bundle. + rpc GetSchemaBundle(GetSchemaBundleRequest) returns (SchemaBundle) { + option (google.api.http) = { + get: "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all schema bundles associated with the specified table. + rpc ListSchemaBundles(ListSchemaBundlesRequest) + returns (ListSchemaBundlesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/instances/*/tables/*}/schemaBundles" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a schema bundle in the specified table. + rpc DeleteSchemaBundle(DeleteSchemaBundleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/instances/*/tables/*/schemaBundles/*}" + }; + option (google.api.method_signature) = "name"; + } } // The request for @@ -688,11 +767,15 @@ message UpdateTableRequest { // * `change_stream_config` // * `change_stream_config.retention_period` // * `deletion_protection` + // * `row_key_schema` // // If `column_families` is set in `update_mask`, it will return an // UNIMPLEMENTED error. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, ignore safety checks when updating the table. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; } // Metadata type for the operation returned by @@ -1303,7 +1386,8 @@ message CreateAuthorizedViewRequest { // The metadata for the Operation returned by CreateAuthorizedView. message CreateAuthorizedViewMetadata { - // The request that prompted the initiation of this CreateInstance operation. + // The request that prompted the initiation of this CreateAuthorizedView + // operation. CreateAuthorizedViewRequest original_request = 1; // The time at which the original request was received. @@ -1340,8 +1424,8 @@ message ListAuthorizedViewsRequest { // Optional. The value of `next_page_token` returned by a previous call. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The resource_view to be applied to the returned views' fields. - // Default to NAME_ONLY. + // Optional. The resource_view to be applied to the returned AuthorizedViews' + // fields. Default to NAME_ONLY. AuthorizedView.ResponseView view = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1380,8 +1464,8 @@ message GetAuthorizedViewRequest { message UpdateAuthorizedViewRequest { // Required. The AuthorizedView to update. The `name` in `authorized_view` is // used to identify the AuthorizedView. AuthorizedView name must in this - // format - // projects//instances//tables/
  • /authorizedViews/ + // format: + // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. AuthorizedView authorized_view = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The list of fields to update. @@ -1432,3 +1516,145 @@ message DeleteAuthorizedViewRequest { // returned. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } + +// The request for +// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]. +message CreateSchemaBundleRequest { + // Required. The parent resource where this schema bundle will be created. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // Required. The unique ID to use for the schema bundle, which will become the + // final component of the schema bundle's resource name. + string schema_bundle_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schema bundle to create. + SchemaBundle schema_bundle = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The metadata for the Operation returned by +// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]. +message CreateSchemaBundleMetadata { + // The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// The request for +// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]. +message UpdateSchemaBundleRequest { + // Required. The schema bundle to update. + // + // The schema bundle's `name` field is used to identify the schema bundle to + // update. Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + SchemaBundle schema_bundle = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, ignore the safety checks when updating the Schema Bundle. + // The safety checks are: + // - The new Schema Bundle is backwards compatible with the existing Schema + // Bundle. + bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The metadata for the Operation returned by +// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]. +message UpdateSchemaBundleMetadata { + // The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + +// The request for +// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]. +message GetSchemaBundleRequest { + // Required. The unique name of the schema bundle to retrieve. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; +} + +// The request for +// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]. +message ListSchemaBundlesRequest { + // Required. The parent, which owns this collection of schema bundles. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; + + // The maximum number of schema bundles to return. If the value is positive, + // the server may return at most this value. If unspecified, the server will + // return the maximum allowed page size. + int32 page_size = 2; + + // A page token, received from a previous `ListSchemaBundles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListSchemaBundles` must + // match the call that provided the page token. + string page_token = 3; +} + +// The response for +// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]. +message ListSchemaBundlesResponse { + // The schema bundles from the specified table. + repeated SchemaBundle schema_bundles = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The request for +// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]. +message DeleteSchemaBundleRequest { + // Required. The unique name of the schema bundle to delete. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + } + ]; + + // Optional. The etag of the schema bundle. + // If this is provided, it must match the server's etag. The server + // returns an ABORTED error on a mismatched etag. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto index fe28f5fa8f..0503e3f3c4 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 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-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto index 188dae7eba..5baa006a9c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -41,6 +41,8 @@ message Instance { option (google.api.resource) = { type: "bigtableadmin.googleapis.com/Instance" pattern: "projects/{project}/instances/{instance}" + plural: "instances" + singular: "instance" }; // Possible states of an instance. @@ -82,9 +84,8 @@ message Instance { // to avoid confusion. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - // (`OutputOnly`) - // The current state of the instance. - State state = 3; + // Output only. The current state of the instance. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The type of the instance. Defaults to `PRODUCTION`. Type type = 4; @@ -102,14 +103,32 @@ message Instance { // * Keys and values must both be under 128 bytes. map labels = 5; - // Output only. A server-assigned timestamp representing when this Instance - // was created. For instances created before this field was added (August - // 2021), this value is `seconds: 0, nanos: 1`. + // Output only. A commit timestamp representing when this Instance was + // created. For instances created before this field was added (August 2021), + // this value is `seconds: 0, nanos: 1`. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Reserved for future use. optional bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzi = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Input only. Immutable. Tag keys/values directly bound to this + // resource. For example: + // - "123/environment": "production", + // - "123/costCenter": "marketing" + // + // Tags and Labels (above) are both used to bind metadata to resources, with + // different use-cases. See + // https://cloud.google.com/resource-manager/docs/tags/tags-overview for an + // in-depth overview on the difference between tags and labels. + map tags = 12 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // The Autoscaling targets for a Cluster. These determine the recommended nodes. @@ -145,6 +164,8 @@ message Cluster { option (google.api.resource) = { type: "bigtableadmin.googleapis.com/Cluster" pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" + plural: "clusters" + singular: "cluster" }; // Possible states of a cluster. @@ -172,6 +193,21 @@ message Cluster { DISABLED = 4; } + // Possible node scaling factors of the clusters. Node scaling delivers better + // latency and more throughput by removing node boundaries. + enum NodeScalingFactor { + // No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X. + NODE_SCALING_FACTOR_UNSPECIFIED = 0; + + // The cluster is running with a scaling factor of 1. + NODE_SCALING_FACTOR_1X = 1; + + // The cluster is running with a scaling factor of 2. + // All node count values must be in increments of 2 with this scaling factor + // enabled, otherwise an INVALID_ARGUMENT error will be returned. + NODE_SCALING_FACTOR_2X = 2; + } + // Autoscaling config for a cluster. message ClusterAutoscalingConfig { // Required. Autoscaling limits for this cluster. @@ -199,7 +235,6 @@ message Cluster { // `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. // 2) Only regional keys can be used and the region of the CMEK key must // match the region of the cluster. - // 3) All clusters within an instance must use the same CMEK key. // Values are of the form // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` string kms_key_name = 1 [(google.api.resource_reference) = { @@ -225,10 +260,15 @@ message Cluster { // Output only. The current state of the cluster. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number of nodes allocated to this cluster. More nodes enable higher - // throughput and more consistent performance. + // The number of nodes in the cluster. If no value is set, + // Cloud Bigtable automatically allocates nodes based on your data footprint + // and optimized for 50% storage utilization. int32 serve_nodes = 4; + // Immutable. The node scaling factor of this cluster. + NodeScalingFactor node_scaling_factor = 9 + [(google.api.field_behavior) = IMMUTABLE]; + oneof config { // Configuration for this cluster. ClusterConfig cluster_config = 7; @@ -250,6 +290,8 @@ message AppProfile { option (google.api.resource) = { type: "bigtableadmin.googleapis.com/AppProfile" pattern: "projects/{project}/instances/{instance}/appProfiles/{app_profile}" + plural: "appProfiles" + singular: "appProfile" }; // Read/write requests are routed to the nearest cluster in the instance, and @@ -258,9 +300,34 @@ message AppProfile { // equidistant. Choosing this option sacrifices read-your-writes consistency // to improve availability. message MultiClusterRoutingUseAny { + // If enabled, Bigtable will route the request based on the row key of the + // request, rather than randomly. Instead, each row key will be assigned + // to a cluster, and will stick to that cluster. If clusters are added or + // removed, then this may affect which row keys stick to which clusters. + // To avoid this, users can use a cluster group to specify which clusters + // are to be used. In this case, new clusters that are not a part of the + // cluster group will not be routed to, and routing will be unaffected by + // the new cluster. Moreover, clusters specified in the cluster group cannot + // be deleted unless removed from the cluster group. + message RowAffinity {} + // The set of clusters to route to. The order is ignored; clusters will be // tried in order of distance. If left empty, all clusters are eligible. repeated string cluster_ids = 1; + + // Possible algorithms for routing affinity. If enabled, Bigtable will + // route between equidistant clusters in a deterministic order rather than + // choosing randomly. + // + // This mechanism gives read-your-writes consistency for *most* requests + // under *most* circumstances, without sacrificing availability. Consistency + // is *not* guaranteed, as requests might still fail over between clusters + // in the event of errors or latency. + oneof affinity { + // Row affinity sticky routing based on the row key of the request. + // Requests that span multiple rows are routed non-deterministically. + RowAffinity row_affinity = 3; + } } // Unconditionally routes all read/write requests to a specific cluster. @@ -298,17 +365,10 @@ message AppProfile { } // Data Boost is a serverless compute capability that lets you run - // high-throughput read jobs on your Bigtable data, without impacting the - // performance of the clusters that handle your application traffic. - // Currently, Data Boost exclusively supports read-only use-cases with - // single-cluster routing. - // - // Data Boost reads are only guaranteed to see the results of writes that - // were written at least 30 minutes ago. This means newly written values may - // not become visible for up to 30m, and also means that old values may - // remain visible for up to 30m after being deleted or overwritten. To - // mitigate the staleness of the data, users may either wait 30m, or use - // CheckConsistency. + // high-throughput read jobs and queries on your Bigtable data, without + // impacting the performance of the clusters that handle your application + // traffic. Data Boost supports read-only use cases with single-cluster + // routing. message DataBoostIsolationReadOnly { // Compute Billing Owner specifies how usage should be accounted when using // Data Boost. Compute Billing Owner also configures which Cloud Project is @@ -380,6 +440,8 @@ message HotTablet { option (google.api.resource) = { type: "bigtableadmin.googleapis.com/HotTablet" pattern: "projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}" + plural: "hotTablets" + singular: "hotTablet" }; // The unique name of the hot tablet. Values are of the form @@ -412,3 +474,60 @@ message HotTablet { // to 100% (the node spent all cycles serving the hot tablet). float node_cpu_usage_percent = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// A SQL logical view object that can be referenced in SQL queries. +message LogicalView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/LogicalView" + pattern: "projects/{project}/instances/{instance}/logicalViews/{logical_view}" + plural: "logicalViews" + singular: "logicalView" + }; + + // Identifier. The unique name of the logical view. + // Format: + // `projects/{project}/instances/{instance}/logicalViews/{logical_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The logical view's select query. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The etag for this logical view. + // This may be sent on update requests to ensure that the client has an + // up-to-date value before proceeding. The server returns an ABORTED error on + // a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set to true to make the LogicalView protected against deletion. + bool deletion_protection = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A materialized view object that can be referenced in SQL queries. +message MaterializedView { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + pattern: "projects/{project}/instances/{instance}/materializedViews/{materialized_view}" + plural: "materializedViews" + singular: "materializedView" + }; + + // Identifier. The unique name of the materialized view. + // Format: + // `projects/{project}/instances/{instance}/materializedViews/{materialized_view}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The materialized view's select query. + string query = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The etag for this materialized view. + // This may be sent on update requests to ensure that the client has an + // up-to-date value before proceeding. The server returns an ABORTED error on + // a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Set to true to make the MaterializedView protected against deletion. + bool deletion_protection = 6; +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto index b2ef458c83..6da7f8b487 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -145,15 +145,26 @@ message Table { // Defines an automated backup policy for a table message AutomatedBackupPolicy { - // Required. How long the automated backups should be retained. The only - // supported value at this time is 3 days. + // Required. How long the automated backups should be retained. Values must + // be at least 3 days and at most 90 days. google.protobuf.Duration retention_period = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. How frequently automated backups should occur. The only - // supported value at this time is 24 hours. - google.protobuf.Duration frequency = 2 - [(google.api.field_behavior) = REQUIRED]; + // How frequently automated backups should occur. The only supported value + // at this time is 24 hours. An undefined frequency is treated as 24 hours. + google.protobuf.Duration frequency = 2; + + // Optional. A list of Cloud Bigtable zones where automated backups are + // allowed to be created. If empty, automated backups will be created in all + // zones of the instance. Locations are in the format + // `projects/{project}/locations/{zone}`. + // This field can only set for tables in Enterprise Plus instances. + repeated string locations = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; } // The unique name of the table. Values are of the form @@ -204,6 +215,73 @@ message Table { // Otherwise, automated backups are disabled. AutomatedBackupPolicy automated_backup_policy = 13; } + + // Rules to specify what data is stored in each storage tier. + // Different tiers store data differently, providing different trade-offs + // between cost and performance. Different parts of a table can be stored + // separately on different tiers. + // If a config is specified, tiered storage is enabled for this table. + // Otherwise, tiered storage is disabled. + // Only SSD instances can configure tiered storage. + TieredStorageConfig tiered_storage_config = 14; + + // The row key schema for this table. The schema is used to decode the raw row + // key bytes into a structured format. The order of field declarations in this + // schema is important, as it reflects how the raw row key bytes are + // structured. Currently, this only affects how the key is read via a + // GoogleSQL query from the ExecuteQuery API. + // + // For a SQL query, the _key column is still read as raw bytes. But queries + // can reference the key fields by name, which will be decoded from _key using + // provided type and encoding. Queries that reference key fields will fail if + // they encounter an invalid row key. + // + // For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the + // following schema: + // { + // fields { + // field_name: "id" + // type { string { encoding: utf8_bytes {} } } + // } + // fields { + // field_name: "date" + // type { string { encoding: utf8_bytes {} } } + // } + // fields { + // field_name: "product_code" + // type { int64 { encoding: big_endian_bytes {} } } + // } + // encoding { delimited_bytes { delimiter: "#" } } + // } + // + // The decoded key parts would be: + // id = "some_id", date = "2024-04-30", product_code = 1245427 + // The query "SELECT _key, product_code FROM table" will return two columns: + // /------------------------------------------------------\ + // | _key | product_code | + // | --------------------------------------|--------------| + // | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 | + // \------------------------------------------------------/ + // + // The schema has the following invariants: + // (1) The decoded field values are order-preserved. For read, the field + // values will be decoded in sorted mode from the raw bytes. + // (2) Every field in the schema must specify a non-empty name. + // (3) Every field must specify a type with an associated encoding. The type + // is limited to scalar types only: Array, Map, Aggregate, and Struct are not + // allowed. + // (4) The field names must not collide with existing column family + // names and reserved keywords "_key" and "_timestamp". + // + // The following update operations are allowed for row_key_schema: + // - Update from an empty schema to a new schema. + // - Remove the existing schema. This operation requires setting the + // `ignore_warnings` flag to `true`, since it might be a backward + // incompatible change. Without the flag, the update request will fail with + // an INVALID_ARGUMENT error. + // Any other row key schema update operation (e.g. update existing schema + // columns names or types) is currently unsupported. + Type.Struct row_key_schema = 15; } // AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users @@ -579,3 +657,72 @@ enum RestoreSourceType { // A backup was used as the source of the restore. BACKUP = 1; } + +// Config for tiered storage. +// A valid config must have a valid TieredStorageRule. Otherwise the whole +// TieredStorageConfig must be unset. +// By default all data is stored in the SSD tier (only SSD instances can +// configure tiered storage). +message TieredStorageConfig { + // Rule to specify what data is stored in the infrequent access(IA) tier. + // The IA tier allows storing more data per node with reduced performance. + TieredStorageRule infrequent_access = 1; +} + +// Rule to specify what data is stored in a storage tier. +message TieredStorageRule { + // Rules to specify what data is stored in this tier. + oneof rule { + // Include cells older than the given age. + // For the infrequent access tier, this value must be at least 30 days. + google.protobuf.Duration include_if_older_than = 1; + } +} + +// Represents a protobuf schema. +message ProtoSchema { + // Required. Contains a protobuf-serialized + // [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto), + // which could include multiple proto files. + // To generate it, [install](https://grpc.io/docs/protoc-installation/) and + // run `protoc` with + // `--include_imports` and `--descriptor_set_out`. For example, to generate + // for moon/shot/app.proto, run + // ``` + // $protoc --proto_path=/app_path --proto_path=/lib_path \ + // --include_imports \ + // --descriptor_set_out=descriptors.pb \ + // moon/shot/app.proto + // ``` + // For more details, see protobuffer [self + // description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). + bytes proto_descriptors = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A named collection of related schemas. +message SchemaBundle { + option (google.api.resource) = { + type: "bigtableadmin.googleapis.com/SchemaBundle" + pattern: "projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}" + plural: "schemaBundles" + singular: "schemaBundle" + }; + + // Identifier. The unique name identifying this schema bundle. + // Values are of the form + // `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The type of this schema bundle. The oneof case cannot change after + // creation. + oneof type { + // Schema for Protobufs. + ProtoSchema proto_schema = 2; + } + + // Optional. The etag for this schema bundle. + // This may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. The server + // returns an ABORTED error on a mismatched etag. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/types.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/types.proto index 49c50d1767..adafda693b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/types.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/types.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -31,35 +31,34 @@ option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; // familiarity and consistency across products and features. // // For compatibility with Bigtable's existing untyped APIs, each `Type` includes -// an `Encoding` which describes how to convert to/from the underlying data. +// an `Encoding` which describes how to convert to or from the underlying data. // -// Each encoding also defines the following properties: +// Each encoding can operate in one of two modes: // -// * Order-preserving: Does the encoded value sort consistently with the -// original typed value? Note that Bigtable will always sort data based on -// the raw encoded value, *not* the decoded type. -// - Example: BYTES values sort in the same order as their raw encodings. -// - Counterexample: Encoding INT64 as a fixed-width decimal string does -// *not* preserve sort order when dealing with negative numbers. -// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. -// * Self-delimiting: If we concatenate two encoded values, can we always tell -// where the first one ends and the second one begins? -// - Example: If we encode INT64s to fixed-width STRINGs, the first value -// will always contain exactly N digits, possibly preceded by a sign. -// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have -// no way to tell where the first one ends. -// * Compatibility: Which other systems have matching encoding schemes? For -// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` +// if and only if `X <= Y`. This is useful anywhere sort order is important, +// for example when encoding keys. +// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then +// `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For +// example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}" +// are valid encodings of the same JSON value. +// +// The API clearly documents which mode is used wherever an encoding can be +// configured. Each encoding also documents which values are supported in which +// modes. For example, when encoding INT64 as a numeric STRING, negative numbers +// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but +// `STRING("-00001") > STRING("00001")`. message Type { // Bytes // Values of type `Bytes` are stored in `Value.bytes_value`. message Bytes { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { - // Leaves the value "as-is" - // * Order-preserving? Yes - // * Self-delimiting? No - // * Compatibility? N/A + // Leaves the value as-is. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. message Raw {} // Which encoding to use. @@ -69,27 +68,33 @@ message Type { } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } // String // Values of type `String` are stored in `Value.string_value`. message String { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { // Deprecated: prefer the equivalent `Utf8Bytes`. message Utf8Raw { option deprecated = true; } - // UTF-8 encoding - // * Order-preserving? Yes (code point order) - // * Self-delimiting? No - // * Compatibility? - // - BigQuery Federation `TEXT` encoding - // - HBase `Bytes.toBytes` - // - Java `String#getBytes(StandardCharsets.UTF_8)` + // UTF-8 encoding. + // + // Sorted mode: + // - All values are supported. + // - Code point order is preserved. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `TEXT` encoding + // - HBase `Bytes.toBytes` + // - Java `String#getBytes(StandardCharsets.UTF_8)` message Utf8Bytes {} // Which encoding to use. @@ -102,36 +107,50 @@ message Type { } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } // Int64 // Values of type `Int64` are stored in `Value.int_value`. message Int64 { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { - // Encodes the value as an 8-byte big endian twos complement `Bytes` - // value. - // * Order-preserving? No (positive values only) - // * Self-delimiting? Yes - // * Compatibility? - // - BigQuery Federation `BINARY` encoding - // - HBase `Bytes.toBytes` - // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + // Encodes the value as an 8-byte big-endian two's complement value. + // + // Sorted mode: non-negative values are supported. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` message BigEndianBytes { // Deprecated: ignored if set. - Bytes bytes_type = 1; + Bytes bytes_type = 1 [deprecated = true]; } + // Encodes the value in a variable length binary format of up to 10 bytes. + // Values that are closer to zero use fewer bytes. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message OrderedCodeBytes {} + // Which encoding to use. oneof encoding { // Use `BigEndianBytes` encoding. BigEndianBytes big_endian_bytes = 1; + + // Use `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 2; } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } @@ -149,7 +168,24 @@ message Type { // Timestamp // Values of type `Timestamp` are stored in `Value.timestamp_value`. - message Timestamp {} + message Timestamp { + // Rules used to convert to or from lower level types. + message Encoding { + // Which encoding to use. + oneof encoding { + // Encodes the number of microseconds since the Unix epoch using the + // given `Int64` encoding. Values must be microsecond-aligned. + // + // Compatible with: + // + // - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` + Int64.Encoding unix_micros_int64 = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } // Date // Values of type `Date` are stored in `Value.date_value`. @@ -170,8 +206,117 @@ message Type { Type type = 2; } + // Rules used to convert to or from lower level types. + message Encoding { + // Uses the encoding of `fields[0].type` as-is. + // Only valid if `fields.size == 1`. + message Singleton {} + + // Fields are encoded independently and concatenated with a configurable + // `delimiter` in between. + // + // A struct with no fields defined is encoded as a single `delimiter`. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - Encoded field values must not contain any bytes <= `delimiter[0]` + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - Encoded field values must not contain `delimiter[0]`. + message DelimitedBytes { + // Byte sequence used to delimit concatenated fields. The delimiter must + // contain at least 1 character and at most 50 characters. + bytes delimiter = 1; + } + + // Fields are encoded independently and concatenated with the fixed byte + // pair {0x00, 0x01} in between. + // + // Any null (0x00) byte in an encoded field is replaced by the fixed byte + // pair {0x00, 0xFF}. + // + // Fields that encode to the empty string "" have special handling: + // + // - If *every* field encodes to "", or if the STRUCT has no fields + // defined, then the STRUCT is encoded as the fixed byte pair + // {0x00, 0x00}. + // - Otherwise, the STRUCT only encodes until the last non-empty field, + // omitting any trailing empty fields. Any empty fields that aren't + // omitted are replaced with the fixed byte pair {0x00, 0x00}. + // + // Examples: + // + // - STRUCT() -> "\00\00" + // - STRUCT("") -> "\00\00" + // - STRUCT("", "") -> "\00\00" + // - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "") -> "A" + // - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" + // + // + // Since null bytes are always escaped, this encoding can cause size + // blowup for encodings like `Int64.BigEndianBytes` that are likely to + // produce many such bytes. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - All values supported by the field encodings are allowed + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - All values supported by the field encodings are allowed. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `Singleton` encoding. + Singleton singleton = 1; + + // Use `DelimitedBytes` encoding. + DelimitedBytes delimited_bytes = 2; + + // User `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 3; + } + } + // The names and types of the fields in this struct. repeated Field fields = 1; + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 2; + } + + // A protobuf message type. + // Values of type `Proto` are stored in `Value.bytes_value`. + message Proto { + // The ID of the schema bundle that this proto is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf message, including package. In + // the format of "foo.bar.Message". + string message_name = 2; + } + + // A protobuf enum type. + // Values of type `Enum` are stored in `Value.int_value`. + message Enum { + // The ID of the schema bundle that this enum is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf enum message, including package. + // In the format of "foo.bar.EnumMessage". + string enum_name = 2; } // An ordered list of elements of a given type. @@ -290,5 +435,11 @@ message Type { // Map Map map_type = 4; + + // Proto + Proto proto_type = 13; + + // Enum + Enum enum_type = 14; } } diff --git a/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml b/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml index 3dc1fb98dc..24ba9badcd 100644 --- a/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml @@ -65,4 +65,66 @@ com/google/bigtable/v2/ReadRowsRequest$RequestStatsView REQUEST_STATS_FULL_VALUE + + + + 7006 + com/google/bigtable/v2/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/bigtable/v2/** + * addRepeatedField(*) + ** + + + 7006 + com/google/bigtable/v2/** + * clear() + ** + + + 7006 + com/google/bigtable/v2/** + * clearField(*) + ** + + + 7006 + com/google/bigtable/v2/** + * clearOneof(*) + ** + + + 7006 + com/google/bigtable/v2/** + * clone() + ** + + + 7006 + com/google/bigtable/v2/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/bigtable/v2/** + * setField(*) + ** + + + 7006 + com/google/bigtable/v2/** + * setRepeatedField(*) + ** + + + 7006 + com/google/bigtable/v2/** + * setUnknownFields(*) + ** + \ No newline at end of file diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index 5cace162dc..428b4e32c0 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.42.0 + 2.76.1-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.42.0 + 2.76.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.42.0 + 2.76.1-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValue.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValue.java index 9e11b19ba6..313ec8d580 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValue.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.ArrayValue} */ -public final class ArrayValue extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ArrayValue extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ArrayValue) ArrayValueOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ArrayValue"); + } + // Use ArrayValue.newBuilder() to construct. - private ArrayValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ArrayValue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ArrayValue() { values_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ArrayValue(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ArrayValue_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List values_; + /** * * @@ -80,6 +88,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getValuesList() { return values_; } + /** * * @@ -93,6 +102,7 @@ public java.util.List getValuesList() { public java.util.List getValuesOrBuilderList() { return values_; } + /** * * @@ -106,6 +116,7 @@ public java.util.List getValues public int getValuesCount() { return values_.size(); } + /** * * @@ -119,6 +130,7 @@ public int getValuesCount() { public com.google.bigtable.v2.Value getValues(int index) { return values_.get(index); } + /** * * @@ -234,38 +246,38 @@ public static com.google.bigtable.v2.ArrayValue parseFrom( public static com.google.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue 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); } @@ -288,10 +300,11 @@ 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; } + /** * * @@ -301,7 +314,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ArrayValue} */ - 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.bigtable.v2.ArrayValue) com.google.bigtable.v2.ArrayValueOrBuilder { @@ -311,7 +324,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable @@ -323,7 +336,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ArrayValue.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -388,39 +401,6 @@ private void buildPartial0(com.google.bigtable.v2.ArrayValue 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.bigtable.v2.ArrayValue) { @@ -452,8 +432,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ArrayValue other) { values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000001); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -527,7 +507,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> @@ -549,6 +529,7 @@ public java.util.List getValuesList() { return valuesBuilder_.getMessageList(); } } + /** * * @@ -565,6 +546,7 @@ public int getValuesCount() { return valuesBuilder_.getCount(); } } + /** * * @@ -581,6 +563,7 @@ public com.google.bigtable.v2.Value getValues(int index) { return valuesBuilder_.getMessage(index); } } + /** * * @@ -603,6 +586,7 @@ public Builder setValues(int index, com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -622,6 +606,7 @@ public Builder setValues(int index, com.google.bigtable.v2.Value.Builder builder } return this; } + /** * * @@ -644,6 +629,7 @@ public Builder addValues(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -666,6 +652,7 @@ public Builder addValues(int index, com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -685,6 +672,7 @@ public Builder addValues(com.google.bigtable.v2.Value.Builder builderForValue) { } return this; } + /** * * @@ -704,6 +692,7 @@ public Builder addValues(int index, com.google.bigtable.v2.Value.Builder builder } return this; } + /** * * @@ -723,6 +712,7 @@ public Builder addAllValues(java.lang.Iterablerepeated .google.bigtable.v2.Value values = 1; */ public com.google.bigtable.v2.Value.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } + /** * * @@ -789,6 +782,7 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { return valuesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -806,6 +800,7 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { return java.util.Collections.unmodifiableList(values_); } } + /** * * @@ -816,8 +811,10 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { * repeated .google.bigtable.v2.Value values = 1; */ public com.google.bigtable.v2.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); + return internalGetValuesFieldBuilder() + .addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); } + /** * * @@ -828,9 +825,10 @@ public com.google.bigtable.v2.Value.Builder addValuesBuilder() { * repeated .google.bigtable.v2.Value values = 1; */ public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Value.getDefaultInstance()); } + /** * * @@ -841,17 +839,17 @@ public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { * repeated .google.bigtable.v2.Value values = 1; */ public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); + return internalGetValuesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -861,17 +859,6 @@ public java.util.List getValuesBuilderList 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.bigtable.v2.ArrayValue) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValueOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValueOrBuilder.java index f4503ab06a..1d0a4b98de 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValueOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ArrayValueOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ArrayValueOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ArrayValue) @@ -34,6 +36,7 @@ public interface ArrayValueOrBuilder * repeated .google.bigtable.v2.Value values = 1; */ java.util.List getValuesList(); + /** * * @@ -44,6 +47,7 @@ public interface ArrayValueOrBuilder * repeated .google.bigtable.v2.Value values = 1; */ com.google.bigtable.v2.Value getValues(int index); + /** * * @@ -54,6 +58,7 @@ public interface ArrayValueOrBuilder * repeated .google.bigtable.v2.Value values = 1; */ int getValuesCount(); + /** * * @@ -64,6 +69,7 @@ public interface ArrayValueOrBuilder * repeated .google.bigtable.v2.Value values = 1; */ java.util.List getValuesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewName.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewName.java index 26bc34da3d..99ece5465f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewName.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequest.java new file mode 100644 index 0000000000..587e10e50e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequest.java @@ -0,0 +1,925 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * A request wrapper for operations on an authorized view. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.AuthorizedViewRequest} + */ +@com.google.protobuf.Generated +public final class AuthorizedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.AuthorizedViewRequest) + AuthorizedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuthorizedViewRequest"); + } + + // Use AuthorizedViewRequest.newBuilder() to construct. + private AuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuthorizedViewRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.AuthorizedViewRequest.class, + com.google.bigtable.v2.AuthorizedViewRequest.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + MUTATE_ROW(2), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 2: + return MUTATE_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + public static final int MUTATE_ROW_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest getMutateRow() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.SessionMutateRowRequest) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.SessionMutateRowRequest) payload_); + } + 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.bigtable.v2.AuthorizedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.AuthorizedViewRequest other = + (com.google.bigtable.v2.AuthorizedViewRequest) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 2: + if (!getMutateRow().equals(other.getMutateRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 2: + hash = (37 * hash) + MUTATE_ROW_FIELD_NUMBER; + hash = (53 * hash) + getMutateRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.AuthorizedViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest 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.bigtable.v2.AuthorizedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest 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.bigtable.v2.AuthorizedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest 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.bigtable.v2.AuthorizedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest 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.bigtable.v2.AuthorizedViewRequest 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 request wrapper for operations on an authorized view. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.AuthorizedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.AuthorizedViewRequest) + com.google.bigtable.v2.AuthorizedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.AuthorizedViewRequest.class, + com.google.bigtable.v2.AuthorizedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.AuthorizedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + if (mutateRowBuilder_ != null) { + mutateRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.AuthorizedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewRequest build() { + com.google.bigtable.v2.AuthorizedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewRequest buildPartial() { + com.google.bigtable.v2.AuthorizedViewRequest result = + new com.google.bigtable.v2.AuthorizedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.AuthorizedViewRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.AuthorizedViewRequest result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + if (payloadCase_ == 2 && mutateRowBuilder_ != null) { + result.payload_ = mutateRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.AuthorizedViewRequest) { + return mergeFrom((com.google.bigtable.v2.AuthorizedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.AuthorizedViewRequest other) { + if (other == com.google.bigtable.v2.AuthorizedViewRequest.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case MUTATE_ROW: + { + mergeMutateRow(other.getMutateRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMutateRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowRequest.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowRequest.newBuilder( + (com.google.bigtable.v2.SessionReadRowRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowRequest.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder>( + (com.google.bigtable.v2.SessionReadRowRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder> + mutateRowBuilder_; + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest getMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return mutateRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder setMutateRow(com.google.bigtable.v2.SessionMutateRowRequest value) { + if (mutateRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + mutateRowBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder setMutateRow( + com.google.bigtable.v2.SessionMutateRowRequest.Builder builderForValue) { + if (mutateRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + mutateRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder mergeMutateRow(com.google.bigtable.v2.SessionMutateRowRequest value) { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionMutateRowRequest.newBuilder( + (com.google.bigtable.v2.SessionMutateRowRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + mutateRowBuilder_.mergeFrom(value); + } else { + mutateRowBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder clearMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + mutateRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public com.google.bigtable.v2.SessionMutateRowRequest.Builder getMutateRowBuilder() { + return internalGetMutateRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder() { + if ((payloadCase_ == 2) && (mutateRowBuilder_ != null)) { + return mutateRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder> + internalGetMutateRowFieldBuilder() { + if (mutateRowBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + mutateRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder>( + (com.google.bigtable.v2.SessionMutateRowRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return mutateRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.AuthorizedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.AuthorizedViewRequest) + private static final com.google.bigtable.v2.AuthorizedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.AuthorizedViewRequest(); + } + + public static com.google.bigtable.v2.AuthorizedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizedViewRequest 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.bigtable.v2.AuthorizedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequestOrBuilder.java new file mode 100644 index 0000000000..ab0b9e4e23 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface AuthorizedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.AuthorizedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowRequest getReadRow(); + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder(); + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + boolean hasMutateRow(); + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + com.google.bigtable.v2.SessionMutateRowRequest getMutateRow(); + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder(); + + com.google.bigtable.v2.AuthorizedViewRequest.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponse.java new file mode 100644 index 0000000000..e7bfbdc73e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponse.java @@ -0,0 +1,925 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * A response wrapper for operations on an authorized view. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.AuthorizedViewResponse} + */ +@com.google.protobuf.Generated +public final class AuthorizedViewResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.AuthorizedViewResponse) + AuthorizedViewResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuthorizedViewResponse"); + } + + // Use AuthorizedViewResponse.newBuilder() to construct. + private AuthorizedViewResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AuthorizedViewResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.AuthorizedViewResponse.class, + com.google.bigtable.v2.AuthorizedViewResponse.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + MUTATE_ROW(2), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 2: + return MUTATE_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + public static final int MUTATE_ROW_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse getMutateRow() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.SessionMutateRowResponse) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.SessionMutateRowResponse) payload_); + } + 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.bigtable.v2.AuthorizedViewResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.AuthorizedViewResponse other = + (com.google.bigtable.v2.AuthorizedViewResponse) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 2: + if (!getMutateRow().equals(other.getMutateRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 2: + hash = (37 * hash) + MUTATE_ROW_FIELD_NUMBER; + hash = (53 * hash) + getMutateRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.AuthorizedViewResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse 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.bigtable.v2.AuthorizedViewResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse 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.bigtable.v2.AuthorizedViewResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse 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.bigtable.v2.AuthorizedViewResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse 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.bigtable.v2.AuthorizedViewResponse 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 response wrapper for operations on an authorized view. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.AuthorizedViewResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.AuthorizedViewResponse) + com.google.bigtable.v2.AuthorizedViewResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.AuthorizedViewResponse.class, + com.google.bigtable.v2.AuthorizedViewResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.AuthorizedViewResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + if (mutateRowBuilder_ != null) { + mutateRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.AuthorizedViewResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewResponse build() { + com.google.bigtable.v2.AuthorizedViewResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.AuthorizedViewResponse buildPartial() { + com.google.bigtable.v2.AuthorizedViewResponse result = + new com.google.bigtable.v2.AuthorizedViewResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.AuthorizedViewResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.AuthorizedViewResponse result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + if (payloadCase_ == 2 && mutateRowBuilder_ != null) { + result.payload_ = mutateRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.AuthorizedViewResponse) { + return mergeFrom((com.google.bigtable.v2.AuthorizedViewResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.AuthorizedViewResponse other) { + if (other == com.google.bigtable.v2.AuthorizedViewResponse.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case MUTATE_ROW: + { + mergeMutateRow(other.getMutateRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMutateRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowResponse.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowResponse.newBuilder( + (com.google.bigtable.v2.SessionReadRowResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowResponse.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder>( + (com.google.bigtable.v2.SessionReadRowResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder> + mutateRowBuilder_; + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse getMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return mutateRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder setMutateRow(com.google.bigtable.v2.SessionMutateRowResponse value) { + if (mutateRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + mutateRowBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder setMutateRow( + com.google.bigtable.v2.SessionMutateRowResponse.Builder builderForValue) { + if (mutateRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + mutateRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder mergeMutateRow(com.google.bigtable.v2.SessionMutateRowResponse value) { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionMutateRowResponse.newBuilder( + (com.google.bigtable.v2.SessionMutateRowResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + mutateRowBuilder_.mergeFrom(value); + } else { + mutateRowBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder clearMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + mutateRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public com.google.bigtable.v2.SessionMutateRowResponse.Builder getMutateRowBuilder() { + return internalGetMutateRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder() { + if ((payloadCase_ == 2) && (mutateRowBuilder_ != null)) { + return mutateRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder> + internalGetMutateRowFieldBuilder() { + if (mutateRowBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + mutateRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder>( + (com.google.bigtable.v2.SessionMutateRowResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return mutateRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.AuthorizedViewResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.AuthorizedViewResponse) + private static final com.google.bigtable.v2.AuthorizedViewResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.AuthorizedViewResponse(); + } + + public static com.google.bigtable.v2.AuthorizedViewResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthorizedViewResponse 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.bigtable.v2.AuthorizedViewResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponseOrBuilder.java new file mode 100644 index 0000000000..4c56458ed6 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewResponseOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface AuthorizedViewResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.AuthorizedViewResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowResponse getReadRow(); + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder(); + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + boolean hasMutateRow(); + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + com.google.bigtable.v2.SessionMutateRowResponse getMutateRow(); + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder(); + + com.google.bigtable.v2.AuthorizedViewResponse.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifier.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifier.java new file mode 100644 index 0000000000..e951f9ad6c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifier.java @@ -0,0 +1,802 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Information about the connected backends from a session client's
    + * perspective. This information may be used to make choices about session
    + * re-establishment en-masse for sessions with the same backend identifiers.
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.BackendIdentifier} + */ +@com.google.protobuf.Generated +public final class BackendIdentifier extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.BackendIdentifier) + BackendIdentifierOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BackendIdentifier"); + } + + // Use BackendIdentifier.newBuilder() to construct. + private BackendIdentifier(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackendIdentifier() { + applicationFrontendZone_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_BackendIdentifier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_BackendIdentifier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.BackendIdentifier.class, + com.google.bigtable.v2.BackendIdentifier.Builder.class); + } + + public static final int GOOGLE_FRONTEND_ID_FIELD_NUMBER = 1; + private long googleFrontendId_ = 0L; + + /** + * + * + *
    +   * An opaque identifier for the Google Frontend which serviced this request.
    +   * Only set when not using DirectAccess.
    +   * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + @java.lang.Override + public long getGoogleFrontendId() { + return googleFrontendId_; + } + + public static final int APPLICATION_FRONTEND_ID_FIELD_NUMBER = 2; + private long applicationFrontendId_ = 0L; + + /** + * + * + *
    +   * An opaque identifier for the application frontend which serviced this
    +   * request.
    +   * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + @java.lang.Override + public long getApplicationFrontendId() { + return applicationFrontendId_; + } + + public static final int APPLICATION_FRONTEND_ZONE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationFrontendZone_ = ""; + + /** + * + * + *
    +   * The zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3; + * + * @return The applicationFrontendZone. + */ + @java.lang.Override + public java.lang.String getApplicationFrontendZone() { + java.lang.Object ref = applicationFrontendZone_; + 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(); + applicationFrontendZone_ = s; + return s; + } + } + + /** + * + * + *
    +   * The zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3; + * + * @return The bytes for applicationFrontendZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationFrontendZoneBytes() { + java.lang.Object ref = applicationFrontendZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendZone_ = 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 (googleFrontendId_ != 0L) { + output.writeInt64(1, googleFrontendId_); + } + if (applicationFrontendId_ != 0L) { + output.writeInt64(2, applicationFrontendId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, applicationFrontendZone_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (googleFrontendId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, googleFrontendId_); + } + if (applicationFrontendId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, applicationFrontendId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, applicationFrontendZone_); + } + 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.bigtable.v2.BackendIdentifier)) { + return super.equals(obj); + } + com.google.bigtable.v2.BackendIdentifier other = (com.google.bigtable.v2.BackendIdentifier) obj; + + if (getGoogleFrontendId() != other.getGoogleFrontendId()) return false; + if (getApplicationFrontendId() != other.getApplicationFrontendId()) return false; + if (!getApplicationFrontendZone().equals(other.getApplicationFrontendZone())) 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) + GOOGLE_FRONTEND_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGoogleFrontendId()); + hash = (37 * hash) + APPLICATION_FRONTEND_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getApplicationFrontendId()); + hash = (37 * hash) + APPLICATION_FRONTEND_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getApplicationFrontendZone().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.BackendIdentifier parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.BackendIdentifier parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.BackendIdentifier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.BackendIdentifier 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.bigtable.v2.BackendIdentifier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.BackendIdentifier parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.BackendIdentifier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.BackendIdentifier 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.bigtable.v2.BackendIdentifier parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.BackendIdentifier 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.bigtable.v2.BackendIdentifier parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.BackendIdentifier 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.bigtable.v2.BackendIdentifier 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; + } + + /** + * + * + *
    +   * Information about the connected backends from a session client's
    +   * perspective. This information may be used to make choices about session
    +   * re-establishment en-masse for sessions with the same backend identifiers.
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.BackendIdentifier} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.BackendIdentifier) + com.google.bigtable.v2.BackendIdentifierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_BackendIdentifier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_BackendIdentifier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.BackendIdentifier.class, + com.google.bigtable.v2.BackendIdentifier.Builder.class); + } + + // Construct using com.google.bigtable.v2.BackendIdentifier.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + googleFrontendId_ = 0L; + applicationFrontendId_ = 0L; + applicationFrontendZone_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_BackendIdentifier_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.BackendIdentifier getDefaultInstanceForType() { + return com.google.bigtable.v2.BackendIdentifier.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.BackendIdentifier build() { + com.google.bigtable.v2.BackendIdentifier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.BackendIdentifier buildPartial() { + com.google.bigtable.v2.BackendIdentifier result = + new com.google.bigtable.v2.BackendIdentifier(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.BackendIdentifier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.googleFrontendId_ = googleFrontendId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.applicationFrontendId_ = applicationFrontendId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.applicationFrontendZone_ = applicationFrontendZone_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.BackendIdentifier) { + return mergeFrom((com.google.bigtable.v2.BackendIdentifier) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.BackendIdentifier other) { + if (other == com.google.bigtable.v2.BackendIdentifier.getDefaultInstance()) return this; + if (other.getGoogleFrontendId() != 0L) { + setGoogleFrontendId(other.getGoogleFrontendId()); + } + if (other.getApplicationFrontendId() != 0L) { + setApplicationFrontendId(other.getApplicationFrontendId()); + } + if (!other.getApplicationFrontendZone().isEmpty()) { + applicationFrontendZone_ = other.applicationFrontendZone_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + googleFrontendId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + applicationFrontendId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + applicationFrontendZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long googleFrontendId_; + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + @java.lang.Override + public long getGoogleFrontendId() { + return googleFrontendId_; + } + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @param value The googleFrontendId to set. + * @return This builder for chaining. + */ + public Builder setGoogleFrontendId(long value) { + + googleFrontendId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearGoogleFrontendId() { + bitField0_ = (bitField0_ & ~0x00000001); + googleFrontendId_ = 0L; + onChanged(); + return this; + } + + private long applicationFrontendId_; + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + @java.lang.Override + public long getApplicationFrontendId() { + return applicationFrontendId_; + } + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @param value The applicationFrontendId to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendId(long value) { + + applicationFrontendId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearApplicationFrontendId() { + bitField0_ = (bitField0_ & ~0x00000002); + applicationFrontendId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object applicationFrontendZone_ = ""; + + /** + * + * + *
    +     * The zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3; + * + * @return The applicationFrontendZone. + */ + public java.lang.String getApplicationFrontendZone() { + java.lang.Object ref = applicationFrontendZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationFrontendZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3; + * + * @return The bytes for applicationFrontendZone. + */ + public com.google.protobuf.ByteString getApplicationFrontendZoneBytes() { + java.lang.Object ref = applicationFrontendZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3; + * + * @param value The applicationFrontendZone to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationFrontendZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3; + * + * @return This builder for chaining. + */ + public Builder clearApplicationFrontendZone() { + applicationFrontendZone_ = getDefaultInstance().getApplicationFrontendZone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3; + * + * @param value The bytes for applicationFrontendZone to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationFrontendZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.BackendIdentifier) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.BackendIdentifier) + private static final com.google.bigtable.v2.BackendIdentifier DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.BackendIdentifier(); + } + + public static com.google.bigtable.v2.BackendIdentifier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackendIdentifier 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.bigtable.v2.BackendIdentifier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifierOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifierOrBuilder.java new file mode 100644 index 0000000000..e966217925 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BackendIdentifierOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface BackendIdentifierOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.BackendIdentifier) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * An opaque identifier for the Google Frontend which serviced this request.
    +   * Only set when not using DirectAccess.
    +   * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + long getGoogleFrontendId(); + + /** + * + * + *
    +   * An opaque identifier for the application frontend which serviced this
    +   * request.
    +   * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + long getApplicationFrontendId(); + + /** + * + * + *
    +   * The zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3; + * + * @return The applicationFrontendZone. + */ + java.lang.String getApplicationFrontendZone(); + + /** + * + * + *
    +   * The zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3; + * + * @return The bytes for applicationFrontendZone. + */ + com.google.protobuf.ByteString getApplicationFrontendZoneBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java index 582ddb0364..da1b7d6197 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class BigtableProto { +@com.google.protobuf.Generated +public final class BigtableProto extends com.google.protobuf.GeneratedFile { private BigtableProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigtableProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,124 +42,136 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadRowsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadRowsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadRowsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadRowsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_SampleRowKeysRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_SampleRowKeysRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_SampleRowKeysResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_SampleRowKeysResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowsRequest_Entry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowsRequest_Entry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_MutateRowsResponse_Entry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RateLimitInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_CheckAndMutateRowRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_CheckAndMutateRowResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_PingAndWarmRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_PingAndWarmResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_PrepareQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -157,285 +181,340 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n!google/bigtable/v2/bigtable.proto\022\022goo" + "\n" + + "!google/bigtable/v2/bigtable.proto\022\022goo" + "gle.bigtable.v2\032\034google/api/annotations." + "proto\032\027google/api/client.proto\032\037google/a" + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032\030google/api/routing.proto\032\035go" - + "ogle/bigtable/v2/data.proto\032&google/bigt" - + "able/v2/request_stats.proto\032\036google/prot" - + "obuf/duration.proto\032\037google/protobuf/tim" - + "estamp.proto\032\036google/protobuf/wrappers.p" - + "roto\032\027google/rpc/status.proto\"\365\003\n\017ReadRo" - + "wsRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\001\372A$\n\"b" - + "igtableadmin.googleapis.com/Table\022Q\n\024aut" - + "horized_view_name\030\t \001(\tB3\340A\001\372A-\n+bigtabl" - + "eadmin.googleapis.com/AuthorizedView\022\026\n\016" - + "app_profile_id\030\005 \001(\t\022(\n\004rows\030\002 \001(\0132\032.goo" - + "gle.bigtable.v2.RowSet\022-\n\006filter\030\003 \001(\0132\035" - + ".google.bigtable.v2.RowFilter\022\022\n\nrows_li" - + "mit\030\004 \001(\003\022P\n\022request_stats_view\030\006 \001(\01624." - + "google.bigtable.v2.ReadRowsRequest.Reque" - + "stStatsView\022\020\n\010reversed\030\007 \001(\010\"f\n\020Request" - + "StatsView\022\"\n\036REQUEST_STATS_VIEW_UNSPECIF" - + "IED\020\000\022\026\n\022REQUEST_STATS_NONE\020\001\022\026\n\022REQUEST" - + "_STATS_FULL\020\002\"\261\003\n\020ReadRowsResponse\022>\n\006ch" - + "unks\030\001 \003(\0132..google.bigtable.v2.ReadRows" - + "Response.CellChunk\022\034\n\024last_scanned_row_k" - + "ey\030\002 \001(\014\0227\n\rrequest_stats\030\003 \001(\0132 .google" - + ".bigtable.v2.RequestStats\032\205\002\n\tCellChunk\022" - + "\017\n\007row_key\030\001 \001(\014\0221\n\013family_name\030\002 \001(\0132\034." - + "google.protobuf.StringValue\022.\n\tqualifier" - + "\030\003 \001(\0132\033.google.protobuf.BytesValue\022\030\n\020t" - + "imestamp_micros\030\004 \001(\003\022\016\n\006labels\030\005 \003(\t\022\r\n" - + "\005value\030\006 \001(\014\022\022\n\nvalue_size\030\007 \001(\005\022\023\n\trese" - + "t_row\030\010 \001(\010H\000\022\024\n\ncommit_row\030\t \001(\010H\000B\014\n\nr" - + "ow_status\"\301\001\n\024SampleRowKeysRequest\022>\n\nta" - + "ble_name\030\001 \001(\tB*\340A\001\372A$\n\"bigtableadmin.go" - + "ogleapis.com/Table\022Q\n\024authorized_view_na" - + "me\030\004 \001(\tB3\340A\001\372A-\n+bigtableadmin.googleap" - + "is.com/AuthorizedView\022\026\n\016app_profile_id\030" - + "\002 \001(\t\">\n\025SampleRowKeysResponse\022\017\n\007row_ke" - + "y\030\001 \001(\014\022\024\n\014offset_bytes\030\002 \001(\003\"\211\002\n\020Mutate" - + "RowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\001\372A$\n\"" - + "bigtableadmin.googleapis.com/Table\022Q\n\024au" - + "thorized_view_name\030\006 \001(\tB3\340A\001\372A-\n+bigtab" - + "leadmin.googleapis.com/AuthorizedView\022\026\n" - + "\016app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003" - + "\340A\002\0224\n\tmutations\030\003 \003(\0132\034.google.bigtable" - + ".v2.MutationB\003\340A\002\"\023\n\021MutateRowResponse\"\321" - + "\002\n\021MutateRowsRequest\022>\n\ntable_name\030\001 \001(\t" - + "B*\340A\001\372A$\n\"bigtableadmin.googleapis.com/T" - + "able\022Q\n\024authorized_view_name\030\005 \001(\tB3\340A\001\372" - + "A-\n+bigtableadmin.googleapis.com/Authori" - + "zedView\022\026\n\016app_profile_id\030\003 \001(\t\022A\n\007entri" - + "es\030\002 \003(\0132+.google.bigtable.v2.MutateRows" - + "Request.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007row_key\030\001" - + " \001(\014\0224\n\tmutations\030\002 \003(\0132\034.google.bigtabl" - + "e.v2.MutationB\003\340A\002\"\344\001\n\022MutateRowsRespons" - + "e\022=\n\007entries\030\001 \003(\0132,.google.bigtable.v2." - + "MutateRowsResponse.Entry\022?\n\017rate_limit_i" - + "nfo\030\003 \001(\0132!.google.bigtable.v2.RateLimit" - + "InfoH\000\210\001\001\032:\n\005Entry\022\r\n\005index\030\001 \001(\003\022\"\n\006sta" - + "tus\030\002 \001(\0132\022.google.rpc.StatusB\022\n\020_rate_l" - + "imit_info\"J\n\rRateLimitInfo\022)\n\006period\030\001 \001" - + "(\0132\031.google.protobuf.Duration\022\016\n\006factor\030" - + "\002 \001(\001\"\201\003\n\030CheckAndMutateRowRequest\022>\n\nta" - + "ble_name\030\001 \001(\tB*\340A\001\372A$\n\"bigtableadmin.go" - + "ogleapis.com/Table\022Q\n\024authorized_view_na" - + "me\030\t \001(\tB3\340A\001\372A-\n+bigtableadmin.googleap" - + "is.com/AuthorizedView\022\026\n\016app_profile_id\030" - + "\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020predicate" - + "_filter\030\006 \001(\0132\035.google.bigtable.v2.RowFi" - + "lter\0224\n\016true_mutations\030\004 \003(\0132\034.google.bi" - + "gtable.v2.Mutation\0225\n\017false_mutations\030\005 " - + "\003(\0132\034.google.bigtable.v2.Mutation\"6\n\031Che" - + "ckAndMutateRowResponse\022\031\n\021predicate_matc" - + "hed\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n\004name\030" - + "\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.googleapis." - + "com/Instance\022\026\n\016app_profile_id\030\002 \001(\t\"\025\n\023" - + "PingAndWarmResponse\"\231\002\n\031ReadModifyWriteR" - + "owRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\001\372A$\n\"b" - + "igtableadmin.googleapis.com/Table\022Q\n\024aut" - + "horized_view_name\030\006 \001(\tB3\340A\001\372A-\n+bigtabl" - + "eadmin.googleapis.com/AuthorizedView\022\026\n\016" - + "app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340" - + "A\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2.R" - + "eadModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyWri" - + "teRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bigt" - + "able.v2.Row\"\206\001\n,GenerateInitialChangeStr" - + "eamPartitionsRequest\022>\n\ntable_name\030\001 \001(\t" - + "B*\340A\002\372A$\n\"bigtableadmin.googleapis.com/T" - + "able\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-Generate" - + "InitialChangeStreamPartitionsResponse\0226\n" - + "\tpartition\030\001 \001(\0132#.google.bigtable.v2.St" - + "reamPartition\"\233\003\n\027ReadChangeStreamReques" - + "t\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtablea" - + "dmin.googleapis.com/Table\022\026\n\016app_profile" - + "_id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google.bi" - + "gtable.v2.StreamPartition\0220\n\nstart_time\030" - + "\004 \001(\0132\032.google.protobuf.TimestampH\000\022K\n\023c" - + "ontinuation_tokens\030\006 \001(\0132,.google.bigtab" - + "le.v2.StreamContinuationTokensH\000\022,\n\010end_" - + "time\030\005 \001(\0132\032.google.protobuf.Timestamp\0225" - + "\n\022heartbeat_duration\030\007 \001(\0132\031.google.prot" - + "obuf.DurationB\014\n\nstart_from\"\251\n\n\030ReadChan" - + "geStreamResponse\022N\n\013data_change\030\001 \001(\01327." - + "google.bigtable.v2.ReadChangeStreamRespo" - + "nse.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326.go" - + "ogle.bigtable.v2.ReadChangeStreamRespons" - + "e.HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328.go" - + "ogle.bigtable.v2.ReadChangeStreamRespons" - + "e.CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\nchu" - + "nk_info\030\001 \001(\0132D.google.bigtable.v2.ReadC" - + "hangeStreamResponse.MutationChunk.ChunkI" - + "nfo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtable." - + "v2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_valu" - + "e_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030\002 \001" - + "(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\306\003\n\nDataChange\022J\n" - + "\004type\030\001 \001(\0162<.google.bigtable.v2.ReadCha" - + "ngeStreamResponse.DataChange.Type\022\031\n\021sou" - + "rce_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014\0224\n" - + "\020commit_timestamp\030\004 \001(\0132\032.google.protobu" - + "f.Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006chunk" - + "s\030\006 \003(\0132:.google.bigtable.v2.ReadChangeS" - + "treamResponse.MutationChunk\022\014\n\004done\030\010 \001(" - + "\010\022\r\n\005token\030\t \001(\t\022;\n\027estimated_low_waterm" - + "ark\030\n \001(\0132\032.google.protobuf.Timestamp\"P\n" - + "\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022\026\n" - + "\022GARBAGE_COLLECTION\020\002\022\020\n\014CONTINUATION\020\003\032" - + "\221\001\n\tHeartbeat\022G\n\022continuation_token\030\001 \001(" - + "\0132+.google.bigtable.v2.StreamContinuatio" - + "nToken\022;\n\027estimated_low_watermark\030\002 \001(\0132" - + "\032.google.protobuf.Timestamp\032\270\001\n\013CloseStr" - + "eam\022\"\n\006status\030\001 \001(\0132\022.google.rpc.Status\022" - + "H\n\023continuation_tokens\030\002 \003(\0132+.google.bi" - + "gtable.v2.StreamContinuationToken\022;\n\016new" - + "_partitions\030\003 \003(\0132#.google.bigtable.v2.S" - + "treamPartitionB\017\n\rstream_record\"\203\003\n\023Exec" - + "uteQueryRequest\022D\n\rinstance_name\030\001 \001(\tB-" - + "\340A\002\372A\'\n%bigtableadmin.googleapis.com/Ins" - + "tance\022\033\n\016app_profile_id\030\002 \001(\tB\003\340A\001\022\022\n\005qu" - + "ery\030\003 \001(\tB\003\340A\002\0227\n\014proto_format\030\004 \001(\0132\037.g" - + "oogle.bigtable.v2.ProtoFormatH\000\022\031\n\014resum" - + "e_token\030\010 \001(\014B\003\340A\001\022H\n\006params\030\007 \003(\01323.goo" - + "gle.bigtable.v2.ExecuteQueryRequest.Para" - + "msEntryB\003\340A\002\032H\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t" - + "\022(\n\005value\030\002 \001(\0132\031.google.bigtable.v2.Val" - + "ue:\0028\001B\r\n\013data_format\"\226\001\n\024ExecuteQueryRe" - + "sponse\0229\n\010metadata\030\001 \001(\0132%.google.bigtab" - + "le.v2.ResultSetMetadataH\000\0227\n\007results\030\002 \001" - + "(\0132$.google.bigtable.v2.PartialResultSet" - + "H\000B\n\n\010response2\235$\n\010Bigtable\022\333\003\n\010ReadRows" - + "\022#.google.bigtable.v2.ReadRowsRequest\032$." - + "google.bigtable.v2.ReadRowsResponse\"\201\003\332A" - + "\ntable_name\332A\031table_name,app_profile_id\202" - + "\323\344\223\002\232\001\"9/v2/{table_name=projects/*/insta" - + "nces/*/tables/*}:readRows:\001*ZZ\"U/v2/{aut" - + "horized_view_name=projects/*/instances/*" - + "/tables/*/authorizedViews/*}:readRows:\001*" - + "\212\323\344\223\002\260\001\022:\n\ntable_name\022,{table_name=proje" - + "cts/*/instances/*/tables/*}\022\020\n\016app_profi" - + "le_id\022`\n\024authorized_view_name\022H{authoriz" - + "ed_view_name=projects/*/instances/*/tabl" - + "es/*/authorizedViews/*}0\001\022\356\003\n\rSampleRowK" - + "eys\022(.google.bigtable.v2.SampleRowKeysRe" - + "quest\032).google.bigtable.v2.SampleRowKeys" - + "Response\"\205\003\332A\ntable_name\332A\031table_name,ap" - + "p_profile_id\202\323\344\223\002\236\001\022>/v2/{table_name=pro" - + "jects/*/instances/*/tables/*}:sampleRowK" - + "eysZ\\\022Z/v2/{authorized_view_name=project" - + "s/*/instances/*/tables/*/authorizedViews" - + "/*}:sampleRowKeys\212\323\344\223\002\260\001\022:\n\ntable_name\022," - + "{table_name=projects/*/instances/*/table" - + "s/*}\022\020\n\016app_profile_id\022`\n\024authorized_vie" - + "w_name\022H{authorized_view_name=projects/*" - + "/instances/*/tables/*/authorizedViews/*}" - + "0\001\022\202\004\n\tMutateRow\022$.google.bigtable.v2.Mu" - + "tateRowRequest\032%.google.bigtable.v2.Muta" - + "teRowResponse\"\247\003\332A\034table_name,row_key,mu" - + "tations\332A+table_name,row_key,mutations,a" - + "pp_profile_id\202\323\344\223\002\234\001\":/v2/{table_name=pr" - + "ojects/*/instances/*/tables/*}:mutateRow" - + ":\001*Z[\"V/v2/{authorized_view_name=project" - + "s/*/instances/*/tables/*/authorizedViews" - + "/*}:mutateRow:\001*\212\323\344\223\002\260\001\022:\n\ntable_name\022,{" - + "table_name=projects/*/instances/*/tables" - + "/*}\022\020\n\016app_profile_id\022`\n\024authorized_view" - + "_name\022H{authorized_view_name=projects/*/" - + "instances/*/tables/*/authorizedViews/*}\022" - + "\365\003\n\nMutateRows\022%.google.bigtable.v2.Muta" - + "teRowsRequest\032&.google.bigtable.v2.Mutat" - + "eRowsResponse\"\225\003\332A\022table_name,entries\332A!" - + "table_name,entries,app_profile_id\202\323\344\223\002\236\001" - + "\";/v2/{table_name=projects/*/instances/*" - + "/tables/*}:mutateRows:\001*Z\\\"W/v2/{authori" - + "zed_view_name=projects/*/instances/*/tab" - + "les/*/authorizedViews/*}:mutateRows:\001*\212\323" - + "\344\223\002\260\001\022:\n\ntable_name\022,{table_name=project" - + "s/*/instances/*/tables/*}\022\020\n\016app_profile" - + "_id\022`\n\024authorized_view_name\022H{authorized" - + "_view_name=projects/*/instances/*/tables" - + "/*/authorizedViews/*}0\001\022\366\004\n\021CheckAndMuta" - + "teRow\022,.google.bigtable.v2.CheckAndMutat" - + "eRowRequest\032-.google.bigtable.v2.CheckAn" - + "dMutateRowResponse\"\203\004\332ABtable_name,row_k" - + "ey,predicate_filter,true_mutations,false" - + "_mutations\332AQtable_name,row_key,predicat" - + "e_filter,true_mutations,false_mutations," - + "app_profile_id\202\323\344\223\002\254\001\"B/v2/{table_name=p" - + "rojects/*/instances/*/tables/*}:checkAnd" - + "MutateRow:\001*Zc\"^/v2/{authorized_view_nam" - + "e=projects/*/instances/*/tables/*/author" - + "izedViews/*}:checkAndMutateRow:\001*\212\323\344\223\002\260\001" - + "\022:\n\ntable_name\022,{table_name=projects/*/i" - + "nstances/*/tables/*}\022\020\n\016app_profile_id\022`" - + "\n\024authorized_view_name\022H{authorized_view" - + "_name=projects/*/instances/*/tables/*/au" - + "thorizedViews/*}\022\356\001\n\013PingAndWarm\022&.googl" - + "e.bigtable.v2.PingAndWarmRequest\032\'.googl" + + "ogle/bigtable/v2/data.proto\032&google/bigtable/v2/request_stats.proto\032 google/bigt" + + "able/v2/session.proto\032\036google/bigtable/v" + + "2/types.proto\032\036google/protobuf/duration." + + "proto\032\037google/protobuf/timestamp.proto\032\036" + + "google/protobuf/wrappers.proto\032\027google/rpc/status.proto\"\314\004\n" + + "\017ReadRowsRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\t \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022U\n" + + "\026materialized_view_name\030\013 \001(\tB5\340A\001\372A/\n" + + "-bigtableadmin.googleapis.com/MaterializedView\022\026\n" + + "\016app_profile_id\030\005 \001(\t\022(\n" + + "\004rows\030\002 \001(\0132\032.google.bigtable.v2.RowSet\022-\n" + + "\006filter\030\003 \001(\0132\035.google.bigtable.v2.RowFilter\022\022\n\n" + + "rows_limit\030\004 \001(\003\022P\n" + + "\022request_stats_view\030\006 \001(\01624.google." + + "bigtable.v2.ReadRowsRequest.RequestStatsView\022\020\n" + + "\010reversed\030\007 \001(\010\"f\n" + + "\020RequestStatsView\022\"\n" + + "\036REQUEST_STATS_VIEW_UNSPECIFIED\020\000\022\026\n" + + "\022REQUEST_STATS_NONE\020\001\022\026\n" + + "\022REQUEST_STATS_FULL\020\002\"\261\003\n" + + "\020ReadRowsResponse\022>\n" + + "\006chunks\030\001 \003(\0132..google.bigtable.v2.ReadRowsResponse.CellChunk\022\034\n" + + "\024last_scanned_row_key\030\002 \001(\014\0227\n\r" + + "request_stats\030\003 \001(\0132 .google.bigtable.v2.RequestStats\032\205\002\n" + + "\tCellChunk\022\017\n" + + "\007row_key\030\001 \001(\014\0221\n" + + "\013family_name\030\002 \001(\0132\034.google.protobuf.StringValue\022.\n" + + "\tqualifier\030\003 \001(\0132\033.google.protobuf.BytesValue\022\030\n" + + "\020timestamp_micros\030\004 \001(\003\022\016\n" + + "\006labels\030\005 \003(\t\022\r\n" + + "\005value\030\006 \001(\014\022\022\n\n" + + "value_size\030\007 \001(\005\022\023\n" + + "\treset_row\030\010 \001(\010H\000\022\024\n\n" + + "commit_row\030\t \001(\010H\000B\014\n\n" + + "row_status\"\230\002\n" + + "\024SampleRowKeysRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\004 \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022U\n" + + "\026materialized_view_name\030\005 \001(\tB5\340A\001\372A/\n" + + "-bigtableadmin.googleapis.com/MaterializedView\022\026\n" + + "\016app_profile_id\030\002 \001(\t\">\n" + + "\025SampleRowKeysResponse\022\017\n" + + "\007row_key\030\001 \001(\014\022\024\n" + + "\014offset_bytes\030\002 \001(\003\"\277\002\n" + + "\020MutateRowRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\006 \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022\026\n" + + "\016app_profile_id\030\004 \001(\t\022\024\n" + + "\007row_key\030\002 \001(\014B\003\340A\002\0224\n" + + "\tmutations\030\003 \003(\0132\034.google.bigtable.v2.MutationB\003\340A\002\0224\n" + + "\013idempotency\030\010 \001(\0132\037.google.bigtable.v2.Idempotency\"\023\n" + + "\021MutateRowResponse\"\210\003\n" + + "\021MutateRowsRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\005 \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022\026\n" + + "\016app_profile_id\030\003 \001(\t\022A\n" + + "\007entries\030\002" + + " \003(\0132+.google.bigtable.v2.MutateRowsRequest.EntryB\003\340A\002\032\204\001\n" + + "\005Entry\022\017\n" + + "\007row_key\030\001 \001(\014\0224\n" + + "\tmutations\030\002 \003(\0132\034.google.bigtable.v2.MutationB\003\340A\002\0224\n" + + "\013idempotency\030\003 \001(\0132\037.google.bigtable.v2.Idempotency\"\344\001\n" + + "\022MutateRowsResponse\022=\n" + + "\007entries\030\001 \003(\0132,.google.bigtable.v2.MutateRowsResponse.Entry\022?\n" + + "\017rate_limit_info\030\003 \001(\0132!" + + ".google.bigtable.v2.RateLimitInfoH\000\210\001\001\032:\n" + + "\005Entry\022\r\n" + + "\005index\030\001 \001(\003\022\"\n" + + "\006status\030\002 \001(\0132\022.google.rpc.StatusB\022\n" + + "\020_rate_limit_info\"J\n\r" + + "RateLimitInfo\022)\n" + + "\006period\030\001 \001(\0132\031.google.protobuf.Duration\022\016\n" + + "\006factor\030\002 \001(\001\"\201\003\n" + + "\030CheckAndMutateRowRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\t \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022\026\n" + + "\016app_profile_id\030\007 \001(\t\022\024\n" + + "\007row_key\030\002 \001(\014B\003\340A\002\0227\n" + + "\020predicate_filter\030\006 \001(\0132\035.google.bigtable.v2.RowFilter\0224\n" + + "\016true_mutations\030\004 \003(\0132\034.google.bigtable.v2.Mutation\0225\n" + + "\017false_mutations\030\005 \003(\0132\034.google.bigtable.v2.Mutation\"6\n" + + "\031CheckAndMutateRowResponse\022\031\n" + + "\021predicate_matched\030\001 \001(\010\"i\n" + + "\022PingAndWarmRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%bigtableadmin.googleapis.com/Instance\022\026\n" + + "\016app_profile_id\030\002 \001(\t\"\025\n" + + "\023PingAndWarmResponse\"\231\002\n" + + "\031ReadModifyWriteRowRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\001\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022Q\n" + + "\024authorized_view_name\030\006 \001(\tB3\340A\001\372A-\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022\026\n" + + "\016app_profile_id\030\004 \001(\t\022\024\n" + + "\007row_key\030\002 \001(\014B\003\340A\002\022;\n" + + "\005rules\030\003" + + " \003(\0132\'.google.bigtable.v2.ReadModifyWriteRuleB\003\340A\002\"B\n" + + "\032ReadModifyWriteRowResponse\022$\n" + + "\003row\030\001 \001(\0132\027.google.bigtable.v2.Row\"\206\001\n" + + ",GenerateInitialChangeStreamPartitionsRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022\026\n" + + "\016app_profile_id\030\002 \001(\t\"g\n" + + "-GenerateInitialChangeStreamPartitionsResponse\0226\n" + + "\tpartition\030\001 \001(\0132#.google.bigtable.v2.StreamPartition\"\233\003\n" + + "\027ReadChangeStreamRequest\022>\n\n" + + "table_name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022\026\n" + + "\016app_profile_id\030\002 \001(\t\0226\n" + + "\tpartition\030\003 \001(\0132#.google.bigtable.v2.StreamPartition\0220\n\n" + + "start_time\030\004 \001(\0132\032.google.protobuf.TimestampH\000\022K\n" + + "\023continuation_tokens\030\006" + + " \001(\0132,.google.bigtable.v2.StreamContinuationTokensH\000\022,\n" + + "\010end_time\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n" + + "\022heartbeat_duration\030\007 \001(\0132\031.google.protobuf.DurationB\014\n\n" + + "start_from\"\251\n\n" + + "\030ReadChangeStreamResponse\022N\n" + + "\013data_change\030\001 \001(\01327.google.bigt" + + "able.v2.ReadChangeStreamResponse.DataChangeH\000\022K\n" + + "\theartbeat\030\002 \001(\01326.google.bigtab" + + "le.v2.ReadChangeStreamResponse.HeartbeatH\000\022P\n" + + "\014close_stream\030\003 \001(\01328.google.bigtab" + + "le.v2.ReadChangeStreamResponse.CloseStreamH\000\032\364\001\n\r" + + "MutationChunk\022X\n\n" + + "chunk_info\030\001 \001" + + "(\0132D.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\022.\n" + + "\010mutation\030\002 \001(\0132\034.google.bigtable.v2.Mutation\032Y\n" + + "\tChunkInfo\022\032\n" + + "\022chunked_value_size\030\001 \001(\005\022\034\n" + + "\024chunked_value_offset\030\002 \001(\005\022\022\n\n" + + "last_chunk\030\003 \001(\010\032\306\003\n\n" + + "DataChange\022J\n" + + "\004type\030\001 \001(\016" + + "2<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\022\031\n" + + "\021source_cluster_id\030\002 \001(\t\022\017\n" + + "\007row_key\030\003 \001(\014\0224\n" + + "\020commit_timestamp\030\004 \001(\0132\032.google.protobuf.Timestamp\022\022\n\n" + + "tiebreaker\030\005 \001(\005\022J\n" + + "\006chunks\030\006 \003(\0132:.g" + + "oogle.bigtable.v2.ReadChangeStreamResponse.MutationChunk\022\014\n" + + "\004done\030\010 \001(\010\022\r\n" + + "\005token\030\t \001(\t\022;\n" + + "\027estimated_low_watermark\030\n" + + " \001(\0132\032.google.protobuf.Timestamp\"P\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004USER\020\001\022\026\n" + + "\022GARBAGE_COLLECTION\020\002\022\020\n" + + "\014CONTINUATION\020\003\032\221\001\n" + + "\tHeartbeat\022G\n" + + "\022continuation_token\030\001" + + " \001(\0132+.google.bigtable.v2.StreamContinuationToken\022;\n" + + "\027estimated_low_watermark\030\002" + + " \001(\0132\032.google.protobuf.Timestamp\032\270\001\n" + + "\013CloseStream\022\"\n" + + "\006status\030\001 \001(\0132\022.google.rpc.Status\022H\n" + + "\023continuation_tokens\030\002" + + " \003(\0132+.google.bigtable.v2.StreamContinuationToken\022;\n" + + "\016new_partitions\030\003 \003(\0132#.google.bigtable.v2.StreamPartitionB\017\n\r" + + "stream_record\"\241\003\n" + + "\023ExecuteQueryRequest\022D\n\r" + + "instance_name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%bigtableadmin.googleapis.com/Instance\022\033\n" + + "\016app_profile_id\030\002 \001(\tB\003\340A\001\022\024\n" + + "\005query\030\003 \001(\tB\005\030\001\340A\002\022\026\n" + + "\016prepared_query\030\t \001(\014\022;\n" + + "\014proto_format\030\004" + + " \001(\0132\037.google.bigtable.v2.ProtoFormatB\002\030\001H\000\022\031\n" + + "\014resume_token\030\010 \001(\014B\003\340A\001\022H\n" + + "\006params\030\007" + + " \003(\01323.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\003\340A\002\032H\n" + + "\013ParamsEntry\022\013\n" + + "\003key\030\001 \001(\t\022(\n" + + "\005value\030\002 \001(\0132\031.google.bigtable.v2.Value:\0028\001B\r\n" + + "\013data_format\"\226\001\n" + + "\024ExecuteQueryResponse\0229\n" + + "\010metadata\030\001 \001(\0132%.google.bigtable.v2.ResultSetMetadataH\000\0227\n" + + "\007results\030\002 \001(\0132$.google.bigtable.v2.PartialResultSetH\000B\n\n" + + "\010response\"\364\002\n" + + "\023PrepareQueryRequest\022D\n\r" + + "instance_name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%bigtableadmin.googleapis.com/Instance\022\033\n" + + "\016app_profile_id\030\002 \001(\tB\003\340A\001\022\022\n" + + "\005query\030\003 \001(\tB\003\340A\002\0227\n" + + "\014proto_format\030\004 \001(\0132\037.google.bigtable.v2.ProtoFormatH\000\022Q\n" + + "\013param_types\030\006" + + " \003(\01327.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\003\340A\002\032K\n" + + "\017ParamTypesEntry\022\013\n" + + "\003key\030\001 \001(\t\022\'\n" + + "\005value\030\002 \001(\0132\030.google.bigtable.v2.Type:\0028\001B\r\n" + + "\013data_format\"\230\001\n" + + "\024PrepareQueryResponse\0227\n" + + "\010metadata\030\001 \001(\0132%.google.bigtable.v2.ResultSetMetadata\022\026\n" + + "\016prepared_query\030\002 \001(\014\022/\n" + + "\013valid_until\030\003 \001(\0132\032.google.protobuf.Timestamp2\215+\n" + + "\010Bigtable\022\325\004\n" + + "\010ReadRows\022#.google.b" + + "igtable.v2.ReadRowsRequest\032$.google.bigtable.v2.ReadRowsResponse\"\373\003\332A\n" + + "table_name\332A\031table_name,app_profile_id\202\323\344\223\002\361\001\"9/v2" + + "/{table_name=projects/*/instances/*/tables/*}:readRows:\001*ZZ\"U/v2/{authorized_vie" + + "w_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\001*ZU\"P/v2/{ma" + + "terialized_view_name=projects/*/instance" + + "s/*/materializedViews/*}:readRows:\001*\212\323\344\223\002\323\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024authorized_view_name\022/{table_name=projects/*/instances/*/tables/*}/**\022:\n" + + "\026materialized_view_name\022 {name=projects/*/instances/*}/**0\001\022\352\004\n\r" + + "SampleRowKeys\022(.google.bigtable.v2.SampleRowKeysRequest\032).g" + + "oogle.bigtable.v2.SampleRowKeysResponse\"\201\004\332A\n" + + "table_name\332A\031table_name,app_profile" + + "_id\202\323\344\223\002\367\001\022>/v2/{table_name=projects/*/i" + + "nstances/*/tables/*}:sampleRowKeysZ\\\022Z/v2/{authorized_view_name=projects/*/insta" + + "nces/*/tables/*/authorizedViews/*}:sampleRowKeysZW\022U/v2/{materialized_view_name=" + + "projects/*/instances/*/materializedViews/*}:sampleRowKeys\212\323\344\223\002\323\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024authorized_view_name\022/{table_name=projects/*/instances/*/tables/*}/**\022:\n" + + "\026materialized_view_name\022 {name=projects/*/instances/*}/**0\001\022\351\003\n" + + "\tMutateRow\022$.google.bigtable.v2.MutateRowRequest\032%.google.bigtable.v2.MutateRow" + + "Response\"\216\003\332A\034table_name,row_key,mutatio" + + "ns\332A+table_name,row_key,mutations,app_pr" + + "ofile_id\202\323\344\223\002\234\001\":/v2/{table_name=project" + + "s/*/instances/*/tables/*}:mutateRow:\001*Z[\"V/v2/{authorized_view_name=projects/*/i" + + "nstances/*/tables/*/authorizedViews/*}:mutateRow:\001*\212\323\344\223\002\227\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024authorized_view_name" + + "\022/{table_name=projects/*/instances/*/tables/*}/**\022\334\003\n\n" + + "MutateRows\022%.google.bigtable.v2.MutateRowsRequest\032&.google.bigtabl" + + "e.v2.MutateRowsResponse\"\374\002\332A\022table_name," + + "entries\332A!table_name,entries,app_profile" + + "_id\202\323\344\223\002\236\001\";/v2/{table_name=projects/*/i" + + "nstances/*/tables/*}:mutateRows:\001*Z\\\"W/v2/{authorized_view_name=projects/*/insta" + + "nces/*/tables/*/authorizedViews/*}:mutateRows:\001*\212\323\344\223\002\227\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024authorized_view_name\022/{" + + "table_name=projects/*/instances/*/tables/*}/**0\001\022\335\004\n" + + "\021CheckAndMutateRow\022,.google.bigtable.v2.CheckAndMutateRowRequest\032-.g" + + "oogle.bigtable.v2.CheckAndMutateRowRespo" + + "nse\"\352\003\332ABtable_name,row_key,predicate_fi" + + "lter,true_mutations,false_mutations\332AQtable_name,row_key,predicate_filter,true_m" + + "utations,false_mutations,app_profile_id\202" + + "\323\344\223\002\254\001\"B/v2/{table_name=projects/*/insta" + + "nces/*/tables/*}:checkAndMutateRow:\001*Zc\"^/v2/{authorized_view_name=projects/*/in" + + "stances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\001*\212\323\344\223\002\227\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024authorized_vi" + + "ew_name\022/{table_name=projects/*/instances/*/tables/*}/**\022\356\001\n" + + "\013PingAndWarm\022&.google.bigtable.v2.PingAndWarmRequest\032\'.googl" + "e.bigtable.v2.PingAndWarmResponse\"\215\001\332A\004n" + "ame\332A\023name,app_profile_id\202\323\344\223\002+\"&/v2/{na" - + "me=projects/*/instances/*}:ping:\001*\212\323\344\223\0029" - + "\022%\n\004name\022\035{name=projects/*/instances/*}\022" - + "\020\n\016app_profile_id\022\247\004\n\022ReadModifyWriteRow" - + "\022-.google.bigtable.v2.ReadModifyWriteRow" + + "me=projects/*/instances/*}:ping:\001*\212\323\344\223\0029\022%\n" + + "\004name\022\035{name=projects/*/instances/*}\022\020\n" + + "\016app_profile_id\022\216\004\n" + + "\022ReadModifyWriteRow\022-.google.bigtable.v2.ReadModifyWriteRow" + "Request\032..google.bigtable.v2.ReadModifyW" - + "riteRowResponse\"\261\003\332A\030table_name,row_key," + + "riteRowResponse\"\230\003\332A\030table_name,row_key," + "rules\332A\'table_name,row_key,rules,app_pro" + "file_id\202\323\344\223\002\256\001\"C/v2/{table_name=projects" - + "/*/instances/*/tables/*}:readModifyWrite" - + "Row:\001*Zd\"_/v2/{authorized_view_name=proj" - + "ects/*/instances/*/tables/*/authorizedVi" - + "ews/*}:readModifyWriteRow:\001*\212\323\344\223\002\260\001\022:\n\nt" - + "able_name\022,{table_name=projects/*/instan" - + "ces/*/tables/*}\022\020\n\016app_profile_id\022`\n\024aut" - + "horized_view_name\022H{authorized_view_name" - + "=projects/*/instances/*/tables/*/authori" - + "zedViews/*}\022\273\002\n%GenerateInitialChangeStr" - + "eamPartitions\022@.google.bigtable.v2.Gener" - + "ateInitialChangeStreamPartitionsRequest\032" - + "A.google.bigtable.v2.GenerateInitialChan" - + "geStreamPartitionsResponse\"\212\001\332A\ntable_na" - + "me\332A\031table_name,app_profile_id\202\323\344\223\002[\"V/v" - + "2/{table_name=projects/*/instances/*/tab" - + "les/*}:generateInitialChangeStreamPartit" - + "ions:\001*0\001\022\346\001\n\020ReadChangeStream\022+.google." - + "bigtable.v2.ReadChangeStreamRequest\032,.go" - + "ogle.bigtable.v2.ReadChangeStreamRespons" - + "e\"u\332A\ntable_name\332A\031table_name,app_profil" - + "e_id\202\323\344\223\002F\"A/v2/{table_name=projects/*/i" - + "nstances/*/tables/*}:readChangeStream:\001*" - + "0\001\022\253\002\n\014ExecuteQuery\022\'.google.bigtable.v2" - + ".ExecuteQueryRequest\032(.google.bigtable.v" - + "2.ExecuteQueryResponse\"\305\001\332A\023instance_nam" - + "e,query\332A\"instance_name,query,app_profil" - + "e_id\202\323\344\223\002<\"7/v2/{instance_name=projects/" - + "*/instances/*}:executeQuery:\001*\212\323\344\223\002B\022.\n\r" - + "instance_name\022\035{name=projects/*/instance" - + "s/*}\022\020\n\016app_profile_id0\001\032\333\002\312A\027bigtable.g" - + "oogleapis.com\322A\275\002https://www.googleapis." - + "com/auth/bigtable.data,https://www.googl" - + "eapis.com/auth/bigtable.data.readonly,ht" - + "tps://www.googleapis.com/auth/cloud-bigt" - + "able.data,https://www.googleapis.com/aut" - + "h/cloud-bigtable.data.readonly,https://w" - + "ww.googleapis.com/auth/cloud-platform,ht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "form.read-onlyB\364\003\n\026com.google.bigtable.v" - + "2B\rBigtableProtoP\001Z8cloud.google.com/go/" - + "bigtable/apiv2/bigtablepb;bigtablepb\252\002\030G" - + "oogle.Cloud.Bigtable.V2\312\002\030Google\\Cloud\\B" - + "igtable\\V2\352\002\033Google::Cloud::Bigtable::V2" - + "\352AP\n%bigtableadmin.googleapis.com/Instan" - + "ce\022\'projects/{project}/instances/{instan" - + "ce}\352A\\\n\"bigtableadmin.googleapis.com/Tab" - + "le\0226projects/{project}/instances/{instan" - + "ce}/tables/{table}\352A\207\001\n+bigtableadmin.go" - + "ogleapis.com/AuthorizedView\022Xprojects/{p" - + "roject}/instances/{instance}/tables/{tab" - + "le}/authorizedViews/{authorized_view}b\006p" - + "roto3" + + "/*/instances/*/tables/*}:readModifyWriteRow:\001*Zd\"_/v2/{authorized_view_name=proj" + + "ects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\001*\212\323\344\223\002\227\001\022:\n\n" + + "table_name\022,{table_name=projects/*/instances/*/tables/*}\022\020\n" + + "\016app_profile_id\022G\n" + + "\024aut" + + "horized_view_name\022/{table_name=projects/*/instances/*/tables/*}/**\022\273\002\n" + + "%GenerateInitialChangeStreamPartitions\022@.google.bi" + + "gtable.v2.GenerateInitialChangeStreamPartitionsRequest\032A.google.bigtable.v2.Gene" + + "rateInitialChangeStreamPartitionsResponse\"\212\001\332A\n" + + "table_name\332A\031table_name,app_profi" + + "le_id\202\323\344\223\002[\"V/v2/{table_name=projects/*/" + + "instances/*/tables/*}:generateInitialChangeStreamPartitions:\001*0\001\022\346\001\n" + + "\020ReadChangeStream\022+.google.bigtable.v2.ReadChangeStr" + + "eamRequest\032,.google.bigtable.v2.ReadChangeStreamResponse\"u\332A\n" + + "table_name\332A\031table_name,app_profile_id\202\323\344\223\002F\"A/v2/{table_na" + + "me=projects/*/instances/*/tables/*}:readChangeStream:\001*0\001\022\251\002\n" + + "\014PrepareQuery\022\'.google.bigtable.v2.PrepareQueryRequest\032(.go" + + "ogle.bigtable.v2.PrepareQueryResponse\"\305\001" + + "\332A\023instance_name,query\332A\"instance_name,q" + + "uery,app_profile_id\202\323\344\223\002<\"7/v2/{instance" + + "_name=projects/*/instances/*}:prepareQuery:\001*\212\323\344\223\002B\022.\n\r" + + "instance_name\022\035{name=projects/*/instances/*}\022\020\n" + + "\016app_profile_id\022\253\002\n" + + "\014ExecuteQuery\022\'.google.bigtable.v2.Exec" + + "uteQueryRequest\032(.google.bigtable.v2.Exe" + + "cuteQueryResponse\"\305\001\332A\023instance_name,que" + + "ry\332A\"instance_name,query,app_profile_id\202" + + "\323\344\223\002<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\001*\212\323\344\223\002B\022.\n\r" + + "instance_name\022\035{name=projects/*/instances/*}\022\020\n" + + "\016app_profile_id0\001\022v\n" + + "\026GetClientConfiguration\0221.google.bigtable.v2.GetClientConf" + + "igurationRequest\032\'.google.bigtable.v2.ClientConfiguration\"\000\022`\n" + + "\tOpenTable\022\".googl" + + "e.bigtable.v2.SessionRequest\032#.google.bigtable.v2.SessionResponse\"\006\240\320\245\216\004\001(\0010\001\022i\n" + + "\022OpenAuthorizedView\022\".google.bigtable.v2" + + ".SessionRequest\032#.google.bigtable.v2.SessionResponse\"\006\240\320\245\216\004\002(\0010\001\022k\n" + + "\024OpenMaterializedView\022\".google.bigtable.v2.SessionReq" + + "uest\032#.google.bigtable.v2.SessionRespons" + + "e\"\006\240\320\245\216\004\003(\0010\001\032\333\002\312A\027bigtable.googleapis.c" + + "om\322A\275\002https://www.googleapis.com/auth/bi" + + "gtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.g" + + "oogleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-big" + + "table.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.g" + + "oogleapis.com/auth/cloud-platform.read-onlyB\365\004\n" + + "\026com.google.bigtable.v2B\r" + + "BigtableProtoP\001Z8cloud.google.com/go/bigtable/ap" + + "iv2/bigtablepb;bigtablepb\252\002\030Google.Cloud" + + ".Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::Cloud::Bigtable::V2\352AP\n" + + "%bigtab" + + "leadmin.googleapis.com/Instance\022\'projects/{project}/instances/{instance}\352A\\\n" + + "\"bigtableadmin.googleapis.com/Table\0226project" + + "s/{project}/instances/{instance}/tables/{table}\352A\207\001\n" + + "+bigtableadmin.googleapis.com/AuthorizedView\022Xprojects/{project}/ins" + + "tances/{instance}/tables/{table}/authorizedViews/{authorized_view}\352A~\n" + + "-bigtableadmin.googleapis.com/MaterializedView\022Mpr" + + "ojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -448,19 +527,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.RoutingProto.getDescriptor(), com.google.bigtable.v2.DataProto.getDescriptor(), com.google.bigtable.v2.RequestStatsProto.getDescriptor(), + com.google.bigtable.v2.SessionProto.getDescriptor(), + com.google.bigtable.v2.TypesProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_bigtable_v2_ReadRowsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_ReadRowsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadRowsRequest_descriptor, new java.lang.String[] { "TableName", "AuthorizedViewName", + "MaterializedViewName", "AppProfileId", "Rows", "Filter", @@ -469,17 +551,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Reversed", }); internal_static_google_bigtable_v2_ReadRowsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_bigtable_v2_ReadRowsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadRowsResponse_descriptor, new java.lang.String[] { "Chunks", "LastScannedRowKey", "RequestStats", }); internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor = - internal_static_google_bigtable_v2_ReadRowsResponse_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_ReadRowsResponse_descriptor.getNestedType(0); internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor, new java.lang.String[] { "RowKey", @@ -494,79 +576,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RowStatus", }); internal_static_google_bigtable_v2_SampleRowKeysRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_bigtable_v2_SampleRowKeysRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_SampleRowKeysRequest_descriptor, new java.lang.String[] { - "TableName", "AuthorizedViewName", "AppProfileId", + "TableName", "AuthorizedViewName", "MaterializedViewName", "AppProfileId", }); internal_static_google_bigtable_v2_SampleRowKeysResponse_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageType(3); internal_static_google_bigtable_v2_SampleRowKeysResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_SampleRowKeysResponse_descriptor, new java.lang.String[] { "RowKey", "OffsetBytes", }); internal_static_google_bigtable_v2_MutateRowRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageType(4); internal_static_google_bigtable_v2_MutateRowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowRequest_descriptor, new java.lang.String[] { - "TableName", "AuthorizedViewName", "AppProfileId", "RowKey", "Mutations", + "TableName", + "AuthorizedViewName", + "AppProfileId", + "RowKey", + "Mutations", + "Idempotency", }); internal_static_google_bigtable_v2_MutateRowResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageType(5); internal_static_google_bigtable_v2_MutateRowResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowResponse_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_MutateRowsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageType(6); internal_static_google_bigtable_v2_MutateRowsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowsRequest_descriptor, new java.lang.String[] { "TableName", "AuthorizedViewName", "AppProfileId", "Entries", }); internal_static_google_bigtable_v2_MutateRowsRequest_Entry_descriptor = - internal_static_google_bigtable_v2_MutateRowsRequest_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_MutateRowsRequest_descriptor.getNestedType(0); internal_static_google_bigtable_v2_MutateRowsRequest_Entry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowsRequest_Entry_descriptor, new java.lang.String[] { - "RowKey", "Mutations", + "RowKey", "Mutations", "Idempotency", }); internal_static_google_bigtable_v2_MutateRowsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageType(7); internal_static_google_bigtable_v2_MutateRowsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowsResponse_descriptor, new java.lang.String[] { "Entries", "RateLimitInfo", }); internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor = - internal_static_google_bigtable_v2_MutateRowsResponse_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_MutateRowsResponse_descriptor.getNestedType(0); internal_static_google_bigtable_v2_MutateRowsResponse_Entry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor, new java.lang.String[] { "Index", "Status", }); - internal_static_google_bigtable_v2_RateLimitInfo_descriptor = - getDescriptor().getMessageTypes().get(8); + internal_static_google_bigtable_v2_RateLimitInfo_descriptor = getDescriptor().getMessageType(8); internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RateLimitInfo_descriptor, new java.lang.String[] { "Period", "Factor", }); internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_bigtable_v2_CheckAndMutateRowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor, new java.lang.String[] { "TableName", @@ -578,63 +664,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FalseMutations", }); internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageType(10); internal_static_google_bigtable_v2_CheckAndMutateRowResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor, new java.lang.String[] { "PredicateMatched", }); internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageType(11); internal_static_google_bigtable_v2_PingAndWarmRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor, new java.lang.String[] { "Name", "AppProfileId", }); internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageType(12); internal_static_google_bigtable_v2_PingAndWarmResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor, new java.lang.String[] { "TableName", "AuthorizedViewName", "AppProfileId", "RowKey", "Rules", }); internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor, new java.lang.String[] { "Row", }); internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor, new java.lang.String[] { "TableName", "AppProfileId", }); internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor, new java.lang.String[] { "Partition", }); internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageType(17); internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor, new java.lang.String[] { "TableName", @@ -647,39 +733,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartFrom", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(18); internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor, new java.lang.String[] { "DataChange", "Heartbeat", "CloseStream", "StreamRecord", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor = - internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor - .getNestedTypes() - .get(0); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor.getNestedType(0); internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor, new java.lang.String[] { "ChunkInfo", "Mutation", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor = internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor - .getNestedTypes() - .get(0); + .getNestedType(0); internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor, new java.lang.String[] { "ChunkedValueSize", "ChunkedValueOffset", "LastChunk", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor = - internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor - .getNestedTypes() - .get(1); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor.getNestedType(1); internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor, new java.lang.String[] { "Type", @@ -693,55 +774,90 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EstimatedLowWatermark", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor = - internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor - .getNestedTypes() - .get(2); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor.getNestedType(2); internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor, new java.lang.String[] { "ContinuationToken", "EstimatedLowWatermark", }); internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor = - internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor - .getNestedTypes() - .get(3); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor.getNestedType(3); internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor, new java.lang.String[] { "Status", "ContinuationTokens", "NewPartitions", }); internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageType(19); internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor, new java.lang.String[] { "InstanceName", "AppProfileId", "Query", + "PreparedQuery", "ProtoFormat", "ResumeToken", "Params", "DataFormat", }); internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_descriptor = - internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor.getNestedType(0); internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ExecuteQueryRequest_ParamsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageType(20); internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor, new java.lang.String[] { "Metadata", "Results", "Response", }); + internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_bigtable_v2_PrepareQueryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor, + new java.lang.String[] { + "InstanceName", "AppProfileId", "Query", "ProtoFormat", "ParamTypes", "DataFormat", + }); + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_descriptor = + internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor, + new java.lang.String[] { + "Metadata", "PreparedQuery", "ValidUntil", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.RoutingProto.getDescriptor(); + com.google.bigtable.v2.DataProto.getDescriptor(); + com.google.bigtable.v2.RequestStatsProto.getDescriptor(); + com.google.bigtable.v2.SessionProto.getDescriptor(); + com.google.bigtable.v2.TypesProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -752,19 +868,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.api.RoutingProto.routing); + registry.add(com.google.bigtable.v2.SessionProto.rpcSessionType); 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.api.RoutingProto.getDescriptor(); - com.google.bigtable.v2.DataProto.getDescriptor(); - com.google.bigtable.v2.RequestStatsProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java index fb7d4e53b4..17f06c8b62 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.Cell} */ -public final class Cell extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Cell extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Cell) CellOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Cell"); + } + // Use Cell.newBuilder() to construct. - private Cell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Cell(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,18 +56,12 @@ private Cell() { labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Cell(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Cell_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Cell_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int TIMESTAMP_MICROS_FIELD_NUMBER = 1; private long timestampMicros_ = 0L; + /** * * @@ -87,6 +95,7 @@ public long getTimestampMicros() { public static final int VALUE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -110,6 +119,7 @@ public com.google.protobuf.ByteString getValue() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -124,6 +134,7 @@ public com.google.protobuf.ByteString getValue() { public com.google.protobuf.ProtocolStringList getLabelsList() { return labels_; } + /** * * @@ -138,6 +149,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -153,6 +165,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -190,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBytes(2, value_); } for (int i = 0; i < labels_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, labels_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, labels_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -293,38 +306,38 @@ public static com.google.bigtable.v2.Cell parseFrom( public static com.google.bigtable.v2.Cell 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.bigtable.v2.Cell 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.bigtable.v2.Cell 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.bigtable.v2.Cell 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.bigtable.v2.Cell 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.bigtable.v2.Cell 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); } @@ -347,10 +360,11 @@ 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; } + /** * * @@ -360,7 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.Cell} */ - 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.bigtable.v2.Cell) com.google.bigtable.v2.CellOrBuilder { @@ -369,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Cell_fieldAccessorTable @@ -380,7 +394,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Cell.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -437,39 +451,6 @@ private void buildPartial0(com.google.bigtable.v2.Cell 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.bigtable.v2.Cell) { @@ -485,7 +466,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Cell other) { if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getValue().isEmpty()) { setValue(other.getValue()); } if (!other.labels_.isEmpty()) { @@ -563,6 +544,7 @@ public Builder mergeFrom( private int bitField0_; private long timestampMicros_; + /** * * @@ -583,6 +565,7 @@ public Builder mergeFrom( public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -607,6 +590,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -631,6 +615,7 @@ public Builder clearTimestampMicros() { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -648,6 +633,7 @@ public Builder clearTimestampMicros() { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -671,6 +657,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -700,6 +687,7 @@ private void ensureLabelsIsMutable() { } bitField0_ |= 0x00000004; } + /** * * @@ -715,6 +703,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { labels_.makeImmutable(); return labels_; } + /** * * @@ -729,6 +718,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -744,6 +734,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -759,6 +750,7 @@ public java.lang.String getLabels(int index) { public com.google.protobuf.ByteString getLabelsBytes(int index) { return labels_.getByteString(index); } + /** * * @@ -782,6 +774,7 @@ public Builder setLabels(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -804,6 +797,7 @@ public Builder addLabels(java.lang.String value) { onChanged(); return this; } + /** * * @@ -823,6 +817,7 @@ public Builder addAllLabels(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -841,6 +836,7 @@ public Builder clearLabels() { onChanged(); return this; } + /** * * @@ -865,17 +861,6 @@ public Builder addLabelsBytes(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.bigtable.v2.Cell) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CellOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CellOrBuilder.java index 7076bb6872..1706b7cccb 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CellOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CellOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface CellOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Cell) @@ -69,6 +71,7 @@ public interface CellOrBuilder * @return A list containing the labels. */ java.util.List getLabelsList(); + /** * * @@ -81,6 +84,7 @@ public interface CellOrBuilder * @return The count of labels. */ int getLabelsCount(); + /** * * @@ -94,6 +98,7 @@ public interface CellOrBuilder * @return The labels at the given index. */ java.lang.String getLabels(int index); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java index 6322ac9cff..230c65a21e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.CheckAndMutateRowRequest} */ -public final class CheckAndMutateRowRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CheckAndMutateRowRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.CheckAndMutateRowRequest) CheckAndMutateRowRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckAndMutateRowRequest"); + } + // Use CheckAndMutateRowRequest.newBuilder() to construct. - private CheckAndMutateRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CheckAndMutateRowRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -47,19 +60,13 @@ private CheckAndMutateRowRequest() { falseMutations_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CheckAndMutateRowRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowRequest_fieldAccessorTable @@ -73,6 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -102,6 +110,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -136,6 +145,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -165,6 +175,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -199,6 +210,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -223,6 +235,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -250,6 +263,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int ROW_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -269,6 +283,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int PREDICATE_FILTER_FIELD_NUMBER = 6; private com.google.bigtable.v2.RowFilter predicateFilter_; + /** * * @@ -287,6 +302,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -307,6 +323,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : predicateFilter_; } + /** * * @@ -330,6 +347,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { @SuppressWarnings("serial") private java.util.List trueMutations_; + /** * * @@ -347,6 +365,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public java.util.List getTrueMutationsList() { return trueMutations_; } + /** * * @@ -365,6 +384,7 @@ public java.util.List getTrueMutationsList() { getTrueMutationsOrBuilderList() { return trueMutations_; } + /** * * @@ -382,6 +402,7 @@ public java.util.List getTrueMutationsList() { public int getTrueMutationsCount() { return trueMutations_.size(); } + /** * * @@ -399,6 +420,7 @@ public int getTrueMutationsCount() { public com.google.bigtable.v2.Mutation getTrueMutations(int index) { return trueMutations_.get(index); } + /** * * @@ -421,6 +443,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in @SuppressWarnings("serial") private java.util.List falseMutations_; + /** * * @@ -438,6 +461,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in public java.util.List getFalseMutationsList() { return falseMutations_; } + /** * * @@ -456,6 +480,7 @@ public java.util.List getFalseMutationsList() { getFalseMutationsOrBuilderList() { return falseMutations_; } + /** * * @@ -473,6 +498,7 @@ public java.util.List getFalseMutationsList() { public int getFalseMutationsCount() { return falseMutations_.size(); } + /** * * @@ -490,6 +516,7 @@ public int getFalseMutationsCount() { public com.google.bigtable.v2.Mutation getFalseMutations(int index) { return falseMutations_.get(index); } + /** * * @@ -522,8 +549,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } if (!rowKey_.isEmpty()) { output.writeBytes(2, rowKey_); @@ -537,11 +564,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getPredicateFilter()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, authorizedViewName_); } getUnknownFields().writeTo(output); } @@ -552,8 +579,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } if (!rowKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, rowKey_); @@ -567,11 +594,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPredicateFilter()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, authorizedViewName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -672,38 +699,38 @@ public static com.google.bigtable.v2.CheckAndMutateRowRequest parseFrom( public static com.google.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest 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); } @@ -726,10 +753,11 @@ 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; } + /** * * @@ -739,7 +767,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.CheckAndMutateRowRequest} */ - 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.bigtable.v2.CheckAndMutateRowRequest) com.google.bigtable.v2.CheckAndMutateRowRequestOrBuilder { @@ -749,7 +777,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowRequest_fieldAccessorTable @@ -763,16 +791,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) { - getPredicateFilterFieldBuilder(); - getTrueMutationsFieldBuilder(); - getFalseMutationsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPredicateFilterFieldBuilder(); + internalGetTrueMutationsFieldBuilder(); + internalGetFalseMutationsFieldBuilder(); } } @@ -883,39 +911,6 @@ private void buildPartial0(com.google.bigtable.v2.CheckAndMutateRowRequest 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.bigtable.v2.CheckAndMutateRowRequest) { @@ -944,7 +939,7 @@ public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) bitField0_ |= 0x00000004; onChanged(); } - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (other.hasPredicateFilter()) { @@ -969,8 +964,8 @@ public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) trueMutations_ = other.trueMutations_; bitField0_ = (bitField0_ & ~0x00000020); trueMutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTrueMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTrueMutationsFieldBuilder() : null; } else { trueMutationsBuilder_.addAllMessages(other.trueMutations_); @@ -996,8 +991,8 @@ public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) falseMutations_ = other.falseMutations_; bitField0_ = (bitField0_ & ~0x00000040); falseMutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFalseMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFalseMutationsFieldBuilder() : null; } else { falseMutationsBuilder_.addAllMessages(other.falseMutations_); @@ -1068,7 +1063,8 @@ public Builder mergeFrom( } // case 42 case 50: { - input.readMessage(getPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 50 @@ -1104,6 +1100,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1132,6 +1129,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1160,6 +1158,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1187,6 +1186,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1210,6 +1210,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1240,6 +1241,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1268,6 +1270,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1296,6 +1299,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1323,6 +1327,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1346,6 +1351,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1376,6 +1382,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1399,6 +1406,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1422,6 +1430,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1444,6 +1453,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1462,6 +1472,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1487,6 +1498,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1503,6 +1515,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1525,6 +1538,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1545,11 +1559,12 @@ public Builder clearRowKey() { } private com.google.bigtable.v2.RowFilter predicateFilter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> predicateFilterBuilder_; + /** * * @@ -1567,6 +1582,7 @@ public Builder clearRowKey() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1590,6 +1606,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { return predicateFilterBuilder_.getMessage(); } } + /** * * @@ -1615,6 +1632,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -1637,6 +1655,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter.Builder build onChanged(); return this; } + /** * * @@ -1667,6 +1686,7 @@ public Builder mergePredicateFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -1689,6 +1709,7 @@ public Builder clearPredicateFilter() { onChanged(); return this; } + /** * * @@ -1704,8 +1725,9 @@ public Builder clearPredicateFilter() { public com.google.bigtable.v2.RowFilter.Builder getPredicateFilterBuilder() { bitField0_ |= 0x00000010; onChanged(); - return getPredicateFilterFieldBuilder().getBuilder(); + return internalGetPredicateFilterFieldBuilder().getBuilder(); } + /** * * @@ -1727,6 +1749,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { : predicateFilter_; } } + /** * * @@ -1739,14 +1762,14 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { * * .google.bigtable.v2.RowFilter predicate_filter = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getPredicateFilterFieldBuilder() { + internalGetPredicateFilterFieldBuilder() { if (predicateFilterBuilder_ == null) { predicateFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -1766,7 +1789,7 @@ private void ensureTrueMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> @@ -1792,6 +1815,7 @@ public java.util.List getTrueMutationsList() { return trueMutationsBuilder_.getMessageList(); } } + /** * * @@ -1812,6 +1836,7 @@ public int getTrueMutationsCount() { return trueMutationsBuilder_.getCount(); } } + /** * * @@ -1832,6 +1857,7 @@ public com.google.bigtable.v2.Mutation getTrueMutations(int index) { return trueMutationsBuilder_.getMessage(index); } } + /** * * @@ -1858,6 +1884,7 @@ public Builder setTrueMutations(int index, com.google.bigtable.v2.Mutation value } return this; } + /** * * @@ -1882,6 +1909,7 @@ public Builder setTrueMutations( } return this; } + /** * * @@ -1908,6 +1936,7 @@ public Builder addTrueMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1934,6 +1963,7 @@ public Builder addTrueMutations(int index, com.google.bigtable.v2.Mutation value } return this; } + /** * * @@ -1957,6 +1987,7 @@ public Builder addTrueMutations(com.google.bigtable.v2.Mutation.Builder builderF } return this; } + /** * * @@ -1981,6 +2012,7 @@ public Builder addTrueMutations( } return this; } + /** * * @@ -2005,6 +2037,7 @@ public Builder addAllTrueMutations( } return this; } + /** * * @@ -2028,6 +2061,7 @@ public Builder clearTrueMutations() { } return this; } + /** * * @@ -2051,6 +2085,7 @@ public Builder removeTrueMutations(int index) { } return this; } + /** * * @@ -2065,8 +2100,9 @@ public Builder removeTrueMutations(int index) { * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ public com.google.bigtable.v2.Mutation.Builder getTrueMutationsBuilder(int index) { - return getTrueMutationsFieldBuilder().getBuilder(index); + return internalGetTrueMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -2087,6 +2123,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in return trueMutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2108,6 +2145,7 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in return java.util.Collections.unmodifiableList(trueMutations_); } } + /** * * @@ -2122,9 +2160,10 @@ public com.google.bigtable.v2.MutationOrBuilder getTrueMutationsOrBuilder(int in * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder() { - return getTrueMutationsFieldBuilder() + return internalGetTrueMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2139,9 +2178,10 @@ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder() { * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder(int index) { - return getTrueMutationsFieldBuilder() + return internalGetTrueMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2156,17 +2196,17 @@ public com.google.bigtable.v2.Mutation.Builder addTrueMutationsBuilder(int index * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ public java.util.List getTrueMutationsBuilderList() { - return getTrueMutationsFieldBuilder().getBuilderList(); + return internalGetTrueMutationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> - getTrueMutationsFieldBuilder() { + internalGetTrueMutationsFieldBuilder() { if (trueMutationsBuilder_ == null) { trueMutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder>( @@ -2189,7 +2229,7 @@ private void ensureFalseMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> @@ -2215,6 +2255,7 @@ public java.util.List getFalseMutationsList() { return falseMutationsBuilder_.getMessageList(); } } + /** * * @@ -2235,6 +2276,7 @@ public int getFalseMutationsCount() { return falseMutationsBuilder_.getCount(); } } + /** * * @@ -2255,6 +2297,7 @@ public com.google.bigtable.v2.Mutation getFalseMutations(int index) { return falseMutationsBuilder_.getMessage(index); } } + /** * * @@ -2281,6 +2324,7 @@ public Builder setFalseMutations(int index, com.google.bigtable.v2.Mutation valu } return this; } + /** * * @@ -2305,6 +2349,7 @@ public Builder setFalseMutations( } return this; } + /** * * @@ -2331,6 +2376,7 @@ public Builder addFalseMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -2357,6 +2403,7 @@ public Builder addFalseMutations(int index, com.google.bigtable.v2.Mutation valu } return this; } + /** * * @@ -2380,6 +2427,7 @@ public Builder addFalseMutations(com.google.bigtable.v2.Mutation.Builder builder } return this; } + /** * * @@ -2404,6 +2452,7 @@ public Builder addFalseMutations( } return this; } + /** * * @@ -2428,6 +2477,7 @@ public Builder addAllFalseMutations( } return this; } + /** * * @@ -2451,6 +2501,7 @@ public Builder clearFalseMutations() { } return this; } + /** * * @@ -2474,6 +2525,7 @@ public Builder removeFalseMutations(int index) { } return this; } + /** * * @@ -2488,8 +2540,9 @@ public Builder removeFalseMutations(int index) { * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ public com.google.bigtable.v2.Mutation.Builder getFalseMutationsBuilder(int index) { - return getFalseMutationsFieldBuilder().getBuilder(index); + return internalGetFalseMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -2510,6 +2563,7 @@ public com.google.bigtable.v2.MutationOrBuilder getFalseMutationsOrBuilder(int i return falseMutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2531,6 +2585,7 @@ public com.google.bigtable.v2.MutationOrBuilder getFalseMutationsOrBuilder(int i return java.util.Collections.unmodifiableList(falseMutations_); } } + /** * * @@ -2545,9 +2600,10 @@ public com.google.bigtable.v2.MutationOrBuilder getFalseMutationsOrBuilder(int i * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder() { - return getFalseMutationsFieldBuilder() + return internalGetFalseMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2562,9 +2618,10 @@ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder() { * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder(int index) { - return getFalseMutationsFieldBuilder() + return internalGetFalseMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -2579,17 +2636,17 @@ public com.google.bigtable.v2.Mutation.Builder addFalseMutationsBuilder(int inde * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ public java.util.List getFalseMutationsBuilderList() { - return getFalseMutationsFieldBuilder().getBuilderList(); + return internalGetFalseMutationsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> - getFalseMutationsFieldBuilder() { + internalGetFalseMutationsFieldBuilder() { if (falseMutationsBuilder_ == null) { falseMutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder>( @@ -2602,17 +2659,6 @@ public java.util.List getFalseMutations return falseMutationsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.CheckAndMutateRowRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequestOrBuilder.java index c67f721d3b..4e2fa437a1 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface CheckAndMutateRowRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.CheckAndMutateRowRequest) @@ -42,6 +44,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +82,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +115,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -154,6 +159,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return Whether the predicateFilter field is set. */ boolean hasPredicateFilter(); + /** * * @@ -169,6 +175,7 @@ public interface CheckAndMutateRowRequestOrBuilder * @return The predicateFilter. */ com.google.bigtable.v2.RowFilter getPredicateFilter(); + /** * * @@ -197,6 +204,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ java.util.List getTrueMutationsList(); + /** * * @@ -211,6 +219,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ com.google.bigtable.v2.Mutation getTrueMutations(int index); + /** * * @@ -225,6 +234,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation true_mutations = 4; */ int getTrueMutationsCount(); + /** * * @@ -240,6 +250,7 @@ public interface CheckAndMutateRowRequestOrBuilder */ java.util.List getTrueMutationsOrBuilderList(); + /** * * @@ -269,6 +280,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ java.util.List getFalseMutationsList(); + /** * * @@ -283,6 +295,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ com.google.bigtable.v2.Mutation getFalseMutations(int index); + /** * * @@ -297,6 +310,7 @@ public interface CheckAndMutateRowRequestOrBuilder * repeated .google.bigtable.v2.Mutation false_mutations = 5; */ int getFalseMutationsCount(); + /** * * @@ -312,6 +326,7 @@ public interface CheckAndMutateRowRequestOrBuilder */ java.util.List getFalseMutationsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java index 35cba2c47e..852a8acf48 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.CheckAndMutateRowResponse} */ -public final class CheckAndMutateRowResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class CheckAndMutateRowResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.CheckAndMutateRowResponse) CheckAndMutateRowResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CheckAndMutateRowResponse"); + } + // Use CheckAndMutateRowResponse.newBuilder() to construct. - private CheckAndMutateRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CheckAndMutateRowResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private CheckAndMutateRowResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CheckAndMutateRowResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowResponse_fieldAccessorTable @@ -63,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int PREDICATE_MATCHED_FIELD_NUMBER = 1; private boolean predicateMatched_ = false; + /** * * @@ -181,38 +189,38 @@ public static com.google.bigtable.v2.CheckAndMutateRowResponse parseFrom( public static com.google.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse 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); } @@ -235,10 +243,11 @@ 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; } + /** * * @@ -248,7 +257,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.CheckAndMutateRowResponse} */ - 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.bigtable.v2.CheckAndMutateRowResponse) com.google.bigtable.v2.CheckAndMutateRowResponseOrBuilder { @@ -258,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowResponse_fieldAccessorTable @@ -270,7 +279,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.CheckAndMutateRowResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -320,39 +329,6 @@ private void buildPartial0(com.google.bigtable.v2.CheckAndMutateRowResponse 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.bigtable.v2.CheckAndMutateRowResponse) { @@ -421,6 +397,7 @@ public Builder mergeFrom( private int bitField0_; private boolean predicateMatched_; + /** * * @@ -437,6 +414,7 @@ public Builder mergeFrom( public boolean getPredicateMatched() { return predicateMatched_; } + /** * * @@ -457,6 +435,7 @@ public Builder setPredicateMatched(boolean value) { onChanged(); return this; } + /** * * @@ -476,17 +455,6 @@ public Builder clearPredicateMatched() { 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.bigtable.v2.CheckAndMutateRowResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponseOrBuilder.java index 5c9843b0c3..d7e3c9567d 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface CheckAndMutateRowResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.CheckAndMutateRowResponse) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfiguration.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfiguration.java new file mode 100644 index 0000000000..0e8c7601b3 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfiguration.java @@ -0,0 +1,3171 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Configuration for the Session API. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ClientConfiguration} + */ +@com.google.protobuf.Generated +public final class ClientConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ClientConfiguration) + ClientConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClientConfiguration"); + } + + // Use ClientConfiguration.newBuilder() to construct. + private ClientConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ClientConfiguration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClientConfiguration.class, + com.google.bigtable.v2.ClientConfiguration.Builder.class); + } + + public interface PollingConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ClientConfiguration.PollingConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return Whether the pollingInterval field is set. + */ + boolean hasPollingInterval(); + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return The pollingInterval. + */ + com.google.protobuf.Duration getPollingInterval(); + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder(); + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return Whether the validityDuration field is set. + */ + boolean hasValidityDuration(); + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return The validityDuration. + */ + com.google.protobuf.Duration getValidityDuration(); + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + com.google.protobuf.DurationOrBuilder getValidityDurationOrBuilder(); + + /** + * + * + *
    +     * Number of times the client should retry a failed
    +     * GetClientConfiguration RPC per polling interval before giving up.
    +     * 
    + * + * int32 max_rpc_retry_count = 6; + * + * @return The maxRpcRetryCount. + */ + int getMaxRpcRetryCount(); + } + + /** Protobuf type {@code google.bigtable.v2.ClientConfiguration.PollingConfiguration} */ + public static final class PollingConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ClientConfiguration.PollingConfiguration) + PollingConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PollingConfiguration"); + } + + // Use PollingConfiguration.newBuilder() to construct. + private PollingConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PollingConfiguration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.class, + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder.class); + } + + private int bitField0_; + public static final int POLLING_INTERVAL_FIELD_NUMBER = 1; + private com.google.protobuf.Duration pollingInterval_; + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return Whether the pollingInterval field is set. + */ + @java.lang.Override + public boolean hasPollingInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return The pollingInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getPollingInterval() { + return pollingInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : pollingInterval_; + } + + /** + * + * + *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder() { + return pollingInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : pollingInterval_; + } + + public static final int VALIDITY_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration validityDuration_; + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return Whether the validityDuration field is set. + */ + @java.lang.Override + public boolean hasValidityDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return The validityDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getValidityDuration() { + return validityDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : validityDuration_; + } + + /** + * + * + *
    +     * How long the client should consider the configuration it receives from
    +     * GetClientConfiguration valid for. Once this duration has passed, the
    +     * client should consider the configuration invalid and must either:
    +     * - Get a new configuration from GetClientConfiguration
    +     * - Or if it cannot, use a sane default configuration
    +     *
    +     * This duration will be at least as long as the polling interval.
    +     * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getValidityDurationOrBuilder() { + return validityDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : validityDuration_; + } + + public static final int MAX_RPC_RETRY_COUNT_FIELD_NUMBER = 6; + private int maxRpcRetryCount_ = 0; + + /** + * + * + *
    +     * Number of times the client should retry a failed
    +     * GetClientConfiguration RPC per polling interval before giving up.
    +     * 
    + * + * int32 max_rpc_retry_count = 6; + * + * @return The maxRpcRetryCount. + */ + @java.lang.Override + public int getMaxRpcRetryCount() { + return maxRpcRetryCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPollingInterval()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getValidityDuration()); + } + if (maxRpcRetryCount_ != 0) { + output.writeInt32(6, maxRpcRetryCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPollingInterval()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValidityDuration()); + } + if (maxRpcRetryCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, maxRpcRetryCount_); + } + 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.bigtable.v2.ClientConfiguration.PollingConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration other = + (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) obj; + + if (hasPollingInterval() != other.hasPollingInterval()) return false; + if (hasPollingInterval()) { + if (!getPollingInterval().equals(other.getPollingInterval())) return false; + } + if (hasValidityDuration() != other.hasValidityDuration()) return false; + if (hasValidityDuration()) { + if (!getValidityDuration().equals(other.getValidityDuration())) return false; + } + if (getMaxRpcRetryCount() != other.getMaxRpcRetryCount()) 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 (hasPollingInterval()) { + hash = (37 * hash) + POLLING_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getPollingInterval().hashCode(); + } + if (hasValidityDuration()) { + hash = (37 * hash) + VALIDITY_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getValidityDuration().hashCode(); + } + hash = (37 * hash) + MAX_RPC_RETRY_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxRpcRetryCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration 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.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration 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.bigtable.v2.ClientConfiguration.PollingConfiguration + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + 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.bigtable.v2.ClientConfiguration.PollingConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration 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.bigtable.v2.ClientConfiguration.PollingConfiguration 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; + } + + /** Protobuf type {@code google.bigtable.v2.ClientConfiguration.PollingConfiguration} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ClientConfiguration.PollingConfiguration) + com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.class, + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder.class); + } + + // Construct using + // com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPollingIntervalFieldBuilder(); + internalGetValidityDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pollingInterval_ = null; + if (pollingIntervalBuilder_ != null) { + pollingIntervalBuilder_.dispose(); + pollingIntervalBuilder_ = null; + } + validityDuration_ = null; + if (validityDurationBuilder_ != null) { + validityDurationBuilder_.dispose(); + validityDurationBuilder_ = null; + } + maxRpcRetryCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + getDefaultInstanceForType() { + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration build() { + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration buildPartial() { + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration result = + new com.google.bigtable.v2.ClientConfiguration.PollingConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pollingInterval_ = + pollingIntervalBuilder_ == null ? pollingInterval_ : pollingIntervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validityDuration_ = + validityDurationBuilder_ == null + ? validityDuration_ + : validityDurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxRpcRetryCount_ = maxRpcRetryCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) { + return mergeFrom((com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration other) { + if (other + == com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance()) + return this; + if (other.hasPollingInterval()) { + mergePollingInterval(other.getPollingInterval()); + } + if (other.hasValidityDuration()) { + mergeValidityDuration(other.getValidityDuration()); + } + if (other.getMaxRpcRetryCount() != 0) { + setMaxRpcRetryCount(other.getMaxRpcRetryCount()); + } + 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( + internalGetPollingIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetValidityDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 48: + { + maxRpcRetryCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + 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 com.google.protobuf.Duration pollingInterval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + pollingIntervalBuilder_; + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return Whether the pollingInterval field is set. + */ + public boolean hasPollingInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + * + * @return The pollingInterval. + */ + public com.google.protobuf.Duration getPollingInterval() { + if (pollingIntervalBuilder_ == null) { + return pollingInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : pollingInterval_; + } else { + return pollingIntervalBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public Builder setPollingInterval(com.google.protobuf.Duration value) { + if (pollingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pollingInterval_ = value; + } else { + pollingIntervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public Builder setPollingInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (pollingIntervalBuilder_ == null) { + pollingInterval_ = builderForValue.build(); + } else { + pollingIntervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public Builder mergePollingInterval(com.google.protobuf.Duration value) { + if (pollingIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && pollingInterval_ != null + && pollingInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { + getPollingIntervalBuilder().mergeFrom(value); + } else { + pollingInterval_ = value; + } + } else { + pollingIntervalBuilder_.mergeFrom(value); + } + if (pollingInterval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public Builder clearPollingInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + pollingInterval_ = null; + if (pollingIntervalBuilder_ != null) { + pollingIntervalBuilder_.dispose(); + pollingIntervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public com.google.protobuf.Duration.Builder getPollingIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPollingIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + public com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder() { + if (pollingIntervalBuilder_ != null) { + return pollingIntervalBuilder_.getMessageOrBuilder(); + } else { + return pollingInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : pollingInterval_; + } + } + + /** + * + * + *
    +       * A duration describing the time between GetClientConfiguration RPCs.
    +       * Only strictly positive values are permissible.
    +       * 
    + * + * .google.protobuf.Duration polling_interval = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetPollingIntervalFieldBuilder() { + if (pollingIntervalBuilder_ == null) { + pollingIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getPollingInterval(), getParentForChildren(), isClean()); + pollingInterval_ = null; + } + return pollingIntervalBuilder_; + } + + private com.google.protobuf.Duration validityDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + validityDurationBuilder_; + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return Whether the validityDuration field is set. + */ + public boolean hasValidityDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + * + * @return The validityDuration. + */ + public com.google.protobuf.Duration getValidityDuration() { + if (validityDurationBuilder_ == null) { + return validityDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : validityDuration_; + } else { + return validityDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public Builder setValidityDuration(com.google.protobuf.Duration value) { + if (validityDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validityDuration_ = value; + } else { + validityDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public Builder setValidityDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (validityDurationBuilder_ == null) { + validityDuration_ = builderForValue.build(); + } else { + validityDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public Builder mergeValidityDuration(com.google.protobuf.Duration value) { + if (validityDurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && validityDuration_ != null + && validityDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getValidityDurationBuilder().mergeFrom(value); + } else { + validityDuration_ = value; + } + } else { + validityDurationBuilder_.mergeFrom(value); + } + if (validityDuration_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public Builder clearValidityDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + validityDuration_ = null; + if (validityDurationBuilder_ != null) { + validityDurationBuilder_.dispose(); + validityDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public com.google.protobuf.Duration.Builder getValidityDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetValidityDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getValidityDurationOrBuilder() { + if (validityDurationBuilder_ != null) { + return validityDurationBuilder_.getMessageOrBuilder(); + } else { + return validityDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : validityDuration_; + } + } + + /** + * + * + *
    +       * How long the client should consider the configuration it receives from
    +       * GetClientConfiguration valid for. Once this duration has passed, the
    +       * client should consider the configuration invalid and must either:
    +       * - Get a new configuration from GetClientConfiguration
    +       * - Or if it cannot, use a sane default configuration
    +       *
    +       * This duration will be at least as long as the polling interval.
    +       * 
    + * + * .google.protobuf.Duration validity_duration = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetValidityDurationFieldBuilder() { + if (validityDurationBuilder_ == null) { + validityDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getValidityDuration(), getParentForChildren(), isClean()); + validityDuration_ = null; + } + return validityDurationBuilder_; + } + + private int maxRpcRetryCount_; + + /** + * + * + *
    +       * Number of times the client should retry a failed
    +       * GetClientConfiguration RPC per polling interval before giving up.
    +       * 
    + * + * int32 max_rpc_retry_count = 6; + * + * @return The maxRpcRetryCount. + */ + @java.lang.Override + public int getMaxRpcRetryCount() { + return maxRpcRetryCount_; + } + + /** + * + * + *
    +       * Number of times the client should retry a failed
    +       * GetClientConfiguration RPC per polling interval before giving up.
    +       * 
    + * + * int32 max_rpc_retry_count = 6; + * + * @param value The maxRpcRetryCount to set. + * @return This builder for chaining. + */ + public Builder setMaxRpcRetryCount(int value) { + + maxRpcRetryCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Number of times the client should retry a failed
    +       * GetClientConfiguration RPC per polling interval before giving up.
    +       * 
    + * + * int32 max_rpc_retry_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearMaxRpcRetryCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxRpcRetryCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ClientConfiguration.PollingConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ClientConfiguration.PollingConfiguration) + private static final com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ClientConfiguration.PollingConfiguration(); + } + + public static com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PollingConfiguration 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.bigtable.v2.ClientConfiguration.PollingConfiguration + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int pollingCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object polling_; + + public enum PollingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STOP_POLLING(3), + @java.lang.Deprecated + POLLING_INTERVAL(4), + POLLING_CONFIGURATION(5), + POLLING_NOT_SET(0); + private final int value; + + private PollingCase(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 PollingCase valueOf(int value) { + return forNumber(value); + } + + public static PollingCase forNumber(int value) { + switch (value) { + case 3: + return STOP_POLLING; + case 4: + return POLLING_INTERVAL; + case 5: + return POLLING_CONFIGURATION; + case 0: + return POLLING_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PollingCase getPollingCase() { + return PollingCase.forNumber(pollingCase_); + } + + public static final int SESSION_CONFIGURATION_FIELD_NUMBER = 2; + private com.google.bigtable.v2.SessionClientConfiguration sessionConfiguration_; + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return Whether the sessionConfiguration field is set. + */ + @java.lang.Override + public boolean hasSessionConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return The sessionConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration getSessionConfiguration() { + return sessionConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance() + : sessionConfiguration_; + } + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfigurationOrBuilder + getSessionConfigurationOrBuilder() { + return sessionConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance() + : sessionConfiguration_; + } + + public static final int STOP_POLLING_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * If the client should cease to check for new configurations, e.g. a
    +   * backstop to prevent excessive GetClientConfiguration RPCs.
    +   * 
    + * + * bool stop_polling = 3; + * + * @return Whether the stopPolling field is set. + */ + @java.lang.Override + public boolean hasStopPolling() { + return pollingCase_ == 3; + } + + /** + * + * + *
    +   * If the client should cease to check for new configurations, e.g. a
    +   * backstop to prevent excessive GetClientConfiguration RPCs.
    +   * 
    + * + * bool stop_polling = 3; + * + * @return The stopPolling. + */ + @java.lang.Override + public boolean getStopPolling() { + if (pollingCase_ == 3) { + return (java.lang.Boolean) polling_; + } + return false; + } + + public static final int POLLING_INTERVAL_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return Whether the pollingInterval field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasPollingInterval() { + return pollingCase_ == 4; + } + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return The pollingInterval. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Duration getPollingInterval() { + if (pollingCase_ == 4) { + return (com.google.protobuf.Duration) polling_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder() { + if (pollingCase_ == 4) { + return (com.google.protobuf.Duration) polling_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int POLLING_CONFIGURATION_FIELD_NUMBER = 5; + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return Whether the pollingConfiguration field is set. + */ + @java.lang.Override + public boolean hasPollingConfiguration() { + return pollingCase_ == 5; + } + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return The pollingConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration getPollingConfiguration() { + if (pollingCase_ == 5) { + return (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_; + } + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder + getPollingConfigurationOrBuilder() { + if (pollingCase_ == 5) { + return (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_; + } + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + + public static final int TELEMETRY_CONFIGURATION_FIELD_NUMBER = 6; + private com.google.bigtable.v2.TelemetryConfiguration telemetryConfiguration_; + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return Whether the telemetryConfiguration field is set. + */ + @java.lang.Override + public boolean hasTelemetryConfiguration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return The telemetryConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration getTelemetryConfiguration() { + return telemetryConfiguration_ == null + ? com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance() + : telemetryConfiguration_; + } + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfigurationOrBuilder + getTelemetryConfigurationOrBuilder() { + return telemetryConfiguration_ == null + ? com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance() + : telemetryConfiguration_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSessionConfiguration()); + } + if (pollingCase_ == 3) { + output.writeBool(3, (boolean) ((java.lang.Boolean) polling_)); + } + if (pollingCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Duration) polling_); + } + if (pollingCase_ == 5) { + output.writeMessage( + 5, (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getTelemetryConfiguration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSessionConfiguration()); + } + if (pollingCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, (boolean) ((java.lang.Boolean) polling_)); + } + if (pollingCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Duration) polling_); + } + if (pollingCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTelemetryConfiguration()); + } + 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.bigtable.v2.ClientConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.ClientConfiguration other = + (com.google.bigtable.v2.ClientConfiguration) obj; + + if (hasSessionConfiguration() != other.hasSessionConfiguration()) return false; + if (hasSessionConfiguration()) { + if (!getSessionConfiguration().equals(other.getSessionConfiguration())) return false; + } + if (hasTelemetryConfiguration() != other.hasTelemetryConfiguration()) return false; + if (hasTelemetryConfiguration()) { + if (!getTelemetryConfiguration().equals(other.getTelemetryConfiguration())) return false; + } + if (!getPollingCase().equals(other.getPollingCase())) return false; + switch (pollingCase_) { + case 3: + if (getStopPolling() != other.getStopPolling()) return false; + break; + case 4: + if (!getPollingInterval().equals(other.getPollingInterval())) return false; + break; + case 5: + if (!getPollingConfiguration().equals(other.getPollingConfiguration())) 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 (hasSessionConfiguration()) { + hash = (37 * hash) + SESSION_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getSessionConfiguration().hashCode(); + } + if (hasTelemetryConfiguration()) { + hash = (37 * hash) + TELEMETRY_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getTelemetryConfiguration().hashCode(); + } + switch (pollingCase_) { + case 3: + hash = (37 * hash) + STOP_POLLING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStopPolling()); + break; + case 4: + hash = (37 * hash) + POLLING_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getPollingInterval().hashCode(); + break; + case 5: + hash = (37 * hash) + POLLING_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getPollingConfiguration().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ClientConfiguration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClientConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration 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.bigtable.v2.ClientConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClientConfiguration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClientConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration 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.bigtable.v2.ClientConfiguration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration 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.bigtable.v2.ClientConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClientConfiguration 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.bigtable.v2.ClientConfiguration 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; + } + + /** + * + * + *
    +   * Configuration for the Session API. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ClientConfiguration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ClientConfiguration) + com.google.bigtable.v2.ClientConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClientConfiguration.class, + com.google.bigtable.v2.ClientConfiguration.Builder.class); + } + + // Construct using com.google.bigtable.v2.ClientConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSessionConfigurationFieldBuilder(); + internalGetTelemetryConfigurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sessionConfiguration_ = null; + if (sessionConfigurationBuilder_ != null) { + sessionConfigurationBuilder_.dispose(); + sessionConfigurationBuilder_ = null; + } + if (pollingIntervalBuilder_ != null) { + pollingIntervalBuilder_.clear(); + } + if (pollingConfigurationBuilder_ != null) { + pollingConfigurationBuilder_.clear(); + } + telemetryConfiguration_ = null; + if (telemetryConfigurationBuilder_ != null) { + telemetryConfigurationBuilder_.dispose(); + telemetryConfigurationBuilder_ = null; + } + pollingCase_ = 0; + polling_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClientConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration getDefaultInstanceForType() { + return com.google.bigtable.v2.ClientConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration build() { + com.google.bigtable.v2.ClientConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration buildPartial() { + com.google.bigtable.v2.ClientConfiguration result = + new com.google.bigtable.v2.ClientConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ClientConfiguration result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sessionConfiguration_ = + sessionConfigurationBuilder_ == null + ? sessionConfiguration_ + : sessionConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.telemetryConfiguration_ = + telemetryConfigurationBuilder_ == null + ? telemetryConfiguration_ + : telemetryConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.ClientConfiguration result) { + result.pollingCase_ = pollingCase_; + result.polling_ = this.polling_; + if (pollingCase_ == 4 && pollingIntervalBuilder_ != null) { + result.polling_ = pollingIntervalBuilder_.build(); + } + if (pollingCase_ == 5 && pollingConfigurationBuilder_ != null) { + result.polling_ = pollingConfigurationBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ClientConfiguration) { + return mergeFrom((com.google.bigtable.v2.ClientConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ClientConfiguration other) { + if (other == com.google.bigtable.v2.ClientConfiguration.getDefaultInstance()) return this; + if (other.hasSessionConfiguration()) { + mergeSessionConfiguration(other.getSessionConfiguration()); + } + if (other.hasTelemetryConfiguration()) { + mergeTelemetryConfiguration(other.getTelemetryConfiguration()); + } + switch (other.getPollingCase()) { + case STOP_POLLING: + { + setStopPolling(other.getStopPolling()); + break; + } + case POLLING_INTERVAL: + { + mergePollingInterval(other.getPollingInterval()); + break; + } + case POLLING_CONFIGURATION: + { + mergePollingConfiguration(other.getPollingConfiguration()); + break; + } + case POLLING_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 18: + { + input.readMessage( + internalGetSessionConfigurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + polling_ = input.readBool(); + pollingCase_ = 3; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetPollingIntervalFieldBuilder().getBuilder(), extensionRegistry); + pollingCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetPollingConfigurationFieldBuilder().getBuilder(), extensionRegistry); + pollingCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetTelemetryConfigurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int pollingCase_ = 0; + private java.lang.Object polling_; + + public PollingCase getPollingCase() { + return PollingCase.forNumber(pollingCase_); + } + + public Builder clearPolling() { + pollingCase_ = 0; + polling_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.SessionClientConfiguration sessionConfiguration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfigurationOrBuilder> + sessionConfigurationBuilder_; + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return Whether the sessionConfiguration field is set. + */ + public boolean hasSessionConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return The sessionConfiguration. + */ + public com.google.bigtable.v2.SessionClientConfiguration getSessionConfiguration() { + if (sessionConfigurationBuilder_ == null) { + return sessionConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance() + : sessionConfiguration_; + } else { + return sessionConfigurationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public Builder setSessionConfiguration( + com.google.bigtable.v2.SessionClientConfiguration value) { + if (sessionConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionConfiguration_ = value; + } else { + sessionConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public Builder setSessionConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.Builder builderForValue) { + if (sessionConfigurationBuilder_ == null) { + sessionConfiguration_ = builderForValue.build(); + } else { + sessionConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public Builder mergeSessionConfiguration( + com.google.bigtable.v2.SessionClientConfiguration value) { + if (sessionConfigurationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sessionConfiguration_ != null + && sessionConfiguration_ + != com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance()) { + getSessionConfigurationBuilder().mergeFrom(value); + } else { + sessionConfiguration_ = value; + } + } else { + sessionConfigurationBuilder_.mergeFrom(value); + } + if (sessionConfiguration_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public Builder clearSessionConfiguration() { + bitField0_ = (bitField0_ & ~0x00000001); + sessionConfiguration_ = null; + if (sessionConfigurationBuilder_ != null) { + sessionConfigurationBuilder_.dispose(); + sessionConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public com.google.bigtable.v2.SessionClientConfiguration.Builder + getSessionConfigurationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSessionConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + public com.google.bigtable.v2.SessionClientConfigurationOrBuilder + getSessionConfigurationOrBuilder() { + if (sessionConfigurationBuilder_ != null) { + return sessionConfigurationBuilder_.getMessageOrBuilder(); + } else { + return sessionConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance() + : sessionConfiguration_; + } + } + + /** + * + * + *
    +     * The configuration for Bigtable Sessions.
    +     * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfigurationOrBuilder> + internalGetSessionConfigurationFieldBuilder() { + if (sessionConfigurationBuilder_ == null) { + sessionConfigurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfigurationOrBuilder>( + getSessionConfiguration(), getParentForChildren(), isClean()); + sessionConfiguration_ = null; + } + return sessionConfigurationBuilder_; + } + + /** + * + * + *
    +     * If the client should cease to check for new configurations, e.g. a
    +     * backstop to prevent excessive GetClientConfiguration RPCs.
    +     * 
    + * + * bool stop_polling = 3; + * + * @return Whether the stopPolling field is set. + */ + public boolean hasStopPolling() { + return pollingCase_ == 3; + } + + /** + * + * + *
    +     * If the client should cease to check for new configurations, e.g. a
    +     * backstop to prevent excessive GetClientConfiguration RPCs.
    +     * 
    + * + * bool stop_polling = 3; + * + * @return The stopPolling. + */ + public boolean getStopPolling() { + if (pollingCase_ == 3) { + return (java.lang.Boolean) polling_; + } + return false; + } + + /** + * + * + *
    +     * If the client should cease to check for new configurations, e.g. a
    +     * backstop to prevent excessive GetClientConfiguration RPCs.
    +     * 
    + * + * bool stop_polling = 3; + * + * @param value The stopPolling to set. + * @return This builder for chaining. + */ + public Builder setStopPolling(boolean value) { + + pollingCase_ = 3; + polling_ = value; + onChanged(); + return this; + } + + /** + * + * + *
    +     * If the client should cease to check for new configurations, e.g. a
    +     * backstop to prevent excessive GetClientConfiguration RPCs.
    +     * 
    + * + * bool stop_polling = 3; + * + * @return This builder for chaining. + */ + public Builder clearStopPolling() { + if (pollingCase_ == 3) { + pollingCase_ = 0; + polling_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + pollingIntervalBuilder_; + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return Whether the pollingInterval field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasPollingInterval() { + return pollingCase_ == 4; + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return The pollingInterval. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.Duration getPollingInterval() { + if (pollingIntervalBuilder_ == null) { + if (pollingCase_ == 4) { + return (com.google.protobuf.Duration) polling_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (pollingCase_ == 4) { + return pollingIntervalBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setPollingInterval(com.google.protobuf.Duration value) { + if (pollingIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + polling_ = value; + onChanged(); + } else { + pollingIntervalBuilder_.setMessage(value); + } + pollingCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder setPollingInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (pollingIntervalBuilder_ == null) { + polling_ = builderForValue.build(); + onChanged(); + } else { + pollingIntervalBuilder_.setMessage(builderForValue.build()); + } + pollingCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder mergePollingInterval(com.google.protobuf.Duration value) { + if (pollingIntervalBuilder_ == null) { + if (pollingCase_ == 4 && polling_ != com.google.protobuf.Duration.getDefaultInstance()) { + polling_ = + com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) polling_) + .mergeFrom(value) + .buildPartial(); + } else { + polling_ = value; + } + onChanged(); + } else { + if (pollingCase_ == 4) { + pollingIntervalBuilder_.mergeFrom(value); + } else { + pollingIntervalBuilder_.setMessage(value); + } + } + pollingCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + public Builder clearPollingInterval() { + if (pollingIntervalBuilder_ == null) { + if (pollingCase_ == 4) { + pollingCase_ = 0; + polling_ = null; + onChanged(); + } + } else { + if (pollingCase_ == 4) { + pollingCase_ = 0; + polling_ = null; + } + pollingIntervalBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + public com.google.protobuf.Duration.Builder getPollingIntervalBuilder() { + return internalGetPollingIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder() { + if ((pollingCase_ == 4) && (pollingIntervalBuilder_ != null)) { + return pollingIntervalBuilder_.getMessageOrBuilder(); + } else { + if (pollingCase_ == 4) { + return (com.google.protobuf.Duration) polling_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Deprecated, prerfer polling_configuration.
    +     *
    +     * A duration describing the time between GetClientConfiguration RPCs.
    +     * Only strictly positive values are permissible.
    +     * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetPollingIntervalFieldBuilder() { + if (pollingIntervalBuilder_ == null) { + if (!(pollingCase_ == 4)) { + polling_ = com.google.protobuf.Duration.getDefaultInstance(); + } + pollingIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) polling_, getParentForChildren(), isClean()); + polling_ = null; + } + pollingCase_ = 4; + onChanged(); + return pollingIntervalBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration, + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder, + com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder> + pollingConfigurationBuilder_; + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return Whether the pollingConfiguration field is set. + */ + @java.lang.Override + public boolean hasPollingConfiguration() { + return pollingCase_ == 5; + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return The pollingConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + getPollingConfiguration() { + if (pollingConfigurationBuilder_ == null) { + if (pollingCase_ == 5) { + return (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_; + } + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } else { + if (pollingCase_ == 5) { + return pollingConfigurationBuilder_.getMessage(); + } + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + public Builder setPollingConfiguration( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration value) { + if (pollingConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + polling_ = value; + onChanged(); + } else { + pollingConfigurationBuilder_.setMessage(value); + } + pollingCase_ = 5; + return this; + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + public Builder setPollingConfiguration( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder builderForValue) { + if (pollingConfigurationBuilder_ == null) { + polling_ = builderForValue.build(); + onChanged(); + } else { + pollingConfigurationBuilder_.setMessage(builderForValue.build()); + } + pollingCase_ = 5; + return this; + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + public Builder mergePollingConfiguration( + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration value) { + if (pollingConfigurationBuilder_ == null) { + if (pollingCase_ == 5 + && polling_ + != com.google.bigtable.v2.ClientConfiguration.PollingConfiguration + .getDefaultInstance()) { + polling_ = + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.newBuilder( + (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_) + .mergeFrom(value) + .buildPartial(); + } else { + polling_ = value; + } + onChanged(); + } else { + if (pollingCase_ == 5) { + pollingConfigurationBuilder_.mergeFrom(value); + } else { + pollingConfigurationBuilder_.setMessage(value); + } + } + pollingCase_ = 5; + return this; + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + public Builder clearPollingConfiguration() { + if (pollingConfigurationBuilder_ == null) { + if (pollingCase_ == 5) { + pollingCase_ = 0; + polling_ = null; + onChanged(); + } + } else { + if (pollingCase_ == 5) { + pollingCase_ = 0; + polling_ = null; + } + pollingConfigurationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + public com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder + getPollingConfigurationBuilder() { + return internalGetPollingConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder + getPollingConfigurationOrBuilder() { + if ((pollingCase_ == 5) && (pollingConfigurationBuilder_ != null)) { + return pollingConfigurationBuilder_.getMessageOrBuilder(); + } else { + if (pollingCase_ == 5) { + return (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_; + } + return com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * If the client should continue to check for new configurations.
    +     * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration, + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder, + com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder> + internalGetPollingConfigurationFieldBuilder() { + if (pollingConfigurationBuilder_ == null) { + if (!(pollingCase_ == 5)) { + polling_ = + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.getDefaultInstance(); + } + pollingConfigurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration, + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration.Builder, + com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder>( + (com.google.bigtable.v2.ClientConfiguration.PollingConfiguration) polling_, + getParentForChildren(), + isClean()); + polling_ = null; + } + pollingCase_ = 5; + onChanged(); + return pollingConfigurationBuilder_; + } + + private com.google.bigtable.v2.TelemetryConfiguration telemetryConfiguration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.TelemetryConfiguration, + com.google.bigtable.v2.TelemetryConfiguration.Builder, + com.google.bigtable.v2.TelemetryConfigurationOrBuilder> + telemetryConfigurationBuilder_; + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return Whether the telemetryConfiguration field is set. + */ + public boolean hasTelemetryConfiguration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return The telemetryConfiguration. + */ + public com.google.bigtable.v2.TelemetryConfiguration getTelemetryConfiguration() { + if (telemetryConfigurationBuilder_ == null) { + return telemetryConfiguration_ == null + ? com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance() + : telemetryConfiguration_; + } else { + return telemetryConfigurationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public Builder setTelemetryConfiguration(com.google.bigtable.v2.TelemetryConfiguration value) { + if (telemetryConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + telemetryConfiguration_ = value; + } else { + telemetryConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public Builder setTelemetryConfiguration( + com.google.bigtable.v2.TelemetryConfiguration.Builder builderForValue) { + if (telemetryConfigurationBuilder_ == null) { + telemetryConfiguration_ = builderForValue.build(); + } else { + telemetryConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public Builder mergeTelemetryConfiguration( + com.google.bigtable.v2.TelemetryConfiguration value) { + if (telemetryConfigurationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && telemetryConfiguration_ != null + && telemetryConfiguration_ + != com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance()) { + getTelemetryConfigurationBuilder().mergeFrom(value); + } else { + telemetryConfiguration_ = value; + } + } else { + telemetryConfigurationBuilder_.mergeFrom(value); + } + if (telemetryConfiguration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public Builder clearTelemetryConfiguration() { + bitField0_ = (bitField0_ & ~0x00000010); + telemetryConfiguration_ = null; + if (telemetryConfigurationBuilder_ != null) { + telemetryConfigurationBuilder_.dispose(); + telemetryConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public com.google.bigtable.v2.TelemetryConfiguration.Builder + getTelemetryConfigurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetTelemetryConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + public com.google.bigtable.v2.TelemetryConfigurationOrBuilder + getTelemetryConfigurationOrBuilder() { + if (telemetryConfigurationBuilder_ != null) { + return telemetryConfigurationBuilder_.getMessageOrBuilder(); + } else { + return telemetryConfiguration_ == null + ? com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance() + : telemetryConfiguration_; + } + } + + /** + * + * + *
    +     * Configuration for telemetry.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.TelemetryConfiguration, + com.google.bigtable.v2.TelemetryConfiguration.Builder, + com.google.bigtable.v2.TelemetryConfigurationOrBuilder> + internalGetTelemetryConfigurationFieldBuilder() { + if (telemetryConfigurationBuilder_ == null) { + telemetryConfigurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.TelemetryConfiguration, + com.google.bigtable.v2.TelemetryConfiguration.Builder, + com.google.bigtable.v2.TelemetryConfigurationOrBuilder>( + getTelemetryConfiguration(), getParentForChildren(), isClean()); + telemetryConfiguration_ = null; + } + return telemetryConfigurationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ClientConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ClientConfiguration) + private static final com.google.bigtable.v2.ClientConfiguration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ClientConfiguration(); + } + + public static com.google.bigtable.v2.ClientConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClientConfiguration 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.bigtable.v2.ClientConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfigurationOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfigurationOrBuilder.java new file mode 100644 index 0000000000..c0e671a1f5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClientConfigurationOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface ClientConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ClientConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return Whether the sessionConfiguration field is set. + */ + boolean hasSessionConfiguration(); + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + * + * @return The sessionConfiguration. + */ + com.google.bigtable.v2.SessionClientConfiguration getSessionConfiguration(); + + /** + * + * + *
    +   * The configuration for Bigtable Sessions.
    +   * 
    + * + * .google.bigtable.v2.SessionClientConfiguration session_configuration = 2; + */ + com.google.bigtable.v2.SessionClientConfigurationOrBuilder getSessionConfigurationOrBuilder(); + + /** + * + * + *
    +   * If the client should cease to check for new configurations, e.g. a
    +   * backstop to prevent excessive GetClientConfiguration RPCs.
    +   * 
    + * + * bool stop_polling = 3; + * + * @return Whether the stopPolling field is set. + */ + boolean hasStopPolling(); + + /** + * + * + *
    +   * If the client should cease to check for new configurations, e.g. a
    +   * backstop to prevent excessive GetClientConfiguration RPCs.
    +   * 
    + * + * bool stop_polling = 3; + * + * @return The stopPolling. + */ + boolean getStopPolling(); + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return Whether the pollingInterval field is set. + */ + @java.lang.Deprecated + boolean hasPollingInterval(); + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + * + * @deprecated google.bigtable.v2.ClientConfiguration.polling_interval is deprecated. See + * google/bigtable/v2/session.proto;l=288 + * @return The pollingInterval. + */ + @java.lang.Deprecated + com.google.protobuf.Duration getPollingInterval(); + + /** + * + * + *
    +   * Deprecated, prerfer polling_configuration.
    +   *
    +   * A duration describing the time between GetClientConfiguration RPCs.
    +   * Only strictly positive values are permissible.
    +   * 
    + * + * .google.protobuf.Duration polling_interval = 4 [deprecated = true]; + */ + @java.lang.Deprecated + com.google.protobuf.DurationOrBuilder getPollingIntervalOrBuilder(); + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return Whether the pollingConfiguration field is set. + */ + boolean hasPollingConfiguration(); + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + * + * @return The pollingConfiguration. + */ + com.google.bigtable.v2.ClientConfiguration.PollingConfiguration getPollingConfiguration(); + + /** + * + * + *
    +   * If the client should continue to check for new configurations.
    +   * 
    + * + * .google.bigtable.v2.ClientConfiguration.PollingConfiguration polling_configuration = 5; + * + */ + com.google.bigtable.v2.ClientConfiguration.PollingConfigurationOrBuilder + getPollingConfigurationOrBuilder(); + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return Whether the telemetryConfiguration field is set. + */ + boolean hasTelemetryConfiguration(); + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + * + * @return The telemetryConfiguration. + */ + com.google.bigtable.v2.TelemetryConfiguration getTelemetryConfiguration(); + + /** + * + * + *
    +   * Configuration for telemetry.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration telemetry_configuration = 6; + */ + com.google.bigtable.v2.TelemetryConfigurationOrBuilder getTelemetryConfigurationOrBuilder(); + + com.google.bigtable.v2.ClientConfiguration.PollingCase getPollingCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequest.java new file mode 100644 index 0000000000..9cb65a2fd5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequest.java @@ -0,0 +1,821 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.CloseSessionRequest} + */ +@com.google.protobuf.Generated +public final class CloseSessionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.CloseSessionRequest) + CloseSessionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloseSessionRequest"); + } + + // Use CloseSessionRequest.newBuilder() to construct. + private CloseSessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloseSessionRequest() { + reason_ = 0; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_CloseSessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_CloseSessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.CloseSessionRequest.class, + com.google.bigtable.v2.CloseSessionRequest.Builder.class); + } + + /** + * + * + *
    +   * Client-generated reason for terminating the session, including a
    +   * plain-text description of why.
    +   * 'reason' may be used for metrics, while both may be logged (server-side).
    +   * 
    + * + * Protobuf enum {@code google.bigtable.v2.CloseSessionRequest.CloseSessionReason} + */ + public enum CloseSessionReason implements com.google.protobuf.ProtocolMessageEnum { + /** CLOSE_SESSION_REASON_UNSET = 0; */ + CLOSE_SESSION_REASON_UNSET(0), + /** CLOSE_SESSION_REASON_GOAWAY = 1; */ + CLOSE_SESSION_REASON_GOAWAY(1), + /** CLOSE_SESSION_REASON_ERROR = 2; */ + CLOSE_SESSION_REASON_ERROR(2), + /** CLOSE_SESSION_REASON_USER = 3; */ + CLOSE_SESSION_REASON_USER(3), + /** CLOSE_SESSION_REASON_DOWNSIZE = 4; */ + CLOSE_SESSION_REASON_DOWNSIZE(4), + /** CLOSE_SESSION_REASON_MISSED_HEARTBEAT = 5; */ + CLOSE_SESSION_REASON_MISSED_HEARTBEAT(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloseSessionReason"); + } + + /** CLOSE_SESSION_REASON_UNSET = 0; */ + public static final int CLOSE_SESSION_REASON_UNSET_VALUE = 0; + + /** CLOSE_SESSION_REASON_GOAWAY = 1; */ + public static final int CLOSE_SESSION_REASON_GOAWAY_VALUE = 1; + + /** CLOSE_SESSION_REASON_ERROR = 2; */ + public static final int CLOSE_SESSION_REASON_ERROR_VALUE = 2; + + /** CLOSE_SESSION_REASON_USER = 3; */ + public static final int CLOSE_SESSION_REASON_USER_VALUE = 3; + + /** CLOSE_SESSION_REASON_DOWNSIZE = 4; */ + public static final int CLOSE_SESSION_REASON_DOWNSIZE_VALUE = 4; + + /** CLOSE_SESSION_REASON_MISSED_HEARTBEAT = 5; */ + public static final int CLOSE_SESSION_REASON_MISSED_HEARTBEAT_VALUE = 5; + + 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 CloseSessionReason 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 CloseSessionReason forNumber(int value) { + switch (value) { + case 0: + return CLOSE_SESSION_REASON_UNSET; + case 1: + return CLOSE_SESSION_REASON_GOAWAY; + case 2: + return CLOSE_SESSION_REASON_ERROR; + case 3: + return CLOSE_SESSION_REASON_USER; + case 4: + return CLOSE_SESSION_REASON_DOWNSIZE; + case 5: + return CLOSE_SESSION_REASON_MISSED_HEARTBEAT; + 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 CloseSessionReason findValueByNumber(int number) { + return CloseSessionReason.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.bigtable.v2.CloseSessionRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final CloseSessionReason[] VALUES = values(); + + public static CloseSessionReason 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 CloseSessionReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.CloseSessionRequest.CloseSessionReason) + } + + public static final int REASON_FIELD_NUMBER = 1; + private int reason_ = 0; + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The reason. + */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason getReason() { + com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason result = + com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.forNumber(reason_); + return result == null + ? com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = 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 (reason_ + != com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_UNSET + .getNumber()) { + output.writeEnum(1, reason_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reason_ + != com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.CLOSE_SESSION_REASON_UNSET + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, reason_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + 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.bigtable.v2.CloseSessionRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.CloseSessionRequest other = + (com.google.bigtable.v2.CloseSessionRequest) obj; + + if (reason_ != other.reason_) return false; + if (!getDescription().equals(other.getDescription())) 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) + REASON_FIELD_NUMBER; + hash = (53 * hash) + reason_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.CloseSessionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.CloseSessionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.CloseSessionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.CloseSessionRequest 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.bigtable.v2.CloseSessionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.CloseSessionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.CloseSessionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.CloseSessionRequest 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.bigtable.v2.CloseSessionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.CloseSessionRequest 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.bigtable.v2.CloseSessionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.CloseSessionRequest 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.bigtable.v2.CloseSessionRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.CloseSessionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.CloseSessionRequest) + com.google.bigtable.v2.CloseSessionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_CloseSessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_CloseSessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.CloseSessionRequest.class, + com.google.bigtable.v2.CloseSessionRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.CloseSessionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reason_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_CloseSessionRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest build() { + com.google.bigtable.v2.CloseSessionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest buildPartial() { + com.google.bigtable.v2.CloseSessionRequest result = + new com.google.bigtable.v2.CloseSessionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.CloseSessionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.reason_ = reason_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.CloseSessionRequest) { + return mergeFrom((com.google.bigtable.v2.CloseSessionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.CloseSessionRequest other) { + if (other == com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance()) return this; + if (other.reason_ != 0) { + setReasonValue(other.getReasonValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + reason_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int reason_ = 0; + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The enum numeric value on the wire for reason. + */ + @java.lang.Override + public int getReasonValue() { + return reason_; + } + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @param value The enum numeric value on the wire for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonValue(int value) { + reason_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The reason. + */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason getReason() { + com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason result = + com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.forNumber(reason_); + return result == null + ? com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason.UNRECOGNIZED + : result; + } + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + reason_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return This builder for chaining. + */ + public Builder clearReason() { + bitField0_ = (bitField0_ & ~0x00000001); + reason_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.CloseSessionRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.CloseSessionRequest) + private static final com.google.bigtable.v2.CloseSessionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.CloseSessionRequest(); + } + + public static com.google.bigtable.v2.CloseSessionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloseSessionRequest 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.bigtable.v2.CloseSessionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequestOrBuilder.java new file mode 100644 index 0000000000..e7f1fd2994 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CloseSessionRequestOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface CloseSessionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.CloseSessionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The enum numeric value on the wire for reason. + */ + int getReasonValue(); + + /** + * .google.bigtable.v2.CloseSessionRequest.CloseSessionReason reason = 1; + * + * @return The reason. + */ + com.google.bigtable.v2.CloseSessionRequest.CloseSessionReason getReason(); + + /** + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformation.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformation.java new file mode 100644 index 0000000000..9e7d108425 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformation.java @@ -0,0 +1,702 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Information on which Cluster served a vRPC, e.g. for Client-Side metrics.
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ClusterInformation} + */ +@com.google.protobuf.Generated +public final class ClusterInformation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ClusterInformation) + ClusterInformationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ClusterInformation"); + } + + // Use ClusterInformation.newBuilder() to construct. + private ClusterInformation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ClusterInformation() { + clusterId_ = ""; + zoneId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClusterInformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClusterInformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClusterInformation.class, + com.google.bigtable.v2.ClusterInformation.Builder.class); + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + + /** + * string cluster_id = 1; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + 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(); + clusterId_ = s; + return s; + } + } + + /** + * string cluster_id = 1; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zoneId_ = ""; + + /** + * string zone_id = 2; + * + * @return The zoneId. + */ + @java.lang.Override + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + 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(); + zoneId_ = s; + return s; + } + } + + /** + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zoneId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, zoneId_); + } + 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(clusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clusterId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zoneId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, zoneId_); + } + 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.bigtable.v2.ClusterInformation)) { + return super.equals(obj); + } + com.google.bigtable.v2.ClusterInformation other = + (com.google.bigtable.v2.ClusterInformation) obj; + + if (!getClusterId().equals(other.getClusterId())) return false; + if (!getZoneId().equals(other.getZoneId())) 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) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + hash = (37 * hash) + ZONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getZoneId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ClusterInformation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClusterInformation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClusterInformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClusterInformation 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.bigtable.v2.ClusterInformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ClusterInformation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ClusterInformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClusterInformation 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.bigtable.v2.ClusterInformation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClusterInformation 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.bigtable.v2.ClusterInformation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ClusterInformation 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.bigtable.v2.ClusterInformation 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; + } + + /** + * + * + *
    +   * Information on which Cluster served a vRPC, e.g. for Client-Side metrics.
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ClusterInformation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ClusterInformation) + com.google.bigtable.v2.ClusterInformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClusterInformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClusterInformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ClusterInformation.class, + com.google.bigtable.v2.ClusterInformation.Builder.class); + } + + // Construct using com.google.bigtable.v2.ClusterInformation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clusterId_ = ""; + zoneId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ClusterInformation_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ClusterInformation getDefaultInstanceForType() { + return com.google.bigtable.v2.ClusterInformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ClusterInformation build() { + com.google.bigtable.v2.ClusterInformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ClusterInformation buildPartial() { + com.google.bigtable.v2.ClusterInformation result = + new com.google.bigtable.v2.ClusterInformation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ClusterInformation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clusterId_ = clusterId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zoneId_ = zoneId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ClusterInformation) { + return mergeFrom((com.google.bigtable.v2.ClusterInformation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ClusterInformation other) { + if (other == com.google.bigtable.v2.ClusterInformation.getDefaultInstance()) return this; + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZoneId().isEmpty()) { + zoneId_ = other.zoneId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + zoneId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object clusterId_ = ""; + + /** + * string cluster_id = 1; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string cluster_id = 1; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string cluster_id = 1; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * string cluster_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * string cluster_id = 1; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object zoneId_ = ""; + + /** + * string zone_id = 2; + * + * @return The zoneId. + */ + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string zone_id = 2; + * + * @param value The zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * string zone_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearZoneId() { + zoneId_ = getDefaultInstance().getZoneId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * string zone_id = 2; + * + * @param value The bytes for zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ClusterInformation) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ClusterInformation) + private static final com.google.bigtable.v2.ClusterInformation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ClusterInformation(); + } + + public static com.google.bigtable.v2.ClusterInformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterInformation 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.bigtable.v2.ClusterInformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformationOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformationOrBuilder.java new file mode 100644 index 0000000000..392d0b7a67 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ClusterInformationOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface ClusterInformationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ClusterInformation) + com.google.protobuf.MessageOrBuilder { + + /** + * string cluster_id = 1; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + + /** + * string cluster_id = 1; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * string zone_id = 2; + * + * @return The zoneId. + */ + java.lang.String getZoneId(); + + /** + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + com.google.protobuf.ByteString getZoneIdBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java index f6b4611058..6ccfb8de32 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.v2.Column} */ -public final class Column extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Column extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Column) ColumnOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Column"); + } + // Use Column.newBuilder() to construct. - private Column(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Column(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,18 +57,12 @@ private Column() { cells_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Column(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Column_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Column_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int QUALIFIER_FIELD_NUMBER = 1; private com.google.protobuf.ByteString qualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -89,6 +97,7 @@ public com.google.protobuf.ByteString getQualifier() { @SuppressWarnings("serial") private java.util.List cells_; + /** * * @@ -102,6 +111,7 @@ public com.google.protobuf.ByteString getQualifier() { public java.util.List getCellsList() { return cells_; } + /** * * @@ -115,6 +125,7 @@ public java.util.List getCellsList() { public java.util.List getCellsOrBuilderList() { return cells_; } + /** * * @@ -128,6 +139,7 @@ public java.util.List getCellsOr public int getCellsCount() { return cells_.size(); } + /** * * @@ -141,6 +153,7 @@ public int getCellsCount() { public com.google.bigtable.v2.Cell getCells(int index) { return cells_.get(index); } + /** * * @@ -265,38 +278,38 @@ public static com.google.bigtable.v2.Column parseFrom( public static com.google.bigtable.v2.Column 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.bigtable.v2.Column 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.bigtable.v2.Column 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.bigtable.v2.Column 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.bigtable.v2.Column 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.bigtable.v2.Column 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); } @@ -319,10 +332,11 @@ 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; } + /** * * @@ -333,7 +347,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.Column} */ - 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.bigtable.v2.Column) com.google.bigtable.v2.ColumnOrBuilder { @@ -342,7 +356,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Column_fieldAccessorTable @@ -353,7 +367,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Column.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -421,39 +435,6 @@ private void buildPartial0(com.google.bigtable.v2.Column 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.bigtable.v2.Column) { @@ -466,7 +447,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Column other) { if (other == com.google.bigtable.v2.Column.getDefaultInstance()) return this; - if (other.getQualifier() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getQualifier().isEmpty()) { setQualifier(other.getQualifier()); } if (cellsBuilder_ == null) { @@ -488,8 +469,8 @@ public Builder mergeFrom(com.google.bigtable.v2.Column other) { cells_ = other.cells_; bitField0_ = (bitField0_ & ~0x00000002); cellsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getCellsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCellsFieldBuilder() : null; } else { cellsBuilder_.addAllMessages(other.cells_); @@ -560,6 +541,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString qualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -579,6 +561,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getQualifier() { return qualifier_; } + /** * * @@ -604,6 +587,7 @@ public Builder setQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -635,7 +619,7 @@ private void ensureCellsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Cell, com.google.bigtable.v2.Cell.Builder, com.google.bigtable.v2.CellOrBuilder> @@ -657,6 +641,7 @@ public java.util.List getCellsList() { return cellsBuilder_.getMessageList(); } } + /** * * @@ -673,6 +658,7 @@ public int getCellsCount() { return cellsBuilder_.getCount(); } } + /** * * @@ -689,6 +675,7 @@ public com.google.bigtable.v2.Cell getCells(int index) { return cellsBuilder_.getMessage(index); } } + /** * * @@ -711,6 +698,7 @@ public Builder setCells(int index, com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -730,6 +718,7 @@ public Builder setCells(int index, com.google.bigtable.v2.Cell.Builder builderFo } return this; } + /** * * @@ -752,6 +741,7 @@ public Builder addCells(com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -774,6 +764,7 @@ public Builder addCells(int index, com.google.bigtable.v2.Cell value) { } return this; } + /** * * @@ -793,6 +784,7 @@ public Builder addCells(com.google.bigtable.v2.Cell.Builder builderForValue) { } return this; } + /** * * @@ -812,6 +804,7 @@ public Builder addCells(int index, com.google.bigtable.v2.Cell.Builder builderFo } return this; } + /** * * @@ -831,6 +824,7 @@ public Builder addAllCells(java.lang.Iterablerepeated .google.bigtable.v2.Cell cells = 2; */ public com.google.bigtable.v2.Cell.Builder getCellsBuilder(int index) { - return getCellsFieldBuilder().getBuilder(index); + return internalGetCellsFieldBuilder().getBuilder(index); } + /** * * @@ -897,6 +894,7 @@ public com.google.bigtable.v2.CellOrBuilder getCellsOrBuilder(int index) { return cellsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -913,6 +911,7 @@ public java.util.List getCellsOr return java.util.Collections.unmodifiableList(cells_); } } + /** * * @@ -923,8 +922,10 @@ public java.util.List getCellsOr * repeated .google.bigtable.v2.Cell cells = 2; */ public com.google.bigtable.v2.Cell.Builder addCellsBuilder() { - return getCellsFieldBuilder().addBuilder(com.google.bigtable.v2.Cell.getDefaultInstance()); + return internalGetCellsFieldBuilder() + .addBuilder(com.google.bigtable.v2.Cell.getDefaultInstance()); } + /** * * @@ -935,9 +936,10 @@ public com.google.bigtable.v2.Cell.Builder addCellsBuilder() { * repeated .google.bigtable.v2.Cell cells = 2; */ public com.google.bigtable.v2.Cell.Builder addCellsBuilder(int index) { - return getCellsFieldBuilder() + return internalGetCellsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Cell.getDefaultInstance()); } + /** * * @@ -948,17 +950,17 @@ public com.google.bigtable.v2.Cell.Builder addCellsBuilder(int index) { * repeated .google.bigtable.v2.Cell cells = 2; */ public java.util.List getCellsBuilderList() { - return getCellsFieldBuilder().getBuilderList(); + return internalGetCellsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Cell, com.google.bigtable.v2.Cell.Builder, com.google.bigtable.v2.CellOrBuilder> - getCellsFieldBuilder() { + internalGetCellsFieldBuilder() { if (cellsBuilder_ == null) { cellsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Cell, com.google.bigtable.v2.Cell.Builder, com.google.bigtable.v2.CellOrBuilder>( @@ -968,17 +970,6 @@ public java.util.List getCellsBuilderList() return cellsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Column) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadata.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadata.java index 2db8895324..d73499cdf1 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadata.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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); } @@ -42,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -91,6 +99,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -117,6 +126,7 @@ public com.google.protobuf.ByteString getNameBytes() { public static final int TYPE_FIELD_NUMBER = 2; private com.google.bigtable.v2.Type type_; + /** * * @@ -132,6 +142,7 @@ public com.google.protobuf.ByteString getNameBytes() { public boolean hasType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -147,6 +158,7 @@ public boolean hasType() { public com.google.bigtable.v2.Type getType() { return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; } + /** * * @@ -175,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()); @@ -190,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()); @@ -274,38 +286,38 @@ public static com.google.bigtable.v2.ColumnMetadata parseFrom( public static com.google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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); } @@ -328,10 +340,11 @@ 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; } + /** * * @@ -341,7 +354,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.ColumnMetadata) com.google.bigtable.v2.ColumnMetadataOrBuilder { @@ -351,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable @@ -365,14 +378,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(); } } @@ -433,39 +446,6 @@ private void buildPartial0(com.google.bigtable.v2.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.bigtable.v2.ColumnMetadata) { @@ -520,7 +500,7 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -544,6 +524,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -566,6 +547,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -588,6 +570,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -609,6 +592,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -626,6 +610,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -650,11 +635,12 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.v2.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> typeBuilder_; + /** * * @@ -669,6 +655,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { public boolean hasType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -687,6 +674,7 @@ public com.google.bigtable.v2.Type getType() { return typeBuilder_.getMessage(); } } + /** * * @@ -709,6 +697,7 @@ public Builder setType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * @@ -728,6 +717,7 @@ public Builder setType(com.google.bigtable.v2.Type.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -755,6 +745,7 @@ public Builder mergeType(com.google.bigtable.v2.Type value) { } return this; } + /** * * @@ -774,6 +765,7 @@ public Builder clearType() { onChanged(); return this; } + /** * * @@ -786,8 +778,9 @@ public Builder clearType() { public com.google.bigtable.v2.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return internalGetTypeFieldBuilder().getBuilder(); } + /** * * @@ -804,6 +797,7 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; } } + /** * * @@ -813,14 +807,14 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { * * .google.bigtable.v2.Type type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>(getType(), getParentForChildren(), isClean()); @@ -829,17 +823,6 @@ public com.google.bigtable.v2.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.bigtable.v2.ColumnMetadata) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadataOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadataOrBuilder.java index 3645b44245..fa42bea19b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ColumnMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ColumnMetadata) @@ -36,6 +38,7 @@ public interface ColumnMetadataOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -61,6 +64,7 @@ public interface ColumnMetadataOrBuilder * @return Whether the type field is set. */ boolean hasType(); + /** * * @@ -73,6 +77,7 @@ public interface ColumnMetadataOrBuilder * @return The type. */ com.google.bigtable.v2.Type getType(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnOrBuilder.java index 107b26e6c6..5d29131b2a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ColumnOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Column) @@ -51,6 +53,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ java.util.List getCellsList(); + /** * * @@ -61,6 +64,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ com.google.bigtable.v2.Cell getCells(int index); + /** * * @@ -71,6 +75,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ int getCellsCount(); + /** * * @@ -81,6 +86,7 @@ public interface ColumnOrBuilder * repeated .google.bigtable.v2.Cell cells = 2; */ java.util.List getCellsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java index a5f7bc5b31..df6d511e3b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -31,13 +32,25 @@ * * Protobuf type {@code google.bigtable.v2.ColumnRange} */ -public final class ColumnRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ColumnRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ColumnRange) ColumnRangeOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ColumnRange"); + } + // Use ColumnRange.newBuilder() to construct. - private ColumnRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ColumnRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private ColumnRange() { familyName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ColumnRange(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnRange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnRange_fieldAccessorTable @@ -83,6 +90,7 @@ public enum StartQualifierCase private StartQualifierCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -132,6 +140,7 @@ public enum EndQualifierCase private EndQualifierCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -168,6 +177,7 @@ public EndQualifierCase getEndQualifierCase() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -191,6 +201,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -216,6 +227,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { } public static final int START_QUALIFIER_CLOSED_FIELD_NUMBER = 2; + /** * * @@ -231,6 +243,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public boolean hasStartQualifierClosed() { return startQualifierCase_ == 2; } + /** * * @@ -251,6 +264,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { } public static final int START_QUALIFIER_OPEN_FIELD_NUMBER = 3; + /** * * @@ -266,6 +280,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { public boolean hasStartQualifierOpen() { return startQualifierCase_ == 3; } + /** * * @@ -286,6 +301,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { } public static final int END_QUALIFIER_CLOSED_FIELD_NUMBER = 4; + /** * * @@ -301,6 +317,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { public boolean hasEndQualifierClosed() { return endQualifierCase_ == 4; } + /** * * @@ -321,6 +338,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { } public static final int END_QUALIFIER_OPEN_FIELD_NUMBER = 5; + /** * * @@ -336,6 +354,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { public boolean hasEndQualifierOpen() { return endQualifierCase_ == 5; } + /** * * @@ -369,8 +388,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (startQualifierCase_ == 2) { output.writeBytes(2, (com.google.protobuf.ByteString) startQualifier_); @@ -393,8 +412,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (startQualifierCase_ == 2) { size += @@ -532,38 +551,38 @@ public static com.google.bigtable.v2.ColumnRange parseFrom( public static com.google.bigtable.v2.ColumnRange 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.bigtable.v2.ColumnRange 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.bigtable.v2.ColumnRange 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.bigtable.v2.ColumnRange 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.bigtable.v2.ColumnRange 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.bigtable.v2.ColumnRange 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,10 +605,11 @@ 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; } + /** * * @@ -602,7 +622,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ColumnRange} */ - 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.bigtable.v2.ColumnRange) com.google.bigtable.v2.ColumnRangeOrBuilder { @@ -612,7 +632,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnRange_fieldAccessorTable @@ -624,7 +644,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ColumnRange.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -685,39 +705,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ColumnRange result) { result.endQualifier_ = this.endQualifier_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ColumnRange) { @@ -871,6 +858,7 @@ public Builder clearEndQualifier() { private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -893,6 +881,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -915,6 +904,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -936,6 +926,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -953,6 +944,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -990,6 +982,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public boolean hasStartQualifierClosed() { return startQualifierCase_ == 2; } + /** * * @@ -1007,6 +1000,7 @@ public com.google.protobuf.ByteString getStartQualifierClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1028,6 +1022,7 @@ public Builder setStartQualifierClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1062,6 +1057,7 @@ public Builder clearStartQualifierClosed() { public boolean hasStartQualifierOpen() { return startQualifierCase_ == 3; } + /** * * @@ -1079,6 +1075,7 @@ public com.google.protobuf.ByteString getStartQualifierOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1100,6 +1097,7 @@ public Builder setStartQualifierOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1134,6 +1132,7 @@ public Builder clearStartQualifierOpen() { public boolean hasEndQualifierClosed() { return endQualifierCase_ == 4; } + /** * * @@ -1151,6 +1150,7 @@ public com.google.protobuf.ByteString getEndQualifierClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1172,6 +1172,7 @@ public Builder setEndQualifierClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1206,6 +1207,7 @@ public Builder clearEndQualifierClosed() { public boolean hasEndQualifierOpen() { return endQualifierCase_ == 5; } + /** * * @@ -1223,6 +1225,7 @@ public com.google.protobuf.ByteString getEndQualifierOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1244,6 +1247,7 @@ public Builder setEndQualifierOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1264,17 +1268,6 @@ public Builder clearEndQualifierOpen() { 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.bigtable.v2.ColumnRange) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRangeOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRangeOrBuilder.java index fd33616277..b7eab1ee34 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRangeOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ColumnRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ColumnRange) @@ -36,6 +38,7 @@ public interface ColumnRangeOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -61,6 +64,7 @@ public interface ColumnRangeOrBuilder * @return Whether the startQualifierClosed field is set. */ boolean hasStartQualifierClosed(); + /** * * @@ -86,6 +90,7 @@ public interface ColumnRangeOrBuilder * @return Whether the startQualifierOpen field is set. */ boolean hasStartQualifierOpen(); + /** * * @@ -111,6 +116,7 @@ public interface ColumnRangeOrBuilder * @return Whether the endQualifierClosed field is set. */ boolean hasEndQualifierClosed(); + /** * * @@ -136,6 +142,7 @@ public interface ColumnRangeOrBuilder * @return Whether the endQualifierOpen field is set. */ boolean hasEndQualifierOpen(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java index 3a81851c08..63ba302c3b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class DataProto { +@com.google.protobuf.Generated +public final class DataProto extends com.google.protobuf.GeneratedFile { private DataProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,136 +42,140 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Row_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Row_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Family_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Family_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Column_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Column_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Cell_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Cell_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Value_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Value_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ArrayValue_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowRange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowSet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowSet_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ColumnRange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ColumnRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_TimestampRange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_TimestampRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ValueRange_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ValueRange_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowFilter_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowFilter_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowFilter_Chain_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowFilter_Chain_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowFilter_Interleave_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowFilter_Interleave_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RowFilter_Condition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RowFilter_Condition_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_SetCell_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_SetCell_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_AddToCell_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_AddToCell_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Mutation_DeleteFromRow_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_StreamPartition_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ProtoFormat_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ColumnMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ProtoSchema_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ResultSetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ProtoRows_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_PartialResultSet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Idempotency_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -169,126 +185,181 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n\035google/bigtable/v2/data.proto\022\022google." + "\n" + + "\035google/bigtable/v2/data.proto\022\022google." + "bigtable.v2\032\037google/api/field_behavior.p" + "roto\032\036google/bigtable/v2/types.proto\032\037go" - + "ogle/protobuf/timestamp.proto\032\026google/ty" - + "pe/date.proto\"@\n\003Row\022\013\n\003key\030\001 \001(\014\022,\n\010fam" - + "ilies\030\002 \003(\0132\032.google.bigtable.v2.Family\"" - + "C\n\006Family\022\014\n\004name\030\001 \001(\t\022+\n\007columns\030\002 \003(\013" - + "2\032.google.bigtable.v2.Column\"D\n\006Column\022\021" - + "\n\tqualifier\030\001 \001(\014\022\'\n\005cells\030\002 \003(\0132\030.googl" - + "e.bigtable.v2.Cell\"?\n\004Cell\022\030\n\020timestamp_" - + "micros\030\001 \001(\003\022\r\n\005value\030\002 \001(\014\022\016\n\006labels\030\003 " - + "\003(\t\"\364\002\n\005Value\022&\n\004type\030\007 \001(\0132\030.google.big" - + "table.v2.Type\022\023\n\traw_value\030\010 \001(\014H\000\022\036\n\024ra" - + "w_timestamp_micros\030\t \001(\003H\000\022\025\n\013bytes_valu" - + "e\030\002 \001(\014H\000\022\026\n\014string_value\030\003 \001(\tH\000\022\023\n\tint" - + "_value\030\006 \001(\003H\000\022\024\n\nbool_value\030\n \001(\010H\000\022\025\n\013" - + "float_value\030\013 \001(\001H\000\0225\n\017timestamp_value\030\014" - + " \001(\0132\032.google.protobuf.TimestampH\000\022\'\n\nda" - + "te_value\030\r \001(\0132\021.google.type.DateH\000\0225\n\013a" - + "rray_value\030\004 \001(\0132\036.google.bigtable.v2.Ar" - + "rayValueH\000B\006\n\004kind\"7\n\nArrayValue\022)\n\006valu" - + "es\030\001 \003(\0132\031.google.bigtable.v2.Value\"\212\001\n\010" - + "RowRange\022\032\n\020start_key_closed\030\001 \001(\014H\000\022\030\n\016" - + "start_key_open\030\002 \001(\014H\000\022\026\n\014end_key_open\030\003" - + " \001(\014H\001\022\030\n\016end_key_closed\030\004 \001(\014H\001B\013\n\tstar" - + "t_keyB\t\n\007end_key\"L\n\006RowSet\022\020\n\010row_keys\030\001" - + " \003(\014\0220\n\nrow_ranges\030\002 \003(\0132\034.google.bigtab" - + "le.v2.RowRange\"\306\001\n\013ColumnRange\022\023\n\013family" - + "_name\030\001 \001(\t\022 \n\026start_qualifier_closed\030\002 " - + "\001(\014H\000\022\036\n\024start_qualifier_open\030\003 \001(\014H\000\022\036\n" - + "\024end_qualifier_closed\030\004 \001(\014H\001\022\034\n\022end_qua" - + "lifier_open\030\005 \001(\014H\001B\021\n\017start_qualifierB\017" - + "\n\rend_qualifier\"N\n\016TimestampRange\022\036\n\026sta" - + "rt_timestamp_micros\030\001 \001(\003\022\034\n\024end_timesta" - + "mp_micros\030\002 \001(\003\"\230\001\n\nValueRange\022\034\n\022start_" - + "value_closed\030\001 \001(\014H\000\022\032\n\020start_value_open" - + "\030\002 \001(\014H\000\022\032\n\020end_value_closed\030\003 \001(\014H\001\022\030\n\016" - + "end_value_open\030\004 \001(\014H\001B\r\n\013start_valueB\013\n" - + "\tend_value\"\337\010\n\tRowFilter\0224\n\005chain\030\001 \001(\0132" - + "#.google.bigtable.v2.RowFilter.ChainH\000\022>" - + "\n\ninterleave\030\002 \001(\0132(.google.bigtable.v2." - + "RowFilter.InterleaveH\000\022<\n\tcondition\030\003 \001(" - + "\0132\'.google.bigtable.v2.RowFilter.Conditi" - + "onH\000\022\016\n\004sink\030\020 \001(\010H\000\022\031\n\017pass_all_filter\030" - + "\021 \001(\010H\000\022\032\n\020block_all_filter\030\022 \001(\010H\000\022\036\n\024r" - + "ow_key_regex_filter\030\004 \001(\014H\000\022\033\n\021row_sampl" - + "e_filter\030\016 \001(\001H\000\022\"\n\030family_name_regex_fi" - + "lter\030\005 \001(\tH\000\022\'\n\035column_qualifier_regex_f" - + "ilter\030\006 \001(\014H\000\022>\n\023column_range_filter\030\007 \001" - + "(\0132\037.google.bigtable.v2.ColumnRangeH\000\022D\n" - + "\026timestamp_range_filter\030\010 \001(\0132\".google.b" - + "igtable.v2.TimestampRangeH\000\022\034\n\022value_reg" - + "ex_filter\030\t \001(\014H\000\022<\n\022value_range_filter\030" - + "\017 \001(\0132\036.google.bigtable.v2.ValueRangeH\000\022" - + "%\n\033cells_per_row_offset_filter\030\n \001(\005H\000\022$" - + "\n\032cells_per_row_limit_filter\030\013 \001(\005H\000\022\'\n\035" - + "cells_per_column_limit_filter\030\014 \001(\005H\000\022!\n" - + "\027strip_value_transformer\030\r \001(\010H\000\022!\n\027appl" - + "y_label_transformer\030\023 \001(\tH\000\0327\n\005Chain\022.\n\007" - + "filters\030\001 \003(\0132\035.google.bigtable.v2.RowFi" - + "lter\032<\n\nInterleave\022.\n\007filters\030\001 \003(\0132\035.go" - + "ogle.bigtable.v2.RowFilter\032\255\001\n\tCondition" - + "\0227\n\020predicate_filter\030\001 \001(\0132\035.google.bigt" - + "able.v2.RowFilter\0222\n\013true_filter\030\002 \001(\0132\035" - + ".google.bigtable.v2.RowFilter\0223\n\014false_f" - + "ilter\030\003 \001(\0132\035.google.bigtable.v2.RowFilt" - + "erB\010\n\006filter\"\255\010\n\010Mutation\0228\n\010set_cell\030\001 " - + "\001(\0132$.google.bigtable.v2.Mutation.SetCel" - + "lH\000\022=\n\013add_to_cell\030\005 \001(\0132&.google.bigtab" - + "le.v2.Mutation.AddToCellH\000\022A\n\rmerge_to_c" - + "ell\030\006 \001(\0132(.google.bigtable.v2.Mutation." - + "MergeToCellH\000\022K\n\022delete_from_column\030\002 \001(" - + "\0132-.google.bigtable.v2.Mutation.DeleteFr" - + "omColumnH\000\022K\n\022delete_from_family\030\003 \001(\0132-" - + ".google.bigtable.v2.Mutation.DeleteFromF" - + "amilyH\000\022E\n\017delete_from_row\030\004 \001(\0132*.googl" - + "e.bigtable.v2.Mutation.DeleteFromRowH\000\032a" - + "\n\007SetCell\022\023\n\013family_name\030\001 \001(\t\022\030\n\020column" - + "_qualifier\030\002 \001(\014\022\030\n\020timestamp_micros\030\003 \001" - + "(\003\022\r\n\005value\030\004 \001(\014\032\255\001\n\tAddToCell\022\023\n\013famil" - + "y_name\030\001 \001(\t\0223\n\020column_qualifier\030\002 \001(\0132\031" - + ".google.bigtable.v2.Value\022,\n\ttimestamp\030\003" - + " \001(\0132\031.google.bigtable.v2.Value\022(\n\005input" - + "\030\004 \001(\0132\031.google.bigtable.v2.Value\032\257\001\n\013Me" - + "rgeToCell\022\023\n\013family_name\030\001 \001(\t\0223\n\020column" - + "_qualifier\030\002 \001(\0132\031.google.bigtable.v2.Va" - + "lue\022,\n\ttimestamp\030\003 \001(\0132\031.google.bigtable" - + ".v2.Value\022(\n\005input\030\004 \001(\0132\031.google.bigtab" - + "le.v2.Value\032y\n\020DeleteFromColumn\022\023\n\013famil" - + "y_name\030\001 \001(\t\022\030\n\020column_qualifier\030\002 \001(\014\0226" - + "\n\ntime_range\030\003 \001(\0132\".google.bigtable.v2." - + "TimestampRange\032\'\n\020DeleteFromFamily\022\023\n\013fa" - + "mily_name\030\001 \001(\t\032\017\n\rDeleteFromRowB\n\n\010muta" - + "tion\"\200\001\n\023ReadModifyWriteRule\022\023\n\013family_n" - + "ame\030\001 \001(\t\022\030\n\020column_qualifier\030\002 \001(\014\022\026\n\014a" - + "ppend_value\030\003 \001(\014H\000\022\032\n\020increment_amount\030" - + "\004 \001(\003H\000B\006\n\004rule\"B\n\017StreamPartition\022/\n\tro" - + "w_range\030\001 \001(\0132\034.google.bigtable.v2.RowRa" - + "nge\"W\n\030StreamContinuationTokens\022;\n\006token" - + "s\030\001 \003(\0132+.google.bigtable.v2.StreamConti" - + "nuationToken\"`\n\027StreamContinuationToken\022" - + "6\n\tpartition\030\001 \001(\0132#.google.bigtable.v2." - + "StreamPartition\022\r\n\005token\030\002 \001(\t\"\r\n\013ProtoF" - + "ormat\"F\n\016ColumnMetadata\022\014\n\004name\030\001 \001(\t\022&\n" + + "ogle/protobuf/timestamp.proto\032\026google/type/date.proto\"@\n" + + "\003Row\022\013\n" + + "\003key\030\001 \001(\014\022,\n" + + "\010families\030\002 \003(\0132\032.google.bigtable.v2.Family\"C\n" + + "\006Family\022\014\n" + + "\004name\030\001 \001(\t\022+\n" + + "\007columns\030\002 \003(\0132\032.google.bigtable.v2.Column\"D\n" + + "\006Column\022\021\n" + + "\tqualifier\030\001 \001(\014\022\'\n" + + "\005cells\030\002 \003(\0132\030.google.bigtable.v2.Cell\"?\n" + + "\004Cell\022\030\n" + + "\020timestamp_micros\030\001 \001(\003\022\r\n" + + "\005value\030\002 \001(\014\022\016\n" + + "\006labels\030\003 \003(\t\"\364\002\n" + + "\005Value\022&\n" + + "\004type\030\007 \001(\0132\030.google.bigtable.v2.Type\022\023\n" + + "\traw_value\030\010 \001(\014H\000\022\036\n" + + "\024raw_timestamp_micros\030\t \001(\003H\000\022\025\n" + + "\013bytes_value\030\002 \001(\014H\000\022\026\n" + + "\014string_value\030\003 \001(\tH\000\022\023\n" + + "\tint_value\030\006 \001(\003H\000\022\024\n\n" + + "bool_value\030\n" + + " \001(\010H\000\022\025\n" + + "\013float_value\030\013 \001(\001H\000\0225\n" + + "\017timestamp_value\030\014 \001(\0132\032.google.protobuf.TimestampH\000\022\'\n\n" + + "date_value\030\r" + + " \001(\0132\021.google.type.DateH\000\0225\n" + + "\013array_value\030\004 \001(\0132\036.google.bigtable.v2.ArrayValueH\000B\006\n" + + "\004kind\"7\n\n" + + "ArrayValue\022)\n" + + "\006values\030\001 \003(\0132\031.google.bigtable.v2.Value\"\212\001\n" + + "\010RowRange\022\032\n" + + "\020start_key_closed\030\001 \001(\014H\000\022\030\n" + + "\016start_key_open\030\002 \001(\014H\000\022\026\n" + + "\014end_key_open\030\003 \001(\014H\001\022\030\n" + + "\016end_key_closed\030\004 \001(\014H\001B\013\n" + + "\tstart_keyB\t\n" + + "\007end_key\"L\n" + + "\006RowSet\022\020\n" + + "\010row_keys\030\001 \003(\014\0220\n\n" + + "row_ranges\030\002 \003(\0132\034.google.bigtable.v2.RowRange\"\306\001\n" + + "\013ColumnRange\022\023\n" + + "\013family_name\030\001 \001(\t\022 \n" + + "\026start_qualifier_closed\030\002 \001(\014H\000\022\036\n" + + "\024start_qualifier_open\030\003 \001(\014H\000\022\036\n" + + "\024end_qualifier_closed\030\004 \001(\014H\001\022\034\n" + + "\022end_qualifier_open\030\005 \001(\014H\001B\021\n" + + "\017start_qualifierB\017\n\r" + + "end_qualifier\"N\n" + + "\016TimestampRange\022\036\n" + + "\026start_timestamp_micros\030\001 \001(\003\022\034\n" + + "\024end_timestamp_micros\030\002 \001(\003\"\230\001\n\n" + + "ValueRange\022\034\n" + + "\022start_value_closed\030\001 \001(\014H\000\022\032\n" + + "\020start_value_open\030\002 \001(\014H\000\022\032\n" + + "\020end_value_closed\030\003 \001(\014H\001\022\030\n" + + "\016end_value_open\030\004 \001(\014H\001B\r\n" + + "\013start_valueB\013\n" + + "\tend_value\"\337\010\n" + + "\tRowFilter\0224\n" + + "\005chain\030\001 \001(\0132#.google.bigtable.v2.RowFilter.ChainH\000\022>\n\n" + + "interleave\030\002 \001(\0132(.google.bigtable.v2.RowFilter.InterleaveH\000\022<\n" + + "\tcondition\030\003 \001(\0132\'.google.bigtable.v2.RowFilter.ConditionH\000\022\016\n" + + "\004sink\030\020 \001(\010H\000\022\031\n" + + "\017pass_all_filter\030\021 \001(\010H\000\022\032\n" + + "\020block_all_filter\030\022 \001(\010H\000\022\036\n" + + "\024row_key_regex_filter\030\004 \001(\014H\000\022\033\n" + + "\021row_sample_filter\030\016 \001(\001H\000\022\"\n" + + "\030family_name_regex_filter\030\005 \001(\tH\000\022\'\n" + + "\035column_qualifier_regex_filter\030\006 \001(\014H\000\022>\n" + + "\023column_range_filter\030\007" + + " \001(\0132\037.google.bigtable.v2.ColumnRangeH\000\022D\n" + + "\026timestamp_range_filter\030\010" + + " \001(\0132\".google.bigtable.v2.TimestampRangeH\000\022\034\n" + + "\022value_regex_filter\030\t \001(\014H\000\022<\n" + + "\022value_range_filter\030\017" + + " \001(\0132\036.google.bigtable.v2.ValueRangeH\000\022%\n" + + "\033cells_per_row_offset_filter\030\n" + + " \001(\005H\000\022$\n" + + "\032cells_per_row_limit_filter\030\013 \001(\005H\000\022\'\n" + + "\035cells_per_column_limit_filter\030\014 \001(\005H\000\022!\n" + + "\027strip_value_transformer\030\r" + + " \001(\010H\000\022!\n" + + "\027apply_label_transformer\030\023 \001(\tH\000\0327\n" + + "\005Chain\022.\n" + + "\007filters\030\001 \003(\0132\035.google.bigtable.v2.RowFilter\032<\n\n" + + "Interleave\022.\n" + + "\007filters\030\001 \003(\0132\035.google.bigtable.v2.RowFilter\032\255\001\n" + + "\tCondition\0227\n" + + "\020predicate_filter\030\001 \001(\0132\035.google.bigtable.v2.RowFilter\0222\n" + + "\013true_filter\030\002 \001(\0132\035.google.bigtable.v2.RowFilter\0223\n" + + "\014false_filter\030\003 \001(\0132\035.google.bigtable.v2.RowFilterB\010\n" + + "\006filter\"\255\010\n" + + "\010Mutation\0228\n" + + "\010set_cell\030\001 \001(\0132$.google.bigtable.v2.Mutation.SetCellH\000\022=\n" + + "\013add_to_cell\030\005" + + " \001(\0132&.google.bigtable.v2.Mutation.AddToCellH\000\022A\n\r" + + "merge_to_cell\030\006 \001(\0132(.google.bigtable.v2.Mutation.MergeToCellH\000\022K\n" + + "\022delete_from_column\030\002 \001(" + + "\0132-.google.bigtable.v2.Mutation.DeleteFromColumnH\000\022K\n" + + "\022delete_from_family\030\003 \001(\0132-" + + ".google.bigtable.v2.Mutation.DeleteFromFamilyH\000\022E\n" + + "\017delete_from_row\030\004 \001(\0132*.googl" + + "e.bigtable.v2.Mutation.DeleteFromRowH\000\032a\n" + + "\007SetCell\022\023\n" + + "\013family_name\030\001 \001(\t\022\030\n" + + "\020column_qualifier\030\002 \001(\014\022\030\n" + + "\020timestamp_micros\030\003 \001(\003\022\r\n" + + "\005value\030\004 \001(\014\032\255\001\n" + + "\tAddToCell\022\023\n" + + "\013family_name\030\001 \001(\t\0223\n" + + "\020column_qualifier\030\002 \001(\0132\031.google.bigtable.v2.Value\022,\n" + + "\ttimestamp\030\003 \001(\0132\031.google.bigtable.v2.Value\022(\n" + + "\005input\030\004 \001(\0132\031.google.bigtable.v2.Value\032\257\001\n" + + "\013MergeToCell\022\023\n" + + "\013family_name\030\001 \001(\t\0223\n" + + "\020column_qualifier\030\002 \001(\0132\031.google.bigtable.v2.Value\022,\n" + + "\ttimestamp\030\003 \001(\0132\031.google.bigtable.v2.Value\022(\n" + + "\005input\030\004 \001(\0132\031.google.bigtable.v2.Value\032y\n" + + "\020DeleteFromColumn\022\023\n" + + "\013family_name\030\001 \001(\t\022\030\n" + + "\020column_qualifier\030\002 \001(\014\0226\n\n" + + "time_range\030\003 \001(\0132\".google.bigtable.v2.TimestampRange\032\'\n" + + "\020DeleteFromFamily\022\023\n" + + "\013family_name\030\001 \001(\t\032\017\n\r" + + "DeleteFromRowB\n\n" + + "\010mutation\"\200\001\n" + + "\023ReadModifyWriteRule\022\023\n" + + "\013family_name\030\001 \001(\t\022\030\n" + + "\020column_qualifier\030\002 \001(\014\022\026\n" + + "\014append_value\030\003 \001(\014H\000\022\032\n" + + "\020increment_amount\030\004 \001(\003H\000B\006\n" + + "\004rule\"B\n" + + "\017StreamPartition\022/\n" + + "\trow_range\030\001 \001(\0132\034.google.bigtable.v2.RowRange\"W\n" + + "\030StreamContinuationTokens\022;\n" + + "\006tokens\030\001 \003(\0132+.google.bigtable.v2.StreamContinuationToken\"`\n" + + "\027StreamContinuationToken\0226\n" + + "\tpartition\030\001 \001(\0132#.google.bigtable.v2.StreamPartition\022\r\n" + + "\005token\030\002 \001(\t\"\r\n" + + "\013ProtoFormat\"F\n" + + "\016ColumnMetadata\022\014\n" + + "\004name\030\001 \001(\t\022&\n" + "\004type\030\002 \001(\0132\030.google.bigtable.v2.Type\"B\n" - + "\013ProtoSchema\0223\n\007columns\030\001 \003(\0132\".google.b" - + "igtable.v2.ColumnMetadata\"V\n\021ResultSetMe" - + "tadata\0227\n\014proto_schema\030\001 \001(\0132\037.google.bi" - + "gtable.v2.ProtoSchemaH\000B\010\n\006schema\"6\n\tPro" - + "toRows\022)\n\006values\030\002 \003(\0132\031.google.bigtable" - + ".v2.Value\"$\n\016ProtoRowsBatch\022\022\n\nbatch_dat" - + "a\030\001 \001(\014\"\226\001\n\020PartialResultSet\022>\n\020proto_ro" - + "ws_batch\030\003 \001(\0132\".google.bigtable.v2.Prot" - + "oRowsBatchH\000\022\024\n\014resume_token\030\005 \001(\014\022\034\n\024es" - + "timated_batch_size\030\004 \001(\005B\016\n\014partial_rows" - + "B\263\001\n\026com.google.bigtable.v2B\tDataProtoP\001" - + "Z8cloud.google.com/go/bigtable/apiv2/big" - + "tablepb;bigtablepb\252\002\030Google.Cloud.Bigtab" - + "le.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Googl" - + "e::Cloud::Bigtable::V2b\006proto3" + + "\013ProtoSchema\0223\n" + + "\007columns\030\001 \003(\0132\".google.bigtable.v2.ColumnMetadata\"V\n" + + "\021ResultSetMetadata\0227\n" + + "\014proto_schema\030\001 \001(\0132\037.google.bigtable.v2.ProtoSchemaH\000B\010\n" + + "\006schema\"6\n" + + "\tProtoRows\022)\n" + + "\006values\030\002 \003(\0132\031.google.bigtable.v2.Value\"$\n" + + "\016ProtoRowsBatch\022\022\n\n" + + "batch_data\030\001 \001(\014\"\325\001\n" + + "\020PartialResultSet\022>\n" + + "\020proto_rows_batch\030\003" + + " \001(\0132\".google.bigtable.v2.ProtoRowsBatchH\000\022\033\n" + + "\016batch_checksum\030\006 \001(\r" + + "H\001\210\001\001\022\024\n" + + "\014resume_token\030\005 \001(\014\022\r\n" + + "\005reset\030\007 \001(\010\022\034\n" + + "\024estimated_batch_size\030\004 \001(\005B\016\n" + + "\014partial_rowsB\021\n" + + "\017_batch_checksum\"L\n" + + "\013Idempotency\022\r" + + "\n" + + "\005token\030\001 \001(\014\022.\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.TimestampB\263\001\n" + + "\026com.google.bigtable.v2B\tDataProtoP\001Z8cloud.google.com/" + + "go/bigtable/apiv2/bigtablepb;bigtablepb\252" + + "\002\030Google.Cloud.Bigtable.V2\312\002\030Google\\Clou" + + "d\\Bigtable\\V2\352\002\033Google::Cloud::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -299,37 +370,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.DateProto.getDescriptor(), }); - internal_static_google_bigtable_v2_Row_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_v2_Row_descriptor = getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_Row_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Row_descriptor, new java.lang.String[] { "Key", "Families", }); - internal_static_google_bigtable_v2_Family_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_bigtable_v2_Family_descriptor = getDescriptor().getMessageType(1); internal_static_google_bigtable_v2_Family_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Family_descriptor, new java.lang.String[] { "Name", "Columns", }); - internal_static_google_bigtable_v2_Column_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_bigtable_v2_Column_descriptor = getDescriptor().getMessageType(2); internal_static_google_bigtable_v2_Column_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Column_descriptor, new java.lang.String[] { "Qualifier", "Cells", }); - internal_static_google_bigtable_v2_Cell_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_bigtable_v2_Cell_descriptor = getDescriptor().getMessageType(3); internal_static_google_bigtable_v2_Cell_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Cell_descriptor, new java.lang.String[] { "TimestampMicros", "Value", "Labels", }); - internal_static_google_bigtable_v2_Value_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_bigtable_v2_Value_descriptor = getDescriptor().getMessageType(4); internal_static_google_bigtable_v2_Value_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Value_descriptor, new java.lang.String[] { "Type", @@ -345,33 +416,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ArrayValue", "Kind", }); - internal_static_google_bigtable_v2_ArrayValue_descriptor = - getDescriptor().getMessageTypes().get(5); + internal_static_google_bigtable_v2_ArrayValue_descriptor = getDescriptor().getMessageType(5); internal_static_google_bigtable_v2_ArrayValue_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ArrayValue_descriptor, new java.lang.String[] { "Values", }); - internal_static_google_bigtable_v2_RowRange_descriptor = - getDescriptor().getMessageTypes().get(6); + internal_static_google_bigtable_v2_RowRange_descriptor = getDescriptor().getMessageType(6); internal_static_google_bigtable_v2_RowRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowRange_descriptor, new java.lang.String[] { "StartKeyClosed", "StartKeyOpen", "EndKeyOpen", "EndKeyClosed", "StartKey", "EndKey", }); - internal_static_google_bigtable_v2_RowSet_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_google_bigtable_v2_RowSet_descriptor = getDescriptor().getMessageType(7); internal_static_google_bigtable_v2_RowSet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowSet_descriptor, new java.lang.String[] { "RowKeys", "RowRanges", }); - internal_static_google_bigtable_v2_ColumnRange_descriptor = - getDescriptor().getMessageTypes().get(8); + internal_static_google_bigtable_v2_ColumnRange_descriptor = getDescriptor().getMessageType(8); internal_static_google_bigtable_v2_ColumnRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ColumnRange_descriptor, new java.lang.String[] { "FamilyName", @@ -383,17 +451,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EndQualifier", }); internal_static_google_bigtable_v2_TimestampRange_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageType(9); internal_static_google_bigtable_v2_TimestampRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_TimestampRange_descriptor, new java.lang.String[] { "StartTimestampMicros", "EndTimestampMicros", }); - internal_static_google_bigtable_v2_ValueRange_descriptor = - getDescriptor().getMessageTypes().get(10); + internal_static_google_bigtable_v2_ValueRange_descriptor = getDescriptor().getMessageType(10); internal_static_google_bigtable_v2_ValueRange_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ValueRange_descriptor, new java.lang.String[] { "StartValueClosed", @@ -403,10 +470,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartValue", "EndValue", }); - internal_static_google_bigtable_v2_RowFilter_descriptor = - getDescriptor().getMessageTypes().get(11); + internal_static_google_bigtable_v2_RowFilter_descriptor = getDescriptor().getMessageType(11); internal_static_google_bigtable_v2_RowFilter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowFilter_descriptor, new java.lang.String[] { "Chain", @@ -431,33 +497,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Filter", }); internal_static_google_bigtable_v2_RowFilter_Chain_descriptor = - internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedType(0); internal_static_google_bigtable_v2_RowFilter_Chain_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowFilter_Chain_descriptor, new java.lang.String[] { "Filters", }); internal_static_google_bigtable_v2_RowFilter_Interleave_descriptor = - internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedType(1); internal_static_google_bigtable_v2_RowFilter_Interleave_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowFilter_Interleave_descriptor, new java.lang.String[] { "Filters", }); internal_static_google_bigtable_v2_RowFilter_Condition_descriptor = - internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_RowFilter_descriptor.getNestedType(2); internal_static_google_bigtable_v2_RowFilter_Condition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RowFilter_Condition_descriptor, new java.lang.String[] { "PredicateFilter", "TrueFilter", "FalseFilter", }); - internal_static_google_bigtable_v2_Mutation_descriptor = - getDescriptor().getMessageTypes().get(12); + internal_static_google_bigtable_v2_Mutation_descriptor = getDescriptor().getMessageType(12); internal_static_google_bigtable_v2_Mutation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_descriptor, new java.lang.String[] { "SetCell", @@ -469,136 +534,146 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Mutation", }); internal_static_google_bigtable_v2_Mutation_SetCell_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Mutation_SetCell_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_SetCell_descriptor, new java.lang.String[] { "FamilyName", "ColumnQualifier", "TimestampMicros", "Value", }); internal_static_google_bigtable_v2_Mutation_AddToCell_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(1); internal_static_google_bigtable_v2_Mutation_AddToCell_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_AddToCell_descriptor, new java.lang.String[] { "FamilyName", "ColumnQualifier", "Timestamp", "Input", }); internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(2); internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor, new java.lang.String[] { "FamilyName", "ColumnQualifier", "Timestamp", "Input", }); internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(3); internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor, new java.lang.String[] { "FamilyName", "ColumnQualifier", "TimeRange", }); internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(4); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(4); internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor, new java.lang.String[] { "FamilyName", }); internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor = - internal_static_google_bigtable_v2_Mutation_descriptor.getNestedTypes().get(5); + internal_static_google_bigtable_v2_Mutation_descriptor.getNestedType(5); internal_static_google_bigtable_v2_Mutation_DeleteFromRow_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageType(13); internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor, new java.lang.String[] { "FamilyName", "ColumnQualifier", "AppendValue", "IncrementAmount", "Rule", }); internal_static_google_bigtable_v2_StreamPartition_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageType(14); internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_StreamPartition_descriptor, new java.lang.String[] { "RowRange", }); internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageType(15); internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor, new java.lang.String[] { "Tokens", }); internal_static_google_bigtable_v2_StreamContinuationToken_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageType(16); internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_StreamContinuationToken_descriptor, new java.lang.String[] { "Partition", "Token", }); - internal_static_google_bigtable_v2_ProtoFormat_descriptor = - getDescriptor().getMessageTypes().get(17); + internal_static_google_bigtable_v2_ProtoFormat_descriptor = getDescriptor().getMessageType(17); internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ProtoFormat_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_ColumnMetadata_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageType(18); internal_static_google_bigtable_v2_ColumnMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ColumnMetadata_descriptor, new java.lang.String[] { "Name", "Type", }); - internal_static_google_bigtable_v2_ProtoSchema_descriptor = - getDescriptor().getMessageTypes().get(19); + internal_static_google_bigtable_v2_ProtoSchema_descriptor = getDescriptor().getMessageType(19); internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ProtoSchema_descriptor, new java.lang.String[] { "Columns", }); internal_static_google_bigtable_v2_ResultSetMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageType(20); internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ResultSetMetadata_descriptor, new java.lang.String[] { "ProtoSchema", "Schema", }); - internal_static_google_bigtable_v2_ProtoRows_descriptor = - getDescriptor().getMessageTypes().get(21); + internal_static_google_bigtable_v2_ProtoRows_descriptor = getDescriptor().getMessageType(21); internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ProtoRows_descriptor, new java.lang.String[] { "Values", }); internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageType(22); internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor, new java.lang.String[] { "BatchData", }); internal_static_google_bigtable_v2_PartialResultSet_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageType(23); internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_PartialResultSet_descriptor, new java.lang.String[] { - "ProtoRowsBatch", "ResumeToken", "EstimatedBatchSize", "PartialRows", + "ProtoRowsBatch", + "BatchChecksum", + "ResumeToken", + "Reset", + "EstimatedBatchSize", + "PartialRows", + }); + internal_static_google_bigtable_v2_Idempotency_descriptor = getDescriptor().getMessageType(24); + internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Idempotency_descriptor, + new java.lang.String[] { + "Token", "StartTime", }); + descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.bigtable.v2.TypesProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponse.java new file mode 100644 index 0000000000..8f3bd05048 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponse.java @@ -0,0 +1,1157 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ErrorResponse} + */ +@com.google.protobuf.Generated +public final class ErrorResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ErrorResponse) + ErrorResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ErrorResponse"); + } + + // Use ErrorResponse.newBuilder() to construct. + private ErrorResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ErrorResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ErrorResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ErrorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ErrorResponse.class, + com.google.bigtable.v2.ErrorResponse.Builder.class); + } + + private int bitField0_; + public static final int RPC_ID_FIELD_NUMBER = 1; + private long rpcId_ = 0L; + + /** + * + * + *
    +   * Which vRPC this response is for.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + public static final int CLUSTER_INFO_FIELD_NUMBER = 2; + private com.google.bigtable.v2.ClusterInformation clusterInfo_; + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + @java.lang.Override + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + @java.lang.Override + public com.google.bigtable.v2.ClusterInformation getClusterInfo() { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + @java.lang.Override + public com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder() { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private com.google.rpc.Status status_; + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + public static final int RETRY_INFO_FIELD_NUMBER = 4; + private com.google.rpc.RetryInfo retryInfo_; + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return Whether the retryInfo field is set. + */ + @java.lang.Override + public boolean hasRetryInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return The retryInfo. + */ + @java.lang.Override + public com.google.rpc.RetryInfo getRetryInfo() { + return retryInfo_ == null ? com.google.rpc.RetryInfo.getDefaultInstance() : retryInfo_; + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + @java.lang.Override + public com.google.rpc.RetryInfoOrBuilder getRetryInfoOrBuilder() { + return retryInfo_ == null ? com.google.rpc.RetryInfo.getDefaultInstance() : retryInfo_; + } + + 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 (rpcId_ != 0L) { + output.writeInt64(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getClusterInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getStatus()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getRetryInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rpcId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClusterInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRetryInfo()); + } + 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.bigtable.v2.ErrorResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.ErrorResponse other = (com.google.bigtable.v2.ErrorResponse) obj; + + if (getRpcId() != other.getRpcId()) return false; + if (hasClusterInfo() != other.hasClusterInfo()) return false; + if (hasClusterInfo()) { + if (!getClusterInfo().equals(other.getClusterInfo())) return false; + } + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasRetryInfo() != other.hasRetryInfo()) return false; + if (hasRetryInfo()) { + if (!getRetryInfo().equals(other.getRetryInfo())) 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) + RPC_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRpcId()); + if (hasClusterInfo()) { + hash = (37 * hash) + CLUSTER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getClusterInfo().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasRetryInfo()) { + hash = (37 * hash) + RETRY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getRetryInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ErrorResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ErrorResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ErrorResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ErrorResponse 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.bigtable.v2.ErrorResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ErrorResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ErrorResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ErrorResponse 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.bigtable.v2.ErrorResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ErrorResponse 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.bigtable.v2.ErrorResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ErrorResponse 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.bigtable.v2.ErrorResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ErrorResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ErrorResponse) + com.google.bigtable.v2.ErrorResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ErrorResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ErrorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ErrorResponse.class, + com.google.bigtable.v2.ErrorResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.ErrorResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClusterInfoFieldBuilder(); + internalGetStatusFieldBuilder(); + internalGetRetryInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rpcId_ = 0L; + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + retryInfo_ = null; + if (retryInfoBuilder_ != null) { + retryInfoBuilder_.dispose(); + retryInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_ErrorResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ErrorResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ErrorResponse build() { + com.google.bigtable.v2.ErrorResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ErrorResponse buildPartial() { + com.google.bigtable.v2.ErrorResponse result = new com.google.bigtable.v2.ErrorResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.ErrorResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rpcId_ = rpcId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterInfo_ = + clusterInfoBuilder_ == null ? clusterInfo_ : clusterInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.retryInfo_ = retryInfoBuilder_ == null ? retryInfo_ : retryInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ErrorResponse) { + return mergeFrom((com.google.bigtable.v2.ErrorResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ErrorResponse other) { + if (other == com.google.bigtable.v2.ErrorResponse.getDefaultInstance()) return this; + if (other.getRpcId() != 0L) { + setRpcId(other.getRpcId()); + } + if (other.hasClusterInfo()) { + mergeClusterInfo(other.getClusterInfo()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasRetryInfo()) { + mergeRetryInfo(other.getRetryInfo()); + } + 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: + { + rpcId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetClusterInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetRetryInfoFieldBuilder().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 long rpcId_; + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @param value The rpcId to set. + * @return This builder for chaining. + */ + public Builder setRpcId(long value) { + + rpcId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearRpcId() { + bitField0_ = (bitField0_ & ~0x00000001); + rpcId_ = 0L; + onChanged(); + return this; + } + + private com.google.bigtable.v2.ClusterInformation clusterInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder> + clusterInfoBuilder_; + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + public com.google.bigtable.v2.ClusterInformation getClusterInfo() { + if (clusterInfoBuilder_ == null) { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } else { + return clusterInfoBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder setClusterInfo(com.google.bigtable.v2.ClusterInformation value) { + if (clusterInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterInfo_ = value; + } else { + clusterInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder setClusterInfo( + com.google.bigtable.v2.ClusterInformation.Builder builderForValue) { + if (clusterInfoBuilder_ == null) { + clusterInfo_ = builderForValue.build(); + } else { + clusterInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder mergeClusterInfo(com.google.bigtable.v2.ClusterInformation value) { + if (clusterInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && clusterInfo_ != null + && clusterInfo_ != com.google.bigtable.v2.ClusterInformation.getDefaultInstance()) { + getClusterInfoBuilder().mergeFrom(value); + } else { + clusterInfo_ = value; + } + } else { + clusterInfoBuilder_.mergeFrom(value); + } + if (clusterInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder clearClusterInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public com.google.bigtable.v2.ClusterInformation.Builder getClusterInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetClusterInfoFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder() { + if (clusterInfoBuilder_ != null) { + return clusterInfoBuilder_.getMessageOrBuilder(); + } else { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder> + internalGetClusterInfoFieldBuilder() { + if (clusterInfoBuilder_ == null) { + clusterInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder>( + getClusterInfo(), getParentForChildren(), isClean()); + clusterInfo_ = null; + } + return clusterInfoBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + if (status_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetStatusFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + + /** + * + * + *
    +     * The error from the vRPC and any retry information to consider.
    +     * 
    + * + * .google.rpc.Status status = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.rpc.RetryInfo retryInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.RetryInfo, + com.google.rpc.RetryInfo.Builder, + com.google.rpc.RetryInfoOrBuilder> + retryInfoBuilder_; + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return Whether the retryInfo field is set. + */ + public boolean hasRetryInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return The retryInfo. + */ + public com.google.rpc.RetryInfo getRetryInfo() { + if (retryInfoBuilder_ == null) { + return retryInfo_ == null ? com.google.rpc.RetryInfo.getDefaultInstance() : retryInfo_; + } else { + return retryInfoBuilder_.getMessage(); + } + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public Builder setRetryInfo(com.google.rpc.RetryInfo value) { + if (retryInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retryInfo_ = value; + } else { + retryInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public Builder setRetryInfo(com.google.rpc.RetryInfo.Builder builderForValue) { + if (retryInfoBuilder_ == null) { + retryInfo_ = builderForValue.build(); + } else { + retryInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public Builder mergeRetryInfo(com.google.rpc.RetryInfo value) { + if (retryInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && retryInfo_ != null + && retryInfo_ != com.google.rpc.RetryInfo.getDefaultInstance()) { + getRetryInfoBuilder().mergeFrom(value); + } else { + retryInfo_ = value; + } + } else { + retryInfoBuilder_.mergeFrom(value); + } + if (retryInfo_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public Builder clearRetryInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + retryInfo_ = null; + if (retryInfoBuilder_ != null) { + retryInfoBuilder_.dispose(); + retryInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public com.google.rpc.RetryInfo.Builder getRetryInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetRetryInfoFieldBuilder().getBuilder(); + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + public com.google.rpc.RetryInfoOrBuilder getRetryInfoOrBuilder() { + if (retryInfoBuilder_ != null) { + return retryInfoBuilder_.getMessageOrBuilder(); + } else { + return retryInfo_ == null ? com.google.rpc.RetryInfo.getDefaultInstance() : retryInfo_; + } + } + + /** .google.rpc.RetryInfo retry_info = 4; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.RetryInfo, + com.google.rpc.RetryInfo.Builder, + com.google.rpc.RetryInfoOrBuilder> + internalGetRetryInfoFieldBuilder() { + if (retryInfoBuilder_ == null) { + retryInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.RetryInfo, + com.google.rpc.RetryInfo.Builder, + com.google.rpc.RetryInfoOrBuilder>( + getRetryInfo(), getParentForChildren(), isClean()); + retryInfo_ = null; + } + return retryInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ErrorResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ErrorResponse) + private static final com.google.bigtable.v2.ErrorResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ErrorResponse(); + } + + public static com.google.bigtable.v2.ErrorResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorResponse 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.bigtable.v2.ErrorResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponseOrBuilder.java new file mode 100644 index 0000000000..d29988fedc --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ErrorResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface ErrorResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ErrorResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Which vRPC this response is for.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + long getRpcId(); + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + boolean hasClusterInfo(); + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + com.google.bigtable.v2.ClusterInformation getClusterInfo(); + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder(); + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + + /** + * + * + *
    +   * The error from the vRPC and any retry information to consider.
    +   * 
    + * + * .google.rpc.Status status = 3; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return Whether the retryInfo field is set. + */ + boolean hasRetryInfo(); + + /** + * .google.rpc.RetryInfo retry_info = 4; + * + * @return The retryInfo. + */ + com.google.rpc.RetryInfo getRetryInfo(); + + /** .google.rpc.RetryInfo retry_info = 4; */ + com.google.rpc.RetryInfoOrBuilder getRetryInfoOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequest.java index 91a076d0f8..65808fb866 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.ExecuteQueryRequest} */ -public final class ExecuteQueryRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteQueryRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ExecuteQueryRequest) ExecuteQueryRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteQueryRequest"); + } + // Use ExecuteQueryRequest.newBuilder() to construct. - private ExecuteQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteQueryRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,15 +55,10 @@ private ExecuteQueryRequest() { instanceName_ = ""; appProfileId_ = ""; query_ = ""; + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; resumeToken_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecuteQueryRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryRequest_descriptor; @@ -69,7 +77,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable @@ -87,6 +95,7 @@ public enum DataFormatCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + @java.lang.Deprecated PROTO_FORMAT(4), DATAFORMAT_NOT_SET(0); private final int value; @@ -94,6 +103,7 @@ public enum DataFormatCase private DataFormatCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -128,6 +138,7 @@ public DataFormatCase getDataFormatCase() { @SuppressWarnings("serial") private volatile java.lang.Object instanceName_ = ""; + /** * * @@ -155,6 +166,7 @@ public java.lang.String getInstanceName() { return s; } } + /** * * @@ -187,6 +199,7 @@ public com.google.protobuf.ByteString getInstanceNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -211,6 +224,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -240,18 +254,25 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object query_ = ""; + /** * * *
        * Required. The query string.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
        * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The query. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getQuery() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { @@ -263,18 +284,25 @@ public java.lang.String getQuery() { return s; } } + /** * * *
        * Required. The query string.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
        * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The bytes for query. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { @@ -287,7 +315,35 @@ public com.google.protobuf.ByteString getQueryBytes() { } } + public static final int PREPARED_QUERY_FIELD_NUMBER = 9; + private com.google.protobuf.ByteString preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * A prepared query that was returned from `PrepareQueryResponse`.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
    +   *
    +   * Setting this field also places restrictions on several other fields:
    +   * - `data_format` must be empty.
    +   * - `validate_only` must be false.
    +   * - `params` must match the `param_types` set in the `PrepareQueryRequest`.
    +   * 
    + * + * bytes prepared_query = 9; + * + * @return The preparedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreparedQuery() { + return preparedQuery_; + } + public static final int PROTO_FORMAT_FIELD_NUMBER = 4; + /** * * @@ -296,14 +352,18 @@ public com.google.protobuf.ByteString getQueryBytes() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return Whether the protoFormat field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProtoFormat() { return dataFormatCase_ == 4; } + /** * * @@ -312,17 +372,21 @@ public boolean hasProtoFormat() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return The protoFormat. */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.ProtoFormat getProtoFormat() { if (dataFormatCase_ == 4) { return (com.google.bigtable.v2.ProtoFormat) dataFormat_; } return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); } + /** * * @@ -331,9 +395,10 @@ public com.google.bigtable.v2.ProtoFormat getProtoFormat() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { if (dataFormatCase_ == 4) { return (com.google.bigtable.v2.ProtoFormat) dataFormat_; @@ -343,6 +408,7 @@ public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { public static final int RESUME_TOKEN_FIELD_NUMBER = 8; private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -394,6 +460,7 @@ private static final class ParamsDefaultEntryHolder { public int getParamsCount() { return internalGetParams().getMap().size(); } + /** * * @@ -406,17 +473,21 @@ public int getParamsCount() { * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -430,12 +501,14 @@ public boolean containsParams(java.lang.String key) { } return internalGetParams().getMap().containsKey(key); } + /** Use {@link #getParamsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); } + /** * * @@ -448,17 +521,21 @@ public java.util.Map getParams() * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -469,6 +546,7 @@ public java.util.Map getParams() public java.util.Map getParamsMap() { return internalGetParams().getMap(); } + /** * * @@ -481,17 +559,21 @@ public java.util.Map getParamsMa * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -510,6 +592,7 @@ public java.util.Map getParamsMa internalGetParams().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } + /** * * @@ -522,17 +605,21 @@ public java.util.Map getParamsMa * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. + * + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -566,23 +653,26 @@ 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(instanceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, query_); } if (dataFormatCase_ == 4) { output.writeMessage(4, (com.google.bigtable.v2.ProtoFormat) dataFormat_); } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 7); if (!resumeToken_.isEmpty()) { output.writeBytes(8, resumeToken_); } + if (!preparedQuery_.isEmpty()) { + output.writeBytes(9, preparedQuery_); + } getUnknownFields().writeTo(output); } @@ -592,14 +682,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, query_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, query_); } if (dataFormatCase_ == 4) { size += @@ -619,6 +709,9 @@ public int getSerializedSize() { if (!resumeToken_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(8, resumeToken_); } + if (!preparedQuery_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(9, preparedQuery_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -638,6 +731,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceName().equals(other.getInstanceName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getQuery().equals(other.getQuery())) return false; + if (!getPreparedQuery().equals(other.getPreparedQuery())) return false; if (!getResumeToken().equals(other.getResumeToken())) return false; if (!internalGetParams().equals(other.internalGetParams())) return false; if (!getDataFormatCase().equals(other.getDataFormatCase())) return false; @@ -665,6 +759,8 @@ public int hashCode() { hash = (53 * hash) + getAppProfileId().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + PREPARED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getPreparedQuery().hashCode(); hash = (37 * hash) + RESUME_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getResumeToken().hashCode(); if (!internalGetParams().getMap().isEmpty()) { @@ -721,38 +817,38 @@ public static com.google.bigtable.v2.ExecuteQueryRequest parseFrom( public static com.google.bigtable.v2.ExecuteQueryRequest 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.bigtable.v2.ExecuteQueryRequest 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.bigtable.v2.ExecuteQueryRequest 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.bigtable.v2.ExecuteQueryRequest 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.bigtable.v2.ExecuteQueryRequest 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.bigtable.v2.ExecuteQueryRequest 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); } @@ -775,10 +871,11 @@ 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; } + /** * * @@ -788,7 +885,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ExecuteQueryRequest} */ - 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.bigtable.v2.ExecuteQueryRequest) com.google.bigtable.v2.ExecuteQueryRequestOrBuilder { @@ -820,7 +917,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryRequest_fieldAccessorTable @@ -832,7 +929,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi // Construct using com.google.bigtable.v2.ExecuteQueryRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -843,6 +940,7 @@ public Builder clear() { instanceName_ = ""; appProfileId_ = ""; query_ = ""; + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; if (protoFormatBuilder_ != null) { protoFormatBuilder_.clear(); } @@ -896,10 +994,13 @@ private void buildPartial0(com.google.bigtable.v2.ExecuteQueryRequest result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.query_ = query_; } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.resumeToken_ = resumeToken_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.preparedQuery_ = preparedQuery_; } if (((from_bitField0_ & 0x00000020) != 0)) { + result.resumeToken_ = resumeToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { result.params_ = internalGetParams().build(ParamsDefaultEntryHolder.defaultEntry); } } @@ -912,39 +1013,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ExecuteQueryRequest resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ExecuteQueryRequest) { @@ -972,11 +1040,14 @@ public Builder mergeFrom(com.google.bigtable.v2.ExecuteQueryRequest other) { bitField0_ |= 0x00000004; onChanged(); } - if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getPreparedQuery().isEmpty()) { + setPreparedQuery(other.getPreparedQuery()); + } + if (!other.getResumeToken().isEmpty()) { setResumeToken(other.getResumeToken()); } internalGetMutableParams().mergeFrom(other.internalGetParams()); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; switch (other.getDataFormatCase()) { case PROTO_FORMAT: { @@ -1034,7 +1105,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getProtoFormatFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProtoFormatFieldBuilder().getBuilder(), extensionRegistry); dataFormatCase_ = 4; break; } // case 34 @@ -1048,15 +1120,21 @@ public Builder mergeFrom( internalGetMutableParams() .ensureBuilderMap() .put(params__.getKey(), params__.getValue()); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 58 case 66: { resumeToken_ = input.readBytes(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 66 + case 74: + { + preparedQuery_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1091,6 +1169,7 @@ public Builder clearDataFormat() { private int bitField0_; private java.lang.Object instanceName_ = ""; + /** * * @@ -1117,6 +1196,7 @@ public java.lang.String getInstanceName() { return (java.lang.String) ref; } } + /** * * @@ -1143,6 +1223,7 @@ public com.google.protobuf.ByteString getInstanceNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1168,6 +1249,7 @@ public Builder setInstanceName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1189,6 +1271,7 @@ public Builder clearInstanceName() { onChanged(); return this; } + /** * * @@ -1217,6 +1300,7 @@ public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1240,6 +1324,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1263,6 +1348,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1285,6 +1371,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1303,6 +1390,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1328,17 +1416,24 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object query_ = ""; + /** * * *
          * Required. The query string.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
          * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The query. */ + @java.lang.Deprecated public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { @@ -1350,17 +1445,24 @@ public java.lang.String getQuery() { return (java.lang.String) ref; } } + /** * * *
          * Required. The query string.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
          * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The bytes for query. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { @@ -1372,18 +1474,25 @@ public com.google.protobuf.ByteString getQueryBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * *
          * Required. The query string.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
          * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @param value The query to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setQuery(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -1393,35 +1502,49 @@ public Builder setQuery(java.lang.String value) { onChanged(); return this; } + /** * * *
          * Required. The query string.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
          * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearQuery() { query_ = getDefaultInstance().getQuery(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } + /** * * *
          * Required. The query string.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
          * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @param value The bytes for query to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setQueryBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1433,11 +1556,94 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.ByteString preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * A prepared query that was returned from `PrepareQueryResponse`.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
    +     *
    +     * Setting this field also places restrictions on several other fields:
    +     * - `data_format` must be empty.
    +     * - `validate_only` must be false.
    +     * - `params` must match the `param_types` set in the `PrepareQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 9; + * + * @return The preparedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreparedQuery() { + return preparedQuery_; + } + + /** + * + * + *
    +     * A prepared query that was returned from `PrepareQueryResponse`.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
    +     *
    +     * Setting this field also places restrictions on several other fields:
    +     * - `data_format` must be empty.
    +     * - `validate_only` must be false.
    +     * - `params` must match the `param_types` set in the `PrepareQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 9; + * + * @param value The preparedQuery to set. + * @return This builder for chaining. + */ + public Builder setPreparedQuery(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + preparedQuery_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * A prepared query that was returned from `PrepareQueryResponse`.
    +     *
    +     * Exactly one of `query` and `prepared_query` is required. Setting both
    +     * or neither is an `INVALID_ARGUMENT`.
    +     *
    +     * Setting this field also places restrictions on several other fields:
    +     * - `data_format` must be empty.
    +     * - `validate_only` must be false.
    +     * - `params` must match the `param_types` set in the `PrepareQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 9; + * + * @return This builder for chaining. + */ + public Builder clearPreparedQuery() { + bitField0_ = (bitField0_ & ~0x00000008); + preparedQuery_ = getDefaultInstance().getPreparedQuery(); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoFormat, com.google.bigtable.v2.ProtoFormat.Builder, com.google.bigtable.v2.ProtoFormatOrBuilder> protoFormatBuilder_; + /** * * @@ -1446,14 +1652,18 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return Whether the protoFormat field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasProtoFormat() { return dataFormatCase_ == 4; } + /** * * @@ -1462,11 +1672,14 @@ public boolean hasProtoFormat() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return The protoFormat. */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.ProtoFormat getProtoFormat() { if (protoFormatBuilder_ == null) { if (dataFormatCase_ == 4) { @@ -1480,6 +1693,7 @@ public com.google.bigtable.v2.ProtoFormat getProtoFormat() { return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); } } + /** * * @@ -1488,8 +1702,9 @@ public com.google.bigtable.v2.ProtoFormat getProtoFormat() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat value) { if (protoFormatBuilder_ == null) { if (value == null) { @@ -1503,6 +1718,7 @@ public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat value) { dataFormatCase_ = 4; return this; } + /** * * @@ -1511,8 +1727,9 @@ public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat value) { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat.Builder builderForValue) { if (protoFormatBuilder_ == null) { dataFormat_ = builderForValue.build(); @@ -1523,6 +1740,7 @@ public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat.Builder builder dataFormatCase_ = 4; return this; } + /** * * @@ -1531,8 +1749,9 @@ public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat.Builder builder * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated public Builder mergeProtoFormat(com.google.bigtable.v2.ProtoFormat value) { if (protoFormatBuilder_ == null) { if (dataFormatCase_ == 4 @@ -1556,6 +1775,7 @@ public Builder mergeProtoFormat(com.google.bigtable.v2.ProtoFormat value) { dataFormatCase_ = 4; return this; } + /** * * @@ -1564,8 +1784,9 @@ public Builder mergeProtoFormat(com.google.bigtable.v2.ProtoFormat value) { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated public Builder clearProtoFormat() { if (protoFormatBuilder_ == null) { if (dataFormatCase_ == 4) { @@ -1582,6 +1803,7 @@ public Builder clearProtoFormat() { } return this; } + /** * * @@ -1590,11 +1812,13 @@ public Builder clearProtoFormat() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated public com.google.bigtable.v2.ProtoFormat.Builder getProtoFormatBuilder() { - return getProtoFormatFieldBuilder().getBuilder(); + return internalGetProtoFormatFieldBuilder().getBuilder(); } + /** * * @@ -1603,9 +1827,10 @@ public com.google.bigtable.v2.ProtoFormat.Builder getProtoFormatBuilder() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { if ((dataFormatCase_ == 4) && (protoFormatBuilder_ != null)) { return protoFormatBuilder_.getMessageOrBuilder(); @@ -1616,6 +1841,7 @@ public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); } } + /** * * @@ -1624,19 +1850,19 @@ public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoFormat, com.google.bigtable.v2.ProtoFormat.Builder, com.google.bigtable.v2.ProtoFormatOrBuilder> - getProtoFormatFieldBuilder() { + internalGetProtoFormatFieldBuilder() { if (protoFormatBuilder_ == null) { if (!(dataFormatCase_ == 4)) { dataFormat_ = com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); } protoFormatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoFormat, com.google.bigtable.v2.ProtoFormat.Builder, com.google.bigtable.v2.ProtoFormatOrBuilder>( @@ -1651,6 +1877,7 @@ public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { } private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1672,6 +1899,7 @@ public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } + /** * * @@ -1695,10 +1923,11 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { throw new NullPointerException(); } resumeToken_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -1717,7 +1946,7 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { * @return This builder for chaining. */ public Builder clearResumeToken() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); resumeToken_ = getDefaultInstance().getResumeToken(); onChanged(); return this; @@ -1739,7 +1968,8 @@ public com.google.bigtable.v2.Value build(com.google.bigtable.v2.ValueOrBuilder defaultEntry() { return ParamsDefaultEntryHolder.defaultEntry; } - }; + } + ; private static final ParamsConverter paramsConverter = new ParamsConverter(); @@ -1771,7 +2001,7 @@ public com.google.bigtable.v2.Value build(com.google.bigtable.v2.ValueOrBuilder if (params_ == null) { params_ = new com.google.protobuf.MapFieldBuilder<>(paramsConverter); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return params_; } @@ -1779,6 +2009,7 @@ public com.google.bigtable.v2.Value build(com.google.bigtable.v2.ValueOrBuilder public int getParamsCount() { return internalGetParams().ensureBuilderMap().size(); } + /** * * @@ -1791,17 +2022,21 @@ public int getParamsCount() { * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -1815,12 +2050,14 @@ public boolean containsParams(java.lang.String key) { } return internalGetParams().ensureBuilderMap().containsKey(key); } + /** Use {@link #getParamsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); } + /** * * @@ -1833,17 +2070,21 @@ public java.util.Map getParams() * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -1854,6 +2095,7 @@ public java.util.Map getParams() public java.util.Map getParamsMap() { return internalGetParams().getImmutableMap(); } + /** * * @@ -1866,17 +2108,21 @@ public java.util.Map getParamsMa * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -1895,6 +2141,7 @@ public java.util.Map getParamsMa internalGetMutableParams().ensureBuilderMap(); return map.containsKey(key) ? paramsConverter.build(map.get(key)) : defaultValue; } + /** * * @@ -1907,17 +2154,21 @@ public java.util.Map getParamsMa * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -1938,10 +2189,11 @@ public com.google.bigtable.v2.Value getParamsOrThrow(java.lang.String key) { } public Builder clearParams() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableParams().clear(); return this; } + /** * * @@ -1954,17 +2206,21 @@ public Builder clearParams() { * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -1978,12 +2234,14 @@ public Builder removeParams(java.lang.String key) { internalGetMutableParams().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableParams() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; return internalGetMutableParams().ensureMessageMap(); } + /** * * @@ -1996,17 +2254,21 @@ public java.util.Map getMutableP * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -2021,9 +2283,10 @@ public Builder putParams(java.lang.String key, com.google.bigtable.v2.Value valu throw new NullPointerException("map value"); } internalGetMutableParams().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; return this; } + /** * * @@ -2036,17 +2299,21 @@ public Builder putParams(java.lang.String key, com.google.bigtable.v2.Value valu * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -2062,9 +2329,10 @@ public Builder putAllParams( } } internalGetMutableParams().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; return this; } + /** * * @@ -2077,17 +2345,21 @@ public Builder putAllParams( * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -2109,17 +2381,6 @@ public com.google.bigtable.v2.Value.Builder putParamsBuilderIfAbsent(java.lang.S return (com.google.bigtable.v2.Value.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.bigtable.v2.ExecuteQueryRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequestOrBuilder.java index a376d8ce56..262acc8a14 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ExecuteQueryRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ExecuteQueryRequest) @@ -40,6 +42,7 @@ public interface ExecuteQueryRequestOrBuilder * @return The instanceName. */ java.lang.String getInstanceName(); + /** * * @@ -70,6 +73,7 @@ public interface ExecuteQueryRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -89,26 +93,60 @@ public interface ExecuteQueryRequestOrBuilder * *
        * Required. The query string.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
        * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The query. */ + @java.lang.Deprecated java.lang.String getQuery(); + /** * * *
        * Required. The query string.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
        * 
    * - * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * string query = 3 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.query is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1132 * @return The bytes for query. */ + @java.lang.Deprecated com.google.protobuf.ByteString getQueryBytes(); + /** + * + * + *
    +   * A prepared query that was returned from `PrepareQueryResponse`.
    +   *
    +   * Exactly one of `query` and `prepared_query` is required. Setting both
    +   * or neither is an `INVALID_ARGUMENT`.
    +   *
    +   * Setting this field also places restrictions on several other fields:
    +   * - `data_format` must be empty.
    +   * - `validate_only` must be false.
    +   * - `params` must match the `param_types` set in the `PrepareQueryRequest`.
    +   * 
    + * + * bytes prepared_query = 9; + * + * @return The preparedQuery. + */ + com.google.protobuf.ByteString getPreparedQuery(); + /** * * @@ -117,11 +155,15 @@ public interface ExecuteQueryRequestOrBuilder * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return Whether the protoFormat field is set. */ + @java.lang.Deprecated boolean hasProtoFormat(); + /** * * @@ -130,11 +172,15 @@ public interface ExecuteQueryRequestOrBuilder * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; * + * @deprecated google.bigtable.v2.ExecuteQueryRequest.proto_format is deprecated. See + * google/bigtable/v2/bigtable.proto;l=1153 * @return The protoFormat. */ + @java.lang.Deprecated com.google.bigtable.v2.ProtoFormat getProtoFormat(); + /** * * @@ -143,8 +189,9 @@ public interface ExecuteQueryRequestOrBuilder * messages. * * - * .google.bigtable.v2.ProtoFormat proto_format = 4; + * .google.bigtable.v2.ProtoFormat proto_format = 4 [deprecated = true]; */ + @java.lang.Deprecated com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder(); /** @@ -178,17 +225,21 @@ public interface ExecuteQueryRequestOrBuilder * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. + * + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -196,6 +247,7 @@ public interface ExecuteQueryRequestOrBuilder * */ int getParamsCount(); + /** * * @@ -208,17 +260,21 @@ public interface ExecuteQueryRequestOrBuilder * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. + * + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -226,9 +282,11 @@ public interface ExecuteQueryRequestOrBuilder * */ boolean containsParams(java.lang.String key); + /** Use {@link #getParamsMap()} instead. */ @java.lang.Deprecated java.util.Map getParams(); + /** * * @@ -241,17 +299,21 @@ public interface ExecuteQueryRequestOrBuilder * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -259,6 +321,7 @@ public interface ExecuteQueryRequestOrBuilder * */ java.util.Map getParamsMap(); + /** * * @@ -271,17 +334,21 @@ public interface ExecuteQueryRequestOrBuilder * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * @@ -293,6 +360,7 @@ com.google.bigtable.v2.Value getParamsOrDefault( java.lang.String key, /* nullable */ com.google.bigtable.v2.Value defaultValue); + /** * * @@ -305,17 +373,21 @@ com.google.bigtable.v2.Value getParamsOrDefault( * * For example, if * `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - * then `@firstName` will be replaced with googlesql bytes value "foo" in the - * query string during query evaluation. + * then `@firstName` will be replaced with googlesql bytes value "foo" in the + * query string during query evaluation. + * + * If `Value.kind` is not set, the value is treated as a NULL value of the + * given type. For example, if + * `params["firstName"] = type {string_type {}}` + * then `@firstName` will be replaced with googlesql null string. * - * In case of Value.kind is not set, it will be set to corresponding null - * value in googlesql. - * `params["firstName"] = type {string_type {}}` - * then `@firstName` will be replaced with googlesql null string. + * If `query` is set, any empty `Value.type` in the map will be rejected with + * `INVALID_ARGUMENT`. * - * Value.type should always be set and no inference of type will be made from - * Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - * error. + * If `prepared_query` is set, any empty `Value.type` in the map will be + * inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + * `Value.type` must match the corresponding `param_types` entry, or be + * rejected with `INVALID_ARGUMENT`. * * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponse.java index 61f1268b72..a022efc48f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.ExecuteQueryResponse} */ -public final class ExecuteQueryResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ExecuteQueryResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ExecuteQueryResponse) ExecuteQueryResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecuteQueryResponse"); + } + // Use ExecuteQueryResponse.newBuilder() to construct. - private ExecuteQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ExecuteQueryResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ExecuteQueryResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExecuteQueryResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable @@ -78,6 +85,7 @@ public enum ResponseCase private ResponseCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -111,6 +119,7 @@ public ResponseCase getResponseCase() { } public static final int METADATA_FIELD_NUMBER = 1; + /** * * @@ -127,6 +136,7 @@ public ResponseCase getResponseCase() { public boolean hasMetadata() { return responseCase_ == 1; } + /** * * @@ -146,6 +156,7 @@ public com.google.bigtable.v2.ResultSetMetadata getMetadata() { } return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); } + /** * * @@ -165,6 +176,7 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() } public static final int RESULTS_FIELD_NUMBER = 2; + /** * * @@ -182,6 +194,7 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() public boolean hasResults() { return responseCase_ == 2; } + /** * * @@ -202,6 +215,7 @@ public com.google.bigtable.v2.PartialResultSet getResults() { } return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); } + /** * * @@ -352,38 +366,38 @@ public static com.google.bigtable.v2.ExecuteQueryResponse parseFrom( public static com.google.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse 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); } @@ -406,10 +420,11 @@ 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; } + /** * * @@ -419,7 +434,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ExecuteQueryResponse} */ - 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.bigtable.v2.ExecuteQueryResponse) com.google.bigtable.v2.ExecuteQueryResponseOrBuilder { @@ -429,7 +444,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ExecuteQueryResponse_fieldAccessorTable @@ -441,7 +456,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ExecuteQueryResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -507,39 +522,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ExecuteQueryResponse 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.bigtable.v2.ExecuteQueryResponse) { @@ -596,13 +578,14 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); responseCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getResultsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetResultsFieldBuilder().getBuilder(), extensionRegistry); responseCase_ = 2; break; } // case 18 @@ -639,11 +622,12 @@ public Builder clearResponse() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ResultSetMetadata, com.google.bigtable.v2.ResultSetMetadata.Builder, com.google.bigtable.v2.ResultSetMetadataOrBuilder> metadataBuilder_; + /** * * @@ -660,6 +644,7 @@ public Builder clearResponse() { public boolean hasMetadata() { return responseCase_ == 1; } + /** * * @@ -686,6 +671,7 @@ public com.google.bigtable.v2.ResultSetMetadata getMetadata() { return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); } } + /** * * @@ -709,6 +695,7 @@ public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata value) { responseCase_ = 1; return this; } + /** * * @@ -729,6 +716,7 @@ public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata.Builder buil responseCase_ = 1; return this; } + /** * * @@ -762,6 +750,7 @@ public Builder mergeMetadata(com.google.bigtable.v2.ResultSetMetadata value) { responseCase_ = 1; return this; } + /** * * @@ -788,6 +777,7 @@ public Builder clearMetadata() { } return this; } + /** * * @@ -799,8 +789,9 @@ public Builder clearMetadata() { * .google.bigtable.v2.ResultSetMetadata metadata = 1; */ public com.google.bigtable.v2.ResultSetMetadata.Builder getMetadataBuilder() { - return getMetadataFieldBuilder().getBuilder(); + return internalGetMetadataFieldBuilder().getBuilder(); } + /** * * @@ -822,6 +813,7 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() return com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); } } + /** * * @@ -832,17 +824,17 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() * * .google.bigtable.v2.ResultSetMetadata metadata = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ResultSetMetadata, com.google.bigtable.v2.ResultSetMetadata.Builder, com.google.bigtable.v2.ResultSetMetadataOrBuilder> - getMetadataFieldBuilder() { + internalGetMetadataFieldBuilder() { if (metadataBuilder_ == null) { if (!(responseCase_ == 1)) { response_ = com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance(); } metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ResultSetMetadata, com.google.bigtable.v2.ResultSetMetadata.Builder, com.google.bigtable.v2.ResultSetMetadataOrBuilder>( @@ -856,11 +848,12 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() return metadataBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.PartialResultSet, com.google.bigtable.v2.PartialResultSet.Builder, com.google.bigtable.v2.PartialResultSetOrBuilder> resultsBuilder_; + /** * * @@ -878,6 +871,7 @@ public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() public boolean hasResults() { return responseCase_ == 2; } + /** * * @@ -905,6 +899,7 @@ public com.google.bigtable.v2.PartialResultSet getResults() { return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); } } + /** * * @@ -929,6 +924,7 @@ public Builder setResults(com.google.bigtable.v2.PartialResultSet value) { responseCase_ = 2; return this; } + /** * * @@ -950,6 +946,7 @@ public Builder setResults(com.google.bigtable.v2.PartialResultSet.Builder builde responseCase_ = 2; return this; } + /** * * @@ -984,6 +981,7 @@ public Builder mergeResults(com.google.bigtable.v2.PartialResultSet value) { responseCase_ = 2; return this; } + /** * * @@ -1011,6 +1009,7 @@ public Builder clearResults() { } return this; } + /** * * @@ -1023,8 +1022,9 @@ public Builder clearResults() { * .google.bigtable.v2.PartialResultSet results = 2; */ public com.google.bigtable.v2.PartialResultSet.Builder getResultsBuilder() { - return getResultsFieldBuilder().getBuilder(); + return internalGetResultsFieldBuilder().getBuilder(); } + /** * * @@ -1047,6 +1047,7 @@ public com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder() { return com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); } } + /** * * @@ -1058,17 +1059,17 @@ public com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder() { * * .google.bigtable.v2.PartialResultSet results = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.PartialResultSet, com.google.bigtable.v2.PartialResultSet.Builder, com.google.bigtable.v2.PartialResultSetOrBuilder> - getResultsFieldBuilder() { + internalGetResultsFieldBuilder() { if (resultsBuilder_ == null) { if (!(responseCase_ == 2)) { response_ = com.google.bigtable.v2.PartialResultSet.getDefaultInstance(); } resultsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.PartialResultSet, com.google.bigtable.v2.PartialResultSet.Builder, com.google.bigtable.v2.PartialResultSetOrBuilder>( @@ -1082,17 +1083,6 @@ public com.google.bigtable.v2.PartialResultSetOrBuilder getResultsOrBuilder() { return resultsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ExecuteQueryResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponseOrBuilder.java index 2379c97b83..0ef540b872 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ExecuteQueryResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ExecuteQueryResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ExecuteQueryResponse) @@ -37,6 +39,7 @@ public interface ExecuteQueryResponseOrBuilder * @return Whether the metadata field is set. */ boolean hasMetadata(); + /** * * @@ -50,6 +53,7 @@ public interface ExecuteQueryResponseOrBuilder * @return The metadata. */ com.google.bigtable.v2.ResultSetMetadata getMetadata(); + /** * * @@ -76,6 +80,7 @@ public interface ExecuteQueryResponseOrBuilder * @return Whether the results field is set. */ boolean hasResults(); + /** * * @@ -90,6 +95,7 @@ public interface ExecuteQueryResponseOrBuilder * @return The results. */ com.google.bigtable.v2.PartialResultSet getResults(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java index 7a47d3c517..4dff09c262 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.v2.Family} */ -public final class Family extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Family extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Family) FamilyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Family"); + } + // Use Family.newBuilder() to construct. - private Family(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Family(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,18 +57,12 @@ private Family() { columns_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Family(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Family_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Family_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -128,6 +137,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private java.util.List columns_; + /** * * @@ -141,6 +151,7 @@ public com.google.protobuf.ByteString getNameBytes() { public java.util.List getColumnsList() { return columns_; } + /** * * @@ -155,6 +166,7 @@ public java.util.List getColumnsList() { getColumnsOrBuilderList() { return columns_; } + /** * * @@ -168,6 +180,7 @@ public java.util.List getColumnsList() { public int getColumnsCount() { return columns_.size(); } + /** * * @@ -181,6 +194,7 @@ public int getColumnsCount() { public com.google.bigtable.v2.Column getColumns(int index) { return columns_.get(index); } + /** * * @@ -209,8 +223,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 < columns_.size(); i++) { output.writeMessage(2, columns_.get(i)); @@ -224,8 +238,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 < columns_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, columns_.get(i)); @@ -305,38 +319,38 @@ public static com.google.bigtable.v2.Family parseFrom( public static com.google.bigtable.v2.Family 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.bigtable.v2.Family 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.bigtable.v2.Family 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.bigtable.v2.Family 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.bigtable.v2.Family 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.bigtable.v2.Family 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,10 +373,11 @@ 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; } + /** * * @@ -373,7 +388,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.Family} */ - 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.bigtable.v2.Family) com.google.bigtable.v2.FamilyOrBuilder { @@ -382,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Family_fieldAccessorTable @@ -393,7 +408,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Family.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -461,39 +476,6 @@ private void buildPartial0(com.google.bigtable.v2.Family 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.bigtable.v2.Family) { @@ -530,8 +512,8 @@ public Builder mergeFrom(com.google.bigtable.v2.Family other) { columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000002); columnsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnsFieldBuilder() : null; } else { columnsBuilder_.addAllMessages(other.columns_); @@ -602,6 +584,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -629,6 +612,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -656,6 +640,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -682,6 +667,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -704,6 +690,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -742,7 +729,7 @@ private void ensureColumnsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Column, com.google.bigtable.v2.Column.Builder, com.google.bigtable.v2.ColumnOrBuilder> @@ -764,6 +751,7 @@ public java.util.List getColumnsList() { return columnsBuilder_.getMessageList(); } } + /** * * @@ -780,6 +768,7 @@ public int getColumnsCount() { return columnsBuilder_.getCount(); } } + /** * * @@ -796,6 +785,7 @@ public com.google.bigtable.v2.Column getColumns(int index) { return columnsBuilder_.getMessage(index); } } + /** * * @@ -818,6 +808,7 @@ public Builder setColumns(int index, com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -837,6 +828,7 @@ public Builder setColumns(int index, com.google.bigtable.v2.Column.Builder build } return this; } + /** * * @@ -859,6 +851,7 @@ public Builder addColumns(com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -881,6 +874,7 @@ public Builder addColumns(int index, com.google.bigtable.v2.Column value) { } return this; } + /** * * @@ -900,6 +894,7 @@ public Builder addColumns(com.google.bigtable.v2.Column.Builder builderForValue) } return this; } + /** * * @@ -919,6 +914,7 @@ public Builder addColumns(int index, com.google.bigtable.v2.Column.Builder build } return this; } + /** * * @@ -939,6 +935,7 @@ public Builder addAllColumns( } return this; } + /** * * @@ -958,6 +955,7 @@ public Builder clearColumns() { } return this; } + /** * * @@ -977,6 +975,7 @@ public Builder removeColumns(int index) { } return this; } + /** * * @@ -987,8 +986,9 @@ public Builder removeColumns(int index) { * repeated .google.bigtable.v2.Column columns = 2; */ public com.google.bigtable.v2.Column.Builder getColumnsBuilder(int index) { - return getColumnsFieldBuilder().getBuilder(index); + return internalGetColumnsFieldBuilder().getBuilder(index); } + /** * * @@ -1005,6 +1005,7 @@ public com.google.bigtable.v2.ColumnOrBuilder getColumnsOrBuilder(int index) { return columnsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1022,6 +1023,7 @@ public com.google.bigtable.v2.ColumnOrBuilder getColumnsOrBuilder(int index) { return java.util.Collections.unmodifiableList(columns_); } } + /** * * @@ -1032,9 +1034,10 @@ public com.google.bigtable.v2.ColumnOrBuilder getColumnsOrBuilder(int index) { * repeated .google.bigtable.v2.Column columns = 2; */ public com.google.bigtable.v2.Column.Builder addColumnsBuilder() { - return getColumnsFieldBuilder() + return internalGetColumnsFieldBuilder() .addBuilder(com.google.bigtable.v2.Column.getDefaultInstance()); } + /** * * @@ -1045,9 +1048,10 @@ public com.google.bigtable.v2.Column.Builder addColumnsBuilder() { * repeated .google.bigtable.v2.Column columns = 2; */ public com.google.bigtable.v2.Column.Builder addColumnsBuilder(int index) { - return getColumnsFieldBuilder() + return internalGetColumnsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Column.getDefaultInstance()); } + /** * * @@ -1058,17 +1062,17 @@ public com.google.bigtable.v2.Column.Builder addColumnsBuilder(int index) { * repeated .google.bigtable.v2.Column columns = 2; */ public java.util.List getColumnsBuilderList() { - return getColumnsFieldBuilder().getBuilderList(); + return internalGetColumnsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Column, com.google.bigtable.v2.Column.Builder, com.google.bigtable.v2.ColumnOrBuilder> - getColumnsFieldBuilder() { + internalGetColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Column, com.google.bigtable.v2.Column.Builder, com.google.bigtable.v2.ColumnOrBuilder>( @@ -1078,17 +1082,6 @@ public java.util.List getColumnsBuilderLi return columnsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Family) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FamilyOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FamilyOrBuilder.java index f0a067d151..8669507682 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FamilyOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FamilyOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface FamilyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Family) @@ -41,6 +43,7 @@ public interface FamilyOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -69,6 +72,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ java.util.List getColumnsList(); + /** * * @@ -79,6 +83,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ com.google.bigtable.v2.Column getColumns(int index); + /** * * @@ -89,6 +94,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ int getColumnsCount(); + /** * * @@ -99,6 +105,7 @@ public interface FamilyOrBuilder * repeated .google.bigtable.v2.Column columns = 2; */ java.util.List getColumnsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java index 9d5085ec26..0f3f05cae2 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/feature_flags.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -35,31 +36,37 @@ * * Protobuf type {@code google.bigtable.v2.FeatureFlags} */ -public final class FeatureFlags extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class FeatureFlags extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.FeatureFlags) FeatureFlagsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeatureFlags"); + } + // Use FeatureFlags.newBuilder() to construct. - private FeatureFlags(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FeatureFlags(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FeatureFlags() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FeatureFlags(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.FeatureFlagsProto .internal_static_google_bigtable_v2_FeatureFlags_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.FeatureFlagsProto .internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable @@ -70,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int REVERSE_SCANS_FIELD_NUMBER = 1; private boolean reverseScans_ = false; + /** * * @@ -89,6 +97,7 @@ public boolean getReverseScans() { public static final int MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER = 3; private boolean mutateRowsRateLimit_ = false; + /** * * @@ -109,6 +118,7 @@ public boolean getMutateRowsRateLimit() { public static final int MUTATE_ROWS_RATE_LIMIT2_FIELD_NUMBER = 5; private boolean mutateRowsRateLimit2_ = false; + /** * * @@ -129,6 +139,7 @@ public boolean getMutateRowsRateLimit2() { public static final int LAST_SCANNED_ROW_RESPONSES_FIELD_NUMBER = 4; private boolean lastScannedRowResponses_ = false; + /** * * @@ -148,6 +159,7 @@ public boolean getLastScannedRowResponses() { public static final int ROUTING_COOKIE_FIELD_NUMBER = 6; private boolean routingCookie_ = false; + /** * * @@ -167,6 +179,7 @@ public boolean getRoutingCookie() { public static final int RETRY_INFO_FIELD_NUMBER = 7; private boolean retryInfo_ = false; + /** * * @@ -186,6 +199,7 @@ public boolean getRetryInfo() { public static final int CLIENT_SIDE_METRICS_ENABLED_FIELD_NUMBER = 8; private boolean clientSideMetricsEnabled_ = false; + /** * * @@ -202,6 +216,101 @@ public boolean getClientSideMetricsEnabled() { return clientSideMetricsEnabled_; } + public static final int TRAFFIC_DIRECTOR_ENABLED_FIELD_NUMBER = 9; + private boolean trafficDirectorEnabled_ = false; + + /** + * + * + *
    +   * Notify the server that the client using Traffic Director endpoint.
    +   * 
    + * + * bool traffic_director_enabled = 9; + * + * @return The trafficDirectorEnabled. + */ + @java.lang.Override + public boolean getTrafficDirectorEnabled() { + return trafficDirectorEnabled_; + } + + public static final int DIRECT_ACCESS_REQUESTED_FIELD_NUMBER = 10; + private boolean directAccessRequested_ = false; + + /** + * + * + *
    +   * Notify the server that the client explicitly opted in for Direct Access.
    +   * 
    + * + * bool direct_access_requested = 10; + * + * @return The directAccessRequested. + */ + @java.lang.Override + public boolean getDirectAccessRequested() { + return directAccessRequested_; + } + + public static final int PEER_INFO_FIELD_NUMBER = 11; + private boolean peerInfo_ = false; + + /** + * + * + *
    +   * If the client can support using BigtablePeerInfo.
    +   * 
    + * + * bool peer_info = 11; + * + * @return The peerInfo. + */ + @java.lang.Override + public boolean getPeerInfo() { + return peerInfo_; + } + + public static final int SESSIONS_COMPATIBLE_FIELD_NUMBER = 12; + private boolean sessionsCompatible_ = false; + + /** + * + * + *
    +   * Indicates whether the client supports the Bigtable Sessions API.
    +   * 
    + * + * bool sessions_compatible = 12; + * + * @return The sessionsCompatible. + */ + @java.lang.Override + public boolean getSessionsCompatible() { + return sessionsCompatible_; + } + + public static final int SESSIONS_REQUIRED_FIELD_NUMBER = 13; + private boolean sessionsRequired_ = false; + + /** + * + * + *
    +   * Internal flag to force sessions for internal projects.
    +   * 
    + * + * bool sessions_required = 13; + * + * @return The sessionsRequired. + */ + @java.lang.Override + public boolean getSessionsRequired() { + return sessionsRequired_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -237,6 +346,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clientSideMetricsEnabled_ != false) { output.writeBool(8, clientSideMetricsEnabled_); } + if (trafficDirectorEnabled_ != false) { + output.writeBool(9, trafficDirectorEnabled_); + } + if (directAccessRequested_ != false) { + output.writeBool(10, directAccessRequested_); + } + if (peerInfo_ != false) { + output.writeBool(11, peerInfo_); + } + if (sessionsCompatible_ != false) { + output.writeBool(12, sessionsCompatible_); + } + if (sessionsRequired_ != false) { + output.writeBool(13, sessionsRequired_); + } getUnknownFields().writeTo(output); } @@ -267,6 +391,21 @@ public int getSerializedSize() { if (clientSideMetricsEnabled_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, clientSideMetricsEnabled_); } + if (trafficDirectorEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, trafficDirectorEnabled_); + } + if (directAccessRequested_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, directAccessRequested_); + } + if (peerInfo_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, peerInfo_); + } + if (sessionsCompatible_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, sessionsCompatible_); + } + if (sessionsRequired_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, sessionsRequired_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -289,6 +428,11 @@ public boolean equals(final java.lang.Object obj) { if (getRoutingCookie() != other.getRoutingCookie()) return false; if (getRetryInfo() != other.getRetryInfo()) return false; if (getClientSideMetricsEnabled() != other.getClientSideMetricsEnabled()) return false; + if (getTrafficDirectorEnabled() != other.getTrafficDirectorEnabled()) return false; + if (getDirectAccessRequested() != other.getDirectAccessRequested()) return false; + if (getPeerInfo() != other.getPeerInfo()) return false; + if (getSessionsCompatible() != other.getSessionsCompatible()) return false; + if (getSessionsRequired() != other.getSessionsRequired()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,6 +458,16 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRetryInfo()); hash = (37 * hash) + CLIENT_SIDE_METRICS_ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getClientSideMetricsEnabled()); + hash = (37 * hash) + TRAFFIC_DIRECTOR_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTrafficDirectorEnabled()); + hash = (37 * hash) + DIRECT_ACCESS_REQUESTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDirectAccessRequested()); + hash = (37 * hash) + PEER_INFO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPeerInfo()); + hash = (37 * hash) + SESSIONS_COMPATIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSessionsCompatible()); + hash = (37 * hash) + SESSIONS_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSessionsRequired()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -355,38 +509,38 @@ public static com.google.bigtable.v2.FeatureFlags parseFrom( public static com.google.bigtable.v2.FeatureFlags 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.bigtable.v2.FeatureFlags 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.bigtable.v2.FeatureFlags 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.bigtable.v2.FeatureFlags 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.bigtable.v2.FeatureFlags 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.bigtable.v2.FeatureFlags 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); } @@ -409,10 +563,11 @@ 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; } + /** * * @@ -429,7 +584,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.FeatureFlags} */ - 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.bigtable.v2.FeatureFlags) com.google.bigtable.v2.FeatureFlagsOrBuilder { @@ -439,7 +594,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.bigtable.v2.FeatureFlagsProto .internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable @@ -451,7 +606,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.FeatureFlags.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -466,6 +621,11 @@ public Builder clear() { routingCookie_ = false; retryInfo_ = false; clientSideMetricsEnabled_ = false; + trafficDirectorEnabled_ = false; + directAccessRequested_ = false; + peerInfo_ = false; + sessionsCompatible_ = false; + sessionsRequired_ = false; return this; } @@ -522,39 +682,21 @@ private void buildPartial0(com.google.bigtable.v2.FeatureFlags result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.clientSideMetricsEnabled_ = clientSideMetricsEnabled_; } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(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_ & 0x00000080) != 0)) { + result.trafficDirectorEnabled_ = trafficDirectorEnabled_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.directAccessRequested_ = directAccessRequested_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.peerInfo_ = peerInfo_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.sessionsCompatible_ = sessionsCompatible_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.sessionsRequired_ = sessionsRequired_; + } } @java.lang.Override @@ -590,6 +732,21 @@ public Builder mergeFrom(com.google.bigtable.v2.FeatureFlags other) { if (other.getClientSideMetricsEnabled() != false) { setClientSideMetricsEnabled(other.getClientSideMetricsEnabled()); } + if (other.getTrafficDirectorEnabled() != false) { + setTrafficDirectorEnabled(other.getTrafficDirectorEnabled()); + } + if (other.getDirectAccessRequested() != false) { + setDirectAccessRequested(other.getDirectAccessRequested()); + } + if (other.getPeerInfo() != false) { + setPeerInfo(other.getPeerInfo()); + } + if (other.getSessionsCompatible() != false) { + setSessionsCompatible(other.getSessionsCompatible()); + } + if (other.getSessionsRequired() != false) { + setSessionsRequired(other.getSessionsRequired()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -658,6 +815,36 @@ public Builder mergeFrom( bitField0_ |= 0x00000040; break; } // case 64 + case 72: + { + trafficDirectorEnabled_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: + { + directAccessRequested_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: + { + peerInfo_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: + { + sessionsCompatible_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 96 + case 104: + { + sessionsRequired_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 104 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -678,6 +865,7 @@ public Builder mergeFrom( private int bitField0_; private boolean reverseScans_; + /** * * @@ -694,6 +882,7 @@ public Builder mergeFrom( public boolean getReverseScans() { return reverseScans_; } + /** * * @@ -714,6 +903,7 @@ public Builder setReverseScans(boolean value) { onChanged(); return this; } + /** * * @@ -734,6 +924,7 @@ public Builder clearReverseScans() { } private boolean mutateRowsRateLimit_; + /** * * @@ -751,6 +942,7 @@ public Builder clearReverseScans() { public boolean getMutateRowsRateLimit() { return mutateRowsRateLimit_; } + /** * * @@ -772,6 +964,7 @@ public Builder setMutateRowsRateLimit(boolean value) { onChanged(); return this; } + /** * * @@ -793,6 +986,7 @@ public Builder clearMutateRowsRateLimit() { } private boolean mutateRowsRateLimit2_; + /** * * @@ -810,6 +1004,7 @@ public Builder clearMutateRowsRateLimit() { public boolean getMutateRowsRateLimit2() { return mutateRowsRateLimit2_; } + /** * * @@ -831,6 +1026,7 @@ public Builder setMutateRowsRateLimit2(boolean value) { onChanged(); return this; } + /** * * @@ -852,6 +1048,7 @@ public Builder clearMutateRowsRateLimit2() { } private boolean lastScannedRowResponses_; + /** * * @@ -868,6 +1065,7 @@ public Builder clearMutateRowsRateLimit2() { public boolean getLastScannedRowResponses() { return lastScannedRowResponses_; } + /** * * @@ -888,6 +1086,7 @@ public Builder setLastScannedRowResponses(boolean value) { onChanged(); return this; } + /** * * @@ -908,6 +1107,7 @@ public Builder clearLastScannedRowResponses() { } private boolean routingCookie_; + /** * * @@ -924,6 +1124,7 @@ public Builder clearLastScannedRowResponses() { public boolean getRoutingCookie() { return routingCookie_; } + /** * * @@ -944,6 +1145,7 @@ public Builder setRoutingCookie(boolean value) { onChanged(); return this; } + /** * * @@ -964,6 +1166,7 @@ public Builder clearRoutingCookie() { } private boolean retryInfo_; + /** * * @@ -980,6 +1183,7 @@ public Builder clearRoutingCookie() { public boolean getRetryInfo() { return retryInfo_; } + /** * * @@ -1000,6 +1204,7 @@ public Builder setRetryInfo(boolean value) { onChanged(); return this; } + /** * * @@ -1020,6 +1225,7 @@ public Builder clearRetryInfo() { } private boolean clientSideMetricsEnabled_; + /** * * @@ -1035,6 +1241,7 @@ public Builder clearRetryInfo() { public boolean getClientSideMetricsEnabled() { return clientSideMetricsEnabled_; } + /** * * @@ -1054,6 +1261,7 @@ public Builder setClientSideMetricsEnabled(boolean value) { onChanged(); return this; } + /** * * @@ -1072,15 +1280,284 @@ public Builder clearClientSideMetricsEnabled() { return this; } + private boolean trafficDirectorEnabled_; + + /** + * + * + *
    +     * Notify the server that the client using Traffic Director endpoint.
    +     * 
    + * + * bool traffic_director_enabled = 9; + * + * @return The trafficDirectorEnabled. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getTrafficDirectorEnabled() { + return trafficDirectorEnabled_; + } + + /** + * + * + *
    +     * Notify the server that the client using Traffic Director endpoint.
    +     * 
    + * + * bool traffic_director_enabled = 9; + * + * @param value The trafficDirectorEnabled to set. + * @return This builder for chaining. + */ + public Builder setTrafficDirectorEnabled(boolean value) { + + trafficDirectorEnabled_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } + /** + * + * + *
    +     * Notify the server that the client using Traffic Director endpoint.
    +     * 
    + * + * bool traffic_director_enabled = 9; + * + * @return This builder for chaining. + */ + public Builder clearTrafficDirectorEnabled() { + bitField0_ = (bitField0_ & ~0x00000080); + trafficDirectorEnabled_ = false; + onChanged(); + return this; + } + + private boolean directAccessRequested_; + + /** + * + * + *
    +     * Notify the server that the client explicitly opted in for Direct Access.
    +     * 
    + * + * bool direct_access_requested = 10; + * + * @return The directAccessRequested. + */ + @java.lang.Override + public boolean getDirectAccessRequested() { + return directAccessRequested_; + } + + /** + * + * + *
    +     * Notify the server that the client explicitly opted in for Direct Access.
    +     * 
    + * + * bool direct_access_requested = 10; + * + * @param value The directAccessRequested to set. + * @return This builder for chaining. + */ + public Builder setDirectAccessRequested(boolean value) { + + directAccessRequested_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Notify the server that the client explicitly opted in for Direct Access.
    +     * 
    + * + * bool direct_access_requested = 10; + * + * @return This builder for chaining. + */ + public Builder clearDirectAccessRequested() { + bitField0_ = (bitField0_ & ~0x00000100); + directAccessRequested_ = false; + onChanged(); + return this; + } + + private boolean peerInfo_; + + /** + * + * + *
    +     * If the client can support using BigtablePeerInfo.
    +     * 
    + * + * bool peer_info = 11; + * + * @return The peerInfo. + */ + @java.lang.Override + public boolean getPeerInfo() { + return peerInfo_; + } + + /** + * + * + *
    +     * If the client can support using BigtablePeerInfo.
    +     * 
    + * + * bool peer_info = 11; + * + * @param value The peerInfo to set. + * @return This builder for chaining. + */ + public Builder setPeerInfo(boolean value) { + + peerInfo_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
    +     * If the client can support using BigtablePeerInfo.
    +     * 
    + * + * bool peer_info = 11; + * + * @return This builder for chaining. + */ + public Builder clearPeerInfo() { + bitField0_ = (bitField0_ & ~0x00000200); + peerInfo_ = false; + onChanged(); + return this; + } + + private boolean sessionsCompatible_; + + /** + * + * + *
    +     * Indicates whether the client supports the Bigtable Sessions API.
    +     * 
    + * + * bool sessions_compatible = 12; + * + * @return The sessionsCompatible. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public boolean getSessionsCompatible() { + return sessionsCompatible_; + } + + /** + * + * + *
    +     * Indicates whether the client supports the Bigtable Sessions API.
    +     * 
    + * + * bool sessions_compatible = 12; + * + * @param value The sessionsCompatible to set. + * @return This builder for chaining. + */ + public Builder setSessionsCompatible(boolean value) { + + sessionsCompatible_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Indicates whether the client supports the Bigtable Sessions API.
    +     * 
    + * + * bool sessions_compatible = 12; + * + * @return This builder for chaining. + */ + public Builder clearSessionsCompatible() { + bitField0_ = (bitField0_ & ~0x00000400); + sessionsCompatible_ = false; + onChanged(); + return this; + } + + private boolean sessionsRequired_; + + /** + * + * + *
    +     * Internal flag to force sessions for internal projects.
    +     * 
    + * + * bool sessions_required = 13; + * + * @return The sessionsRequired. + */ + @java.lang.Override + public boolean getSessionsRequired() { + return sessionsRequired_; + } + + /** + * + * + *
    +     * Internal flag to force sessions for internal projects.
    +     * 
    + * + * bool sessions_required = 13; + * + * @param value The sessionsRequired to set. + * @return This builder for chaining. + */ + public Builder setSessionsRequired(boolean value) { + + sessionsRequired_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Internal flag to force sessions for internal projects.
    +     * 
    + * + * bool sessions_required = 13; + * + * @return This builder for chaining. + */ + public Builder clearSessionsRequired() { + bitField0_ = (bitField0_ & ~0x00000800); + sessionsRequired_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.FeatureFlags) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java index 861e2ea925..c6d5769116 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/feature_flags.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface FeatureFlagsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.FeatureFlags) @@ -122,4 +124,69 @@ public interface FeatureFlagsOrBuilder * @return The clientSideMetricsEnabled. */ boolean getClientSideMetricsEnabled(); + + /** + * + * + *
    +   * Notify the server that the client using Traffic Director endpoint.
    +   * 
    + * + * bool traffic_director_enabled = 9; + * + * @return The trafficDirectorEnabled. + */ + boolean getTrafficDirectorEnabled(); + + /** + * + * + *
    +   * Notify the server that the client explicitly opted in for Direct Access.
    +   * 
    + * + * bool direct_access_requested = 10; + * + * @return The directAccessRequested. + */ + boolean getDirectAccessRequested(); + + /** + * + * + *
    +   * If the client can support using BigtablePeerInfo.
    +   * 
    + * + * bool peer_info = 11; + * + * @return The peerInfo. + */ + boolean getPeerInfo(); + + /** + * + * + *
    +   * Indicates whether the client supports the Bigtable Sessions API.
    +   * 
    + * + * bool sessions_compatible = 12; + * + * @return The sessionsCompatible. + */ + boolean getSessionsCompatible(); + + /** + * + * + *
    +   * Internal flag to force sessions for internal projects.
    +   * 
    + * + * bool sessions_required = 13; + * + * @return The sessionsRequired. + */ + boolean getSessionsRequired(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java index c2633070d7..b0bbffce2b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/feature_flags.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class FeatureFlagsProto { +@com.google.protobuf.Generated +public final class FeatureFlagsProto extends com.google.protobuf.GeneratedFile { private FeatureFlagsProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeatureFlagsProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,7 +42,7 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_FeatureFlags_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -42,25 +54,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n&google/bigtable/v2/feature_flags.proto" - + "\022\022google.bigtable.v2\"\333\001\n\014FeatureFlags\022\025\n" + + "\022\022google.bigtable.v2\"\351\002\n\014FeatureFlags\022\025\n" + "\rreverse_scans\030\001 \001(\010\022\036\n\026mutate_rows_rate" + "_limit\030\003 \001(\010\022\037\n\027mutate_rows_rate_limit2\030" + "\005 \001(\010\022\"\n\032last_scanned_row_responses\030\004 \001(" + "\010\022\026\n\016routing_cookie\030\006 \001(\010\022\022\n\nretry_info\030" + "\007 \001(\010\022#\n\033client_side_metrics_enabled\030\010 \001" - + "(\010B\273\001\n\026com.google.bigtable.v2B\021FeatureFl" - + "agsProtoP\001Z8cloud.google.com/go/bigtable" - + "/apiv2/bigtablepb;bigtablepb\252\002\030Google.Cl" - + "oud.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\" - + "V2\352\002\033Google::Cloud::Bigtable::V2b\006proto3" + + "(\010\022 \n\030traffic_director_enabled\030\t \001(\010\022\037\n\027" + + "direct_access_requested\030\n \001(\010\022\021\n\tpeer_in" + + "fo\030\013 \001(\010\022\033\n\023sessions_compatible\030\014 \001(\010\022\031\n" + + "\021sessions_required\030\r \001(\010B\273\001\n\026com.google." + + "bigtable.v2B\021FeatureFlagsProtoP\001Z8cloud." + + "google.com/go/bigtable/apiv2/bigtablepb;" + + "bigtablepb\252\002\030Google.Cloud.Bigtable.V2\312\002\030" + + "Google\\Cloud\\Bigtable\\V2\352\002\033Google::Cloud" + + "::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); - internal_static_google_bigtable_v2_FeatureFlags_descriptor = - getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_v2_FeatureFlags_descriptor = getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_FeatureFlags_descriptor, new java.lang.String[] { "ReverseScans", @@ -70,7 +85,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RoutingCookie", "RetryInfo", "ClientSideMetricsEnabled", + "TrafficDirectorEnabled", + "DirectAccessRequested", + "PeerInfo", + "SessionsCompatible", + "SessionsRequired", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java index b6beff94ec..9e2e6fe855 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.FullReadStatsView} */ -public final class FullReadStatsView extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class FullReadStatsView extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.FullReadStatsView) FullReadStatsViewOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FullReadStatsView"); + } + // Use FullReadStatsView.newBuilder() to construct. - private FullReadStatsView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private FullReadStatsView(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private FullReadStatsView() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FullReadStatsView(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_FullReadStatsView_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int READ_ITERATION_STATS_FIELD_NUMBER = 1; private com.google.bigtable.v2.ReadIterationStats readIterationStats_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasReadIterationStats() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -102,6 +111,7 @@ public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { ? com.google.bigtable.v2.ReadIterationStats.getDefaultInstance() : readIterationStats_; } + /** * * @@ -123,6 +133,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO public static final int REQUEST_LATENCY_STATS_FIELD_NUMBER = 2; private com.google.bigtable.v2.RequestLatencyStats requestLatencyStats_; + /** * * @@ -139,6 +150,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO public boolean hasRequestLatencyStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -157,6 +169,7 @@ public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { ? com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance() : requestLatencyStats_; } + /** * * @@ -293,38 +306,38 @@ public static com.google.bigtable.v2.FullReadStatsView parseFrom( public static com.google.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView 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); } @@ -347,10 +360,11 @@ 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; } + /** * * @@ -360,7 +374,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.FullReadStatsView} */ - 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.bigtable.v2.FullReadStatsView) com.google.bigtable.v2.FullReadStatsViewOrBuilder { @@ -370,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.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable @@ -384,15 +398,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) { - getReadIterationStatsFieldBuilder(); - getRequestLatencyStatsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReadIterationStatsFieldBuilder(); + internalGetRequestLatencyStatsFieldBuilder(); } } @@ -464,39 +478,6 @@ private void buildPartial0(com.google.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView) { @@ -544,14 +525,14 @@ public Builder mergeFrom( case 10: { input.readMessage( - getReadIterationStatsFieldBuilder().getBuilder(), extensionRegistry); + internalGetReadIterationStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( - getRequestLatencyStatsFieldBuilder().getBuilder(), extensionRegistry); + internalGetRequestLatencyStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -575,11 +556,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.ReadIterationStats readIterationStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadIterationStats, com.google.bigtable.v2.ReadIterationStats.Builder, com.google.bigtable.v2.ReadIterationStatsOrBuilder> readIterationStatsBuilder_; + /** * * @@ -597,6 +579,7 @@ public Builder mergeFrom( public boolean hasReadIterationStats() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -620,6 +603,7 @@ public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { return readIterationStatsBuilder_.getMessage(); } } + /** * * @@ -645,6 +629,7 @@ public Builder setReadIterationStats(com.google.bigtable.v2.ReadIterationStats v onChanged(); return this; } + /** * * @@ -668,6 +653,7 @@ public Builder setReadIterationStats( onChanged(); return this; } + /** * * @@ -699,6 +685,7 @@ public Builder mergeReadIterationStats(com.google.bigtable.v2.ReadIterationStats } return this; } + /** * * @@ -721,6 +708,7 @@ public Builder clearReadIterationStats() { onChanged(); return this; } + /** * * @@ -736,8 +724,9 @@ public Builder clearReadIterationStats() { public com.google.bigtable.v2.ReadIterationStats.Builder getReadIterationStatsBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getReadIterationStatsFieldBuilder().getBuilder(); + return internalGetReadIterationStatsFieldBuilder().getBuilder(); } + /** * * @@ -759,6 +748,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO : readIterationStats_; } } + /** * * @@ -771,14 +761,14 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO * * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadIterationStats, com.google.bigtable.v2.ReadIterationStats.Builder, com.google.bigtable.v2.ReadIterationStatsOrBuilder> - getReadIterationStatsFieldBuilder() { + internalGetReadIterationStatsFieldBuilder() { if (readIterationStatsBuilder_ == null) { readIterationStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadIterationStats, com.google.bigtable.v2.ReadIterationStats.Builder, com.google.bigtable.v2.ReadIterationStatsOrBuilder>( @@ -789,11 +779,12 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO } private com.google.bigtable.v2.RequestLatencyStats requestLatencyStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestLatencyStats, com.google.bigtable.v2.RequestLatencyStats.Builder, com.google.bigtable.v2.RequestLatencyStatsOrBuilder> requestLatencyStatsBuilder_; + /** * * @@ -809,6 +800,7 @@ public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsO public boolean hasRequestLatencyStats() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -830,6 +822,7 @@ public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { return requestLatencyStatsBuilder_.getMessage(); } } + /** * * @@ -853,6 +846,7 @@ public Builder setRequestLatencyStats(com.google.bigtable.v2.RequestLatencyStats onChanged(); return this; } + /** * * @@ -874,6 +868,7 @@ public Builder setRequestLatencyStats( onChanged(); return this; } + /** * * @@ -903,6 +898,7 @@ public Builder mergeRequestLatencyStats(com.google.bigtable.v2.RequestLatencySta } return this; } + /** * * @@ -923,6 +919,7 @@ public Builder clearRequestLatencyStats() { onChanged(); return this; } + /** * * @@ -936,8 +933,9 @@ public Builder clearRequestLatencyStats() { public com.google.bigtable.v2.RequestLatencyStats.Builder getRequestLatencyStatsBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRequestLatencyStatsFieldBuilder().getBuilder(); + return internalGetRequestLatencyStatsFieldBuilder().getBuilder(); } + /** * * @@ -957,6 +955,7 @@ public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStat : requestLatencyStats_; } } + /** * * @@ -967,14 +966,14 @@ public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStat * * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestLatencyStats, com.google.bigtable.v2.RequestLatencyStats.Builder, com.google.bigtable.v2.RequestLatencyStatsOrBuilder> - getRequestLatencyStatsFieldBuilder() { + internalGetRequestLatencyStatsFieldBuilder() { if (requestLatencyStatsBuilder_ == null) { requestLatencyStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestLatencyStats, com.google.bigtable.v2.RequestLatencyStats.Builder, com.google.bigtable.v2.RequestLatencyStatsOrBuilder>( @@ -984,17 +983,6 @@ public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStat return requestLatencyStatsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.FullReadStatsView) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java index 7a51c40d44..6355563d96 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface FullReadStatsViewOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.FullReadStatsView) @@ -39,6 +41,7 @@ public interface FullReadStatsViewOrBuilder * @return Whether the readIterationStats field is set. */ boolean hasReadIterationStats(); + /** * * @@ -54,6 +57,7 @@ public interface FullReadStatsViewOrBuilder * @return The readIterationStats. */ com.google.bigtable.v2.ReadIterationStats getReadIterationStats(); + /** * * @@ -81,6 +85,7 @@ public interface FullReadStatsViewOrBuilder * @return Whether the requestLatencyStats field is set. */ boolean hasRequestLatencyStats(); + /** * * @@ -94,6 +99,7 @@ public interface FullReadStatsViewOrBuilder * @return The requestLatencyStats. */ com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java index 830b265845..8d49f29c98 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,15 +30,27 @@ * * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} */ +@com.google.protobuf.Generated public final class GenerateInitialChangeStreamPartitionsRequest - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) GenerateInitialChangeStreamPartitionsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateInitialChangeStreamPartitionsRequest"); + } + // Use GenerateInitialChangeStreamPartitionsRequest.newBuilder() to construct. private GenerateInitialChangeStreamPartitionsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +59,13 @@ private GenerateInitialChangeStreamPartitionsRequest() { appProfileId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GenerateInitialChangeStreamPartitionsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -99,6 +107,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -132,6 +141,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -157,6 +167,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -197,11 +208,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } getUnknownFields().writeTo(output); } @@ -212,11 +223,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -293,39 +304,39 @@ public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsReques public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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,10 +360,11 @@ 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 +375,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} */ - 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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequestOrBuilder { @@ -373,7 +385,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable @@ -386,7 +398,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -443,39 +455,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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) { @@ -560,6 +539,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -587,6 +567,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -614,6 +595,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -640,6 +622,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -662,6 +645,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -691,6 +675,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -715,6 +700,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -739,6 +725,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -762,6 +749,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -781,6 +769,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -806,17 +795,6 @@ public Builder setAppProfileIdBytes(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.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java index d8b9c0e3b1..480a01e981 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) @@ -41,6 +43,7 @@ public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -73,6 +76,7 @@ public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java index dcc7993b98..553e33d3fc 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,33 +30,39 @@ * * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} */ +@com.google.protobuf.Generated public final class GenerateInitialChangeStreamPartitionsResponse - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) GenerateInitialChangeStreamPartitionsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerateInitialChangeStreamPartitionsResponse"); + } + // Use GenerateInitialChangeStreamPartitionsResponse.newBuilder() to construct. private GenerateInitialChangeStreamPartitionsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private GenerateInitialChangeStreamPartitionsResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GenerateInitialChangeStreamPartitionsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PARTITION_FIELD_NUMBER = 1; private com.google.bigtable.v2.StreamPartition partition_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -99,6 +108,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -221,39 +231,39 @@ public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRespon public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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,10 +287,11 @@ 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 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} */ - 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponseOrBuilder { @@ -301,7 +312,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable @@ -316,14 +327,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 +394,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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) { @@ -463,7 +441,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -487,11 +466,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.StreamPartition partition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -506,6 +486,7 @@ public Builder mergeFrom( public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -526,6 +507,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -548,6 +530,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -567,6 +550,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -594,6 +578,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -613,6 +598,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -625,8 +611,9 @@ public Builder clearPartition() { public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getPartitionFieldBuilder().getBuilder(); + return internalGetPartitionFieldBuilder().getBuilder(); } + /** * * @@ -645,6 +632,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * @@ -654,14 +642,14 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { * * .google.bigtable.v2.StreamPartition partition = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> - getPartitionFieldBuilder() { + internalGetPartitionFieldBuilder() { if (partitionBuilder_ == null) { partitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder>( @@ -671,17 +659,6 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { 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.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java index d0385bb806..af25316245 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) @@ -36,6 +38,7 @@ public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -48,6 +51,7 @@ public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder * @return The partition. */ com.google.bigtable.v2.StreamPartition getPartition(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequest.java new file mode 100644 index 0000000000..bece1ef443 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequest.java @@ -0,0 +1,841 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * See GetClientConfiguration() RPC in bigtable.proto. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.GetClientConfigurationRequest} + */ +@com.google.protobuf.Generated +public final class GetClientConfigurationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.GetClientConfigurationRequest) + GetClientConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetClientConfigurationRequest"); + } + + // Use GetClientConfigurationRequest.newBuilder() to construct. + private GetClientConfigurationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetClientConfigurationRequest() { + instanceName_ = ""; + appProfileId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GetClientConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GetClientConfigurationRequest.class, + com.google.bigtable.v2.GetClientConfigurationRequest.Builder.class); + } + + public static final int INSTANCE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceName_ = ""; + + /** + * + * + *
    +   * Required. The unique name of the instance for which the client will target
    +   * with Data API requests.
    +   *
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + @java.lang.Override + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + 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(); + instanceName_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The unique name of the instance for which the client will target
    +   * with Data API requests.
    +   *
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +   * Optional. The name of the AppProfile which will be used by the client when
    +   * sending requests in the Data API.
    +   *
    +   * If not specified, the `default` application profile will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + 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(); + appProfileId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The name of the AppProfile which will be used by the client when
    +   * sending requests in the Data API.
    +   *
    +   * If not specified, the `default` application profile will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + 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(instanceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + 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.bigtable.v2.GetClientConfigurationRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.GetClientConfigurationRequest other = + (com.google.bigtable.v2.GetClientConfigurationRequest) obj; + + if (!getInstanceName().equals(other.getInstanceName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest 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.bigtable.v2.GetClientConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest 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.bigtable.v2.GetClientConfigurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest 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.bigtable.v2.GetClientConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest 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.bigtable.v2.GetClientConfigurationRequest 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; + } + + /** + * + * + *
    +   * See GetClientConfiguration() RPC in bigtable.proto. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.GetClientConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.GetClientConfigurationRequest) + com.google.bigtable.v2.GetClientConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GetClientConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GetClientConfigurationRequest.class, + com.google.bigtable.v2.GetClientConfigurationRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.GetClientConfigurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceName_ = ""; + appProfileId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.GetClientConfigurationRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.GetClientConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.GetClientConfigurationRequest build() { + com.google.bigtable.v2.GetClientConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.GetClientConfigurationRequest buildPartial() { + com.google.bigtable.v2.GetClientConfigurationRequest result = + new com.google.bigtable.v2.GetClientConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.GetClientConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceName_ = instanceName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.GetClientConfigurationRequest) { + return mergeFrom((com.google.bigtable.v2.GetClientConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.GetClientConfigurationRequest other) { + if (other == com.google.bigtable.v2.GetClientConfigurationRequest.getDefaultInstance()) + return this; + if (!other.getInstanceName().isEmpty()) { + instanceName_ = other.instanceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + instanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object instanceName_ = ""; + + /** + * + * + *
    +     * Required. The unique name of the instance for which the client will target
    +     * with Data API requests.
    +     *
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The unique name of the instance for which the client will target
    +     * with Data API requests.
    +     *
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The unique name of the instance for which the client will target
    +     * with Data API requests.
    +     *
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The unique name of the instance for which the client will target
    +     * with Data API requests.
    +     *
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInstanceName() { + instanceName_ = getDefaultInstance().getInstanceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The unique name of the instance for which the client will target
    +     * with Data API requests.
    +     *
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +     * Optional. The name of the AppProfile which will be used by the client when
    +     * sending requests in the Data API.
    +     *
    +     * If not specified, the `default` application profile will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The name of the AppProfile which will be used by the client when
    +     * sending requests in the Data API.
    +     *
    +     * If not specified, the `default` application profile will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The name of the AppProfile which will be used by the client when
    +     * sending requests in the Data API.
    +     *
    +     * If not specified, the `default` application profile will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The name of the AppProfile which will be used by the client when
    +     * sending requests in the Data API.
    +     *
    +     * If not specified, the `default` application profile will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The name of the AppProfile which will be used by the client when
    +     * sending requests in the Data API.
    +     *
    +     * If not specified, the `default` application profile will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.GetClientConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.GetClientConfigurationRequest) + private static final com.google.bigtable.v2.GetClientConfigurationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.GetClientConfigurationRequest(); + } + + public static com.google.bigtable.v2.GetClientConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetClientConfigurationRequest 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.bigtable.v2.GetClientConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequestOrBuilder.java new file mode 100644 index 0000000000..1cb100829d --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GetClientConfigurationRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface GetClientConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GetClientConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The unique name of the instance for which the client will target
    +   * with Data API requests.
    +   *
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + java.lang.String getInstanceName(); + + /** + * + * + *
    +   * Required. The unique name of the instance for which the client will target
    +   * with Data API requests.
    +   *
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + com.google.protobuf.ByteString getInstanceNameBytes(); + + /** + * + * + *
    +   * Optional. The name of the AppProfile which will be used by the client when
    +   * sending requests in the Data API.
    +   *
    +   * If not specified, the `default` application profile will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * + * + *
    +   * Optional. The name of the AppProfile which will be used by the client when
    +   * sending requests in the Data API.
    +   *
    +   * If not specified, the `default` application profile will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponse.java new file mode 100644 index 0000000000..bc76b77715 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponse.java @@ -0,0 +1,852 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.GoAwayResponse} + */ +@com.google.protobuf.Generated +public final class GoAwayResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.GoAwayResponse) + GoAwayResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GoAwayResponse"); + } + + // Use GoAwayResponse.newBuilder() to construct. + private GoAwayResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GoAwayResponse() { + reason_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GoAwayResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GoAwayResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GoAwayResponse.class, + com.google.bigtable.v2.GoAwayResponse.Builder.class); + } + + public static final int REASON_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + + /** + * + * + *
    +   * Server-generated reason for GOAWAY, including a plain-text description of
    +   * why. 'reason' may be used for CSM, while both may be logged.
    +   * 
    + * + * string reason = 1; + * + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + 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(); + reason_ = s; + return s; + } + } + + /** + * + * + *
    +   * Server-generated reason for GOAWAY, including a plain-text description of
    +   * why. 'reason' may be used for CSM, while both may be logged.
    +   * 
    + * + * string reason = 1; + * + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_RPC_ID_ADMITTED_FIELD_NUMBER = 3; + private long lastRpcIdAdmitted_ = 0L; + + /** + * + * + *
    +   * The last vRPC which was admitted by the AFE. The client may expect the
    +   * result from the vRPC on the stream before disconnecting, and should
    +   * retry vRPCs beyond this boundary.
    +   * 
    + * + * int64 last_rpc_id_admitted = 3; + * + * @return The lastRpcIdAdmitted. + */ + @java.lang.Override + public long getLastRpcIdAdmitted() { + return lastRpcIdAdmitted_; + } + + 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(reason_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, reason_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (lastRpcIdAdmitted_ != 0L) { + output.writeInt64(3, lastRpcIdAdmitted_); + } + 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(reason_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, reason_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (lastRpcIdAdmitted_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, lastRpcIdAdmitted_); + } + 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.bigtable.v2.GoAwayResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.GoAwayResponse other = (com.google.bigtable.v2.GoAwayResponse) obj; + + if (!getReason().equals(other.getReason())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getLastRpcIdAdmitted() != other.getLastRpcIdAdmitted()) 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) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + LAST_RPC_ID_ADMITTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLastRpcIdAdmitted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.GoAwayResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GoAwayResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.GoAwayResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GoAwayResponse 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.bigtable.v2.GoAwayResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.GoAwayResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.GoAwayResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GoAwayResponse 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.bigtable.v2.GoAwayResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GoAwayResponse 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.bigtable.v2.GoAwayResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.GoAwayResponse 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.bigtable.v2.GoAwayResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.GoAwayResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.GoAwayResponse) + com.google.bigtable.v2.GoAwayResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GoAwayResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GoAwayResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GoAwayResponse.class, + com.google.bigtable.v2.GoAwayResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.GoAwayResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reason_ = ""; + description_ = ""; + lastRpcIdAdmitted_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_GoAwayResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponse build() { + com.google.bigtable.v2.GoAwayResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponse buildPartial() { + com.google.bigtable.v2.GoAwayResponse result = + new com.google.bigtable.v2.GoAwayResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.GoAwayResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.reason_ = reason_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastRpcIdAdmitted_ = lastRpcIdAdmitted_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.GoAwayResponse) { + return mergeFrom((com.google.bigtable.v2.GoAwayResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.GoAwayResponse other) { + if (other == com.google.bigtable.v2.GoAwayResponse.getDefaultInstance()) return this; + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getLastRpcIdAdmitted() != 0L) { + setLastRpcIdAdmitted(other.getLastRpcIdAdmitted()); + } + 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: + { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + lastRpcIdAdmitted_ = input.readInt64(); + 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 reason_ = ""; + + /** + * + * + *
    +     * Server-generated reason for GOAWAY, including a plain-text description of
    +     * why. 'reason' may be used for CSM, while both may be logged.
    +     * 
    + * + * string reason = 1; + * + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Server-generated reason for GOAWAY, including a plain-text description of
    +     * why. 'reason' may be used for CSM, while both may be logged.
    +     * 
    + * + * string reason = 1; + * + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Server-generated reason for GOAWAY, including a plain-text description of
    +     * why. 'reason' may be used for CSM, while both may be logged.
    +     * 
    + * + * string reason = 1; + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Server-generated reason for GOAWAY, including a plain-text description of
    +     * why. 'reason' may be used for CSM, while both may be logged.
    +     * 
    + * + * string reason = 1; + * + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Server-generated reason for GOAWAY, including a plain-text description of
    +     * why. 'reason' may be used for CSM, while both may be logged.
    +     * 
    + * + * string reason = 1; + * + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long lastRpcIdAdmitted_; + + /** + * + * + *
    +     * The last vRPC which was admitted by the AFE. The client may expect the
    +     * result from the vRPC on the stream before disconnecting, and should
    +     * retry vRPCs beyond this boundary.
    +     * 
    + * + * int64 last_rpc_id_admitted = 3; + * + * @return The lastRpcIdAdmitted. + */ + @java.lang.Override + public long getLastRpcIdAdmitted() { + return lastRpcIdAdmitted_; + } + + /** + * + * + *
    +     * The last vRPC which was admitted by the AFE. The client may expect the
    +     * result from the vRPC on the stream before disconnecting, and should
    +     * retry vRPCs beyond this boundary.
    +     * 
    + * + * int64 last_rpc_id_admitted = 3; + * + * @param value The lastRpcIdAdmitted to set. + * @return This builder for chaining. + */ + public Builder setLastRpcIdAdmitted(long value) { + + lastRpcIdAdmitted_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The last vRPC which was admitted by the AFE. The client may expect the
    +     * result from the vRPC on the stream before disconnecting, and should
    +     * retry vRPCs beyond this boundary.
    +     * 
    + * + * int64 last_rpc_id_admitted = 3; + * + * @return This builder for chaining. + */ + public Builder clearLastRpcIdAdmitted() { + bitField0_ = (bitField0_ & ~0x00000004); + lastRpcIdAdmitted_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.GoAwayResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.GoAwayResponse) + private static final com.google.bigtable.v2.GoAwayResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.GoAwayResponse(); + } + + public static com.google.bigtable.v2.GoAwayResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoAwayResponse 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.bigtable.v2.GoAwayResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponseOrBuilder.java new file mode 100644 index 0000000000..3bddd8a3bd --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GoAwayResponseOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface GoAwayResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GoAwayResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Server-generated reason for GOAWAY, including a plain-text description of
    +   * why. 'reason' may be used for CSM, while both may be logged.
    +   * 
    + * + * string reason = 1; + * + * @return The reason. + */ + java.lang.String getReason(); + + /** + * + * + *
    +   * Server-generated reason for GOAWAY, including a plain-text description of
    +   * why. 'reason' may be used for CSM, while both may be logged.
    +   * 
    + * + * string reason = 1; + * + * @return The bytes for reason. + */ + com.google.protobuf.ByteString getReasonBytes(); + + /** + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
    +   * The last vRPC which was admitted by the AFE. The client may expect the
    +   * result from the vRPC on the stream before disconnecting, and should
    +   * retry vRPCs beyond this boundary.
    +   * 
    + * + * int64 last_rpc_id_admitted = 3; + * + * @return The lastRpcIdAdmitted. + */ + long getLastRpcIdAdmitted(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponse.java new file mode 100644 index 0000000000..3c10f838b8 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponse.java @@ -0,0 +1,394 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.HeartbeatResponse} + */ +@com.google.protobuf.Generated +public final class HeartbeatResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.HeartbeatResponse) + HeartbeatResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartbeatResponse"); + } + + // Use HeartbeatResponse.newBuilder() to construct. + private HeartbeatResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartbeatResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_HeartbeatResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_HeartbeatResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.HeartbeatResponse.class, + com.google.bigtable.v2.HeartbeatResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.HeartbeatResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.HeartbeatResponse other = (com.google.bigtable.v2.HeartbeatResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.HeartbeatResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.HeartbeatResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.HeartbeatResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.HeartbeatResponse 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.bigtable.v2.HeartbeatResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.HeartbeatResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.HeartbeatResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.HeartbeatResponse 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.bigtable.v2.HeartbeatResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.HeartbeatResponse 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.bigtable.v2.HeartbeatResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.HeartbeatResponse 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.bigtable.v2.HeartbeatResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.HeartbeatResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.HeartbeatResponse) + com.google.bigtable.v2.HeartbeatResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_HeartbeatResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_HeartbeatResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.HeartbeatResponse.class, + com.google.bigtable.v2.HeartbeatResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.HeartbeatResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_HeartbeatResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponse build() { + com.google.bigtable.v2.HeartbeatResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponse buildPartial() { + com.google.bigtable.v2.HeartbeatResponse result = + new com.google.bigtable.v2.HeartbeatResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.HeartbeatResponse) { + return mergeFrom((com.google.bigtable.v2.HeartbeatResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.HeartbeatResponse other) { + if (other == com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.HeartbeatResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.HeartbeatResponse) + private static final com.google.bigtable.v2.HeartbeatResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.HeartbeatResponse(); + } + + public static com.google.bigtable.v2.HeartbeatResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartbeatResponse 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.bigtable.v2.HeartbeatResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponseOrBuilder.java new file mode 100644 index 0000000000..7e29853099 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/HeartbeatResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface HeartbeatResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.HeartbeatResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Idempotency.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Idempotency.java new file mode 100644 index 0000000000..b90af09d6a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Idempotency.java @@ -0,0 +1,855 @@ +/* + * Copyright 2026 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Parameters on mutations where clients want to ensure idempotency (i.e.
    + * at-most-once semantics). This is currently only needed for certain aggregate
    + * types.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.Idempotency} + */ +@com.google.protobuf.Generated +public final class Idempotency extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Idempotency) + IdempotencyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Idempotency"); + } + + // Use Idempotency.newBuilder() to construct. + private Idempotency(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Idempotency() { + token_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Idempotency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Idempotency.class, + com.google.bigtable.v2.Idempotency.Builder.class); + } + + private int bitField0_; + public static final int TOKEN_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Unique token used to identify replays of this mutation.
    +   * Must be at least 8 bytes long.
    +   * 
    + * + * bytes token = 1; + * + * @return The token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToken() { + return token_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + 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 (!token_.isEmpty()) { + output.writeBytes(1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!token_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + 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.bigtable.v2.Idempotency)) { + return super.equals(obj); + } + com.google.bigtable.v2.Idempotency other = (com.google.bigtable.v2.Idempotency) obj; + + if (!getToken().equals(other.getToken())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Idempotency parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Idempotency parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Idempotency parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Idempotency 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.bigtable.v2.Idempotency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Idempotency parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Idempotency parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Idempotency 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.bigtable.v2.Idempotency parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Idempotency 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.bigtable.v2.Idempotency parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Idempotency 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.bigtable.v2.Idempotency 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; + } + + /** + * + * + *
    +   * Parameters on mutations where clients want to ensure idempotency (i.e.
    +   * at-most-once semantics). This is currently only needed for certain aggregate
    +   * types.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Idempotency} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Idempotency) + com.google.bigtable.v2.IdempotencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Idempotency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Idempotency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Idempotency.class, + com.google.bigtable.v2.Idempotency.Builder.class); + } + + // Construct using com.google.bigtable.v2.Idempotency.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = com.google.protobuf.ByteString.EMPTY; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.DataProto + .internal_static_google_bigtable_v2_Idempotency_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Idempotency getDefaultInstanceForType() { + return com.google.bigtable.v2.Idempotency.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Idempotency build() { + com.google.bigtable.v2.Idempotency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Idempotency buildPartial() { + com.google.bigtable.v2.Idempotency result = new com.google.bigtable.v2.Idempotency(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Idempotency result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Idempotency) { + return mergeFrom((com.google.bigtable.v2.Idempotency) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Idempotency other) { + if (other == com.google.bigtable.v2.Idempotency.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + setToken(other.getToken()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + token_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Unique token used to identify replays of this mutation.
    +     * Must be at least 8 bytes long.
    +     * 
    + * + * bytes token = 1; + * + * @return The token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToken() { + return token_; + } + + /** + * + * + *
    +     * Unique token used to identify replays of this mutation.
    +     * Must be at least 8 bytes long.
    +     * 
    + * + * bytes token = 1; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Unique token used to identify replays of this mutation.
    +     * Must be at least 8 bytes long.
    +     * 
    + * + * bytes token = 1; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000001); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
    +     * Client-assigned timestamp when the mutation's first attempt was sent.
    +     * Used to reject mutations that arrive after idempotency protection may
    +     * have expired. May cause spurious rejections if clock skew is too high.
    +     *
    +     * Leave unset or zero to always accept the mutation, at the risk of
    +     * double counting if the protection for previous attempts has expired.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Idempotency) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Idempotency) + private static final com.google.bigtable.v2.Idempotency DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Idempotency(); + } + + public static com.google.bigtable.v2.Idempotency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Idempotency 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.bigtable.v2.Idempotency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/IdempotencyOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/IdempotencyOrBuilder.java new file mode 100644 index 0000000000..95e40c3547 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/IdempotencyOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface IdempotencyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Idempotency) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Unique token used to identify replays of this mutation.
    +   * Must be at least 8 bytes long.
    +   * 
    + * + * bytes token = 1; + * + * @return The token. + */ + com.google.protobuf.ByteString getToken(); + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
    +   * Client-assigned timestamp when the mutation's first attempt was sent.
    +   * Used to reject mutations that arrive after idempotency protection may
    +   * have expired. May cause spurious rejections if clock skew is too high.
    +   *
    +   * Leave unset or zero to always accept the mutation, at the risk of
    +   * double counting if the protection for previous attempts has expired.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/InstanceName.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/InstanceName.java index cc4f7e627b..d36d4f04c1 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/InstanceName.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/InstanceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptions.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptions.java new file mode 100644 index 0000000000..e9443eecbe --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptions.java @@ -0,0 +1,2567 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Configuration for how to balance vRPCs over sessions. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions} + */ +@com.google.protobuf.Generated +public final class LoadBalancingOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.LoadBalancingOptions) + LoadBalancingOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LoadBalancingOptions"); + } + + // Use LoadBalancingOptions.newBuilder() to construct. + private LoadBalancingOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LoadBalancingOptions() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.class, + com.google.bigtable.v2.LoadBalancingOptions.Builder.class); + } + + public interface LeastInFlightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Of all connected AFEs, the size of the random subset to run the algorithm
    +     * on. Zero implies all connected AFEs.
    +     * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + long getRandomSubsetSize(); + } + + /** + * + * + *
    +   * Balances vRPCs over backends, preferring to send new vRPCs to AFEs with the
    +   * least number of active vRPCs.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.LeastInFlight} + */ + public static final class LeastInFlight extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + LeastInFlightOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LeastInFlight"); + } + + // Use LeastInFlight.newBuilder() to construct. + private LeastInFlight(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LeastInFlight() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.class, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder.class); + } + + public static final int RANDOM_SUBSET_SIZE_FIELD_NUMBER = 1; + private long randomSubsetSize_ = 0L; + + /** + * + * + *
    +     * Of all connected AFEs, the size of the random subset to run the algorithm
    +     * on. Zero implies all connected AFEs.
    +     * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + @java.lang.Override + public long getRandomSubsetSize() { + return randomSubsetSize_; + } + + 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 (randomSubsetSize_ != 0L) { + output.writeInt64(1, randomSubsetSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (randomSubsetSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, randomSubsetSize_); + } + 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.bigtable.v2.LoadBalancingOptions.LeastInFlight)) { + return super.equals(obj); + } + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight other = + (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) obj; + + if (getRandomSubsetSize() != other.getRandomSubsetSize()) 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) + RANDOM_SUBSET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRandomSubsetSize()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight 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.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight 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.bigtable.v2.LoadBalancingOptions.LeastInFlight parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight 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.bigtable.v2.LoadBalancingOptions.LeastInFlight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight 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.bigtable.v2.LoadBalancingOptions.LeastInFlight 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; + } + + /** + * + * + *
    +     * Balances vRPCs over backends, preferring to send new vRPCs to AFEs with the
    +     * least number of active vRPCs.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.LeastInFlight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.class, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder.class); + } + + // Construct using com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + randomSubsetSize_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight getDefaultInstanceForType() { + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight build() { + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight buildPartial() { + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight result = + new com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.randomSubsetSize_ = randomSubsetSize_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) { + return mergeFrom((com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight other) { + if (other == com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance()) + return this; + if (other.getRandomSubsetSize() != 0L) { + setRandomSubsetSize(other.getRandomSubsetSize()); + } + 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: + { + randomSubsetSize_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long randomSubsetSize_; + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to run the algorithm
    +       * on. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + @java.lang.Override + public long getRandomSubsetSize() { + return randomSubsetSize_; + } + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to run the algorithm
    +       * on. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @param value The randomSubsetSize to set. + * @return This builder for chaining. + */ + public Builder setRandomSubsetSize(long value) { + + randomSubsetSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to run the algorithm
    +       * on. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearRandomSubsetSize() { + bitField0_ = (bitField0_ & ~0x00000001); + randomSubsetSize_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + private static final com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight(); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeastInFlight 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.bigtable.v2.LoadBalancingOptions.LeastInFlight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PeakEwmaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.LoadBalancingOptions.PeakEwma) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Of all connected AFEs, the size of the random subset to compare costs
    +     * over. Zero implies all connected AFEs.
    +     * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + long getRandomSubsetSize(); + } + + /** + * + * + *
    +   * Balances vRPCs over backends, by maintaining a moving average of each AFE's
    +   * round-trip time, weighted by the number of outstanding vRPCs, and
    +   * distribute traffic to AFEs where that cost function is smallest.
    +   *
    +   * See:
    +   * https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.PeakEwma} + */ + public static final class PeakEwma extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.LoadBalancingOptions.PeakEwma) + PeakEwmaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PeakEwma"); + } + + // Use PeakEwma.newBuilder() to construct. + private PeakEwma(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PeakEwma() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.class, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder.class); + } + + public static final int RANDOM_SUBSET_SIZE_FIELD_NUMBER = 1; + private long randomSubsetSize_ = 0L; + + /** + * + * + *
    +     * Of all connected AFEs, the size of the random subset to compare costs
    +     * over. Zero implies all connected AFEs.
    +     * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + @java.lang.Override + public long getRandomSubsetSize() { + return randomSubsetSize_; + } + + 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 (randomSubsetSize_ != 0L) { + output.writeInt64(1, randomSubsetSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (randomSubsetSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, randomSubsetSize_); + } + 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.bigtable.v2.LoadBalancingOptions.PeakEwma)) { + return super.equals(obj); + } + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma other = + (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) obj; + + if (getRandomSubsetSize() != other.getRandomSubsetSize()) 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) + RANDOM_SUBSET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRandomSubsetSize()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma 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.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma 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.bigtable.v2.LoadBalancingOptions.PeakEwma parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma 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.bigtable.v2.LoadBalancingOptions.PeakEwma parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma 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.bigtable.v2.LoadBalancingOptions.PeakEwma 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; + } + + /** + * + * + *
    +     * Balances vRPCs over backends, by maintaining a moving average of each AFE's
    +     * round-trip time, weighted by the number of outstanding vRPCs, and
    +     * distribute traffic to AFEs where that cost function is smallest.
    +     *
    +     * See:
    +     * https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.PeakEwma} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.LoadBalancingOptions.PeakEwma) + com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.class, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder.class); + } + + // Construct using com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + randomSubsetSize_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma getDefaultInstanceForType() { + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma build() { + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma buildPartial() { + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma result = + new com.google.bigtable.v2.LoadBalancingOptions.PeakEwma(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.LoadBalancingOptions.PeakEwma result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.randomSubsetSize_ = randomSubsetSize_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) { + return mergeFrom((com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.LoadBalancingOptions.PeakEwma other) { + if (other == com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance()) + return this; + if (other.getRandomSubsetSize() != 0L) { + setRandomSubsetSize(other.getRandomSubsetSize()); + } + 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: + { + randomSubsetSize_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long randomSubsetSize_; + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to compare costs
    +       * over. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @return The randomSubsetSize. + */ + @java.lang.Override + public long getRandomSubsetSize() { + return randomSubsetSize_; + } + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to compare costs
    +       * over. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @param value The randomSubsetSize to set. + * @return This builder for chaining. + */ + public Builder setRandomSubsetSize(long value) { + + randomSubsetSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Of all connected AFEs, the size of the random subset to compare costs
    +       * over. Zero implies all connected AFEs.
    +       * 
    + * + * int64 random_subset_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearRandomSubsetSize() { + bitField0_ = (bitField0_ & ~0x00000001); + randomSubsetSize_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.LoadBalancingOptions.PeakEwma) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.LoadBalancingOptions.PeakEwma) + private static final com.google.bigtable.v2.LoadBalancingOptions.PeakEwma DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.LoadBalancingOptions.PeakEwma(); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.PeakEwma getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PeakEwma 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.bigtable.v2.LoadBalancingOptions.PeakEwma getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RandomOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.LoadBalancingOptions.Random) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Balances vRPCs over backends, by randomly selecting a backend.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.Random} + */ + public static final class Random extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.LoadBalancingOptions.Random) + RandomOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Random"); + } + + // Use Random.newBuilder() to construct. + private Random(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Random() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_Random_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.Random.class, + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.LoadBalancingOptions.Random)) { + return super.equals(obj); + } + com.google.bigtable.v2.LoadBalancingOptions.Random other = + (com.google.bigtable.v2.LoadBalancingOptions.Random) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random 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.bigtable.v2.LoadBalancingOptions.Random parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random 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.bigtable.v2.LoadBalancingOptions.Random parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random 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.bigtable.v2.LoadBalancingOptions.Random parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random 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.bigtable.v2.LoadBalancingOptions.Random 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; + } + + /** + * + * + *
    +     * Balances vRPCs over backends, by randomly selecting a backend.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions.Random} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.LoadBalancingOptions.Random) + com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_Random_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.Random.class, + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder.class); + } + + // Construct using com.google.bigtable.v2.LoadBalancingOptions.Random.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.Random getDefaultInstanceForType() { + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.Random build() { + com.google.bigtable.v2.LoadBalancingOptions.Random result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.Random buildPartial() { + com.google.bigtable.v2.LoadBalancingOptions.Random result = + new com.google.bigtable.v2.LoadBalancingOptions.Random(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.LoadBalancingOptions.Random) { + return mergeFrom((com.google.bigtable.v2.LoadBalancingOptions.Random) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.LoadBalancingOptions.Random other) { + if (other == com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.LoadBalancingOptions.Random) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.LoadBalancingOptions.Random) + private static final com.google.bigtable.v2.LoadBalancingOptions.Random DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.LoadBalancingOptions.Random(); + } + + public static com.google.bigtable.v2.LoadBalancingOptions.Random getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Random 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.bigtable.v2.LoadBalancingOptions.Random getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int loadBalancingStrategyCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object loadBalancingStrategy_; + + public enum LoadBalancingStrategyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LEAST_IN_FLIGHT(1), + PEAK_EWMA(2), + RANDOM(4), + LOADBALANCINGSTRATEGY_NOT_SET(0); + private final int value; + + private LoadBalancingStrategyCase(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 LoadBalancingStrategyCase valueOf(int value) { + return forNumber(value); + } + + public static LoadBalancingStrategyCase forNumber(int value) { + switch (value) { + case 1: + return LEAST_IN_FLIGHT; + case 2: + return PEAK_EWMA; + case 4: + return RANDOM; + case 0: + return LOADBALANCINGSTRATEGY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LoadBalancingStrategyCase getLoadBalancingStrategyCase() { + return LoadBalancingStrategyCase.forNumber(loadBalancingStrategyCase_); + } + + public static final int LEAST_IN_FLIGHT_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return Whether the leastInFlight field is set. + */ + @java.lang.Override + public boolean hasLeastInFlight() { + return loadBalancingStrategyCase_ == 1; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return The leastInFlight. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight getLeastInFlight() { + if (loadBalancingStrategyCase_ == 1) { + return (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder + getLeastInFlightOrBuilder() { + if (loadBalancingStrategyCase_ == 1) { + return (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + + public static final int PEAK_EWMA_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return Whether the peakEwma field is set. + */ + @java.lang.Override + public boolean hasPeakEwma() { + return loadBalancingStrategyCase_ == 2; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return The peakEwma. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma getPeakEwma() { + if (loadBalancingStrategyCase_ == 2) { + return (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder getPeakEwmaOrBuilder() { + if (loadBalancingStrategyCase_ == 2) { + return (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + + public static final int RANDOM_FIELD_NUMBER = 4; + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return Whether the random field is set. + */ + @java.lang.Override + public boolean hasRandom() { + return loadBalancingStrategyCase_ == 4; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return The random. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.Random getRandom() { + if (loadBalancingStrategyCase_ == 4) { + return (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder getRandomOrBuilder() { + if (loadBalancingStrategyCase_ == 4) { + return (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (loadBalancingStrategyCase_ == 1) { + output.writeMessage( + 1, (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_); + } + if (loadBalancingStrategyCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_); + } + if (loadBalancingStrategyCase_ == 4) { + output.writeMessage( + 4, (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (loadBalancingStrategyCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_); + } + if (loadBalancingStrategyCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_); + } + if (loadBalancingStrategyCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_); + } + 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.bigtable.v2.LoadBalancingOptions)) { + return super.equals(obj); + } + com.google.bigtable.v2.LoadBalancingOptions other = + (com.google.bigtable.v2.LoadBalancingOptions) obj; + + if (!getLoadBalancingStrategyCase().equals(other.getLoadBalancingStrategyCase())) return false; + switch (loadBalancingStrategyCase_) { + case 1: + if (!getLeastInFlight().equals(other.getLeastInFlight())) return false; + break; + case 2: + if (!getPeakEwma().equals(other.getPeakEwma())) return false; + break; + case 4: + if (!getRandom().equals(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(); + switch (loadBalancingStrategyCase_) { + case 1: + hash = (37 * hash) + LEAST_IN_FLIGHT_FIELD_NUMBER; + hash = (53 * hash) + getLeastInFlight().hashCode(); + break; + case 2: + hash = (37 * hash) + PEAK_EWMA_FIELD_NUMBER; + hash = (53 * hash) + getPeakEwma().hashCode(); + break; + case 4: + hash = (37 * hash) + RANDOM_FIELD_NUMBER; + hash = (53 * hash) + getRandom().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.LoadBalancingOptions parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions 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.bigtable.v2.LoadBalancingOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.LoadBalancingOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.LoadBalancingOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions 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.bigtable.v2.LoadBalancingOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions 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.bigtable.v2.LoadBalancingOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.LoadBalancingOptions 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.bigtable.v2.LoadBalancingOptions 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; + } + + /** + * + * + *
    +   * Configuration for how to balance vRPCs over sessions. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.LoadBalancingOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.LoadBalancingOptions) + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.LoadBalancingOptions.class, + com.google.bigtable.v2.LoadBalancingOptions.Builder.class); + } + + // Construct using com.google.bigtable.v2.LoadBalancingOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (leastInFlightBuilder_ != null) { + leastInFlightBuilder_.clear(); + } + if (peakEwmaBuilder_ != null) { + peakEwmaBuilder_.clear(); + } + if (randomBuilder_ != null) { + randomBuilder_.clear(); + } + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions getDefaultInstanceForType() { + return com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions build() { + com.google.bigtable.v2.LoadBalancingOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions buildPartial() { + com.google.bigtable.v2.LoadBalancingOptions result = + new com.google.bigtable.v2.LoadBalancingOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.LoadBalancingOptions result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.LoadBalancingOptions result) { + result.loadBalancingStrategyCase_ = loadBalancingStrategyCase_; + result.loadBalancingStrategy_ = this.loadBalancingStrategy_; + if (loadBalancingStrategyCase_ == 1 && leastInFlightBuilder_ != null) { + result.loadBalancingStrategy_ = leastInFlightBuilder_.build(); + } + if (loadBalancingStrategyCase_ == 2 && peakEwmaBuilder_ != null) { + result.loadBalancingStrategy_ = peakEwmaBuilder_.build(); + } + if (loadBalancingStrategyCase_ == 4 && randomBuilder_ != null) { + result.loadBalancingStrategy_ = randomBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.LoadBalancingOptions) { + return mergeFrom((com.google.bigtable.v2.LoadBalancingOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.LoadBalancingOptions other) { + if (other == com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance()) return this; + switch (other.getLoadBalancingStrategyCase()) { + case LEAST_IN_FLIGHT: + { + mergeLeastInFlight(other.getLeastInFlight()); + break; + } + case PEAK_EWMA: + { + mergePeakEwma(other.getPeakEwma()); + break; + } + case RANDOM: + { + mergeRandom(other.getRandom()); + break; + } + case LOADBALANCINGSTRATEGY_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( + internalGetLeastInFlightFieldBuilder().getBuilder(), extensionRegistry); + loadBalancingStrategyCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPeakEwmaFieldBuilder().getBuilder(), extensionRegistry); + loadBalancingStrategyCase_ = 2; + break; + } // case 18 + case 34: + { + input.readMessage(internalGetRandomFieldBuilder().getBuilder(), extensionRegistry); + loadBalancingStrategyCase_ = 4; + 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 loadBalancingStrategyCase_ = 0; + private java.lang.Object loadBalancingStrategy_; + + public LoadBalancingStrategyCase getLoadBalancingStrategyCase() { + return LoadBalancingStrategyCase.forNumber(loadBalancingStrategyCase_); + } + + public Builder clearLoadBalancingStrategy() { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder> + leastInFlightBuilder_; + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return Whether the leastInFlight field is set. + */ + @java.lang.Override + public boolean hasLeastInFlight() { + return loadBalancingStrategyCase_ == 1; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return The leastInFlight. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight getLeastInFlight() { + if (leastInFlightBuilder_ == null) { + if (loadBalancingStrategyCase_ == 1) { + return (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } else { + if (loadBalancingStrategyCase_ == 1) { + return leastInFlightBuilder_.getMessage(); + } + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + public Builder setLeastInFlight( + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight value) { + if (leastInFlightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadBalancingStrategy_ = value; + onChanged(); + } else { + leastInFlightBuilder_.setMessage(value); + } + loadBalancingStrategyCase_ = 1; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + public Builder setLeastInFlight( + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder builderForValue) { + if (leastInFlightBuilder_ == null) { + loadBalancingStrategy_ = builderForValue.build(); + onChanged(); + } else { + leastInFlightBuilder_.setMessage(builderForValue.build()); + } + loadBalancingStrategyCase_ = 1; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + public Builder mergeLeastInFlight( + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight value) { + if (leastInFlightBuilder_ == null) { + if (loadBalancingStrategyCase_ == 1 + && loadBalancingStrategy_ + != com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance()) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.newBuilder( + (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) + loadBalancingStrategy_) + .mergeFrom(value) + .buildPartial(); + } else { + loadBalancingStrategy_ = value; + } + onChanged(); + } else { + if (loadBalancingStrategyCase_ == 1) { + leastInFlightBuilder_.mergeFrom(value); + } else { + leastInFlightBuilder_.setMessage(value); + } + } + loadBalancingStrategyCase_ = 1; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + public Builder clearLeastInFlight() { + if (leastInFlightBuilder_ == null) { + if (loadBalancingStrategyCase_ == 1) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + onChanged(); + } + } else { + if (loadBalancingStrategyCase_ == 1) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + } + leastInFlightBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder + getLeastInFlightBuilder() { + return internalGetLeastInFlightFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder + getLeastInFlightOrBuilder() { + if ((loadBalancingStrategyCase_ == 1) && (leastInFlightBuilder_ != null)) { + return leastInFlightBuilder_.getMessageOrBuilder(); + } else { + if (loadBalancingStrategyCase_ == 1) { + return (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder> + internalGetLeastInFlightFieldBuilder() { + if (leastInFlightBuilder_ == null) { + if (!(loadBalancingStrategyCase_ == 1)) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.getDefaultInstance(); + } + leastInFlightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight.Builder, + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder>( + (com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight) loadBalancingStrategy_, + getParentForChildren(), + isClean()); + loadBalancingStrategy_ = null; + } + loadBalancingStrategyCase_ = 1; + onChanged(); + return leastInFlightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder> + peakEwmaBuilder_; + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return Whether the peakEwma field is set. + */ + @java.lang.Override + public boolean hasPeakEwma() { + return loadBalancingStrategyCase_ == 2; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return The peakEwma. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma getPeakEwma() { + if (peakEwmaBuilder_ == null) { + if (loadBalancingStrategyCase_ == 2) { + return (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } else { + if (loadBalancingStrategyCase_ == 2) { + return peakEwmaBuilder_.getMessage(); + } + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + public Builder setPeakEwma(com.google.bigtable.v2.LoadBalancingOptions.PeakEwma value) { + if (peakEwmaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadBalancingStrategy_ = value; + onChanged(); + } else { + peakEwmaBuilder_.setMessage(value); + } + loadBalancingStrategyCase_ = 2; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + public Builder setPeakEwma( + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder builderForValue) { + if (peakEwmaBuilder_ == null) { + loadBalancingStrategy_ = builderForValue.build(); + onChanged(); + } else { + peakEwmaBuilder_.setMessage(builderForValue.build()); + } + loadBalancingStrategyCase_ = 2; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + public Builder mergePeakEwma(com.google.bigtable.v2.LoadBalancingOptions.PeakEwma value) { + if (peakEwmaBuilder_ == null) { + if (loadBalancingStrategyCase_ == 2 + && loadBalancingStrategy_ + != com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance()) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.newBuilder( + (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_) + .mergeFrom(value) + .buildPartial(); + } else { + loadBalancingStrategy_ = value; + } + onChanged(); + } else { + if (loadBalancingStrategyCase_ == 2) { + peakEwmaBuilder_.mergeFrom(value); + } else { + peakEwmaBuilder_.setMessage(value); + } + } + loadBalancingStrategyCase_ = 2; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + public Builder clearPeakEwma() { + if (peakEwmaBuilder_ == null) { + if (loadBalancingStrategyCase_ == 2) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + onChanged(); + } + } else { + if (loadBalancingStrategyCase_ == 2) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + } + peakEwmaBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder getPeakEwmaBuilder() { + return internalGetPeakEwmaFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder getPeakEwmaOrBuilder() { + if ((loadBalancingStrategyCase_ == 2) && (peakEwmaBuilder_ != null)) { + return peakEwmaBuilder_.getMessageOrBuilder(); + } else { + if (loadBalancingStrategyCase_ == 2) { + return (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder> + internalGetPeakEwmaFieldBuilder() { + if (peakEwmaBuilder_ == null) { + if (!(loadBalancingStrategyCase_ == 2)) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.getDefaultInstance(); + } + peakEwmaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma.Builder, + com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder>( + (com.google.bigtable.v2.LoadBalancingOptions.PeakEwma) loadBalancingStrategy_, + getParentForChildren(), + isClean()); + loadBalancingStrategy_ = null; + } + loadBalancingStrategyCase_ = 2; + onChanged(); + return peakEwmaBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.Random, + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder, + com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder> + randomBuilder_; + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return Whether the random field is set. + */ + @java.lang.Override + public boolean hasRandom() { + return loadBalancingStrategyCase_ == 4; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return The random. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.Random getRandom() { + if (randomBuilder_ == null) { + if (loadBalancingStrategyCase_ == 4) { + return (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } else { + if (loadBalancingStrategyCase_ == 4) { + return randomBuilder_.getMessage(); + } + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + public Builder setRandom(com.google.bigtable.v2.LoadBalancingOptions.Random value) { + if (randomBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadBalancingStrategy_ = value; + onChanged(); + } else { + randomBuilder_.setMessage(value); + } + loadBalancingStrategyCase_ = 4; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + public Builder setRandom( + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder builderForValue) { + if (randomBuilder_ == null) { + loadBalancingStrategy_ = builderForValue.build(); + onChanged(); + } else { + randomBuilder_.setMessage(builderForValue.build()); + } + loadBalancingStrategyCase_ = 4; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + public Builder mergeRandom(com.google.bigtable.v2.LoadBalancingOptions.Random value) { + if (randomBuilder_ == null) { + if (loadBalancingStrategyCase_ == 4 + && loadBalancingStrategy_ + != com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance()) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.Random.newBuilder( + (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_) + .mergeFrom(value) + .buildPartial(); + } else { + loadBalancingStrategy_ = value; + } + onChanged(); + } else { + if (loadBalancingStrategyCase_ == 4) { + randomBuilder_.mergeFrom(value); + } else { + randomBuilder_.setMessage(value); + } + } + loadBalancingStrategyCase_ = 4; + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + public Builder clearRandom() { + if (randomBuilder_ == null) { + if (loadBalancingStrategyCase_ == 4) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + onChanged(); + } + } else { + if (loadBalancingStrategyCase_ == 4) { + loadBalancingStrategyCase_ = 0; + loadBalancingStrategy_ = null; + } + randomBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + public com.google.bigtable.v2.LoadBalancingOptions.Random.Builder getRandomBuilder() { + return internalGetRandomFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder getRandomOrBuilder() { + if ((loadBalancingStrategyCase_ == 4) && (randomBuilder_ != null)) { + return randomBuilder_.getMessageOrBuilder(); + } else { + if (loadBalancingStrategyCase_ == 4) { + return (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_; + } + return com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.Random, + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder, + com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder> + internalGetRandomFieldBuilder() { + if (randomBuilder_ == null) { + if (!(loadBalancingStrategyCase_ == 4)) { + loadBalancingStrategy_ = + com.google.bigtable.v2.LoadBalancingOptions.Random.getDefaultInstance(); + } + randomBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions.Random, + com.google.bigtable.v2.LoadBalancingOptions.Random.Builder, + com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder>( + (com.google.bigtable.v2.LoadBalancingOptions.Random) loadBalancingStrategy_, + getParentForChildren(), + isClean()); + loadBalancingStrategy_ = null; + } + loadBalancingStrategyCase_ = 4; + onChanged(); + return randomBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.LoadBalancingOptions) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.LoadBalancingOptions) + private static final com.google.bigtable.v2.LoadBalancingOptions DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.LoadBalancingOptions(); + } + + public static com.google.bigtable.v2.LoadBalancingOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadBalancingOptions 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.bigtable.v2.LoadBalancingOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptionsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptionsOrBuilder.java new file mode 100644 index 0000000000..5d2b6f2fa4 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/LoadBalancingOptionsOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface LoadBalancingOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.LoadBalancingOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return Whether the leastInFlight field is set. + */ + boolean hasLeastInFlight(); + + /** + * .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; + * + * @return The leastInFlight. + */ + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlight getLeastInFlight(); + + /** .google.bigtable.v2.LoadBalancingOptions.LeastInFlight least_in_flight = 1; */ + com.google.bigtable.v2.LoadBalancingOptions.LeastInFlightOrBuilder getLeastInFlightOrBuilder(); + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return Whether the peakEwma field is set. + */ + boolean hasPeakEwma(); + + /** + * .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; + * + * @return The peakEwma. + */ + com.google.bigtable.v2.LoadBalancingOptions.PeakEwma getPeakEwma(); + + /** .google.bigtable.v2.LoadBalancingOptions.PeakEwma peak_ewma = 2; */ + com.google.bigtable.v2.LoadBalancingOptions.PeakEwmaOrBuilder getPeakEwmaOrBuilder(); + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return Whether the random field is set. + */ + boolean hasRandom(); + + /** + * .google.bigtable.v2.LoadBalancingOptions.Random random = 4; + * + * @return The random. + */ + com.google.bigtable.v2.LoadBalancingOptions.Random getRandom(); + + /** .google.bigtable.v2.LoadBalancingOptions.Random random = 4; */ + com.google.bigtable.v2.LoadBalancingOptions.RandomOrBuilder getRandomOrBuilder(); + + com.google.bigtable.v2.LoadBalancingOptions.LoadBalancingStrategyCase + getLoadBalancingStrategyCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewName.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewName.java new file mode 100644 index 0000000000..a1e665074a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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.bigtable.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class MaterializedViewName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE_MATERIALIZED_VIEW = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/instances/{instance}/materializedViews/{materialized_view}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + private final String materializedView; + + @Deprecated + protected MaterializedViewName() { + project = null; + instance = null; + materializedView = null; + } + + private MaterializedViewName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + materializedView = Preconditions.checkNotNull(builder.getMaterializedView()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getMaterializedView() { + return materializedView; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MaterializedViewName of(String project, String instance, String materializedView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setMaterializedView(materializedView) + .build(); + } + + public static String format(String project, String instance, String materializedView) { + return newBuilder() + .setProject(project) + .setInstance(instance) + .setMaterializedView(materializedView) + .build() + .toString(); + } + + public static MaterializedViewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE_MATERIALIZED_VIEW.validatedMatch( + formattedString, "MaterializedViewName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("instance"), matchMap.get("materialized_view")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (MaterializedViewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE_MATERIALIZED_VIEW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (materializedView != null) { + fieldMapBuilder.put("materialized_view", materializedView); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE_MATERIALIZED_VIEW.instantiate( + "project", project, "instance", instance, "materialized_view", materializedView); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + MaterializedViewName that = ((MaterializedViewName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.materializedView, that.materializedView); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(materializedView); + return h; + } + + /** Builder for projects/{project}/instances/{instance}/materializedViews/{materialized_view}. */ + public static class Builder { + private String project; + private String instance; + private String materializedView; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public String getMaterializedView() { + return materializedView; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setMaterializedView(String materializedView) { + this.materializedView = materializedView; + return this; + } + + private Builder(MaterializedViewName materializedViewName) { + this.project = materializedViewName.project; + this.instance = materializedViewName.instance; + this.materializedView = materializedViewName.materializedView; + } + + public MaterializedViewName build() { + return new MaterializedViewName(this); + } + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequest.java new file mode 100644 index 0000000000..af602741d4 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequest.java @@ -0,0 +1,705 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * A request wrapper for operations on a materialized view. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.MaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class MaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.MaterializedViewRequest) + MaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MaterializedViewRequest"); + } + + // Use MaterializedViewRequest.newBuilder() to construct. + private MaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MaterializedViewRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.MaterializedViewRequest.class, + com.google.bigtable.v2.MaterializedViewRequest.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + 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.bigtable.v2.MaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.MaterializedViewRequest other = + (com.google.bigtable.v2.MaterializedViewRequest) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.MaterializedViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.MaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewRequest 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.bigtable.v2.MaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.MaterializedViewRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewRequest 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.bigtable.v2.MaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewRequest 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.bigtable.v2.MaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewRequest 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.bigtable.v2.MaterializedViewRequest 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 request wrapper for operations on a materialized view. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.MaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.MaterializedViewRequest) + com.google.bigtable.v2.MaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.MaterializedViewRequest.class, + com.google.bigtable.v2.MaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.MaterializedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.MaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewRequest build() { + com.google.bigtable.v2.MaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewRequest buildPartial() { + com.google.bigtable.v2.MaterializedViewRequest result = + new com.google.bigtable.v2.MaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.MaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.MaterializedViewRequest result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.MaterializedViewRequest) { + return mergeFrom((com.google.bigtable.v2.MaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.MaterializedViewRequest other) { + if (other == com.google.bigtable.v2.MaterializedViewRequest.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowRequest.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowRequest.newBuilder( + (com.google.bigtable.v2.SessionReadRowRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowRequest.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder>( + (com.google.bigtable.v2.SessionReadRowRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.MaterializedViewRequest) + private static final com.google.bigtable.v2.MaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.MaterializedViewRequest(); + } + + public static com.google.bigtable.v2.MaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaterializedViewRequest 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.bigtable.v2.MaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..09d0c7e81d --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewRequestOrBuilder.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface MaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowRequest getReadRow(); + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder(); + + com.google.bigtable.v2.MaterializedViewRequest.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponse.java new file mode 100644 index 0000000000..8bfc871eaf --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponse.java @@ -0,0 +1,708 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * A response wrapper for operations on a materialized view. Internal usage
    + * only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.MaterializedViewResponse} + */ +@com.google.protobuf.Generated +public final class MaterializedViewResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.MaterializedViewResponse) + MaterializedViewResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MaterializedViewResponse"); + } + + // Use MaterializedViewResponse.newBuilder() to construct. + private MaterializedViewResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MaterializedViewResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.MaterializedViewResponse.class, + com.google.bigtable.v2.MaterializedViewResponse.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + 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.bigtable.v2.MaterializedViewResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.MaterializedViewResponse other = + (com.google.bigtable.v2.MaterializedViewResponse) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.MaterializedViewResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.MaterializedViewResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewResponse 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.bigtable.v2.MaterializedViewResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.MaterializedViewResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.MaterializedViewResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewResponse 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.bigtable.v2.MaterializedViewResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewResponse 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.bigtable.v2.MaterializedViewResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.MaterializedViewResponse 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.bigtable.v2.MaterializedViewResponse 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 response wrapper for operations on a materialized view. Internal usage
    +   * only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.MaterializedViewResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.MaterializedViewResponse) + com.google.bigtable.v2.MaterializedViewResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.MaterializedViewResponse.class, + com.google.bigtable.v2.MaterializedViewResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.MaterializedViewResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.MaterializedViewResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewResponse build() { + com.google.bigtable.v2.MaterializedViewResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.MaterializedViewResponse buildPartial() { + com.google.bigtable.v2.MaterializedViewResponse result = + new com.google.bigtable.v2.MaterializedViewResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.MaterializedViewResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.MaterializedViewResponse result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.MaterializedViewResponse) { + return mergeFrom((com.google.bigtable.v2.MaterializedViewResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.MaterializedViewResponse other) { + if (other == com.google.bigtable.v2.MaterializedViewResponse.getDefaultInstance()) + return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowResponse.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowResponse.newBuilder( + (com.google.bigtable.v2.SessionReadRowResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowResponse.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder>( + (com.google.bigtable.v2.SessionReadRowResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MaterializedViewResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.MaterializedViewResponse) + private static final com.google.bigtable.v2.MaterializedViewResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.MaterializedViewResponse(); + } + + public static com.google.bigtable.v2.MaterializedViewResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaterializedViewResponse 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.bigtable.v2.MaterializedViewResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponseOrBuilder.java new file mode 100644 index 0000000000..ab9241e6de --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MaterializedViewResponseOrBuilder.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface MaterializedViewResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MaterializedViewResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowResponse getReadRow(); + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder(); + + com.google.bigtable.v2.MaterializedViewResponse.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java index 38ee1e6bb4..ff0558b238 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.MutateRowRequest} */ -public final class MutateRowRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MutateRowRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowRequest) MutateRowRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutateRowRequest"); + } + // Use MutateRowRequest.newBuilder() to construct. - private MutateRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutateRowRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +59,13 @@ private MutateRowRequest() { mutations_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutateRowRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowRequest_fieldAccessorTable @@ -67,10 +74,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.MutateRowRequest.Builder.class); } + private int bitField0_; public static final int TABLE_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -100,6 +109,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -134,6 +144,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -163,6 +174,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -197,6 +209,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -221,6 +234,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -248,6 +262,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int ROW_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -268,6 +283,7 @@ public com.google.protobuf.ByteString getRowKey() { @SuppressWarnings("serial") private java.util.List mutations_; + /** * * @@ -285,6 +301,7 @@ public com.google.protobuf.ByteString getRowKey() { public java.util.List getMutationsList() { return mutations_; } + /** * * @@ -303,6 +320,7 @@ public java.util.List getMutationsList() { getMutationsOrBuilderList() { return mutations_; } + /** * * @@ -320,6 +338,7 @@ public java.util.List getMutationsList() { public int getMutationsCount() { return mutations_.size(); } + /** * * @@ -337,6 +356,7 @@ public int getMutationsCount() { public com.google.bigtable.v2.Mutation getMutations(int index) { return mutations_.get(index); } + /** * * @@ -355,6 +375,62 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutations_.get(index); } + public static final int IDEMPOTENCY_FIELD_NUMBER = 8; + private com.google.bigtable.v2.Idempotency idempotency_; + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return Whether the idempotency field is set. + */ + @java.lang.Override + public boolean hasIdempotency() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return The idempotency. + */ + @java.lang.Override + public com.google.bigtable.v2.Idempotency getIdempotency() { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + @java.lang.Override + public com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder() { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -369,8 +445,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } if (!rowKey_.isEmpty()) { output.writeBytes(2, rowKey_); @@ -378,11 +454,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(3, mutations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, authorizedViewName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getIdempotency()); } getUnknownFields().writeTo(output); } @@ -393,8 +472,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } if (!rowKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, rowKey_); @@ -402,11 +481,14 @@ public int getSerializedSize() { for (int i = 0; i < mutations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, mutations_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, authorizedViewName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authorizedViewName_); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getIdempotency()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -428,6 +510,10 @@ public boolean equals(final java.lang.Object obj) { if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getRowKey().equals(other.getRowKey())) return false; if (!getMutationsList().equals(other.getMutationsList())) return false; + if (hasIdempotency() != other.hasIdempotency()) return false; + if (hasIdempotency()) { + if (!getIdempotency().equals(other.getIdempotency())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,6 +537,10 @@ public int hashCode() { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } + if (hasIdempotency()) { + hash = (37 * hash) + IDEMPOTENCY_FIELD_NUMBER; + hash = (53 * hash) + getIdempotency().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -493,38 +583,38 @@ public static com.google.bigtable.v2.MutateRowRequest parseFrom( public static com.google.bigtable.v2.MutateRowRequest 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.bigtable.v2.MutateRowRequest 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.bigtable.v2.MutateRowRequest 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.bigtable.v2.MutateRowRequest 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.bigtable.v2.MutateRowRequest 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.bigtable.v2.MutateRowRequest 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); } @@ -547,10 +637,11 @@ 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; } + /** * * @@ -560,7 +651,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.MutateRowRequest} */ - 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.bigtable.v2.MutateRowRequest) com.google.bigtable.v2.MutateRowRequestOrBuilder { @@ -570,7 +661,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowRequest_fieldAccessorTable @@ -580,10 +671,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowRequest.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) { + internalGetMutationsFieldBuilder(); + internalGetIdempotencyFieldBuilder(); + } } @java.lang.Override @@ -601,6 +702,11 @@ public Builder clear() { mutationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } return this; } @@ -662,39 +768,13 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowRequest result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.rowKey_ = rowKey_; } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(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_ & 0x00000020) != 0)) { + result.idempotency_ = + idempotencyBuilder_ == null ? idempotency_ : idempotencyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -724,7 +804,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { bitField0_ |= 0x00000004; onChanged(); } - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (mutationsBuilder_ == null) { @@ -746,14 +826,17 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { mutations_ = other.mutations_; bitField0_ = (bitField0_ & ~0x00000010); mutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationsFieldBuilder() : null; } else { mutationsBuilder_.addAllMessages(other.mutations_); } } } + if (other.hasIdempotency()) { + mergeIdempotency(other.getIdempotency()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -816,6 +899,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 50 + case 66: + { + input.readMessage( + internalGetIdempotencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -836,6 +926,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -864,6 +955,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -892,6 +984,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -919,6 +1012,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -942,6 +1036,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -972,6 +1067,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1000,6 +1096,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1028,6 +1125,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1055,6 +1153,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1078,6 +1177,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1108,6 +1208,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1131,6 +1232,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1154,6 +1256,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1176,6 +1279,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1194,6 +1298,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1219,6 +1324,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1234,6 +1340,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1255,6 +1362,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1283,7 +1391,7 @@ private void ensureMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> @@ -1309,6 +1417,7 @@ public java.util.List getMutationsList() { return mutationsBuilder_.getMessageList(); } } + /** * * @@ -1329,6 +1438,7 @@ public int getMutationsCount() { return mutationsBuilder_.getCount(); } } + /** * * @@ -1349,6 +1459,7 @@ public com.google.bigtable.v2.Mutation getMutations(int index) { return mutationsBuilder_.getMessage(index); } } + /** * * @@ -1375,6 +1486,7 @@ public Builder setMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1399,6 +1511,7 @@ public Builder setMutations( } return this; } + /** * * @@ -1425,6 +1538,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1451,6 +1565,7 @@ public Builder addMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1474,6 +1589,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation.Builder builderForVa } return this; } + /** * * @@ -1498,6 +1614,7 @@ public Builder addMutations( } return this; } + /** * * @@ -1522,6 +1639,7 @@ public Builder addAllMutations( } return this; } + /** * * @@ -1545,6 +1663,7 @@ public Builder clearMutations() { } return this; } + /** * * @@ -1568,6 +1687,7 @@ public Builder removeMutations(int index) { } return this; } + /** * * @@ -1582,8 +1702,9 @@ public Builder removeMutations(int index) { *
    */ public com.google.bigtable.v2.Mutation.Builder getMutationsBuilder(int index) { - return getMutationsFieldBuilder().getBuilder(index); + return internalGetMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -1604,6 +1725,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1625,6 +1747,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return java.util.Collections.unmodifiableList(mutations_); } } + /** * * @@ -1639,9 +1762,10 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) *
    */ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1656,9 +1780,10 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { * */ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder(int index) { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1673,17 +1798,17 @@ public com.google.bigtable.v2.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.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> - getMutationsFieldBuilder() { + internalGetMutationsFieldBuilder() { if (mutationsBuilder_ == null) { mutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder>( @@ -1693,15 +1818,207 @@ public java.util.List getMutationsBuild return mutationsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.bigtable.v2.Idempotency idempotency_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + idempotencyBuilder_; + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return Whether the idempotency field is set. + */ + public boolean hasIdempotency() { + return ((bitField0_ & 0x00000020) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return The idempotency. + */ + public com.google.bigtable.v2.Idempotency getIdempotency() { + if (idempotencyBuilder_ == null) { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } else { + return idempotencyBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public Builder setIdempotency(com.google.bigtable.v2.Idempotency value) { + if (idempotencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idempotency_ = value; + } else { + idempotencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public Builder setIdempotency(com.google.bigtable.v2.Idempotency.Builder builderForValue) { + if (idempotencyBuilder_ == null) { + idempotency_ = builderForValue.build(); + } else { + idempotencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public Builder mergeIdempotency(com.google.bigtable.v2.Idempotency value) { + if (idempotencyBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && idempotency_ != null + && idempotency_ != com.google.bigtable.v2.Idempotency.getDefaultInstance()) { + getIdempotencyBuilder().mergeFrom(value); + } else { + idempotency_ = value; + } + } else { + idempotencyBuilder_.mergeFrom(value); + } + if (idempotency_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public Builder clearIdempotency() { + bitField0_ = (bitField0_ & ~0x00000020); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public com.google.bigtable.v2.Idempotency.Builder getIdempotencyBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetIdempotencyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + public com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder() { + if (idempotencyBuilder_ != null) { + return idempotencyBuilder_.getMessageOrBuilder(); + } else { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + internalGetIdempotencyFieldBuilder() { + if (idempotencyBuilder_ == null) { + idempotencyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder>( + getIdempotency(), getParentForChildren(), isClean()); + idempotency_ = null; + } + return idempotencyBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MutateRowRequest) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequestOrBuilder.java index 8b19fb3c85..653a6fb7e7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface MutateRowRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MutateRowRequest) @@ -42,6 +44,7 @@ public interface MutateRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +82,7 @@ public interface MutateRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +115,7 @@ public interface MutateRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -152,6 +157,7 @@ public interface MutateRowRequestOrBuilder * */ java.util.List getMutationsList(); + /** * * @@ -166,6 +172,7 @@ public interface MutateRowRequestOrBuilder * */ com.google.bigtable.v2.Mutation getMutations(int index); + /** * * @@ -180,6 +187,7 @@ public interface MutateRowRequestOrBuilder * */ int getMutationsCount(); + /** * * @@ -194,6 +202,7 @@ public interface MutateRowRequestOrBuilder * */ java.util.List getMutationsOrBuilderList(); + /** * * @@ -208,4 +217,44 @@ public interface MutateRowRequestOrBuilder * */ com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index); + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return Whether the idempotency field is set. + */ + boolean hasIdempotency(); + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + * + * @return The idempotency. + */ + com.google.bigtable.v2.Idempotency getIdempotency(); + + /** + * + * + *
    +   * If set consistently across retries, prevents this mutation from being
    +   * double applied to aggregate column families within a 15m window.
    +   * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 8; + */ + com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java index 5d211f9a97..8abbb58859 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.MutateRowResponse} */ -public final class MutateRowResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MutateRowResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowResponse) MutateRowResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutateRowResponse"); + } + // Use MutateRowResponse.newBuilder() to construct. - private MutateRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutateRowResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MutateRowResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutateRowResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowResponse_fieldAccessorTable @@ -152,38 +159,38 @@ public static com.google.bigtable.v2.MutateRowResponse parseFrom( public static com.google.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse 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); } @@ -206,10 +213,11 @@ 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; } + /** * * @@ -219,7 +227,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.MutateRowResponse} */ - 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.bigtable.v2.MutateRowResponse) com.google.bigtable.v2.MutateRowResponseOrBuilder { @@ -229,7 +237,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowResponse_fieldAccessorTable @@ -241,7 +249,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.MutateRowResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -279,39 +287,6 @@ public com.google.bigtable.v2.MutateRowResponse 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.bigtable.v2.MutateRowResponse) { @@ -367,17 +342,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.bigtable.v2.MutateRowResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponseOrBuilder.java index 913cd4aa57..099ede3648 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface MutateRowResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MutateRowResponse) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java index 9272f90a3a..3c4a869639 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.MutateRowsRequest} */ -public final class MutateRowsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MutateRowsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsRequest) MutateRowsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutateRowsRequest"); + } + // Use MutateRowsRequest.newBuilder() to construct. - private MutateRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutateRowsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -45,19 +58,13 @@ private MutateRowsRequest() { entries_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutateRowsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_fieldAccessorTable @@ -98,6 +105,7 @@ public interface EntryOrBuilder * */ java.util.List getMutationsList(); + /** * * @@ -112,6 +120,7 @@ public interface EntryOrBuilder * */ com.google.bigtable.v2.Mutation getMutations(int index); + /** * * @@ -126,6 +135,7 @@ public interface EntryOrBuilder * */ int getMutationsCount(); + /** * * @@ -140,6 +150,7 @@ public interface EntryOrBuilder * */ java.util.List getMutationsOrBuilderList(); + /** * * @@ -154,7 +165,48 @@ public interface EntryOrBuilder * */ com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index); + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return Whether the idempotency field is set. + */ + boolean hasIdempotency(); + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return The idempotency. + */ + com.google.bigtable.v2.Idempotency getIdempotency(); + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder(); } + /** * * @@ -164,13 +216,24 @@ public interface EntryOrBuilder * * Protobuf type {@code google.bigtable.v2.MutateRowsRequest.Entry} */ - public static final class Entry extends com.google.protobuf.GeneratedMessageV3 + public static final class Entry extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsRequest.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Entry"); + } + // Use Entry.newBuilder() to construct. - private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -179,19 +242,13 @@ private Entry() { mutations_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Entry(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_Entry_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_Entry_fieldAccessorTable @@ -200,8 +257,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.MutateRowsRequest.Entry.Builder.class); } + private int bitField0_; public static final int ROW_KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -222,6 +281,7 @@ public com.google.protobuf.ByteString getRowKey() { @SuppressWarnings("serial") private java.util.List mutations_; + /** * * @@ -239,6 +299,7 @@ public com.google.protobuf.ByteString getRowKey() { public java.util.List getMutationsList() { return mutations_; } + /** * * @@ -257,6 +318,7 @@ public java.util.List getMutationsList() { getMutationsOrBuilderList() { return mutations_; } + /** * * @@ -274,6 +336,7 @@ public java.util.List getMutationsList() { public int getMutationsCount() { return mutations_.size(); } + /** * * @@ -291,6 +354,7 @@ public int getMutationsCount() { public com.google.bigtable.v2.Mutation getMutations(int index) { return mutations_.get(index); } + /** * * @@ -309,6 +373,62 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutations_.get(index); } + public static final int IDEMPOTENCY_FIELD_NUMBER = 3; + private com.google.bigtable.v2.Idempotency idempotency_; + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return Whether the idempotency field is set. + */ + @java.lang.Override + public boolean hasIdempotency() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return The idempotency. + */ + @java.lang.Override + public com.google.bigtable.v2.Idempotency getIdempotency() { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + + /** + * + * + *
    +     * If set consistently across retries, prevents this mutation from being
    +     * double applied to aggregate column families within a 15m window.
    +     * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder() { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -329,6 +449,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(2, mutations_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getIdempotency()); + } getUnknownFields().writeTo(output); } @@ -344,6 +467,9 @@ public int getSerializedSize() { for (int i = 0; i < mutations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, mutations_.get(i)); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIdempotency()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -362,6 +488,10 @@ public boolean equals(final java.lang.Object obj) { if (!getRowKey().equals(other.getRowKey())) return false; if (!getMutationsList().equals(other.getMutationsList())) return false; + if (hasIdempotency() != other.hasIdempotency()) return false; + if (hasIdempotency()) { + if (!getIdempotency().equals(other.getIdempotency())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,6 +509,10 @@ public int hashCode() { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } + if (hasIdempotency()) { + hash = (37 * hash) + IDEMPOTENCY_FIELD_NUMBER; + hash = (53 * hash) + getIdempotency().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -421,38 +555,38 @@ public static com.google.bigtable.v2.MutateRowsRequest.Entry parseFrom( public static com.google.bigtable.v2.MutateRowsRequest.Entry 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.bigtable.v2.MutateRowsRequest.Entry 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.bigtable.v2.MutateRowsRequest.Entry 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.bigtable.v2.MutateRowsRequest.Entry 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.bigtable.v2.MutateRowsRequest.Entry 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.bigtable.v2.MutateRowsRequest.Entry 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,11 +609,11 @@ 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,8 +623,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.MutateRowsRequest.Entry} */ - 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.bigtable.v2.MutateRowsRequest.Entry) com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder { @@ -500,7 +633,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_Entry_fieldAccessorTable @@ -510,10 +643,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowsRequest.Entry.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) { + internalGetMutationsFieldBuilder(); + internalGetIdempotencyFieldBuilder(); + } } @java.lang.Override @@ -528,6 +671,11 @@ public Builder clear() { mutationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } return this; } @@ -581,41 +729,13 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowsRequest.Entry result if (((from_bitField0_ & 0x00000001) != 0)) { result.rowKey_ = rowKey_; } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(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_ & 0x00000004) != 0)) { + result.idempotency_ = + idempotencyBuilder_ == null ? idempotency_ : idempotencyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -631,7 +751,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest.Entry other) { if (other == com.google.bigtable.v2.MutateRowsRequest.Entry.getDefaultInstance()) return this; - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (mutationsBuilder_ == null) { @@ -653,14 +773,17 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest.Entry other) { mutations_ = other.mutations_; bitField0_ = (bitField0_ & ~0x00000002); mutationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getMutationsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationsFieldBuilder() : null; } else { mutationsBuilder_.addAllMessages(other.mutations_); } } } + if (other.hasIdempotency()) { + mergeIdempotency(other.getIdempotency()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -706,6 +829,13 @@ public Builder mergeFrom( } break; } // case 18 + case 26: + { + input.readMessage( + internalGetIdempotencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -726,6 +856,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -741,6 +872,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -762,6 +894,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -790,7 +923,7 @@ private void ensureMutationsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> @@ -816,6 +949,7 @@ public java.util.List getMutationsList() { return mutationsBuilder_.getMessageList(); } } + /** * * @@ -836,6 +970,7 @@ public int getMutationsCount() { return mutationsBuilder_.getCount(); } } + /** * * @@ -856,6 +991,7 @@ public com.google.bigtable.v2.Mutation getMutations(int index) { return mutationsBuilder_.getMessage(index); } } + /** * * @@ -882,6 +1018,7 @@ public Builder setMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -906,6 +1043,7 @@ public Builder setMutations( } return this; } + /** * * @@ -932,6 +1070,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -958,6 +1097,7 @@ public Builder addMutations(int index, com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -981,6 +1121,7 @@ public Builder addMutations(com.google.bigtable.v2.Mutation.Builder builderForVa } return this; } + /** * * @@ -1005,6 +1146,7 @@ public Builder addMutations( } return this; } + /** * * @@ -1029,6 +1171,7 @@ public Builder addAllMutations( } return this; } + /** * * @@ -1052,6 +1195,7 @@ public Builder clearMutations() { } return this; } + /** * * @@ -1075,6 +1219,7 @@ public Builder removeMutations(int index) { } return this; } + /** * * @@ -1089,8 +1234,9 @@ public Builder removeMutations(int index) { * */ public com.google.bigtable.v2.Mutation.Builder getMutationsBuilder(int index) { - return getMutationsFieldBuilder().getBuilder(index); + return internalGetMutationsFieldBuilder().getBuilder(index); } + /** * * @@ -1111,6 +1257,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return mutationsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1132,6 +1279,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) return java.util.Collections.unmodifiableList(mutations_); } } + /** * * @@ -1146,9 +1294,10 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) * */ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1163,9 +1312,10 @@ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { * */ public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder(int index) { - return getMutationsFieldBuilder() + return internalGetMutationsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); } + /** * * @@ -1180,17 +1330,17 @@ public com.google.bigtable.v2.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.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> - getMutationsFieldBuilder() { + internalGetMutationsFieldBuilder() { if (mutationsBuilder_ == null) { mutationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder>( @@ -1200,16 +1350,207 @@ public java.util.List getMutationsBuild return mutationsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private com.google.bigtable.v2.Idempotency idempotency_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + idempotencyBuilder_; + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return Whether the idempotency field is set. + */ + public boolean hasIdempotency() { + return ((bitField0_ & 0x00000004) != 0); } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + * + * @return The idempotency. + */ + public com.google.bigtable.v2.Idempotency getIdempotency() { + if (idempotencyBuilder_ == null) { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } else { + return idempotencyBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public Builder setIdempotency(com.google.bigtable.v2.Idempotency value) { + if (idempotencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idempotency_ = value; + } else { + idempotencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public Builder setIdempotency(com.google.bigtable.v2.Idempotency.Builder builderForValue) { + if (idempotencyBuilder_ == null) { + idempotency_ = builderForValue.build(); + } else { + idempotencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public Builder mergeIdempotency(com.google.bigtable.v2.Idempotency value) { + if (idempotencyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && idempotency_ != null + && idempotency_ != com.google.bigtable.v2.Idempotency.getDefaultInstance()) { + getIdempotencyBuilder().mergeFrom(value); + } else { + idempotency_ = value; + } + } else { + idempotencyBuilder_.mergeFrom(value); + } + if (idempotency_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public Builder clearIdempotency() { + bitField0_ = (bitField0_ & ~0x00000004); + idempotency_ = null; + if (idempotencyBuilder_ != null) { + idempotencyBuilder_.dispose(); + idempotencyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public com.google.bigtable.v2.Idempotency.Builder getIdempotencyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetIdempotencyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + public com.google.bigtable.v2.IdempotencyOrBuilder getIdempotencyOrBuilder() { + if (idempotencyBuilder_ != null) { + return idempotencyBuilder_.getMessageOrBuilder(); + } else { + return idempotency_ == null + ? com.google.bigtable.v2.Idempotency.getDefaultInstance() + : idempotency_; + } + } + + /** + * + * + *
    +       * If set consistently across retries, prevents this mutation from being
    +       * double applied to aggregate column families within a 15m window.
    +       * 
    + * + * .google.bigtable.v2.Idempotency idempotency = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder> + internalGetIdempotencyFieldBuilder() { + if (idempotencyBuilder_ == null) { + idempotencyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Idempotency, + com.google.bigtable.v2.Idempotency.Builder, + com.google.bigtable.v2.IdempotencyOrBuilder>( + getIdempotency(), getParentForChildren(), isClean()); + idempotency_ = null; + } + return idempotencyBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MutateRowsRequest.Entry) @@ -1268,6 +1609,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry getDefaultInstanceForType( @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -1297,6 +1639,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -1331,6 +1674,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1360,6 +1704,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -1394,6 +1739,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -1418,6 +1764,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -1447,6 +1794,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { @SuppressWarnings("serial") private java.util.List entries_; + /** * * @@ -1466,6 +1814,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public java.util.List getEntriesList() { return entries_; } + /** * * @@ -1486,6 +1835,7 @@ public java.util.List getEntries getEntriesOrBuilderList() { return entries_; } + /** * * @@ -1505,6 +1855,7 @@ public java.util.List getEntries public int getEntriesCount() { return entries_.size(); } + /** * * @@ -1524,6 +1875,7 @@ public int getEntriesCount() { public com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index) { return entries_.get(index); } + /** * * @@ -1558,17 +1910,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } for (int i = 0; i < entries_.size(); i++) { output.writeMessage(2, entries_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, authorizedViewName_); } getUnknownFields().writeTo(output); } @@ -1579,17 +1931,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, entries_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, authorizedViewName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1673,38 +2025,38 @@ public static com.google.bigtable.v2.MutateRowsRequest parseFrom( public static com.google.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest 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); } @@ -1727,10 +2079,11 @@ 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; } + /** * * @@ -1740,7 +2093,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.MutateRowsRequest} */ - 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.bigtable.v2.MutateRowsRequest) com.google.bigtable.v2.MutateRowsRequestOrBuilder { @@ -1750,7 +2103,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_fieldAccessorTable @@ -1762,7 +2115,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.MutateRowsRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1840,39 +2193,6 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowsRequest 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.bigtable.v2.MutateRowsRequest) { @@ -1919,8 +2239,8 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest other) { entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000008); entriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEntriesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); @@ -2004,6 +2324,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -2032,6 +2353,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -2060,6 +2382,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2087,6 +2410,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2110,6 +2434,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -2140,6 +2465,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -2168,6 +2494,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -2196,6 +2523,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2223,6 +2551,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2246,6 +2575,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -2276,6 +2606,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -2299,6 +2630,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -2322,6 +2654,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -2344,6 +2677,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2362,6 +2696,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -2397,7 +2732,7 @@ private void ensureEntriesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsRequest.Entry, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder, com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder> @@ -2425,6 +2760,7 @@ public java.util.List getEntries return entriesBuilder_.getMessageList(); } } + /** * * @@ -2447,6 +2783,7 @@ public int getEntriesCount() { return entriesBuilder_.getCount(); } } + /** * * @@ -2469,6 +2806,7 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index) { return entriesBuilder_.getMessage(index); } } + /** * * @@ -2497,6 +2835,7 @@ public Builder setEntries(int index, com.google.bigtable.v2.MutateRowsRequest.En } return this; } + /** * * @@ -2523,6 +2862,7 @@ public Builder setEntries( } return this; } + /** * * @@ -2551,6 +2891,7 @@ public Builder addEntries(com.google.bigtable.v2.MutateRowsRequest.Entry value) } return this; } + /** * * @@ -2579,6 +2920,7 @@ public Builder addEntries(int index, com.google.bigtable.v2.MutateRowsRequest.En } return this; } + /** * * @@ -2605,6 +2947,7 @@ public Builder addEntries( } return this; } + /** * * @@ -2631,6 +2974,7 @@ public Builder addEntries( } return this; } + /** * * @@ -2657,6 +3001,7 @@ public Builder addAllEntries( } return this; } + /** * * @@ -2682,6 +3027,7 @@ public Builder clearEntries() { } return this; } + /** * * @@ -2707,6 +3053,7 @@ public Builder removeEntries(int index) { } return this; } + /** * * @@ -2723,8 +3070,9 @@ public Builder removeEntries(int index) { * */ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder getEntriesBuilder(int index) { - return getEntriesFieldBuilder().getBuilder(index); + return internalGetEntriesFieldBuilder().getBuilder(index); } + /** * * @@ -2747,6 +3095,7 @@ public com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder getEntriesOrBuild return entriesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2770,6 +3119,7 @@ public com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder getEntriesOrBuild return java.util.Collections.unmodifiableList(entries_); } } + /** * * @@ -2786,9 +3136,10 @@ public com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder getEntriesOrBuild * */ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder() { - return getEntriesFieldBuilder() + return internalGetEntriesFieldBuilder() .addBuilder(com.google.bigtable.v2.MutateRowsRequest.Entry.getDefaultInstance()); } + /** * * @@ -2805,9 +3156,10 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder( * */ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder(int index) { - return getEntriesFieldBuilder() + return internalGetEntriesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.MutateRowsRequest.Entry.getDefaultInstance()); } + /** * * @@ -2825,17 +3177,17 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder( */ public java.util.List getEntriesBuilderList() { - return getEntriesFieldBuilder().getBuilderList(); + return internalGetEntriesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsRequest.Entry, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder, com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder> - getEntriesFieldBuilder() { + internalGetEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsRequest.Entry, com.google.bigtable.v2.MutateRowsRequest.Entry.Builder, com.google.bigtable.v2.MutateRowsRequest.EntryOrBuilder>( @@ -2845,17 +3197,6 @@ public com.google.bigtable.v2.MutateRowsRequest.Entry.Builder addEntriesBuilder( return entriesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MutateRowsRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequestOrBuilder.java index 78137ed5e3..2bf701791c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface MutateRowsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MutateRowsRequest) @@ -42,6 +44,7 @@ public interface MutateRowsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +82,7 @@ public interface MutateRowsRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +115,7 @@ public interface MutateRowsRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -141,6 +146,7 @@ public interface MutateRowsRequestOrBuilder * */ java.util.List getEntriesList(); + /** * * @@ -157,6 +163,7 @@ public interface MutateRowsRequestOrBuilder * */ com.google.bigtable.v2.MutateRowsRequest.Entry getEntries(int index); + /** * * @@ -173,6 +180,7 @@ public interface MutateRowsRequestOrBuilder * */ int getEntriesCount(); + /** * * @@ -190,6 +198,7 @@ public interface MutateRowsRequestOrBuilder */ java.util.List getEntriesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java index a5c9a4e9ac..2a664cc9c9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.MutateRowsResponse} */ -public final class MutateRowsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class MutateRowsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsResponse) MutateRowsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutateRowsResponse"); + } + // Use MutateRowsResponse.newBuilder() to construct. - private MutateRowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutateRowsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private MutateRowsResponse() { entries_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutateRowsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_fieldAccessorTable @@ -97,6 +104,7 @@ public interface EntryOrBuilder * @return Whether the status field is set. */ boolean hasStatus(); + /** * * @@ -112,6 +120,7 @@ public interface EntryOrBuilder * @return The status. */ com.google.rpc.Status getStatus(); + /** * * @@ -126,6 +135,7 @@ public interface EntryOrBuilder */ com.google.rpc.StatusOrBuilder getStatusOrBuilder(); } + /** * * @@ -135,31 +145,36 @@ public interface EntryOrBuilder * * Protobuf type {@code google.bigtable.v2.MutateRowsResponse.Entry} */ - public static final class Entry extends com.google.protobuf.GeneratedMessageV3 + public static final class Entry extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.MutateRowsResponse.Entry) EntryOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Entry"); + } + // Use Entry.newBuilder() to construct. - private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Entry() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Entry(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_Entry_fieldAccessorTable @@ -171,6 +186,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int INDEX_FIELD_NUMBER = 1; private long index_ = 0L; + /** * * @@ -190,6 +206,7 @@ public long getIndex() { public static final int STATUS_FIELD_NUMBER = 2; private com.google.rpc.Status status_; + /** * * @@ -208,6 +225,7 @@ public long getIndex() { public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -226,6 +244,7 @@ public boolean hasStatus() { public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } + /** * * @@ -358,38 +377,38 @@ public static com.google.bigtable.v2.MutateRowsResponse.Entry parseFrom( public static com.google.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry 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,11 +431,11 @@ 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,8 +445,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.MutateRowsResponse.Entry} */ - 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.bigtable.v2.MutateRowsResponse.Entry) com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder { @@ -437,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_Entry_fieldAccessorTable @@ -451,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) { - getStatusFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStatusFieldBuilder(); } } @@ -519,41 +537,6 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowsResponse.Entry 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.bigtable.v2.MutateRowsResponse.Entry) { @@ -607,7 +590,8 @@ public Builder mergeFrom( } // case 8 case 18: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -631,6 +615,7 @@ public Builder mergeFrom( private int bitField0_; private long index_; + /** * * @@ -647,6 +632,7 @@ public Builder mergeFrom( public long getIndex() { return index_; } + /** * * @@ -667,6 +653,7 @@ public Builder setIndex(long value) { onChanged(); return this; } + /** * * @@ -687,9 +674,10 @@ public Builder clearIndex() { } 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_; + /** * * @@ -707,6 +695,7 @@ public Builder clearIndex() { public boolean hasStatus() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -728,6 +717,7 @@ public com.google.rpc.Status getStatus() { return statusBuilder_.getMessage(); } } + /** * * @@ -753,6 +743,7 @@ public Builder setStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -775,6 +766,7 @@ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -805,6 +797,7 @@ public Builder mergeStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -827,6 +820,7 @@ public Builder clearStatus() { onChanged(); return this; } + /** * * @@ -842,8 +836,9 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } + /** * * @@ -863,6 +858,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } } + /** * * @@ -875,12 +871,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()); @@ -889,18 +885,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.bigtable.v2.MutateRowsResponse.Entry) } @@ -958,6 +942,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType @SuppressWarnings("serial") private java.util.List entries_; + /** * * @@ -971,6 +956,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType public java.util.List getEntriesList() { return entries_; } + /** * * @@ -985,6 +971,7 @@ public java.util.List getEntrie getEntriesOrBuilderList() { return entries_; } + /** * * @@ -998,6 +985,7 @@ public java.util.List getEntrie public int getEntriesCount() { return entries_.size(); } + /** * * @@ -1011,6 +999,7 @@ public int getEntriesCount() { public com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index) { return entries_.get(index); } + /** * * @@ -1027,6 +1016,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil public static final int RATE_LIMIT_INFO_FIELD_NUMBER = 3; private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_; + /** * * @@ -1044,6 +1034,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil public boolean hasRateLimitInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1063,6 +1054,7 @@ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() { ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance() : rateLimitInfo_; } + /** * * @@ -1198,38 +1190,38 @@ public static com.google.bigtable.v2.MutateRowsResponse parseFrom( public static com.google.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse 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); } @@ -1252,10 +1244,11 @@ 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; } + /** * * @@ -1265,7 +1258,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.MutateRowsResponse} */ - 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.bigtable.v2.MutateRowsResponse) com.google.bigtable.v2.MutateRowsResponseOrBuilder { @@ -1275,7 +1268,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_fieldAccessorTable @@ -1289,15 +1282,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) { - getEntriesFieldBuilder(); - getRateLimitInfoFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEntriesFieldBuilder(); + internalGetRateLimitInfoFieldBuilder(); } } @@ -1375,39 +1368,6 @@ private void buildPartial0(com.google.bigtable.v2.MutateRowsResponse 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.bigtable.v2.MutateRowsResponse) { @@ -1439,8 +1399,8 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsResponse other) { entries_ = other.entries_; bitField0_ = (bitField0_ & ~0x00000001); entriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getEntriesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); @@ -1492,7 +1452,8 @@ public Builder mergeFrom( } // case 10 case 26: { - input.readMessage(getRateLimitInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRateLimitInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 26 @@ -1526,7 +1487,7 @@ private void ensureEntriesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsResponse.Entry, com.google.bigtable.v2.MutateRowsResponse.Entry.Builder, com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder> @@ -1548,6 +1509,7 @@ public java.util.List getEntrie return entriesBuilder_.getMessageList(); } } + /** * * @@ -1564,6 +1526,7 @@ public int getEntriesCount() { return entriesBuilder_.getCount(); } } + /** * * @@ -1580,6 +1543,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index) { return entriesBuilder_.getMessage(index); } } + /** * * @@ -1602,6 +1566,7 @@ public Builder setEntries(int index, com.google.bigtable.v2.MutateRowsResponse.E } return this; } + /** * * @@ -1622,6 +1587,7 @@ public Builder setEntries( } return this; } + /** * * @@ -1644,6 +1610,7 @@ public Builder addEntries(com.google.bigtable.v2.MutateRowsResponse.Entry value) } return this; } + /** * * @@ -1666,6 +1633,7 @@ public Builder addEntries(int index, com.google.bigtable.v2.MutateRowsResponse.E } return this; } + /** * * @@ -1686,6 +1654,7 @@ public Builder addEntries( } return this; } + /** * * @@ -1706,6 +1675,7 @@ public Builder addEntries( } return this; } + /** * * @@ -1726,6 +1696,7 @@ public Builder addAllEntries( } return this; } + /** * * @@ -1745,6 +1716,7 @@ public Builder clearEntries() { } return this; } + /** * * @@ -1764,6 +1736,7 @@ public Builder removeEntries(int index) { } return this; } + /** * * @@ -1774,8 +1747,9 @@ public Builder removeEntries(int index) { * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder getEntriesBuilder(int index) { - return getEntriesFieldBuilder().getBuilder(index); + return internalGetEntriesFieldBuilder().getBuilder(index); } + /** * * @@ -1792,6 +1766,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil return entriesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1809,6 +1784,7 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil return java.util.Collections.unmodifiableList(entries_); } } + /** * * @@ -1819,9 +1795,10 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder() { - return getEntriesFieldBuilder() + return internalGetEntriesFieldBuilder() .addBuilder(com.google.bigtable.v2.MutateRowsResponse.Entry.getDefaultInstance()); } + /** * * @@ -1832,9 +1809,10 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder(int index) { - return getEntriesFieldBuilder() + return internalGetEntriesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.MutateRowsResponse.Entry.getDefaultInstance()); } + /** * * @@ -1846,17 +1824,17 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder */ public java.util.List getEntriesBuilderList() { - return getEntriesFieldBuilder().getBuilderList(); + return internalGetEntriesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsResponse.Entry, com.google.bigtable.v2.MutateRowsResponse.Entry.Builder, com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder> - getEntriesFieldBuilder() { + internalGetEntriesFieldBuilder() { if (entriesBuilder_ == null) { entriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.MutateRowsResponse.Entry, com.google.bigtable.v2.MutateRowsResponse.Entry.Builder, com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder>( @@ -1867,11 +1845,12 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder } private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RateLimitInfo, com.google.bigtable.v2.RateLimitInfo.Builder, com.google.bigtable.v2.RateLimitInfoOrBuilder> rateLimitInfoBuilder_; + /** * * @@ -1888,6 +1867,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder public boolean hasRateLimitInfo() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1910,6 +1890,7 @@ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() { return rateLimitInfoBuilder_.getMessage(); } } + /** * * @@ -1934,6 +1915,7 @@ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) { onChanged(); return this; } + /** * * @@ -1955,6 +1937,7 @@ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo.Builder bui onChanged(); return this; } + /** * * @@ -1984,6 +1967,7 @@ public Builder mergeRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) { } return this; } + /** * * @@ -2005,6 +1989,7 @@ public Builder clearRateLimitInfo() { onChanged(); return this; } + /** * * @@ -2019,8 +2004,9 @@ public Builder clearRateLimitInfo() { public com.google.bigtable.v2.RateLimitInfo.Builder getRateLimitInfoBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getRateLimitInfoFieldBuilder().getBuilder(); + return internalGetRateLimitInfoFieldBuilder().getBuilder(); } + /** * * @@ -2041,6 +2027,7 @@ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() : rateLimitInfo_; } } + /** * * @@ -2052,14 +2039,14 @@ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() * * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RateLimitInfo, com.google.bigtable.v2.RateLimitInfo.Builder, com.google.bigtable.v2.RateLimitInfoOrBuilder> - getRateLimitInfoFieldBuilder() { + internalGetRateLimitInfoFieldBuilder() { if (rateLimitInfoBuilder_ == null) { rateLimitInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RateLimitInfo, com.google.bigtable.v2.RateLimitInfo.Builder, com.google.bigtable.v2.RateLimitInfoOrBuilder>( @@ -2069,17 +2056,6 @@ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() return rateLimitInfoBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.MutateRowsResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java index 4c83e12105..1a98432832 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface MutateRowsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.MutateRowsResponse) @@ -34,6 +36,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ java.util.List getEntriesList(); + /** * * @@ -44,6 +47,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ com.google.bigtable.v2.MutateRowsResponse.Entry getEntries(int index); + /** * * @@ -54,6 +58,7 @@ public interface MutateRowsResponseOrBuilder * repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; */ int getEntriesCount(); + /** * * @@ -65,6 +70,7 @@ public interface MutateRowsResponseOrBuilder */ java.util.List getEntriesOrBuilderList(); + /** * * @@ -90,6 +96,7 @@ public interface MutateRowsResponseOrBuilder * @return Whether the rateLimitInfo field is set. */ boolean hasRateLimitInfo(); + /** * * @@ -104,6 +111,7 @@ public interface MutateRowsResponseOrBuilder * @return The rateLimitInfo. */ com.google.bigtable.v2.RateLimitInfo getRateLimitInfo(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java index ed0550b705..9aff81a132 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,30 +29,36 @@ * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Mutation_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_fieldAccessorTable @@ -77,6 +84,7 @@ public interface SetCellOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -135,6 +143,7 @@ public interface SetCellOrBuilder */ com.google.protobuf.ByteString getValue(); } + /** * * @@ -144,13 +153,24 @@ public interface SetCellOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.SetCell} */ - public static final class SetCell extends com.google.protobuf.GeneratedMessageV3 + public static final class SetCell extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.SetCell) SetCellOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SetCell"); + } + // Use SetCell.newBuilder() to construct. - private SetCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SetCell(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -160,19 +180,13 @@ private SetCell() { value_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SetCell(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_SetCell_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_SetCell_fieldAccessorTable @@ -185,6 +199,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -209,6 +224,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -236,6 +252,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -255,6 +272,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public static final int TIMESTAMP_MICROS_FIELD_NUMBER = 3; private long timestampMicros_ = 0L; + /** * * @@ -277,6 +295,7 @@ public long getTimestampMicros() { public static final int VALUE_FIELD_NUMBER = 4; private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -307,8 +326,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (!columnQualifier_.isEmpty()) { output.writeBytes(2, columnQualifier_); @@ -328,8 +347,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (!columnQualifier_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, columnQualifier_); @@ -420,38 +439,38 @@ public static com.google.bigtable.v2.Mutation.SetCell parseFrom( public static com.google.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell 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,11 +493,11 @@ 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; } + /** * * @@ -488,8 +507,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.SetCell} */ - 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.bigtable.v2.Mutation.SetCell) com.google.bigtable.v2.Mutation.SetCellOrBuilder { @@ -499,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_SetCell_fieldAccessorTable @@ -511,7 +529,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Mutation.SetCell.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -573,41 +591,6 @@ private void buildPartial0(com.google.bigtable.v2.Mutation.SetCell 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.bigtable.v2.Mutation.SetCell) { @@ -625,13 +608,13 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation.SetCell other) { bitField0_ |= 0x00000001; onChanged(); } - if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getColumnQualifier().isEmpty()) { setColumnQualifier(other.getColumnQualifier()); } if (other.getTimestampMicros() != 0L) { setTimestampMicros(other.getTimestampMicros()); } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getValue().isEmpty()) { setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -704,6 +687,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -727,6 +711,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -750,6 +735,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -772,6 +758,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -790,6 +777,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -816,6 +804,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -832,6 +821,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -854,6 +844,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -874,6 +865,7 @@ public Builder clearColumnQualifier() { } private long timestampMicros_; + /** * * @@ -893,6 +885,7 @@ public Builder clearColumnQualifier() { public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -916,6 +909,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -939,6 +933,7 @@ public Builder clearTimestampMicros() { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -954,6 +949,7 @@ public Builder clearTimestampMicros() { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -975,6 +971,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -993,18 +990,6 @@ public Builder clearValue() { 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.bigtable.v2.Mutation.SetCell) } @@ -1076,6 +1061,7 @@ public interface AddToCellOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -1104,6 +1090,7 @@ public interface AddToCellOrBuilder * @return Whether the columnQualifier field is set. */ boolean hasColumnQualifier(); + /** * * @@ -1117,6 +1104,7 @@ public interface AddToCellOrBuilder * @return The columnQualifier. */ com.google.bigtable.v2.Value getColumnQualifier(); + /** * * @@ -1142,6 +1130,7 @@ public interface AddToCellOrBuilder * @return Whether the timestamp field is set. */ boolean hasTimestamp(); + /** * * @@ -1155,6 +1144,7 @@ public interface AddToCellOrBuilder * @return The timestamp. */ com.google.bigtable.v2.Value getTimestamp(); + /** * * @@ -1180,6 +1170,7 @@ public interface AddToCellOrBuilder * @return Whether the input field is set. */ boolean hasInput(); + /** * * @@ -1193,6 +1184,7 @@ public interface AddToCellOrBuilder * @return The input. */ com.google.bigtable.v2.Value getInput(); + /** * * @@ -1205,6 +1197,7 @@ public interface AddToCellOrBuilder */ com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder(); } + /** * * @@ -1214,13 +1207,24 @@ public interface AddToCellOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.AddToCell} */ - public static final class AddToCell extends com.google.protobuf.GeneratedMessageV3 + public static final class AddToCell extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.AddToCell) AddToCellOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AddToCell"); + } + // Use AddToCell.newBuilder() to construct. - private AddToCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private AddToCell(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1228,19 +1232,13 @@ private AddToCell() { familyName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AddToCell(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_AddToCell_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_AddToCell_fieldAccessorTable @@ -1254,6 +1252,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -1279,6 +1278,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -1307,6 +1307,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; private com.google.bigtable.v2.Value columnQualifier_; + /** * * @@ -1323,6 +1324,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1341,6 +1343,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { ? com.google.bigtable.v2.Value.getDefaultInstance() : columnQualifier_; } + /** * * @@ -1360,6 +1363,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public static final int TIMESTAMP_FIELD_NUMBER = 3; private com.google.bigtable.v2.Value timestamp_; + /** * * @@ -1376,6 +1380,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1392,6 +1397,7 @@ public boolean hasTimestamp() { public com.google.bigtable.v2.Value getTimestamp() { return timestamp_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : timestamp_; } + /** * * @@ -1409,6 +1415,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public static final int INPUT_FIELD_NUMBER = 4; private com.google.bigtable.v2.Value input_; + /** * * @@ -1425,6 +1432,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1441,6 +1449,7 @@ public boolean hasInput() { public com.google.bigtable.v2.Value getInput() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } + /** * * @@ -1470,8 +1479,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getColumnQualifier()); @@ -1491,8 +1500,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getColumnQualifier()); @@ -1599,38 +1608,38 @@ public static com.google.bigtable.v2.Mutation.AddToCell parseFrom( public static com.google.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell 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); } @@ -1653,11 +1662,11 @@ 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; } + /** * * @@ -1667,8 +1676,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.AddToCell} */ - 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.bigtable.v2.Mutation.AddToCell) com.google.bigtable.v2.Mutation.AddToCellOrBuilder { @@ -1678,7 +1686,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_AddToCell_fieldAccessorTable @@ -1692,16 +1700,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) { - getColumnQualifierFieldBuilder(); - getTimestampFieldBuilder(); - getInputFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetColumnQualifierFieldBuilder(); + internalGetTimestampFieldBuilder(); + internalGetInputFieldBuilder(); } } @@ -1781,41 +1789,6 @@ private void buildPartial0(com.google.bigtable.v2.Mutation.AddToCell 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.bigtable.v2.Mutation.AddToCell) { @@ -1877,19 +1850,20 @@ public Builder mergeFrom( case 18: { input.readMessage( - getColumnQualifierFieldBuilder().getBuilder(), extensionRegistry); + internalGetColumnQualifierFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getInputFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetInputFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -1913,6 +1887,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -1937,6 +1912,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -1961,6 +1937,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1984,6 +1961,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2003,6 +1981,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -2029,11 +2008,12 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.v2.Value columnQualifier_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> columnQualifierBuilder_; + /** * * @@ -2049,6 +2029,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2070,6 +2051,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { return columnQualifierBuilder_.getMessage(); } } + /** * * @@ -2093,6 +2075,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2113,6 +2096,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value.Builder builderFo onChanged(); return this; } + /** * * @@ -2141,6 +2125,7 @@ public Builder mergeColumnQualifier(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2161,6 +2146,7 @@ public Builder clearColumnQualifier() { onChanged(); return this; } + /** * * @@ -2174,8 +2160,9 @@ public Builder clearColumnQualifier() { public com.google.bigtable.v2.Value.Builder getColumnQualifierBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getColumnQualifierFieldBuilder().getBuilder(); + return internalGetColumnQualifierFieldBuilder().getBuilder(); } + /** * * @@ -2195,6 +2182,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { : columnQualifier_; } } + /** * * @@ -2205,14 +2193,14 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { * * .google.bigtable.v2.Value column_qualifier = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getColumnQualifierFieldBuilder() { + internalGetColumnQualifierFieldBuilder() { if (columnQualifierBuilder_ == null) { columnQualifierBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -2223,11 +2211,12 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { } private com.google.bigtable.v2.Value timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> timestampBuilder_; + /** * * @@ -2243,6 +2232,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -2264,6 +2254,7 @@ public com.google.bigtable.v2.Value getTimestamp() { return timestampBuilder_.getMessage(); } } + /** * * @@ -2287,6 +2278,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2307,6 +2299,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value.Builder builderForValue onChanged(); return this; } + /** * * @@ -2335,6 +2328,7 @@ public Builder mergeTimestamp(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2355,6 +2349,7 @@ public Builder clearTimestamp() { onChanged(); return this; } + /** * * @@ -2368,8 +2363,9 @@ public Builder clearTimestamp() { public com.google.bigtable.v2.Value.Builder getTimestampBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTimestampFieldBuilder().getBuilder(); + return internalGetTimestampFieldBuilder().getBuilder(); } + /** * * @@ -2389,6 +2385,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { : timestamp_; } } + /** * * @@ -2399,14 +2396,14 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { * * .google.bigtable.v2.Value timestamp = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getTimestampFieldBuilder() { + internalGetTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -2417,11 +2414,12 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { } private com.google.bigtable.v2.Value input_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> inputBuilder_; + /** * * @@ -2437,6 +2435,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -2456,6 +2455,7 @@ public com.google.bigtable.v2.Value getInput() { return inputBuilder_.getMessage(); } } + /** * * @@ -2479,6 +2479,7 @@ public Builder setInput(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -2499,6 +2500,7 @@ public Builder setInput(com.google.bigtable.v2.Value.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -2527,6 +2529,7 @@ public Builder mergeInput(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -2547,6 +2550,7 @@ public Builder clearInput() { onChanged(); return this; } + /** * * @@ -2560,8 +2564,9 @@ public Builder clearInput() { public com.google.bigtable.v2.Value.Builder getInputBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getInputFieldBuilder().getBuilder(); + return internalGetInputFieldBuilder().getBuilder(); } + /** * * @@ -2579,6 +2584,7 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } } + /** * * @@ -2589,14 +2595,14 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { * * .google.bigtable.v2.Value input = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getInputFieldBuilder() { + internalGetInputFieldBuilder() { if (inputBuilder_ == null) { inputBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -2606,18 +2612,6 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { return inputBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Mutation.AddToCell) } @@ -2689,6 +2683,7 @@ public interface MergeToCellOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -2717,6 +2712,7 @@ public interface MergeToCellOrBuilder * @return Whether the columnQualifier field is set. */ boolean hasColumnQualifier(); + /** * * @@ -2730,6 +2726,7 @@ public interface MergeToCellOrBuilder * @return The columnQualifier. */ com.google.bigtable.v2.Value getColumnQualifier(); + /** * * @@ -2755,6 +2752,7 @@ public interface MergeToCellOrBuilder * @return Whether the timestamp field is set. */ boolean hasTimestamp(); + /** * * @@ -2768,6 +2766,7 @@ public interface MergeToCellOrBuilder * @return The timestamp. */ com.google.bigtable.v2.Value getTimestamp(); + /** * * @@ -2794,6 +2793,7 @@ public interface MergeToCellOrBuilder * @return Whether the input field is set. */ boolean hasInput(); + /** * * @@ -2808,6 +2808,7 @@ public interface MergeToCellOrBuilder * @return The input. */ com.google.bigtable.v2.Value getInput(); + /** * * @@ -2821,6 +2822,7 @@ public interface MergeToCellOrBuilder */ com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder(); } + /** * * @@ -2831,13 +2833,24 @@ public interface MergeToCellOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.MergeToCell} */ - public static final class MergeToCell extends com.google.protobuf.GeneratedMessageV3 + public static final class MergeToCell extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.MergeToCell) MergeToCellOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MergeToCell"); + } + // Use MergeToCell.newBuilder() to construct. - private MergeToCell(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MergeToCell(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2845,19 +2858,13 @@ private MergeToCell() { familyName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MergeToCell(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_MergeToCell_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable @@ -2871,6 +2878,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -2896,6 +2904,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -2924,6 +2933,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; private com.google.bigtable.v2.Value columnQualifier_; + /** * * @@ -2940,6 +2950,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2958,6 +2969,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { ? com.google.bigtable.v2.Value.getDefaultInstance() : columnQualifier_; } + /** * * @@ -2977,6 +2989,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public static final int TIMESTAMP_FIELD_NUMBER = 3; private com.google.bigtable.v2.Value timestamp_; + /** * * @@ -2993,6 +3006,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3009,6 +3023,7 @@ public boolean hasTimestamp() { public com.google.bigtable.v2.Value getTimestamp() { return timestamp_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : timestamp_; } + /** * * @@ -3026,6 +3041,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public static final int INPUT_FIELD_NUMBER = 4; private com.google.bigtable.v2.Value input_; + /** * * @@ -3043,6 +3059,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3060,6 +3077,7 @@ public boolean hasInput() { public com.google.bigtable.v2.Value getInput() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } + /** * * @@ -3090,8 +3108,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getColumnQualifier()); @@ -3111,8 +3129,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getColumnQualifier()); @@ -3219,38 +3237,38 @@ public static com.google.bigtable.v2.Mutation.MergeToCell parseFrom( public static com.google.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell 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); } @@ -3273,11 +3291,11 @@ 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; } + /** * * @@ -3288,8 +3306,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.MergeToCell} */ - 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.bigtable.v2.Mutation.MergeToCell) com.google.bigtable.v2.Mutation.MergeToCellOrBuilder { @@ -3299,7 +3316,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_MergeToCell_fieldAccessorTable @@ -3313,16 +3330,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) { - getColumnQualifierFieldBuilder(); - getTimestampFieldBuilder(); - getInputFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetColumnQualifierFieldBuilder(); + internalGetTimestampFieldBuilder(); + internalGetInputFieldBuilder(); } } @@ -3402,41 +3419,6 @@ private void buildPartial0(com.google.bigtable.v2.Mutation.MergeToCell 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.bigtable.v2.Mutation.MergeToCell) { @@ -3498,19 +3480,20 @@ public Builder mergeFrom( case 18: { input.readMessage( - getColumnQualifierFieldBuilder().getBuilder(), extensionRegistry); + internalGetColumnQualifierFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getInputFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetInputFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -3534,6 +3517,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -3558,6 +3542,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -3582,6 +3567,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3605,6 +3591,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3624,6 +3611,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -3650,11 +3638,12 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.v2.Value columnQualifier_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> columnQualifierBuilder_; + /** * * @@ -3670,6 +3659,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public boolean hasColumnQualifier() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3691,6 +3681,7 @@ public com.google.bigtable.v2.Value getColumnQualifier() { return columnQualifierBuilder_.getMessage(); } } + /** * * @@ -3714,6 +3705,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -3734,6 +3726,7 @@ public Builder setColumnQualifier(com.google.bigtable.v2.Value.Builder builderFo onChanged(); return this; } + /** * * @@ -3762,6 +3755,7 @@ public Builder mergeColumnQualifier(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -3782,6 +3776,7 @@ public Builder clearColumnQualifier() { onChanged(); return this; } + /** * * @@ -3795,8 +3790,9 @@ public Builder clearColumnQualifier() { public com.google.bigtable.v2.Value.Builder getColumnQualifierBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getColumnQualifierFieldBuilder().getBuilder(); + return internalGetColumnQualifierFieldBuilder().getBuilder(); } + /** * * @@ -3816,6 +3812,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { : columnQualifier_; } } + /** * * @@ -3826,14 +3823,14 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { * * .google.bigtable.v2.Value column_qualifier = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getColumnQualifierFieldBuilder() { + internalGetColumnQualifierFieldBuilder() { if (columnQualifierBuilder_ == null) { columnQualifierBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -3844,11 +3841,12 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { } private com.google.bigtable.v2.Value timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> timestampBuilder_; + /** * * @@ -3864,6 +3862,7 @@ public com.google.bigtable.v2.ValueOrBuilder getColumnQualifierOrBuilder() { public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3885,6 +3884,7 @@ public com.google.bigtable.v2.Value getTimestamp() { return timestampBuilder_.getMessage(); } } + /** * * @@ -3908,6 +3908,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -3928,6 +3929,7 @@ public Builder setTimestamp(com.google.bigtable.v2.Value.Builder builderForValue onChanged(); return this; } + /** * * @@ -3956,6 +3958,7 @@ public Builder mergeTimestamp(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -3976,6 +3979,7 @@ public Builder clearTimestamp() { onChanged(); return this; } + /** * * @@ -3989,8 +3993,9 @@ public Builder clearTimestamp() { public com.google.bigtable.v2.Value.Builder getTimestampBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTimestampFieldBuilder().getBuilder(); + return internalGetTimestampFieldBuilder().getBuilder(); } + /** * * @@ -4010,6 +4015,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { : timestamp_; } } + /** * * @@ -4020,14 +4026,14 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { * * .google.bigtable.v2.Value timestamp = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getTimestampFieldBuilder() { + internalGetTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -4038,11 +4044,12 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { } private com.google.bigtable.v2.Value input_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> inputBuilder_; + /** * * @@ -4059,6 +4066,7 @@ public com.google.bigtable.v2.ValueOrBuilder getTimestampOrBuilder() { public boolean hasInput() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -4079,6 +4087,7 @@ public com.google.bigtable.v2.Value getInput() { return inputBuilder_.getMessage(); } } + /** * * @@ -4103,6 +4112,7 @@ public Builder setInput(com.google.bigtable.v2.Value value) { onChanged(); return this; } + /** * * @@ -4124,6 +4134,7 @@ public Builder setInput(com.google.bigtable.v2.Value.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -4153,6 +4164,7 @@ public Builder mergeInput(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -4174,6 +4186,7 @@ public Builder clearInput() { onChanged(); return this; } + /** * * @@ -4188,8 +4201,9 @@ public Builder clearInput() { public com.google.bigtable.v2.Value.Builder getInputBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getInputFieldBuilder().getBuilder(); + return internalGetInputFieldBuilder().getBuilder(); } + /** * * @@ -4208,6 +4222,7 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { return input_ == null ? com.google.bigtable.v2.Value.getDefaultInstance() : input_; } } + /** * * @@ -4219,14 +4234,14 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { * * .google.bigtable.v2.Value input = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getInputFieldBuilder() { + internalGetInputFieldBuilder() { if (inputBuilder_ == null) { inputBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -4236,18 +4251,6 @@ public com.google.bigtable.v2.ValueOrBuilder getInputOrBuilder() { return inputBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Mutation.MergeToCell) } @@ -4318,6 +4321,7 @@ public interface DeleteFromColumnOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -4358,6 +4362,7 @@ public interface DeleteFromColumnOrBuilder * @return Whether the timeRange field is set. */ boolean hasTimeRange(); + /** * * @@ -4370,6 +4375,7 @@ public interface DeleteFromColumnOrBuilder * @return The timeRange. */ com.google.bigtable.v2.TimestampRange getTimeRange(); + /** * * @@ -4381,6 +4387,7 @@ public interface DeleteFromColumnOrBuilder */ com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder(); } + /** * * @@ -4391,13 +4398,24 @@ public interface DeleteFromColumnOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromColumn} */ - public static final class DeleteFromColumn extends com.google.protobuf.GeneratedMessageV3 + public static final class DeleteFromColumn extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromColumn) DeleteFromColumnOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteFromColumn"); + } + // Use DeleteFromColumn.newBuilder() to construct. - private DeleteFromColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteFromColumn(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -4406,19 +4424,13 @@ private DeleteFromColumn() { columnQualifier_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFromColumn(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable @@ -4432,6 +4444,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -4456,6 +4469,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -4483,6 +4497,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -4502,6 +4517,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public static final int TIME_RANGE_FIELD_NUMBER = 3; private com.google.bigtable.v2.TimestampRange timeRange_; + /** * * @@ -4517,6 +4533,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public boolean hasTimeRange() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -4534,6 +4551,7 @@ public com.google.bigtable.v2.TimestampRange getTimeRange() { ? com.google.bigtable.v2.TimestampRange.getDefaultInstance() : timeRange_; } + /** * * @@ -4564,8 +4582,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (!columnQualifier_.isEmpty()) { output.writeBytes(2, columnQualifier_); @@ -4582,8 +4600,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (!columnQualifier_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, columnQualifier_); @@ -4674,38 +4692,38 @@ public static com.google.bigtable.v2.Mutation.DeleteFromColumn parseFrom( public static com.google.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn 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); } @@ -4728,11 +4746,11 @@ 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; } + /** * * @@ -4743,8 +4761,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromColumn} */ - 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.bigtable.v2.Mutation.DeleteFromColumn) com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder { @@ -4754,7 +4771,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_fieldAccessorTable @@ -4768,14 +4785,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) { - getTimeRangeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTimeRangeFieldBuilder(); } } @@ -4840,41 +4857,6 @@ private void buildPartial0(com.google.bigtable.v2.Mutation.DeleteFromColumn 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.bigtable.v2.Mutation.DeleteFromColumn) { @@ -4893,7 +4875,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation.DeleteFromColumn other) bitField0_ |= 0x00000001; onChanged(); } - if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getColumnQualifier().isEmpty()) { setColumnQualifier(other.getColumnQualifier()); } if (other.hasTimeRange()) { @@ -4939,7 +4921,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getTimeRangeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimeRangeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -4963,6 +4946,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -4986,6 +4970,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -5009,6 +4994,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -5031,6 +5017,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -5049,6 +5036,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -5075,6 +5063,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -5091,6 +5080,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -5113,6 +5103,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -5133,11 +5124,12 @@ public Builder clearColumnQualifier() { } private com.google.bigtable.v2.TimestampRange timeRange_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> timeRangeBuilder_; + /** * * @@ -5152,6 +5144,7 @@ public Builder clearColumnQualifier() { public boolean hasTimeRange() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -5172,6 +5165,7 @@ public com.google.bigtable.v2.TimestampRange getTimeRange() { return timeRangeBuilder_.getMessage(); } } + /** * * @@ -5194,6 +5188,7 @@ public Builder setTimeRange(com.google.bigtable.v2.TimestampRange value) { onChanged(); return this; } + /** * * @@ -5213,6 +5208,7 @@ public Builder setTimeRange(com.google.bigtable.v2.TimestampRange.Builder builde onChanged(); return this; } + /** * * @@ -5240,6 +5236,7 @@ public Builder mergeTimeRange(com.google.bigtable.v2.TimestampRange value) { } return this; } + /** * * @@ -5259,6 +5256,7 @@ public Builder clearTimeRange() { onChanged(); return this; } + /** * * @@ -5271,8 +5269,9 @@ public Builder clearTimeRange() { public com.google.bigtable.v2.TimestampRange.Builder getTimeRangeBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getTimeRangeFieldBuilder().getBuilder(); + return internalGetTimeRangeFieldBuilder().getBuilder(); } + /** * * @@ -5291,6 +5290,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder() { : timeRange_; } } + /** * * @@ -5300,14 +5300,14 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder() { * * .google.bigtable.v2.TimestampRange time_range = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> - getTimeRangeFieldBuilder() { + internalGetTimeRangeFieldBuilder() { if (timeRangeBuilder_ == null) { timeRangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder>( @@ -5317,18 +5317,6 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimeRangeOrBuilder() { return timeRangeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Mutation.DeleteFromColumn) } @@ -5399,6 +5387,7 @@ public interface DeleteFromFamilyOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -5413,6 +5402,7 @@ public interface DeleteFromFamilyOrBuilder */ com.google.protobuf.ByteString getFamilyNameBytes(); } + /** * * @@ -5422,13 +5412,24 @@ public interface DeleteFromFamilyOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromFamily} */ - public static final class DeleteFromFamily extends com.google.protobuf.GeneratedMessageV3 + public static final class DeleteFromFamily extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromFamily) DeleteFromFamilyOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteFromFamily"); + } + // Use DeleteFromFamily.newBuilder() to construct. - private DeleteFromFamily(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteFromFamily(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -5436,19 +5437,13 @@ private DeleteFromFamily() { familyName_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFromFamily(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_fieldAccessorTable @@ -5461,6 +5456,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -5485,6 +5481,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -5524,8 +5521,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } getUnknownFields().writeTo(output); } @@ -5536,8 +5533,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -5611,38 +5608,38 @@ public static com.google.bigtable.v2.Mutation.DeleteFromFamily parseFrom( public static com.google.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily 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); } @@ -5665,11 +5662,11 @@ 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; } + /** * * @@ -5679,8 +5676,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromFamily} */ - 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.bigtable.v2.Mutation.DeleteFromFamily) com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder { @@ -5690,7 +5686,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_fieldAccessorTable @@ -5702,7 +5698,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Mutation.DeleteFromFamily.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -5752,41 +5748,6 @@ private void buildPartial0(com.google.bigtable.v2.Mutation.DeleteFromFamily 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.bigtable.v2.Mutation.DeleteFromFamily) { @@ -5857,6 +5818,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -5880,6 +5842,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -5903,6 +5866,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -5925,6 +5889,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -5943,6 +5908,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -5967,18 +5933,6 @@ public Builder setFamilyNameBytes(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.bigtable.v2.Mutation.DeleteFromFamily) } @@ -6035,6 +5989,7 @@ public interface DeleteFromRowOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation.DeleteFromRow) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -6044,31 +5999,36 @@ public interface DeleteFromRowOrBuilder * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromRow} */ - public static final class DeleteFromRow extends com.google.protobuf.GeneratedMessageV3 + public static final class DeleteFromRow extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Mutation.DeleteFromRow) DeleteFromRowOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteFromRow"); + } + // Use DeleteFromRow.newBuilder() to construct. - private DeleteFromRow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DeleteFromRow(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private DeleteFromRow() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteFromRow(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromRow_fieldAccessorTable @@ -6169,38 +6129,38 @@ public static com.google.bigtable.v2.Mutation.DeleteFromRow parseFrom( public static com.google.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow 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); } @@ -6223,11 +6183,11 @@ 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; } + /** * * @@ -6237,8 +6197,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Mutation.DeleteFromRow} */ - 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.bigtable.v2.Mutation.DeleteFromRow) com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder { @@ -6248,7 +6207,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromRow_fieldAccessorTable @@ -6260,7 +6219,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Mutation.DeleteFromRow.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -6298,41 +6257,6 @@ public com.google.bigtable.v2.Mutation.DeleteFromRow 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.bigtable.v2.Mutation.DeleteFromRow) { @@ -6389,18 +6313,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.bigtable.v2.Mutation.DeleteFromRow) } @@ -6474,6 +6386,7 @@ public enum MutationCase private MutationCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -6515,6 +6428,7 @@ public MutationCase getMutationCase() { } public static final int SET_CELL_FIELD_NUMBER = 1; + /** * * @@ -6530,6 +6444,7 @@ public MutationCase getMutationCase() { public boolean hasSetCell() { return mutationCase_ == 1; } + /** * * @@ -6548,6 +6463,7 @@ public com.google.bigtable.v2.Mutation.SetCell getSetCell() { } return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } + /** * * @@ -6566,6 +6482,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { } public static final int ADD_TO_CELL_FIELD_NUMBER = 5; + /** * * @@ -6581,6 +6498,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { public boolean hasAddToCell() { return mutationCase_ == 5; } + /** * * @@ -6599,6 +6517,7 @@ public com.google.bigtable.v2.Mutation.AddToCell getAddToCell() { } return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } + /** * * @@ -6617,6 +6536,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( } public static final int MERGE_TO_CELL_FIELD_NUMBER = 6; + /** * * @@ -6632,6 +6552,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( public boolean hasMergeToCell() { return mutationCase_ == 6; } + /** * * @@ -6650,6 +6571,7 @@ public com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell() { } return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); } + /** * * @@ -6668,6 +6590,7 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil } public static final int DELETE_FROM_COLUMN_FIELD_NUMBER = 2; + /** * * @@ -6683,6 +6606,7 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil public boolean hasDeleteFromColumn() { return mutationCase_ == 2; } + /** * * @@ -6701,6 +6625,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn() { } return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } + /** * * @@ -6719,6 +6644,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder getDeleteFromCo } public static final int DELETE_FROM_FAMILY_FIELD_NUMBER = 3; + /** * * @@ -6734,6 +6660,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder getDeleteFromCo public boolean hasDeleteFromFamily() { return mutationCase_ == 3; } + /** * * @@ -6752,6 +6679,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily() { } return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } + /** * * @@ -6770,6 +6698,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder getDeleteFromFa } public static final int DELETE_FROM_ROW_FIELD_NUMBER = 4; + /** * * @@ -6785,6 +6714,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder getDeleteFromFa public boolean hasDeleteFromRow() { return mutationCase_ == 4; } + /** * * @@ -6803,6 +6733,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRow getDeleteFromRow() { } return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } + /** * * @@ -7009,38 +6940,38 @@ public static com.google.bigtable.v2.Mutation parseFrom( public static com.google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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); } @@ -7063,10 +6994,11 @@ 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; } + /** * * @@ -7076,7 +7008,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.Mutation) com.google.bigtable.v2.MutationOrBuilder { @@ -7086,7 +7018,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_fieldAccessorTable @@ -7097,7 +7029,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Mutation.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -7186,39 +7118,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.Mutation 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.bigtable.v2.Mutation) { @@ -7295,39 +7194,42 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getSetCellFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSetCellFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 1; break; } // case 10 case 18: { input.readMessage( - getDeleteFromColumnFieldBuilder().getBuilder(), extensionRegistry); + internalGetDeleteFromColumnFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 2; break; } // case 18 case 26: { input.readMessage( - getDeleteFromFamilyFieldBuilder().getBuilder(), extensionRegistry); + internalGetDeleteFromFamilyFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 3; break; } // case 26 case 34: { - input.readMessage(getDeleteFromRowFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDeleteFromRowFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 4; break; } // case 34 case 42: { - input.readMessage(getAddToCellFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetAddToCellFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 5; break; } // case 42 case 50: { - input.readMessage(getMergeToCellFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMergeToCellFieldBuilder().getBuilder(), extensionRegistry); mutationCase_ = 6; break; } // case 50 @@ -7364,11 +7266,12 @@ public Builder clearMutation() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.SetCell, com.google.bigtable.v2.Mutation.SetCell.Builder, com.google.bigtable.v2.Mutation.SetCellOrBuilder> setCellBuilder_; + /** * * @@ -7384,6 +7287,7 @@ public Builder clearMutation() { public boolean hasSetCell() { return mutationCase_ == 1; } + /** * * @@ -7409,6 +7313,7 @@ public com.google.bigtable.v2.Mutation.SetCell getSetCell() { return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } } + /** * * @@ -7431,6 +7336,7 @@ public Builder setSetCell(com.google.bigtable.v2.Mutation.SetCell value) { mutationCase_ = 1; return this; } + /** * * @@ -7450,6 +7356,7 @@ public Builder setSetCell(com.google.bigtable.v2.Mutation.SetCell.Builder builde mutationCase_ = 1; return this; } + /** * * @@ -7482,6 +7389,7 @@ public Builder mergeSetCell(com.google.bigtable.v2.Mutation.SetCell value) { mutationCase_ = 1; return this; } + /** * * @@ -7507,6 +7415,7 @@ public Builder clearSetCell() { } return this; } + /** * * @@ -7517,8 +7426,9 @@ public Builder clearSetCell() { * .google.bigtable.v2.Mutation.SetCell set_cell = 1; */ public com.google.bigtable.v2.Mutation.SetCell.Builder getSetCellBuilder() { - return getSetCellFieldBuilder().getBuilder(); + return internalGetSetCellFieldBuilder().getBuilder(); } + /** * * @@ -7539,6 +7449,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { return com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } } + /** * * @@ -7548,17 +7459,17 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { * * .google.bigtable.v2.Mutation.SetCell set_cell = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.SetCell, com.google.bigtable.v2.Mutation.SetCell.Builder, com.google.bigtable.v2.Mutation.SetCellOrBuilder> - getSetCellFieldBuilder() { + internalGetSetCellFieldBuilder() { if (setCellBuilder_ == null) { if (!(mutationCase_ == 1)) { mutation_ = com.google.bigtable.v2.Mutation.SetCell.getDefaultInstance(); } setCellBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.SetCell, com.google.bigtable.v2.Mutation.SetCell.Builder, com.google.bigtable.v2.Mutation.SetCellOrBuilder>( @@ -7572,11 +7483,12 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { return setCellBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.AddToCell, com.google.bigtable.v2.Mutation.AddToCell.Builder, com.google.bigtable.v2.Mutation.AddToCellOrBuilder> addToCellBuilder_; + /** * * @@ -7592,6 +7504,7 @@ public com.google.bigtable.v2.Mutation.SetCellOrBuilder getSetCellOrBuilder() { public boolean hasAddToCell() { return mutationCase_ == 5; } + /** * * @@ -7617,6 +7530,7 @@ public com.google.bigtable.v2.Mutation.AddToCell getAddToCell() { return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } } + /** * * @@ -7639,6 +7553,7 @@ public Builder setAddToCell(com.google.bigtable.v2.Mutation.AddToCell value) { mutationCase_ = 5; return this; } + /** * * @@ -7658,6 +7573,7 @@ public Builder setAddToCell(com.google.bigtable.v2.Mutation.AddToCell.Builder bu mutationCase_ = 5; return this; } + /** * * @@ -7690,6 +7606,7 @@ public Builder mergeAddToCell(com.google.bigtable.v2.Mutation.AddToCell value) { mutationCase_ = 5; return this; } + /** * * @@ -7715,6 +7632,7 @@ public Builder clearAddToCell() { } return this; } + /** * * @@ -7725,8 +7643,9 @@ public Builder clearAddToCell() { * .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; */ public com.google.bigtable.v2.Mutation.AddToCell.Builder getAddToCellBuilder() { - return getAddToCellFieldBuilder().getBuilder(); + return internalGetAddToCellFieldBuilder().getBuilder(); } + /** * * @@ -7747,6 +7666,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( return com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } } + /** * * @@ -7756,17 +7676,17 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( * * .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.AddToCell, com.google.bigtable.v2.Mutation.AddToCell.Builder, com.google.bigtable.v2.Mutation.AddToCellOrBuilder> - getAddToCellFieldBuilder() { + internalGetAddToCellFieldBuilder() { if (addToCellBuilder_ == null) { if (!(mutationCase_ == 5)) { mutation_ = com.google.bigtable.v2.Mutation.AddToCell.getDefaultInstance(); } addToCellBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.AddToCell, com.google.bigtable.v2.Mutation.AddToCell.Builder, com.google.bigtable.v2.Mutation.AddToCellOrBuilder>( @@ -7780,11 +7700,12 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( return addToCellBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.MergeToCell, com.google.bigtable.v2.Mutation.MergeToCell.Builder, com.google.bigtable.v2.Mutation.MergeToCellOrBuilder> mergeToCellBuilder_; + /** * * @@ -7800,6 +7721,7 @@ public com.google.bigtable.v2.Mutation.AddToCellOrBuilder getAddToCellOrBuilder( public boolean hasMergeToCell() { return mutationCase_ == 6; } + /** * * @@ -7825,6 +7747,7 @@ public com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell() { return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); } } + /** * * @@ -7847,6 +7770,7 @@ public Builder setMergeToCell(com.google.bigtable.v2.Mutation.MergeToCell value) mutationCase_ = 6; return this; } + /** * * @@ -7867,6 +7791,7 @@ public Builder setMergeToCell( mutationCase_ = 6; return this; } + /** * * @@ -7899,6 +7824,7 @@ public Builder mergeMergeToCell(com.google.bigtable.v2.Mutation.MergeToCell valu mutationCase_ = 6; return this; } + /** * * @@ -7924,6 +7850,7 @@ public Builder clearMergeToCell() { } return this; } + /** * * @@ -7934,8 +7861,9 @@ public Builder clearMergeToCell() { * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; */ public com.google.bigtable.v2.Mutation.MergeToCell.Builder getMergeToCellBuilder() { - return getMergeToCellFieldBuilder().getBuilder(); + return internalGetMergeToCellFieldBuilder().getBuilder(); } + /** * * @@ -7956,6 +7884,7 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil return com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); } } + /** * * @@ -7965,17 +7894,17 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil * * .google.bigtable.v2.Mutation.MergeToCell merge_to_cell = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.MergeToCell, com.google.bigtable.v2.Mutation.MergeToCell.Builder, com.google.bigtable.v2.Mutation.MergeToCellOrBuilder> - getMergeToCellFieldBuilder() { + internalGetMergeToCellFieldBuilder() { if (mergeToCellBuilder_ == null) { if (!(mutationCase_ == 6)) { mutation_ = com.google.bigtable.v2.Mutation.MergeToCell.getDefaultInstance(); } mergeToCellBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.MergeToCell, com.google.bigtable.v2.Mutation.MergeToCell.Builder, com.google.bigtable.v2.Mutation.MergeToCellOrBuilder>( @@ -7989,11 +7918,12 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil return mergeToCellBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromColumn, com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder, com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder> deleteFromColumnBuilder_; + /** * * @@ -8009,6 +7939,7 @@ public com.google.bigtable.v2.Mutation.MergeToCellOrBuilder getMergeToCellOrBuil public boolean hasDeleteFromColumn() { return mutationCase_ == 2; } + /** * * @@ -8034,6 +7965,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn() { return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } } + /** * * @@ -8056,6 +7988,7 @@ public Builder setDeleteFromColumn(com.google.bigtable.v2.Mutation.DeleteFromCol mutationCase_ = 2; return this; } + /** * * @@ -8076,6 +8009,7 @@ public Builder setDeleteFromColumn( mutationCase_ = 2; return this; } + /** * * @@ -8108,6 +8042,7 @@ public Builder mergeDeleteFromColumn(com.google.bigtable.v2.Mutation.DeleteFromC mutationCase_ = 2; return this; } + /** * * @@ -8133,6 +8068,7 @@ public Builder clearDeleteFromColumn() { } return this; } + /** * * @@ -8143,8 +8079,9 @@ public Builder clearDeleteFromColumn() { * .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; */ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromColumnBuilder() { - return getDeleteFromColumnFieldBuilder().getBuilder(); + return internalGetDeleteFromColumnFieldBuilder().getBuilder(); } + /** * * @@ -8166,6 +8103,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol return com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } } + /** * * @@ -8175,17 +8113,17 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol * * .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromColumn, com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder, com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder> - getDeleteFromColumnFieldBuilder() { + internalGetDeleteFromColumnFieldBuilder() { if (deleteFromColumnBuilder_ == null) { if (!(mutationCase_ == 2)) { mutation_ = com.google.bigtable.v2.Mutation.DeleteFromColumn.getDefaultInstance(); } deleteFromColumnBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromColumn, com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder, com.google.bigtable.v2.Mutation.DeleteFromColumnOrBuilder>( @@ -8199,11 +8137,12 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol return deleteFromColumnBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromFamily, com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder, com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder> deleteFromFamilyBuilder_; + /** * * @@ -8219,6 +8158,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder getDeleteFromCol public boolean hasDeleteFromFamily() { return mutationCase_ == 3; } + /** * * @@ -8244,6 +8184,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily() { return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } } + /** * * @@ -8266,6 +8207,7 @@ public Builder setDeleteFromFamily(com.google.bigtable.v2.Mutation.DeleteFromFam mutationCase_ = 3; return this; } + /** * * @@ -8286,6 +8228,7 @@ public Builder setDeleteFromFamily( mutationCase_ = 3; return this; } + /** * * @@ -8318,6 +8261,7 @@ public Builder mergeDeleteFromFamily(com.google.bigtable.v2.Mutation.DeleteFromF mutationCase_ = 3; return this; } + /** * * @@ -8343,6 +8287,7 @@ public Builder clearDeleteFromFamily() { } return this; } + /** * * @@ -8353,8 +8298,9 @@ public Builder clearDeleteFromFamily() { * .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; */ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFamilyBuilder() { - return getDeleteFromFamilyFieldBuilder().getBuilder(); + return internalGetDeleteFromFamilyFieldBuilder().getBuilder(); } + /** * * @@ -8376,6 +8322,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam return com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } } + /** * * @@ -8385,17 +8332,17 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam * * .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromFamily, com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder, com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder> - getDeleteFromFamilyFieldBuilder() { + internalGetDeleteFromFamilyFieldBuilder() { if (deleteFromFamilyBuilder_ == null) { if (!(mutationCase_ == 3)) { mutation_ = com.google.bigtable.v2.Mutation.DeleteFromFamily.getDefaultInstance(); } deleteFromFamilyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromFamily, com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder, com.google.bigtable.v2.Mutation.DeleteFromFamilyOrBuilder>( @@ -8409,11 +8356,12 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam return deleteFromFamilyBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromRow, com.google.bigtable.v2.Mutation.DeleteFromRow.Builder, com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder> deleteFromRowBuilder_; + /** * * @@ -8429,6 +8377,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder getDeleteFromFam public boolean hasDeleteFromRow() { return mutationCase_ == 4; } + /** * * @@ -8454,6 +8403,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRow getDeleteFromRow() { return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } } + /** * * @@ -8476,6 +8426,7 @@ public Builder setDeleteFromRow(com.google.bigtable.v2.Mutation.DeleteFromRow va mutationCase_ = 4; return this; } + /** * * @@ -8496,6 +8447,7 @@ public Builder setDeleteFromRow( mutationCase_ = 4; return this; } + /** * * @@ -8528,6 +8480,7 @@ public Builder mergeDeleteFromRow(com.google.bigtable.v2.Mutation.DeleteFromRow mutationCase_ = 4; return this; } + /** * * @@ -8553,6 +8506,7 @@ public Builder clearDeleteFromRow() { } return this; } + /** * * @@ -8563,8 +8517,9 @@ public Builder clearDeleteFromRow() { * .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; */ public com.google.bigtable.v2.Mutation.DeleteFromRow.Builder getDeleteFromRowBuilder() { - return getDeleteFromRowFieldBuilder().getBuilder(); + return internalGetDeleteFromRowFieldBuilder().getBuilder(); } + /** * * @@ -8585,6 +8540,7 @@ public com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder getDeleteFromRowOr return com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } } + /** * * @@ -8594,17 +8550,17 @@ public com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder getDeleteFromRowOr * * .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromRow, com.google.bigtable.v2.Mutation.DeleteFromRow.Builder, com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder> - getDeleteFromRowFieldBuilder() { + internalGetDeleteFromRowFieldBuilder() { if (deleteFromRowBuilder_ == null) { if (!(mutationCase_ == 4)) { mutation_ = com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance(); } deleteFromRowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation.DeleteFromRow, com.google.bigtable.v2.Mutation.DeleteFromRow.Builder, com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder>( @@ -8618,17 +8574,6 @@ public com.google.bigtable.v2.Mutation.DeleteFromRowOrBuilder getDeleteFromRowOr return deleteFromRowBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Mutation) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutationOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutationOrBuilder.java index 061de24e52..0463a62ec1 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutationOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutationOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface MutationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Mutation) @@ -36,6 +38,7 @@ public interface MutationOrBuilder * @return Whether the setCell field is set. */ boolean hasSetCell(); + /** * * @@ -48,6 +51,7 @@ public interface MutationOrBuilder * @return The setCell. */ com.google.bigtable.v2.Mutation.SetCell getSetCell(); + /** * * @@ -71,6 +75,7 @@ public interface MutationOrBuilder * @return Whether the addToCell field is set. */ boolean hasAddToCell(); + /** * * @@ -83,6 +88,7 @@ public interface MutationOrBuilder * @return The addToCell. */ com.google.bigtable.v2.Mutation.AddToCell getAddToCell(); + /** * * @@ -106,6 +112,7 @@ public interface MutationOrBuilder * @return Whether the mergeToCell field is set. */ boolean hasMergeToCell(); + /** * * @@ -118,6 +125,7 @@ public interface MutationOrBuilder * @return The mergeToCell. */ com.google.bigtable.v2.Mutation.MergeToCell getMergeToCell(); + /** * * @@ -141,6 +149,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromColumn field is set. */ boolean hasDeleteFromColumn(); + /** * * @@ -153,6 +162,7 @@ public interface MutationOrBuilder * @return The deleteFromColumn. */ com.google.bigtable.v2.Mutation.DeleteFromColumn getDeleteFromColumn(); + /** * * @@ -176,6 +186,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromFamily field is set. */ boolean hasDeleteFromFamily(); + /** * * @@ -188,6 +199,7 @@ public interface MutationOrBuilder * @return The deleteFromFamily. */ com.google.bigtable.v2.Mutation.DeleteFromFamily getDeleteFromFamily(); + /** * * @@ -211,6 +223,7 @@ public interface MutationOrBuilder * @return Whether the deleteFromRow field is set. */ boolean hasDeleteFromRow(); + /** * * @@ -223,6 +236,7 @@ public interface MutationOrBuilder * @return The deleteFromRow. */ com.google.bigtable.v2.Mutation.DeleteFromRow getDeleteFromRow(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequest.java new file mode 100644 index 0000000000..57b67a81a5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequest.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Open sessions for an AuthorizedView. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenAuthorizedViewRequest} + */ +@com.google.protobuf.Generated +public final class OpenAuthorizedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenAuthorizedViewRequest) + OpenAuthorizedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenAuthorizedViewRequest"); + } + + // Use OpenAuthorizedViewRequest.newBuilder() to construct. + private OpenAuthorizedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenAuthorizedViewRequest() { + authorizedViewName_ = ""; + appProfileId_ = ""; + permission_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenAuthorizedViewRequest.class, + com.google.bigtable.v2.OpenAuthorizedViewRequest.Builder.class); + } + + /** Protobuf enum {@code google.bigtable.v2.OpenAuthorizedViewRequest.Permission} */ + public enum Permission implements com.google.protobuf.ProtocolMessageEnum { + /** PERMISSION_UNSET = 0; */ + PERMISSION_UNSET(0), + /** PERMISSION_READ = 1; */ + PERMISSION_READ(1), + /** PERMISSION_WRITE = 2; */ + PERMISSION_WRITE(2), + /** PERMISSION_READ_WRITE = 3; */ + PERMISSION_READ_WRITE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Permission"); + } + + /** PERMISSION_UNSET = 0; */ + public static final int PERMISSION_UNSET_VALUE = 0; + + /** PERMISSION_READ = 1; */ + public static final int PERMISSION_READ_VALUE = 1; + + /** PERMISSION_WRITE = 2; */ + public static final int PERMISSION_WRITE_VALUE = 2; + + /** PERMISSION_READ_WRITE = 3; */ + public static final int PERMISSION_READ_WRITE_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 Permission 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 Permission forNumber(int value) { + switch (value) { + case 0: + return PERMISSION_UNSET; + case 1: + return PERMISSION_READ; + case 2: + return PERMISSION_WRITE; + case 3: + return PERMISSION_READ_WRITE; + 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 Permission findValueByNumber(int number) { + return Permission.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.bigtable.v2.OpenAuthorizedViewRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final Permission[] VALUES = values(); + + public static Permission 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 Permission(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.OpenAuthorizedViewRequest.Permission) + } + + public static final int AUTHORIZED_VIEW_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object authorizedViewName_ = ""; + + /** + * + * + *
    +   * The Authorized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +   * 
    + * + * string authorized_view_name = 1; + * + * @return The authorizedViewName. + */ + @java.lang.Override + public java.lang.String getAuthorizedViewName() { + java.lang.Object ref = authorizedViewName_; + 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(); + authorizedViewName_ = s; + return s; + } + } + + /** + * + * + *
    +   * The Authorized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +   * 
    + * + * string authorized_view_name = 1; + * + * @return The bytes for authorizedViewName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { + java.lang.Object ref = authorizedViewName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +   * The app profile id to use for the authorized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + 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(); + appProfileId_ = s; + return s; + } + } + + /** + * + * + *
    +   * The app profile id to use for the authorized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + private int permission_ = 0; + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission getPermission() { + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission result = + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, authorizedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.PERMISSION_UNSET + .getNumber()) { + output.writeEnum(3, permission_); + } + 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(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, authorizedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.PERMISSION_UNSET + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, permission_); + } + 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.bigtable.v2.OpenAuthorizedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenAuthorizedViewRequest other = + (com.google.bigtable.v2.OpenAuthorizedViewRequest) obj; + + if (!getAuthorizedViewName().equals(other.getAuthorizedViewName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (permission_ != other.permission_) 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) + AUTHORIZED_VIEW_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizedViewName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + permission_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest 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.bigtable.v2.OpenAuthorizedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest 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.bigtable.v2.OpenAuthorizedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest 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.bigtable.v2.OpenAuthorizedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest 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.bigtable.v2.OpenAuthorizedViewRequest 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; + } + + /** + * + * + *
    +   * Open sessions for an AuthorizedView. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenAuthorizedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenAuthorizedViewRequest) + com.google.bigtable.v2.OpenAuthorizedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenAuthorizedViewRequest.class, + com.google.bigtable.v2.OpenAuthorizedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenAuthorizedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + authorizedViewName_ = ""; + appProfileId_ = ""; + permission_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenAuthorizedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewRequest build() { + com.google.bigtable.v2.OpenAuthorizedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewRequest buildPartial() { + com.google.bigtable.v2.OpenAuthorizedViewRequest result = + new com.google.bigtable.v2.OpenAuthorizedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.OpenAuthorizedViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.authorizedViewName_ = authorizedViewName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenAuthorizedViewRequest) { + return mergeFrom((com.google.bigtable.v2.OpenAuthorizedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenAuthorizedViewRequest other) { + if (other == com.google.bigtable.v2.OpenAuthorizedViewRequest.getDefaultInstance()) + return this; + if (!other.getAuthorizedViewName().isEmpty()) { + authorizedViewName_ = other.authorizedViewName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.permission_ != 0) { + setPermissionValue(other.getPermissionValue()); + } + 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: + { + authorizedViewName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + permission_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object authorizedViewName_ = ""; + + /** + * + * + *
    +     * The Authorized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +     * 
    + * + * string authorized_view_name = 1; + * + * @return The authorizedViewName. + */ + public java.lang.String getAuthorizedViewName() { + java.lang.Object ref = authorizedViewName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizedViewName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The Authorized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +     * 
    + * + * string authorized_view_name = 1; + * + * @return The bytes for authorizedViewName. + */ + public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { + java.lang.Object ref = authorizedViewName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authorizedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The Authorized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +     * 
    + * + * string authorized_view_name = 1; + * + * @param value The authorizedViewName to set. + * @return This builder for chaining. + */ + public Builder setAuthorizedViewName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authorizedViewName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Authorized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +     * 
    + * + * string authorized_view_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearAuthorizedViewName() { + authorizedViewName_ = getDefaultInstance().getAuthorizedViewName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Authorized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +     * 
    + * + * string authorized_view_name = 1; + * + * @param value The bytes for authorizedViewName to set. + * @return This builder for chaining. + */ + public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authorizedViewName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +     * The app profile id to use for the authorized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The app profile id to use for the authorized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The app profile id to use for the authorized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The app profile id to use for the authorized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The app profile id to use for the authorized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int permission_ = 0; + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @param value The enum numeric value on the wire for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionValue(int value) { + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission getPermission() { + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission result = + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + permission_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return This builder for chaining. + */ + public Builder clearPermission() { + bitField0_ = (bitField0_ & ~0x00000004); + permission_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenAuthorizedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenAuthorizedViewRequest) + private static final com.google.bigtable.v2.OpenAuthorizedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenAuthorizedViewRequest(); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenAuthorizedViewRequest 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.bigtable.v2.OpenAuthorizedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequestOrBuilder.java new file mode 100644 index 0000000000..1844ca34fb --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenAuthorizedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenAuthorizedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The Authorized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +   * 
    + * + * string authorized_view_name = 1; + * + * @return The authorizedViewName. + */ + java.lang.String getAuthorizedViewName(); + + /** + * + * + *
    +   * The Authorized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
    +   * 
    + * + * string authorized_view_name = 1; + * + * @return The bytes for authorizedViewName. + */ + com.google.protobuf.ByteString getAuthorizedViewNameBytes(); + + /** + * + * + *
    +   * The app profile id to use for the authorized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * + * + *
    +   * The app profile id to use for the authorized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + int getPermissionValue(); + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenAuthorizedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + com.google.bigtable.v2.OpenAuthorizedViewRequest.Permission getPermission(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponse.java new file mode 100644 index 0000000000..a9aa9e1381 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponse.java @@ -0,0 +1,396 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenAuthorizedViewResponse} + */ +@com.google.protobuf.Generated +public final class OpenAuthorizedViewResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenAuthorizedViewResponse) + OpenAuthorizedViewResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenAuthorizedViewResponse"); + } + + // Use OpenAuthorizedViewResponse.newBuilder() to construct. + private OpenAuthorizedViewResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenAuthorizedViewResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenAuthorizedViewResponse.class, + com.google.bigtable.v2.OpenAuthorizedViewResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.OpenAuthorizedViewResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenAuthorizedViewResponse other = + (com.google.bigtable.v2.OpenAuthorizedViewResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse 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.bigtable.v2.OpenAuthorizedViewResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse 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.bigtable.v2.OpenAuthorizedViewResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse 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.bigtable.v2.OpenAuthorizedViewResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse 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.bigtable.v2.OpenAuthorizedViewResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenAuthorizedViewResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenAuthorizedViewResponse) + com.google.bigtable.v2.OpenAuthorizedViewResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenAuthorizedViewResponse.class, + com.google.bigtable.v2.OpenAuthorizedViewResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenAuthorizedViewResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenAuthorizedViewResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewResponse build() { + com.google.bigtable.v2.OpenAuthorizedViewResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenAuthorizedViewResponse buildPartial() { + com.google.bigtable.v2.OpenAuthorizedViewResponse result = + new com.google.bigtable.v2.OpenAuthorizedViewResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenAuthorizedViewResponse) { + return mergeFrom((com.google.bigtable.v2.OpenAuthorizedViewResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenAuthorizedViewResponse other) { + if (other == com.google.bigtable.v2.OpenAuthorizedViewResponse.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenAuthorizedViewResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenAuthorizedViewResponse) + private static final com.google.bigtable.v2.OpenAuthorizedViewResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenAuthorizedViewResponse(); + } + + public static com.google.bigtable.v2.OpenAuthorizedViewResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenAuthorizedViewResponse 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.bigtable.v2.OpenAuthorizedViewResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponseOrBuilder.java new file mode 100644 index 0000000000..41487837a9 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenAuthorizedViewResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenAuthorizedViewResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenAuthorizedViewResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequest.java new file mode 100644 index 0000000000..46af0c1227 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequest.java @@ -0,0 +1,1064 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Open sessions for a MaterializedView. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenMaterializedViewRequest} + */ +@com.google.protobuf.Generated +public final class OpenMaterializedViewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenMaterializedViewRequest) + OpenMaterializedViewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenMaterializedViewRequest"); + } + + // Use OpenMaterializedViewRequest.newBuilder() to construct. + private OpenMaterializedViewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenMaterializedViewRequest() { + materializedViewName_ = ""; + appProfileId_ = ""; + permission_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenMaterializedViewRequest.class, + com.google.bigtable.v2.OpenMaterializedViewRequest.Builder.class); + } + + /** Protobuf enum {@code google.bigtable.v2.OpenMaterializedViewRequest.Permission} */ + public enum Permission implements com.google.protobuf.ProtocolMessageEnum { + /** PERMISSION_UNSET = 0; */ + PERMISSION_UNSET(0), + /** PERMISSION_READ = 1; */ + PERMISSION_READ(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Permission"); + } + + /** PERMISSION_UNSET = 0; */ + public static final int PERMISSION_UNSET_VALUE = 0; + + /** PERMISSION_READ = 1; */ + public static final int PERMISSION_READ_VALUE = 1; + + 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 Permission 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 Permission forNumber(int value) { + switch (value) { + case 0: + return PERMISSION_UNSET; + case 1: + return PERMISSION_READ; + 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 Permission findValueByNumber(int number) { + return Permission.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.bigtable.v2.OpenMaterializedViewRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Permission[] VALUES = values(); + + public static Permission 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 Permission(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.OpenMaterializedViewRequest.Permission) + } + + public static final int MATERIALIZED_VIEW_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +   * The Materialized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * string materialized_view_name = 1; + * + * @return The materializedViewName. + */ + @java.lang.Override + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + 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(); + materializedViewName_ = s; + return s; + } + } + + /** + * + * + *
    +   * The Materialized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * string materialized_view_name = 1; + * + * @return The bytes for materializedViewName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +   * The app profile id to use for the materialized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + 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(); + appProfileId_ = s; + return s; + } + } + + /** + * + * + *
    +   * The app profile id to use for the materialized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + private int permission_ = 0; + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewRequest.Permission getPermission() { + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission result = + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, materializedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.PERMISSION_UNSET + .getNumber()) { + output.writeEnum(3, permission_); + } + 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(materializedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, materializedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.PERMISSION_UNSET + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, permission_); + } + 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.bigtable.v2.OpenMaterializedViewRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenMaterializedViewRequest other = + (com.google.bigtable.v2.OpenMaterializedViewRequest) obj; + + if (!getMaterializedViewName().equals(other.getMaterializedViewName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (permission_ != other.permission_) 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) + MATERIALIZED_VIEW_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedViewName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + permission_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest 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.bigtable.v2.OpenMaterializedViewRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest 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.bigtable.v2.OpenMaterializedViewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest 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.bigtable.v2.OpenMaterializedViewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest 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.bigtable.v2.OpenMaterializedViewRequest 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; + } + + /** + * + * + *
    +   * Open sessions for a MaterializedView. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenMaterializedViewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenMaterializedViewRequest) + com.google.bigtable.v2.OpenMaterializedViewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenMaterializedViewRequest.class, + com.google.bigtable.v2.OpenMaterializedViewRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenMaterializedViewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + materializedViewName_ = ""; + appProfileId_ = ""; + permission_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenMaterializedViewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewRequest build() { + com.google.bigtable.v2.OpenMaterializedViewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewRequest buildPartial() { + com.google.bigtable.v2.OpenMaterializedViewRequest result = + new com.google.bigtable.v2.OpenMaterializedViewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.OpenMaterializedViewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.materializedViewName_ = materializedViewName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenMaterializedViewRequest) { + return mergeFrom((com.google.bigtable.v2.OpenMaterializedViewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenMaterializedViewRequest other) { + if (other == com.google.bigtable.v2.OpenMaterializedViewRequest.getDefaultInstance()) + return this; + if (!other.getMaterializedViewName().isEmpty()) { + materializedViewName_ = other.materializedViewName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.permission_ != 0) { + setPermissionValue(other.getPermissionValue()); + } + 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: + { + materializedViewName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + permission_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +     * The Materialized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * string materialized_view_name = 1; + * + * @return The materializedViewName. + */ + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + materializedViewName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The Materialized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * string materialized_view_name = 1; + * + * @return The bytes for materializedViewName. + */ + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The Materialized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * string materialized_view_name = 1; + * + * @param value The materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + materializedViewName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Materialized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * string materialized_view_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearMaterializedViewName() { + materializedViewName_ = getDefaultInstance().getMaterializedViewName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Materialized view name to read and write from. Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * string materialized_view_name = 1; + * + * @param value The bytes for materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + materializedViewName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +     * The app profile id to use for the materialized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The app profile id to use for the materialized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The app profile id to use for the materialized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The app profile id to use for the materialized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The app profile id to use for the materialized view sessions.
    +     * 
    + * + * string app_profile_id = 2; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int permission_ = 0; + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @param value The enum numeric value on the wire for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionValue(int value) { + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewRequest.Permission getPermission() { + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission result = + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenMaterializedViewRequest.Permission.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + permission_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Permission for the session.
    +     * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return This builder for chaining. + */ + public Builder clearPermission() { + bitField0_ = (bitField0_ & ~0x00000004); + permission_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenMaterializedViewRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenMaterializedViewRequest) + private static final com.google.bigtable.v2.OpenMaterializedViewRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenMaterializedViewRequest(); + } + + public static com.google.bigtable.v2.OpenMaterializedViewRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenMaterializedViewRequest 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.bigtable.v2.OpenMaterializedViewRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequestOrBuilder.java new file mode 100644 index 0000000000..e020a78e46 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenMaterializedViewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenMaterializedViewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The Materialized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * string materialized_view_name = 1; + * + * @return The materializedViewName. + */ + java.lang.String getMaterializedViewName(); + + /** + * + * + *
    +   * The Materialized view name to read and write from. Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * string materialized_view_name = 1; + * + * @return The bytes for materializedViewName. + */ + com.google.protobuf.ByteString getMaterializedViewNameBytes(); + + /** + * + * + *
    +   * The app profile id to use for the materialized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * + * + *
    +   * The app profile id to use for the materialized view sessions.
    +   * 
    + * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + int getPermissionValue(); + + /** + * + * + *
    +   * Permission for the session.
    +   * 
    + * + * .google.bigtable.v2.OpenMaterializedViewRequest.Permission permission = 3; + * + * @return The permission. + */ + com.google.bigtable.v2.OpenMaterializedViewRequest.Permission getPermission(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponse.java new file mode 100644 index 0000000000..37d6086066 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponse.java @@ -0,0 +1,396 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenMaterializedViewResponse} + */ +@com.google.protobuf.Generated +public final class OpenMaterializedViewResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenMaterializedViewResponse) + OpenMaterializedViewResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenMaterializedViewResponse"); + } + + // Use OpenMaterializedViewResponse.newBuilder() to construct. + private OpenMaterializedViewResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenMaterializedViewResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenMaterializedViewResponse.class, + com.google.bigtable.v2.OpenMaterializedViewResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.OpenMaterializedViewResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenMaterializedViewResponse other = + (com.google.bigtable.v2.OpenMaterializedViewResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse 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.bigtable.v2.OpenMaterializedViewResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse 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.bigtable.v2.OpenMaterializedViewResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse 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.bigtable.v2.OpenMaterializedViewResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse 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.bigtable.v2.OpenMaterializedViewResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenMaterializedViewResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenMaterializedViewResponse) + com.google.bigtable.v2.OpenMaterializedViewResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenMaterializedViewResponse.class, + com.google.bigtable.v2.OpenMaterializedViewResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenMaterializedViewResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenMaterializedViewResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewResponse build() { + com.google.bigtable.v2.OpenMaterializedViewResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenMaterializedViewResponse buildPartial() { + com.google.bigtable.v2.OpenMaterializedViewResponse result = + new com.google.bigtable.v2.OpenMaterializedViewResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenMaterializedViewResponse) { + return mergeFrom((com.google.bigtable.v2.OpenMaterializedViewResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenMaterializedViewResponse other) { + if (other == com.google.bigtable.v2.OpenMaterializedViewResponse.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenMaterializedViewResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenMaterializedViewResponse) + private static final com.google.bigtable.v2.OpenMaterializedViewResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenMaterializedViewResponse(); + } + + public static com.google.bigtable.v2.OpenMaterializedViewResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenMaterializedViewResponse 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.bigtable.v2.OpenMaterializedViewResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponseOrBuilder.java new file mode 100644 index 0000000000..f37e4cd2a8 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenMaterializedViewResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenMaterializedViewResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenMaterializedViewResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequest.java new file mode 100644 index 0000000000..1b7374f77b --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequest.java @@ -0,0 +1,1108 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenSessionRequest} + */ +@com.google.protobuf.Generated +public final class OpenSessionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenSessionRequest) + OpenSessionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenSessionRequest"); + } + + // Use OpenSessionRequest.newBuilder() to construct. + private OpenSessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenSessionRequest() { + routingCookie_ = com.google.protobuf.ByteString.EMPTY; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenSessionRequest.class, + com.google.bigtable.v2.OpenSessionRequest.Builder.class); + } + + private int bitField0_; + public static final int PROTOCOL_VERSION_FIELD_NUMBER = 1; + private long protocolVersion_ = 0L; + + /** + * + * + *
    +   * A version indicator from the client stating its understanding of the
    +   * protocol. This is to disambiguate client behavior amidst changes in
    +   * semantic usage of the API, e.g. if the structure remains the same but
    +   * behavior changes.
    +   * 
    + * + * int64 protocol_version = 1; + * + * @return The protocolVersion. + */ + @java.lang.Override + public long getProtocolVersion() { + return protocolVersion_; + } + + public static final int FLAGS_FIELD_NUMBER = 2; + private com.google.bigtable.v2.FeatureFlags flags_; + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return Whether the flags field is set. + */ + @java.lang.Override + public boolean hasFlags() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return The flags. + */ + @java.lang.Override + public com.google.bigtable.v2.FeatureFlags getFlags() { + return flags_ == null ? com.google.bigtable.v2.FeatureFlags.getDefaultInstance() : flags_; + } + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.FeatureFlagsOrBuilder getFlagsOrBuilder() { + return flags_ == null ? com.google.bigtable.v2.FeatureFlags.getDefaultInstance() : flags_; + } + + public static final int CONSECUTIVE_FAILED_CONNECTION_ATTEMPTS_FIELD_NUMBER = 3; + private long consecutiveFailedConnectionAttempts_ = 0L; + + /** + * + * + *
    +   * Used for serverside observability.
    +   * 
    + * + * int64 consecutive_failed_connection_attempts = 3; + * + * @return The consecutiveFailedConnectionAttempts. + */ + @java.lang.Override + public long getConsecutiveFailedConnectionAttempts() { + return consecutiveFailedConnectionAttempts_; + } + + public static final int ROUTING_COOKIE_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString routingCookie_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * How the request should be routed (if presented as part of a GOAWAY
    +   * from a previous session). Post V1.
    +   * 
    + * + * bytes routing_cookie = 4; + * + * @return The routingCookie. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoutingCookie() { + return routingCookie_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Can be Open{Table,AuthorizedView,MaterializedView}Request,
    +   * (or in post-V1, PrepareSqlQueryRequest)
    +   * 
    + * + * bytes payload = 5; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return 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 (protocolVersion_ != 0L) { + output.writeInt64(1, protocolVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getFlags()); + } + if (consecutiveFailedConnectionAttempts_ != 0L) { + output.writeInt64(3, consecutiveFailedConnectionAttempts_); + } + if (!routingCookie_.isEmpty()) { + output.writeBytes(4, routingCookie_); + } + if (!payload_.isEmpty()) { + output.writeBytes(5, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (protocolVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, protocolVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFlags()); + } + if (consecutiveFailedConnectionAttempts_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 3, consecutiveFailedConnectionAttempts_); + } + if (!routingCookie_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, routingCookie_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, payload_); + } + 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.bigtable.v2.OpenSessionRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenSessionRequest other = + (com.google.bigtable.v2.OpenSessionRequest) obj; + + if (getProtocolVersion() != other.getProtocolVersion()) return false; + if (hasFlags() != other.hasFlags()) return false; + if (hasFlags()) { + if (!getFlags().equals(other.getFlags())) return false; + } + if (getConsecutiveFailedConnectionAttempts() != other.getConsecutiveFailedConnectionAttempts()) + return false; + if (!getRoutingCookie().equals(other.getRoutingCookie())) return false; + 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) + PROTOCOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProtocolVersion()); + if (hasFlags()) { + hash = (37 * hash) + FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getFlags().hashCode(); + } + hash = (37 * hash) + CONSECUTIVE_FAILED_CONNECTION_ATTEMPTS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(getConsecutiveFailedConnectionAttempts()); + hash = (37 * hash) + ROUTING_COOKIE_FIELD_NUMBER; + hash = (53 * hash) + getRoutingCookie().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenSessionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenSessionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionRequest 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.bigtable.v2.OpenSessionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenSessionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionRequest 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.bigtable.v2.OpenSessionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionRequest 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.bigtable.v2.OpenSessionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionRequest 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.bigtable.v2.OpenSessionRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenSessionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenSessionRequest) + com.google.bigtable.v2.OpenSessionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenSessionRequest.class, + com.google.bigtable.v2.OpenSessionRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenSessionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFlagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + protocolVersion_ = 0L; + flags_ = null; + if (flagsBuilder_ != null) { + flagsBuilder_.dispose(); + flagsBuilder_ = null; + } + consecutiveFailedConnectionAttempts_ = 0L; + routingCookie_ = com.google.protobuf.ByteString.EMPTY; + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest build() { + com.google.bigtable.v2.OpenSessionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest buildPartial() { + com.google.bigtable.v2.OpenSessionRequest result = + new com.google.bigtable.v2.OpenSessionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.OpenSessionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.protocolVersion_ = protocolVersion_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.flags_ = flagsBuilder_ == null ? flags_ : flagsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.consecutiveFailedConnectionAttempts_ = consecutiveFailedConnectionAttempts_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.routingCookie_ = routingCookie_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.payload_ = payload_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenSessionRequest) { + return mergeFrom((com.google.bigtable.v2.OpenSessionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenSessionRequest other) { + if (other == com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance()) return this; + if (other.getProtocolVersion() != 0L) { + setProtocolVersion(other.getProtocolVersion()); + } + if (other.hasFlags()) { + mergeFlags(other.getFlags()); + } + if (other.getConsecutiveFailedConnectionAttempts() != 0L) { + setConsecutiveFailedConnectionAttempts(other.getConsecutiveFailedConnectionAttempts()); + } + if (!other.getRoutingCookie().isEmpty()) { + setRoutingCookie(other.getRoutingCookie()); + } + if (!other.getPayload().isEmpty()) { + setPayload(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 8: + { + protocolVersion_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(internalGetFlagsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + consecutiveFailedConnectionAttempts_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + routingCookie_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + payload_ = 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 long protocolVersion_; + + /** + * + * + *
    +     * A version indicator from the client stating its understanding of the
    +     * protocol. This is to disambiguate client behavior amidst changes in
    +     * semantic usage of the API, e.g. if the structure remains the same but
    +     * behavior changes.
    +     * 
    + * + * int64 protocol_version = 1; + * + * @return The protocolVersion. + */ + @java.lang.Override + public long getProtocolVersion() { + return protocolVersion_; + } + + /** + * + * + *
    +     * A version indicator from the client stating its understanding of the
    +     * protocol. This is to disambiguate client behavior amidst changes in
    +     * semantic usage of the API, e.g. if the structure remains the same but
    +     * behavior changes.
    +     * 
    + * + * int64 protocol_version = 1; + * + * @param value The protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersion(long value) { + + protocolVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * A version indicator from the client stating its understanding of the
    +     * protocol. This is to disambiguate client behavior amidst changes in
    +     * semantic usage of the API, e.g. if the structure remains the same but
    +     * behavior changes.
    +     * 
    + * + * int64 protocol_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearProtocolVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + protocolVersion_ = 0L; + onChanged(); + return this; + } + + private com.google.bigtable.v2.FeatureFlags flags_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.FeatureFlags, + com.google.bigtable.v2.FeatureFlags.Builder, + com.google.bigtable.v2.FeatureFlagsOrBuilder> + flagsBuilder_; + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return Whether the flags field is set. + */ + public boolean hasFlags() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return The flags. + */ + public com.google.bigtable.v2.FeatureFlags getFlags() { + if (flagsBuilder_ == null) { + return flags_ == null ? com.google.bigtable.v2.FeatureFlags.getDefaultInstance() : flags_; + } else { + return flagsBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public Builder setFlags(com.google.bigtable.v2.FeatureFlags value) { + if (flagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + flags_ = value; + } else { + flagsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public Builder setFlags(com.google.bigtable.v2.FeatureFlags.Builder builderForValue) { + if (flagsBuilder_ == null) { + flags_ = builderForValue.build(); + } else { + flagsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public Builder mergeFlags(com.google.bigtable.v2.FeatureFlags value) { + if (flagsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && flags_ != null + && flags_ != com.google.bigtable.v2.FeatureFlags.getDefaultInstance()) { + getFlagsBuilder().mergeFrom(value); + } else { + flags_ = value; + } + } else { + flagsBuilder_.mergeFrom(value); + } + if (flags_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public Builder clearFlags() { + bitField0_ = (bitField0_ & ~0x00000002); + flags_ = null; + if (flagsBuilder_ != null) { + flagsBuilder_.dispose(); + flagsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public com.google.bigtable.v2.FeatureFlags.Builder getFlagsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetFlagsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + public com.google.bigtable.v2.FeatureFlagsOrBuilder getFlagsOrBuilder() { + if (flagsBuilder_ != null) { + return flagsBuilder_.getMessageOrBuilder(); + } else { + return flags_ == null ? com.google.bigtable.v2.FeatureFlags.getDefaultInstance() : flags_; + } + } + + /** + * + * + *
    +     * Client settings, including a record of
    +     * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.FeatureFlags, + com.google.bigtable.v2.FeatureFlags.Builder, + com.google.bigtable.v2.FeatureFlagsOrBuilder> + internalGetFlagsFieldBuilder() { + if (flagsBuilder_ == null) { + flagsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.FeatureFlags, + com.google.bigtable.v2.FeatureFlags.Builder, + com.google.bigtable.v2.FeatureFlagsOrBuilder>( + getFlags(), getParentForChildren(), isClean()); + flags_ = null; + } + return flagsBuilder_; + } + + private long consecutiveFailedConnectionAttempts_; + + /** + * + * + *
    +     * Used for serverside observability.
    +     * 
    + * + * int64 consecutive_failed_connection_attempts = 3; + * + * @return The consecutiveFailedConnectionAttempts. + */ + @java.lang.Override + public long getConsecutiveFailedConnectionAttempts() { + return consecutiveFailedConnectionAttempts_; + } + + /** + * + * + *
    +     * Used for serverside observability.
    +     * 
    + * + * int64 consecutive_failed_connection_attempts = 3; + * + * @param value The consecutiveFailedConnectionAttempts to set. + * @return This builder for chaining. + */ + public Builder setConsecutiveFailedConnectionAttempts(long value) { + + consecutiveFailedConnectionAttempts_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Used for serverside observability.
    +     * 
    + * + * int64 consecutive_failed_connection_attempts = 3; + * + * @return This builder for chaining. + */ + public Builder clearConsecutiveFailedConnectionAttempts() { + bitField0_ = (bitField0_ & ~0x00000004); + consecutiveFailedConnectionAttempts_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString routingCookie_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * How the request should be routed (if presented as part of a GOAWAY
    +     * from a previous session). Post V1.
    +     * 
    + * + * bytes routing_cookie = 4; + * + * @return The routingCookie. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoutingCookie() { + return routingCookie_; + } + + /** + * + * + *
    +     * How the request should be routed (if presented as part of a GOAWAY
    +     * from a previous session). Post V1.
    +     * 
    + * + * bytes routing_cookie = 4; + * + * @param value The routingCookie to set. + * @return This builder for chaining. + */ + public Builder setRoutingCookie(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + routingCookie_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * How the request should be routed (if presented as part of a GOAWAY
    +     * from a previous session). Post V1.
    +     * 
    + * + * bytes routing_cookie = 4; + * + * @return This builder for chaining. + */ + public Builder clearRoutingCookie() { + bitField0_ = (bitField0_ & ~0x00000008); + routingCookie_ = getDefaultInstance().getRoutingCookie(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Request,
    +     * (or in post-V1, PrepareSqlQueryRequest)
    +     * 
    + * + * bytes payload = 5; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Request,
    +     * (or in post-V1, PrepareSqlQueryRequest)
    +     * 
    + * + * bytes payload = 5; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Request,
    +     * (or in post-V1, PrepareSqlQueryRequest)
    +     * 
    + * + * bytes payload = 5; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000010); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenSessionRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenSessionRequest) + private static final com.google.bigtable.v2.OpenSessionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenSessionRequest(); + } + + public static com.google.bigtable.v2.OpenSessionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenSessionRequest 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.bigtable.v2.OpenSessionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequestOrBuilder.java new file mode 100644 index 0000000000..0ec579f66c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenSessionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenSessionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * A version indicator from the client stating its understanding of the
    +   * protocol. This is to disambiguate client behavior amidst changes in
    +   * semantic usage of the API, e.g. if the structure remains the same but
    +   * behavior changes.
    +   * 
    + * + * int64 protocol_version = 1; + * + * @return The protocolVersion. + */ + long getProtocolVersion(); + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return Whether the flags field is set. + */ + boolean hasFlags(); + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + * + * @return The flags. + */ + com.google.bigtable.v2.FeatureFlags getFlags(); + + /** + * + * + *
    +   * Client settings, including a record of
    +   * 
    + * + * .google.bigtable.v2.FeatureFlags flags = 2; + */ + com.google.bigtable.v2.FeatureFlagsOrBuilder getFlagsOrBuilder(); + + /** + * + * + *
    +   * Used for serverside observability.
    +   * 
    + * + * int64 consecutive_failed_connection_attempts = 3; + * + * @return The consecutiveFailedConnectionAttempts. + */ + long getConsecutiveFailedConnectionAttempts(); + + /** + * + * + *
    +   * How the request should be routed (if presented as part of a GOAWAY
    +   * from a previous session). Post V1.
    +   * 
    + * + * bytes routing_cookie = 4; + * + * @return The routingCookie. + */ + com.google.protobuf.ByteString getRoutingCookie(); + + /** + * + * + *
    +   * Can be Open{Table,AuthorizedView,MaterializedView}Request,
    +   * (or in post-V1, PrepareSqlQueryRequest)
    +   * 
    + * + * bytes payload = 5; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponse.java new file mode 100644 index 0000000000..241c47f12a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponse.java @@ -0,0 +1,801 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenSessionResponse} + */ +@com.google.protobuf.Generated +public final class OpenSessionResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenSessionResponse) + OpenSessionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenSessionResponse"); + } + + // Use OpenSessionResponse.newBuilder() to construct. + private OpenSessionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenSessionResponse() { + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenSessionResponse.class, + com.google.bigtable.v2.OpenSessionResponse.Builder.class); + } + + private int bitField0_; + public static final int BACKEND_FIELD_NUMBER = 2; + private com.google.bigtable.v2.BackendIdentifier backend_; + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return Whether the backend field is set. + */ + @java.lang.Override + public boolean hasBackend() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return The backend. + */ + @java.lang.Override + public com.google.bigtable.v2.BackendIdentifier getBackend() { + return backend_ == null + ? com.google.bigtable.v2.BackendIdentifier.getDefaultInstance() + : backend_; + } + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.BackendIdentifierOrBuilder getBackendOrBuilder() { + return backend_ == null + ? com.google.bigtable.v2.BackendIdentifier.getDefaultInstance() + : backend_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Can be Open{Table,AuthorizedView,MaterializedView}Response,
    +   * (or in post-V1, PrepareSqlQueryResponse)
    +   * 
    + * + * bytes payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return 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 (!payload_.isEmpty()) { + output.writeBytes(1, payload_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getBackend()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, payload_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackend()); + } + 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.bigtable.v2.OpenSessionResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenSessionResponse other = + (com.google.bigtable.v2.OpenSessionResponse) obj; + + if (hasBackend() != other.hasBackend()) return false; + if (hasBackend()) { + if (!getBackend().equals(other.getBackend())) return false; + } + 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(); + if (hasBackend()) { + hash = (37 * hash) + BACKEND_FIELD_NUMBER; + hash = (53 * hash) + getBackend().hashCode(); + } + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenSessionResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenSessionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionResponse 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.bigtable.v2.OpenSessionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenSessionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenSessionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionResponse 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.bigtable.v2.OpenSessionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionResponse 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.bigtable.v2.OpenSessionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenSessionResponse 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.bigtable.v2.OpenSessionResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenSessionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenSessionResponse) + com.google.bigtable.v2.OpenSessionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenSessionResponse.class, + com.google.bigtable.v2.OpenSessionResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenSessionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackendFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backend_ = null; + if (backendBuilder_ != null) { + backendBuilder_.dispose(); + backendBuilder_ = null; + } + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenSessionResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponse build() { + com.google.bigtable.v2.OpenSessionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponse buildPartial() { + com.google.bigtable.v2.OpenSessionResponse result = + new com.google.bigtable.v2.OpenSessionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.OpenSessionResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backend_ = backendBuilder_ == null ? backend_ : backendBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payload_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenSessionResponse) { + return mergeFrom((com.google.bigtable.v2.OpenSessionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenSessionResponse other) { + if (other == com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance()) return this; + if (other.hasBackend()) { + mergeBackend(other.getBackend()); + } + if (!other.getPayload().isEmpty()) { + setPayload(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: + { + payload_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetBackendFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.BackendIdentifier backend_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.BackendIdentifier, + com.google.bigtable.v2.BackendIdentifier.Builder, + com.google.bigtable.v2.BackendIdentifierOrBuilder> + backendBuilder_; + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return Whether the backend field is set. + */ + public boolean hasBackend() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return The backend. + */ + public com.google.bigtable.v2.BackendIdentifier getBackend() { + if (backendBuilder_ == null) { + return backend_ == null + ? com.google.bigtable.v2.BackendIdentifier.getDefaultInstance() + : backend_; + } else { + return backendBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public Builder setBackend(com.google.bigtable.v2.BackendIdentifier value) { + if (backendBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backend_ = value; + } else { + backendBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public Builder setBackend(com.google.bigtable.v2.BackendIdentifier.Builder builderForValue) { + if (backendBuilder_ == null) { + backend_ = builderForValue.build(); + } else { + backendBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public Builder mergeBackend(com.google.bigtable.v2.BackendIdentifier value) { + if (backendBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && backend_ != null + && backend_ != com.google.bigtable.v2.BackendIdentifier.getDefaultInstance()) { + getBackendBuilder().mergeFrom(value); + } else { + backend_ = value; + } + } else { + backendBuilder_.mergeFrom(value); + } + if (backend_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public Builder clearBackend() { + bitField0_ = (bitField0_ & ~0x00000001); + backend_ = null; + if (backendBuilder_ != null) { + backendBuilder_.dispose(); + backendBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public com.google.bigtable.v2.BackendIdentifier.Builder getBackendBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBackendFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + public com.google.bigtable.v2.BackendIdentifierOrBuilder getBackendOrBuilder() { + if (backendBuilder_ != null) { + return backendBuilder_.getMessageOrBuilder(); + } else { + return backend_ == null + ? com.google.bigtable.v2.BackendIdentifier.getDefaultInstance() + : backend_; + } + } + + /** + * + * + *
    +     * Information on the backend(s) that are hosting this session.
    +     * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.BackendIdentifier, + com.google.bigtable.v2.BackendIdentifier.Builder, + com.google.bigtable.v2.BackendIdentifierOrBuilder> + internalGetBackendFieldBuilder() { + if (backendBuilder_ == null) { + backendBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.BackendIdentifier, + com.google.bigtable.v2.BackendIdentifier.Builder, + com.google.bigtable.v2.BackendIdentifierOrBuilder>( + getBackend(), getParentForChildren(), isClean()); + backend_ = null; + } + return backendBuilder_; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Response,
    +     * (or in post-V1, PrepareSqlQueryResponse)
    +     * 
    + * + * bytes payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Response,
    +     * (or in post-V1, PrepareSqlQueryResponse)
    +     * 
    + * + * bytes payload = 1; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Can be Open{Table,AuthorizedView,MaterializedView}Response,
    +     * (or in post-V1, PrepareSqlQueryResponse)
    +     * 
    + * + * bytes payload = 1; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000002); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenSessionResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenSessionResponse) + private static final com.google.bigtable.v2.OpenSessionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenSessionResponse(); + } + + public static com.google.bigtable.v2.OpenSessionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenSessionResponse 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.bigtable.v2.OpenSessionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponseOrBuilder.java new file mode 100644 index 0000000000..c27747a340 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenSessionResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenSessionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenSessionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return Whether the backend field is set. + */ + boolean hasBackend(); + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + * + * @return The backend. + */ + com.google.bigtable.v2.BackendIdentifier getBackend(); + + /** + * + * + *
    +   * Information on the backend(s) that are hosting this session.
    +   * 
    + * + * .google.bigtable.v2.BackendIdentifier backend = 2; + */ + com.google.bigtable.v2.BackendIdentifierOrBuilder getBackendOrBuilder(); + + /** + * + * + *
    +   * Can be Open{Table,AuthorizedView,MaterializedView}Response,
    +   * (or in post-V1, PrepareSqlQueryResponse)
    +   * 
    + * + * bytes payload = 1; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequest.java new file mode 100644 index 0000000000..924a7926f4 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequest.java @@ -0,0 +1,938 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenTableRequest} + */ +@com.google.protobuf.Generated +public final class OpenTableRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenTableRequest) + OpenTableRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenTableRequest"); + } + + // Use OpenTableRequest.newBuilder() to construct. + private OpenTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenTableRequest() { + tableName_ = ""; + appProfileId_ = ""; + permission_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenTableRequest.class, + com.google.bigtable.v2.OpenTableRequest.Builder.class); + } + + /** Protobuf enum {@code google.bigtable.v2.OpenTableRequest.Permission} */ + public enum Permission implements com.google.protobuf.ProtocolMessageEnum { + /** PERMISSION_UNSET = 0; */ + PERMISSION_UNSET(0), + /** PERMISSION_READ = 1; */ + PERMISSION_READ(1), + /** PERMISSION_WRITE = 2; */ + PERMISSION_WRITE(2), + /** PERMISSION_READ_WRITE = 3; */ + PERMISSION_READ_WRITE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Permission"); + } + + /** PERMISSION_UNSET = 0; */ + public static final int PERMISSION_UNSET_VALUE = 0; + + /** PERMISSION_READ = 1; */ + public static final int PERMISSION_READ_VALUE = 1; + + /** PERMISSION_WRITE = 2; */ + public static final int PERMISSION_WRITE_VALUE = 2; + + /** PERMISSION_READ_WRITE = 3; */ + public static final int PERMISSION_READ_WRITE_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 Permission 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 Permission forNumber(int value) { + switch (value) { + case 0: + return PERMISSION_UNSET; + case 1: + return PERMISSION_READ; + case 2: + return PERMISSION_WRITE; + case 3: + return PERMISSION_READ_WRITE; + 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 Permission findValueByNumber(int number) { + return Permission.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.bigtable.v2.OpenTableRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final Permission[] VALUES = values(); + + public static Permission 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 Permission(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.OpenTableRequest.Permission) + } + + public static final int TABLE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tableName_ = ""; + + /** + * string table_name = 1; + * + * @return The tableName. + */ + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + 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(); + tableName_ = s; + return s; + } + } + + /** + * string table_name = 1; + * + * @return The bytes for tableName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + 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(); + appProfileId_ = s; + return s; + } + } + + /** + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 3; + private int permission_ = 0; + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenTableRequest.Permission getPermission() { + com.google.bigtable.v2.OpenTableRequest.Permission result = + com.google.bigtable.v2.OpenTableRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenTableRequest.Permission.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenTableRequest.Permission.PERMISSION_UNSET.getNumber()) { + output.writeEnum(3, permission_); + } + 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(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + if (permission_ + != com.google.bigtable.v2.OpenTableRequest.Permission.PERMISSION_UNSET.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, permission_); + } + 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.bigtable.v2.OpenTableRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenTableRequest other = (com.google.bigtable.v2.OpenTableRequest) obj; + + if (!getTableName().equals(other.getTableName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (permission_ != other.permission_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + permission_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenTableRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableRequest 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.bigtable.v2.OpenTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableRequest 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.bigtable.v2.OpenTableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableRequest 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.bigtable.v2.OpenTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableRequest 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.bigtable.v2.OpenTableRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenTableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenTableRequest) + com.google.bigtable.v2.OpenTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenTableRequest.class, + com.google.bigtable.v2.OpenTableRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenTableRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tableName_ = ""; + appProfileId_ = ""; + permission_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenTableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableRequest build() { + com.google.bigtable.v2.OpenTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableRequest buildPartial() { + com.google.bigtable.v2.OpenTableRequest result = + new com.google.bigtable.v2.OpenTableRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.OpenTableRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tableName_ = tableName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.permission_ = permission_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenTableRequest) { + return mergeFrom((com.google.bigtable.v2.OpenTableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenTableRequest other) { + if (other == com.google.bigtable.v2.OpenTableRequest.getDefaultInstance()) return this; + if (!other.getTableName().isEmpty()) { + tableName_ = other.tableName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.permission_ != 0) { + setPermissionValue(other.getPermissionValue()); + } + 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: + { + tableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + permission_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tableName_ = ""; + + /** + * string table_name = 1; + * + * @return The tableName. + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string table_name = 1; + * + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * 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(); + } + tableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * string table_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * 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); + tableName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * string app_profile_id = 2; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * string app_profile_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * string app_profile_id = 2; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int permission_ = 0; + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + @java.lang.Override + public int getPermissionValue() { + return permission_; + } + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @param value The enum numeric value on the wire for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionValue(int value) { + permission_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The permission. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenTableRequest.Permission getPermission() { + com.google.bigtable.v2.OpenTableRequest.Permission result = + com.google.bigtable.v2.OpenTableRequest.Permission.forNumber(permission_); + return result == null + ? com.google.bigtable.v2.OpenTableRequest.Permission.UNRECOGNIZED + : result; + } + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission(com.google.bigtable.v2.OpenTableRequest.Permission value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + permission_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return This builder for chaining. + */ + public Builder clearPermission() { + bitField0_ = (bitField0_ & ~0x00000004); + permission_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenTableRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenTableRequest) + private static final com.google.bigtable.v2.OpenTableRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenTableRequest(); + } + + public static com.google.bigtable.v2.OpenTableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenTableRequest 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.bigtable.v2.OpenTableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequestOrBuilder.java new file mode 100644 index 0000000000..968dc3a1db --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenTableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenTableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string table_name = 1; + * + * @return The tableName. + */ + java.lang.String getTableName(); + + /** + * string table_name = 1; + * + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString getTableNameBytes(); + + /** + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The enum numeric value on the wire for permission. + */ + int getPermissionValue(); + + /** + * .google.bigtable.v2.OpenTableRequest.Permission permission = 3; + * + * @return The permission. + */ + com.google.bigtable.v2.OpenTableRequest.Permission getPermission(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponse.java new file mode 100644 index 0000000000..a738487aef --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponse.java @@ -0,0 +1,394 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenTableResponse} + */ +@com.google.protobuf.Generated +public final class OpenTableResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.OpenTableResponse) + OpenTableResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OpenTableResponse"); + } + + // Use OpenTableResponse.newBuilder() to construct. + private OpenTableResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OpenTableResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenTableResponse.class, + com.google.bigtable.v2.OpenTableResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.OpenTableResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.OpenTableResponse other = (com.google.bigtable.v2.OpenTableResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.OpenTableResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableResponse 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.bigtable.v2.OpenTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.OpenTableResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.OpenTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableResponse 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.bigtable.v2.OpenTableResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableResponse 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.bigtable.v2.OpenTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.OpenTableResponse 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.bigtable.v2.OpenTableResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.OpenTableResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.OpenTableResponse) + com.google.bigtable.v2.OpenTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.OpenTableResponse.class, + com.google.bigtable.v2.OpenTableResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.OpenTableResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_OpenTableResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.OpenTableResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableResponse build() { + com.google.bigtable.v2.OpenTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.OpenTableResponse buildPartial() { + com.google.bigtable.v2.OpenTableResponse result = + new com.google.bigtable.v2.OpenTableResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.OpenTableResponse) { + return mergeFrom((com.google.bigtable.v2.OpenTableResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.OpenTableResponse other) { + if (other == com.google.bigtable.v2.OpenTableResponse.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.OpenTableResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.OpenTableResponse) + private static final com.google.bigtable.v2.OpenTableResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.OpenTableResponse(); + } + + public static com.google.bigtable.v2.OpenTableResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenTableResponse 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.bigtable.v2.OpenTableResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponseOrBuilder.java new file mode 100644 index 0000000000..2f872a59f9 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/OpenTableResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface OpenTableResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.OpenTableResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java index d63c94777c..ca2dd85f01 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -24,19 +25,61 @@ * *
      * A partial result set from the streaming query API.
    - * CBT client will buffer partial_rows from result_sets until it gets a
    - * resumption_token.
    + * Cloud Bigtable clients buffer partial results received in this message until
    + * a `resume_token` is received.
    + *
    + * The pseudocode below describes how to buffer and parse a stream of
    + * `PartialResultSet` messages.
    + *
    + * Having:
    + * - queue of row results waiting to be returned `queue`
    + * - extensible buffer of bytes `buffer`
    + * - a place to keep track of the most recent `resume_token`
    + * for each PartialResultSet `p` received {
    + * if p.reset {
    + * ensure `queue` is empty
    + * ensure `buffer` is empty
    + * }
    + * if p.estimated_batch_size != 0 {
    + * (optional) ensure `buffer` is sized to at least `p.estimated_batch_size`
    + * }
    + * if `p.proto_rows_batch` is set {
    + * append `p.proto_rows_batch.bytes` to `buffer`
    + * }
    + * if p.batch_checksum is set and `buffer` is not empty {
    + * validate the checksum matches the contents of `buffer`
    + * (see comments on `batch_checksum`)
    + * parse `buffer` as `ProtoRows` message, clearing `buffer`
    + * add parsed rows to end of `queue`
    + * }
    + * if p.resume_token is set {
    + * release results in `queue`
    + * save `p.resume_token` in `resume_token`
    + * }
    + * }
      * 
    * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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); } @@ -44,19 +87,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_PartialResultSet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable @@ -65,6 +102,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.PartialResultSet.Builder.class); } + private int bitField0_; private int partialRowsCase_ = 0; @SuppressWarnings("serial") @@ -81,6 +119,7 @@ public enum PartialRowsCase private PartialRowsCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -112,6 +151,7 @@ public PartialRowsCase getPartialRowsCase() { } public static final int PROTO_ROWS_BATCH_FIELD_NUMBER = 3; + /** * * @@ -127,6 +167,7 @@ public PartialRowsCase getPartialRowsCase() { public boolean hasProtoRowsBatch() { return partialRowsCase_ == 3; } + /** * * @@ -145,6 +186,7 @@ public com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch() { } return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); } + /** * * @@ -162,30 +204,100 @@ public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); } + public static final int BATCH_CHECKSUM_FIELD_NUMBER = 6; + private int batchChecksum_ = 0; + + /** + * + * + *
    +   * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +   *
    +   * When present, the buffered data from `partial_rows` forms a complete
    +   * parseable message of the appropriate type.
    +   *
    +   * The client should mark the end of a parseable message and prepare to
    +   * receive a new one starting from the next `PartialResultSet` message.
    +   * Clients must verify the checksum of the serialized batch before yielding it
    +   * to the caller.
    +   *
    +   * This does NOT mean the values can be yielded to the callers since a
    +   * `resume_token` is required to safely do so.
    +   *
    +   * If `resume_token` is non-empty and any data has been received since the
    +   * last one, this field is guaranteed to be non-empty. In other words, clients
    +   * may assume that a batch will never cross a `resume_token` boundary.
    +   * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return Whether the batchChecksum field is set. + */ + @java.lang.Override + public boolean hasBatchChecksum() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +   *
    +   * When present, the buffered data from `partial_rows` forms a complete
    +   * parseable message of the appropriate type.
    +   *
    +   * The client should mark the end of a parseable message and prepare to
    +   * receive a new one starting from the next `PartialResultSet` message.
    +   * Clients must verify the checksum of the serialized batch before yielding it
    +   * to the caller.
    +   *
    +   * This does NOT mean the values can be yielded to the callers since a
    +   * `resume_token` is required to safely do so.
    +   *
    +   * If `resume_token` is non-empty and any data has been received since the
    +   * last one, this field is guaranteed to be non-empty. In other words, clients
    +   * may assume that a batch will never cross a `resume_token` boundary.
    +   * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return The batchChecksum. + */ + @java.lang.Override + public int getBatchChecksum() { + return batchChecksum_; + } + public static final int RESUME_TOKEN_FIELD_NUMBER = 5; private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
        * An opaque token sent by the server to allow query resumption and signal
    -   * the client to accumulate `partial_rows` since the last non-empty
    -   * `resume_token`. On resumption, the resumed query will return the remaining
    -   * rows for this query.
    +   * that the buffered values constructed from received `partial_rows` can be
    +   * yielded to the caller. Clients can provide this token in a subsequent
    +   * request to resume the result stream from the current point.
    +   *
    +   * When `resume_token` is non-empty, the buffered values received from
    +   * `partial_rows` since the last non-empty `resume_token` can be yielded to
    +   * the callers, provided that the client keeps the value of `resume_token` and
    +   * uses it on subsequent retries.
        *
    -   * If there is a batch in progress, a non-empty `resume_token`
    -   * means that that the batch of `partial_rows` will be complete after merging
    -   * the `partial_rows` from this response. The client must only yield
    -   * completed batches to the application, and must ensure that any future
    -   * retries send the latest token to avoid returning duplicate data.
    +   * A `resume_token` may be sent without information in `partial_rows` to
    +   * checkpoint the progress of a sparse query. Any previous `partial_rows` data
    +   * should still be yielded in this case, and the new `resume_token` should be
    +   * saved for future retries as normal.
        *
    -   * The server may set 'resume_token' without a 'partial_rows'. If there is a
    -   * batch in progress the client should yield it.
    +   * A `resume_token` will only be sent on a boundary where there is either no
    +   * ongoing result batch, or `batch_checksum` is also populated.
        *
        * The server will also send a sentinel `resume_token` when last batch of
        * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with
        * the sentinel `resume_token`, the server will emit it again without any
    -   * `partial_rows`, then return OK.
    +   * data in `partial_rows`, then return OK.
        * 
    * * bytes resume_token = 5; @@ -197,20 +309,42 @@ public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } + public static final int RESET_FIELD_NUMBER = 7; + private boolean reset_ = false; + + /** + * + * + *
    +   * If `true`, any data buffered since the last non-empty `resume_token` must
    +   * be discarded before the other parts of this message, if any, are handled.
    +   * 
    + * + * bool reset = 7; + * + * @return The reset. + */ + @java.lang.Override + public boolean getReset() { + return reset_; + } + public static final int ESTIMATED_BATCH_SIZE_FIELD_NUMBER = 4; private int estimatedBatchSize_ = 0; + /** * * *
    -   * Estimated size of a new batch. The server will always set this when
    -   * returning the first `partial_rows` of a batch, and will not set it at any
    -   * other time.
    +   * Estimated size of the buffer required to hold the next batch of results.
    +   *
    +   * This value will be sent with the first `partial_rows` of a batch. That is,
    +   * on the first `partial_rows` received in a stream, on the first message
    +   * after a `batch_checksum` message, and any time `reset` is true.
        *
    -   * The client can use this estimate to allocate an initial buffer for the
    -   * batched results. This helps minimize the number of allocations required,
    -   * though the buffer size may still need to be increased if the estimate is
    -   * too low.
    +   * The client can use this estimate to allocate a buffer for the next batch of
    +   * results. This helps minimize the number of allocations required, though the
    +   * buffer size may still need to be increased if the estimate is too low.
        * 
    * * int32 estimated_batch_size = 4; @@ -245,6 +379,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!resumeToken_.isEmpty()) { output.writeBytes(5, resumeToken_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeUInt32(6, batchChecksum_); + } + if (reset_ != false) { + output.writeBool(7, reset_); + } getUnknownFields().writeTo(output); } @@ -265,6 +405,12 @@ public int getSerializedSize() { if (!resumeToken_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, resumeToken_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, batchChecksum_); + } + if (reset_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, reset_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -280,7 +426,12 @@ public boolean equals(final java.lang.Object obj) { } com.google.bigtable.v2.PartialResultSet other = (com.google.bigtable.v2.PartialResultSet) obj; + if (hasBatchChecksum() != other.hasBatchChecksum()) return false; + if (hasBatchChecksum()) { + if (getBatchChecksum() != other.getBatchChecksum()) return false; + } if (!getResumeToken().equals(other.getResumeToken())) return false; + if (getReset() != other.getReset()) return false; if (getEstimatedBatchSize() != other.getEstimatedBatchSize()) return false; if (!getPartialRowsCase().equals(other.getPartialRowsCase())) return false; switch (partialRowsCase_) { @@ -301,8 +452,14 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBatchChecksum()) { + hash = (37 * hash) + BATCH_CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getBatchChecksum(); + } hash = (37 * hash) + RESUME_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getResumeToken().hashCode(); + hash = (37 * hash) + RESET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReset()); hash = (37 * hash) + ESTIMATED_BATCH_SIZE_FIELD_NUMBER; hash = (53 * hash) + getEstimatedBatchSize(); switch (partialRowsCase_) { @@ -355,38 +512,38 @@ public static com.google.bigtable.v2.PartialResultSet parseFrom( public static com.google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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); } @@ -409,22 +566,53 @@ 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; } + /** * * *
        * A partial result set from the streaming query API.
    -   * CBT client will buffer partial_rows from result_sets until it gets a
    -   * resumption_token.
    +   * Cloud Bigtable clients buffer partial results received in this message until
    +   * a `resume_token` is received.
    +   *
    +   * The pseudocode below describes how to buffer and parse a stream of
    +   * `PartialResultSet` messages.
    +   *
    +   * Having:
    +   * - queue of row results waiting to be returned `queue`
    +   * - extensible buffer of bytes `buffer`
    +   * - a place to keep track of the most recent `resume_token`
    +   * for each PartialResultSet `p` received {
    +   * if p.reset {
    +   * ensure `queue` is empty
    +   * ensure `buffer` is empty
    +   * }
    +   * if p.estimated_batch_size != 0 {
    +   * (optional) ensure `buffer` is sized to at least `p.estimated_batch_size`
    +   * }
    +   * if `p.proto_rows_batch` is set {
    +   * append `p.proto_rows_batch.bytes` to `buffer`
    +   * }
    +   * if p.batch_checksum is set and `buffer` is not empty {
    +   * validate the checksum matches the contents of `buffer`
    +   * (see comments on `batch_checksum`)
    +   * parse `buffer` as `ProtoRows` message, clearing `buffer`
    +   * add parsed rows to end of `queue`
    +   * }
    +   * if p.resume_token is set {
    +   * release results in `queue`
    +   * save `p.resume_token` in `resume_token`
    +   * }
    +   * }
        * 
    * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.PartialResultSet) com.google.bigtable.v2.PartialResultSetOrBuilder { @@ -434,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_PartialResultSet_fieldAccessorTable @@ -446,7 +634,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.PartialResultSet.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -457,7 +645,9 @@ public Builder clear() { if (protoRowsBatchBuilder_ != null) { protoRowsBatchBuilder_.clear(); } + batchChecksum_ = 0; resumeToken_ = com.google.protobuf.ByteString.EMPTY; + reset_ = false; estimatedBatchSize_ = 0; partialRowsCase_ = 0; partialRows_ = null; @@ -498,12 +688,21 @@ public com.google.bigtable.v2.PartialResultSet buildPartial() { private void buildPartial0(com.google.bigtable.v2.PartialResultSet result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.resumeToken_ = resumeToken_; + result.batchChecksum_ = batchChecksum_; + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.resumeToken_ = resumeToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.reset_ = reset_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.estimatedBatchSize_ = estimatedBatchSize_; } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.bigtable.v2.PartialResultSet result) { @@ -514,39 +713,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.PartialResultSet 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.bigtable.v2.PartialResultSet) { @@ -559,9 +725,15 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.PartialResultSet other) { if (other == com.google.bigtable.v2.PartialResultSet.getDefaultInstance()) return this; - if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { + if (other.hasBatchChecksum()) { + setBatchChecksum(other.getBatchChecksum()); + } + if (!other.getResumeToken().isEmpty()) { setResumeToken(other.getResumeToken()); } + if (other.getReset() != false) { + setReset(other.getReset()); + } if (other.getEstimatedBatchSize() != 0) { setEstimatedBatchSize(other.getEstimatedBatchSize()); } @@ -604,22 +776,35 @@ public Builder mergeFrom( break; case 26: { - input.readMessage(getProtoRowsBatchFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProtoRowsBatchFieldBuilder().getBuilder(), extensionRegistry); partialRowsCase_ = 3; break; } // case 26 case 32: { estimatedBatchSize_ = input.readInt32(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; break; } // case 32 case 42: { resumeToken_ = input.readBytes(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 42 + case 48: + { + batchChecksum_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 48 + case 56: + { + reset_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 56 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -653,11 +838,12 @@ public Builder clearPartialRows() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoRowsBatch, com.google.bigtable.v2.ProtoRowsBatch.Builder, com.google.bigtable.v2.ProtoRowsBatchOrBuilder> protoRowsBatchBuilder_; + /** * * @@ -673,6 +859,7 @@ public Builder clearPartialRows() { public boolean hasProtoRowsBatch() { return partialRowsCase_ == 3; } + /** * * @@ -698,6 +885,7 @@ public com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch() { return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); } } + /** * * @@ -720,6 +908,7 @@ public Builder setProtoRowsBatch(com.google.bigtable.v2.ProtoRowsBatch value) { partialRowsCase_ = 3; return this; } + /** * * @@ -740,6 +929,7 @@ public Builder setProtoRowsBatch( partialRowsCase_ = 3; return this; } + /** * * @@ -772,6 +962,7 @@ public Builder mergeProtoRowsBatch(com.google.bigtable.v2.ProtoRowsBatch value) partialRowsCase_ = 3; return this; } + /** * * @@ -797,6 +988,7 @@ public Builder clearProtoRowsBatch() { } return this; } + /** * * @@ -807,8 +999,9 @@ public Builder clearProtoRowsBatch() { * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; */ public com.google.bigtable.v2.ProtoRowsBatch.Builder getProtoRowsBatchBuilder() { - return getProtoRowsBatchFieldBuilder().getBuilder(); + return internalGetProtoRowsBatchFieldBuilder().getBuilder(); } + /** * * @@ -829,6 +1022,7 @@ public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder return com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); } } + /** * * @@ -838,17 +1032,17 @@ public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder * * .google.bigtable.v2.ProtoRowsBatch proto_rows_batch = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoRowsBatch, com.google.bigtable.v2.ProtoRowsBatch.Builder, com.google.bigtable.v2.ProtoRowsBatchOrBuilder> - getProtoRowsBatchFieldBuilder() { + internalGetProtoRowsBatchFieldBuilder() { if (protoRowsBatchBuilder_ == null) { if (!(partialRowsCase_ == 3)) { partialRows_ = com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance(); } protoRowsBatchBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoRowsBatch, com.google.bigtable.v2.ProtoRowsBatch.Builder, com.google.bigtable.v2.ProtoRowsBatchOrBuilder>( @@ -862,29 +1056,166 @@ public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder return protoRowsBatchBuilder_; } + private int batchChecksum_; + + /** + * + * + *
    +     * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +     *
    +     * When present, the buffered data from `partial_rows` forms a complete
    +     * parseable message of the appropriate type.
    +     *
    +     * The client should mark the end of a parseable message and prepare to
    +     * receive a new one starting from the next `PartialResultSet` message.
    +     * Clients must verify the checksum of the serialized batch before yielding it
    +     * to the caller.
    +     *
    +     * This does NOT mean the values can be yielded to the callers since a
    +     * `resume_token` is required to safely do so.
    +     *
    +     * If `resume_token` is non-empty and any data has been received since the
    +     * last one, this field is guaranteed to be non-empty. In other words, clients
    +     * may assume that a batch will never cross a `resume_token` boundary.
    +     * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return Whether the batchChecksum field is set. + */ + @java.lang.Override + public boolean hasBatchChecksum() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +     *
    +     * When present, the buffered data from `partial_rows` forms a complete
    +     * parseable message of the appropriate type.
    +     *
    +     * The client should mark the end of a parseable message and prepare to
    +     * receive a new one starting from the next `PartialResultSet` message.
    +     * Clients must verify the checksum of the serialized batch before yielding it
    +     * to the caller.
    +     *
    +     * This does NOT mean the values can be yielded to the callers since a
    +     * `resume_token` is required to safely do so.
    +     *
    +     * If `resume_token` is non-empty and any data has been received since the
    +     * last one, this field is guaranteed to be non-empty. In other words, clients
    +     * may assume that a batch will never cross a `resume_token` boundary.
    +     * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return The batchChecksum. + */ + @java.lang.Override + public int getBatchChecksum() { + return batchChecksum_; + } + + /** + * + * + *
    +     * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +     *
    +     * When present, the buffered data from `partial_rows` forms a complete
    +     * parseable message of the appropriate type.
    +     *
    +     * The client should mark the end of a parseable message and prepare to
    +     * receive a new one starting from the next `PartialResultSet` message.
    +     * Clients must verify the checksum of the serialized batch before yielding it
    +     * to the caller.
    +     *
    +     * This does NOT mean the values can be yielded to the callers since a
    +     * `resume_token` is required to safely do so.
    +     *
    +     * If `resume_token` is non-empty and any data has been received since the
    +     * last one, this field is guaranteed to be non-empty. In other words, clients
    +     * may assume that a batch will never cross a `resume_token` boundary.
    +     * 
    + * + * optional uint32 batch_checksum = 6; + * + * @param value The batchChecksum to set. + * @return This builder for chaining. + */ + public Builder setBatchChecksum(int value) { + + batchChecksum_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +     *
    +     * When present, the buffered data from `partial_rows` forms a complete
    +     * parseable message of the appropriate type.
    +     *
    +     * The client should mark the end of a parseable message and prepare to
    +     * receive a new one starting from the next `PartialResultSet` message.
    +     * Clients must verify the checksum of the serialized batch before yielding it
    +     * to the caller.
    +     *
    +     * This does NOT mean the values can be yielded to the callers since a
    +     * `resume_token` is required to safely do so.
    +     *
    +     * If `resume_token` is non-empty and any data has been received since the
    +     * last one, this field is guaranteed to be non-empty. In other words, clients
    +     * may assume that a batch will never cross a `resume_token` boundary.
    +     * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return This builder for chaining. + */ + public Builder clearBatchChecksum() { + bitField0_ = (bitField0_ & ~0x00000002); + batchChecksum_ = 0; + onChanged(); + return this; + } + private com.google.protobuf.ByteString resumeToken_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
          * An opaque token sent by the server to allow query resumption and signal
    -     * the client to accumulate `partial_rows` since the last non-empty
    -     * `resume_token`. On resumption, the resumed query will return the remaining
    -     * rows for this query.
    +     * that the buffered values constructed from received `partial_rows` can be
    +     * yielded to the caller. Clients can provide this token in a subsequent
    +     * request to resume the result stream from the current point.
    +     *
    +     * When `resume_token` is non-empty, the buffered values received from
    +     * `partial_rows` since the last non-empty `resume_token` can be yielded to
    +     * the callers, provided that the client keeps the value of `resume_token` and
    +     * uses it on subsequent retries.
          *
    -     * If there is a batch in progress, a non-empty `resume_token`
    -     * means that that the batch of `partial_rows` will be complete after merging
    -     * the `partial_rows` from this response. The client must only yield
    -     * completed batches to the application, and must ensure that any future
    -     * retries send the latest token to avoid returning duplicate data.
    +     * A `resume_token` may be sent without information in `partial_rows` to
    +     * checkpoint the progress of a sparse query. Any previous `partial_rows` data
    +     * should still be yielded in this case, and the new `resume_token` should be
    +     * saved for future retries as normal.
          *
    -     * The server may set 'resume_token' without a 'partial_rows'. If there is a
    -     * batch in progress the client should yield it.
    +     * A `resume_token` will only be sent on a boundary where there is either no
    +     * ongoing result batch, or `batch_checksum` is also populated.
          *
          * The server will also send a sentinel `resume_token` when last batch of
          * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with
          * the sentinel `resume_token`, the server will emit it again without any
    -     * `partial_rows`, then return OK.
    +     * data in `partial_rows`, then return OK.
          * 
    * * bytes resume_token = 5; @@ -895,28 +1226,33 @@ public com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } + /** * * *
          * An opaque token sent by the server to allow query resumption and signal
    -     * the client to accumulate `partial_rows` since the last non-empty
    -     * `resume_token`. On resumption, the resumed query will return the remaining
    -     * rows for this query.
    +     * that the buffered values constructed from received `partial_rows` can be
    +     * yielded to the caller. Clients can provide this token in a subsequent
    +     * request to resume the result stream from the current point.
    +     *
    +     * When `resume_token` is non-empty, the buffered values received from
    +     * `partial_rows` since the last non-empty `resume_token` can be yielded to
    +     * the callers, provided that the client keeps the value of `resume_token` and
    +     * uses it on subsequent retries.
          *
    -     * If there is a batch in progress, a non-empty `resume_token`
    -     * means that that the batch of `partial_rows` will be complete after merging
    -     * the `partial_rows` from this response. The client must only yield
    -     * completed batches to the application, and must ensure that any future
    -     * retries send the latest token to avoid returning duplicate data.
    +     * A `resume_token` may be sent without information in `partial_rows` to
    +     * checkpoint the progress of a sparse query. Any previous `partial_rows` data
    +     * should still be yielded in this case, and the new `resume_token` should be
    +     * saved for future retries as normal.
          *
    -     * The server may set 'resume_token' without a 'partial_rows'. If there is a
    -     * batch in progress the client should yield it.
    +     * A `resume_token` will only be sent on a boundary where there is either no
    +     * ongoing result batch, or `batch_checksum` is also populated.
          *
          * The server will also send a sentinel `resume_token` when last batch of
          * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with
          * the sentinel `resume_token`, the server will emit it again without any
    -     * `partial_rows`, then return OK.
    +     * data in `partial_rows`, then return OK.
          * 
    * * bytes resume_token = 5; @@ -929,32 +1265,37 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { throw new NullPointerException(); } resumeToken_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } + /** * * *
          * An opaque token sent by the server to allow query resumption and signal
    -     * the client to accumulate `partial_rows` since the last non-empty
    -     * `resume_token`. On resumption, the resumed query will return the remaining
    -     * rows for this query.
    +     * that the buffered values constructed from received `partial_rows` can be
    +     * yielded to the caller. Clients can provide this token in a subsequent
    +     * request to resume the result stream from the current point.
          *
    -     * If there is a batch in progress, a non-empty `resume_token`
    -     * means that that the batch of `partial_rows` will be complete after merging
    -     * the `partial_rows` from this response. The client must only yield
    -     * completed batches to the application, and must ensure that any future
    -     * retries send the latest token to avoid returning duplicate data.
    +     * When `resume_token` is non-empty, the buffered values received from
    +     * `partial_rows` since the last non-empty `resume_token` can be yielded to
    +     * the callers, provided that the client keeps the value of `resume_token` and
    +     * uses it on subsequent retries.
          *
    -     * The server may set 'resume_token' without a 'partial_rows'. If there is a
    -     * batch in progress the client should yield it.
    +     * A `resume_token` may be sent without information in `partial_rows` to
    +     * checkpoint the progress of a sparse query. Any previous `partial_rows` data
    +     * should still be yielded in this case, and the new `resume_token` should be
    +     * saved for future retries as normal.
    +     *
    +     * A `resume_token` will only be sent on a boundary where there is either no
    +     * ongoing result batch, or `batch_checksum` is also populated.
          *
          * The server will also send a sentinel `resume_token` when last batch of
          * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with
          * the sentinel `resume_token`, the server will emit it again without any
    -     * `partial_rows`, then return OK.
    +     * data in `partial_rows`, then return OK.
          * 
    * * bytes resume_token = 5; @@ -962,25 +1303,86 @@ public Builder setResumeToken(com.google.protobuf.ByteString value) { * @return This builder for chaining. */ public Builder clearResumeToken() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); resumeToken_ = getDefaultInstance().getResumeToken(); onChanged(); return this; } + private boolean reset_; + + /** + * + * + *
    +     * If `true`, any data buffered since the last non-empty `resume_token` must
    +     * be discarded before the other parts of this message, if any, are handled.
    +     * 
    + * + * bool reset = 7; + * + * @return The reset. + */ + @java.lang.Override + public boolean getReset() { + return reset_; + } + + /** + * + * + *
    +     * If `true`, any data buffered since the last non-empty `resume_token` must
    +     * be discarded before the other parts of this message, if any, are handled.
    +     * 
    + * + * bool reset = 7; + * + * @param value The reset to set. + * @return This builder for chaining. + */ + public Builder setReset(boolean value) { + + reset_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * If `true`, any data buffered since the last non-empty `resume_token` must
    +     * be discarded before the other parts of this message, if any, are handled.
    +     * 
    + * + * bool reset = 7; + * + * @return This builder for chaining. + */ + public Builder clearReset() { + bitField0_ = (bitField0_ & ~0x00000008); + reset_ = false; + onChanged(); + return this; + } + private int estimatedBatchSize_; + /** * * *
    -     * Estimated size of a new batch. The server will always set this when
    -     * returning the first `partial_rows` of a batch, and will not set it at any
    -     * other time.
    -     *
    -     * The client can use this estimate to allocate an initial buffer for the
    -     * batched results. This helps minimize the number of allocations required,
    -     * though the buffer size may still need to be increased if the estimate is
    -     * too low.
    +     * Estimated size of the buffer required to hold the next batch of results.
    +     *
    +     * This value will be sent with the first `partial_rows` of a batch. That is,
    +     * on the first `partial_rows` received in a stream, on the first message
    +     * after a `batch_checksum` message, and any time `reset` is true.
    +     *
    +     * The client can use this estimate to allocate a buffer for the next batch of
    +     * results. This helps minimize the number of allocations required, though the
    +     * buffer size may still need to be increased if the estimate is too low.
          * 
    * * int32 estimated_batch_size = 4; @@ -991,18 +1393,20 @@ public Builder clearResumeToken() { public int getEstimatedBatchSize() { return estimatedBatchSize_; } + /** * * *
    -     * Estimated size of a new batch. The server will always set this when
    -     * returning the first `partial_rows` of a batch, and will not set it at any
    -     * other time.
    -     *
    -     * The client can use this estimate to allocate an initial buffer for the
    -     * batched results. This helps minimize the number of allocations required,
    -     * though the buffer size may still need to be increased if the estimate is
    -     * too low.
    +     * Estimated size of the buffer required to hold the next batch of results.
    +     *
    +     * This value will be sent with the first `partial_rows` of a batch. That is,
    +     * on the first `partial_rows` received in a stream, on the first message
    +     * after a `batch_checksum` message, and any time `reset` is true.
    +     *
    +     * The client can use this estimate to allocate a buffer for the next batch of
    +     * results. This helps minimize the number of allocations required, though the
    +     * buffer size may still need to be increased if the estimate is too low.
          * 
    * * int32 estimated_batch_size = 4; @@ -1013,22 +1417,24 @@ public int getEstimatedBatchSize() { public Builder setEstimatedBatchSize(int value) { estimatedBatchSize_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } + /** * * *
    -     * Estimated size of a new batch. The server will always set this when
    -     * returning the first `partial_rows` of a batch, and will not set it at any
    -     * other time.
    -     *
    -     * The client can use this estimate to allocate an initial buffer for the
    -     * batched results. This helps minimize the number of allocations required,
    -     * though the buffer size may still need to be increased if the estimate is
    -     * too low.
    +     * Estimated size of the buffer required to hold the next batch of results.
    +     *
    +     * This value will be sent with the first `partial_rows` of a batch. That is,
    +     * on the first `partial_rows` received in a stream, on the first message
    +     * after a `batch_checksum` message, and any time `reset` is true.
    +     *
    +     * The client can use this estimate to allocate a buffer for the next batch of
    +     * results. This helps minimize the number of allocations required, though the
    +     * buffer size may still need to be increased if the estimate is too low.
          * 
    * * int32 estimated_batch_size = 4; @@ -1036,23 +1442,12 @@ public Builder setEstimatedBatchSize(int value) { * @return This builder for chaining. */ public Builder clearEstimatedBatchSize() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); estimatedBatchSize_ = 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.bigtable.v2.PartialResultSet) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSetOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSetOrBuilder.java index 90191f0eb5..b0f0454d61 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSetOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PartialResultSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface PartialResultSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PartialResultSet) @@ -36,6 +38,7 @@ public interface PartialResultSetOrBuilder * @return Whether the protoRowsBatch field is set. */ boolean hasProtoRowsBatch(); + /** * * @@ -48,6 +51,7 @@ public interface PartialResultSetOrBuilder * @return The protoRowsBatch. */ com.google.bigtable.v2.ProtoRowsBatch getProtoRowsBatch(); + /** * * @@ -59,28 +63,88 @@ public interface PartialResultSetOrBuilder */ com.google.bigtable.v2.ProtoRowsBatchOrBuilder getProtoRowsBatchOrBuilder(); + /** + * + * + *
    +   * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +   *
    +   * When present, the buffered data from `partial_rows` forms a complete
    +   * parseable message of the appropriate type.
    +   *
    +   * The client should mark the end of a parseable message and prepare to
    +   * receive a new one starting from the next `PartialResultSet` message.
    +   * Clients must verify the checksum of the serialized batch before yielding it
    +   * to the caller.
    +   *
    +   * This does NOT mean the values can be yielded to the callers since a
    +   * `resume_token` is required to safely do so.
    +   *
    +   * If `resume_token` is non-empty and any data has been received since the
    +   * last one, this field is guaranteed to be non-empty. In other words, clients
    +   * may assume that a batch will never cross a `resume_token` boundary.
    +   * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return Whether the batchChecksum field is set. + */ + boolean hasBatchChecksum(); + + /** + * + * + *
    +   * CRC32C checksum of concatenated `partial_rows` data for the current batch.
    +   *
    +   * When present, the buffered data from `partial_rows` forms a complete
    +   * parseable message of the appropriate type.
    +   *
    +   * The client should mark the end of a parseable message and prepare to
    +   * receive a new one starting from the next `PartialResultSet` message.
    +   * Clients must verify the checksum of the serialized batch before yielding it
    +   * to the caller.
    +   *
    +   * This does NOT mean the values can be yielded to the callers since a
    +   * `resume_token` is required to safely do so.
    +   *
    +   * If `resume_token` is non-empty and any data has been received since the
    +   * last one, this field is guaranteed to be non-empty. In other words, clients
    +   * may assume that a batch will never cross a `resume_token` boundary.
    +   * 
    + * + * optional uint32 batch_checksum = 6; + * + * @return The batchChecksum. + */ + int getBatchChecksum(); + /** * * *
        * An opaque token sent by the server to allow query resumption and signal
    -   * the client to accumulate `partial_rows` since the last non-empty
    -   * `resume_token`. On resumption, the resumed query will return the remaining
    -   * rows for this query.
    +   * that the buffered values constructed from received `partial_rows` can be
    +   * yielded to the caller. Clients can provide this token in a subsequent
    +   * request to resume the result stream from the current point.
        *
    -   * If there is a batch in progress, a non-empty `resume_token`
    -   * means that that the batch of `partial_rows` will be complete after merging
    -   * the `partial_rows` from this response. The client must only yield
    -   * completed batches to the application, and must ensure that any future
    -   * retries send the latest token to avoid returning duplicate data.
    +   * When `resume_token` is non-empty, the buffered values received from
    +   * `partial_rows` since the last non-empty `resume_token` can be yielded to
    +   * the callers, provided that the client keeps the value of `resume_token` and
    +   * uses it on subsequent retries.
        *
    -   * The server may set 'resume_token' without a 'partial_rows'. If there is a
    -   * batch in progress the client should yield it.
    +   * A `resume_token` may be sent without information in `partial_rows` to
    +   * checkpoint the progress of a sparse query. Any previous `partial_rows` data
    +   * should still be yielded in this case, and the new `resume_token` should be
    +   * saved for future retries as normal.
    +   *
    +   * A `resume_token` will only be sent on a boundary where there is either no
    +   * ongoing result batch, or `batch_checksum` is also populated.
        *
        * The server will also send a sentinel `resume_token` when last batch of
        * `partial_rows` is sent. If the client retries the ExecuteQueryRequest with
        * the sentinel `resume_token`, the server will emit it again without any
    -   * `partial_rows`, then return OK.
    +   * data in `partial_rows`, then return OK.
        * 
    * * bytes resume_token = 5; @@ -93,14 +157,29 @@ public interface PartialResultSetOrBuilder * * *
    -   * Estimated size of a new batch. The server will always set this when
    -   * returning the first `partial_rows` of a batch, and will not set it at any
    -   * other time.
    -   *
    -   * The client can use this estimate to allocate an initial buffer for the
    -   * batched results. This helps minimize the number of allocations required,
    -   * though the buffer size may still need to be increased if the estimate is
    -   * too low.
    +   * If `true`, any data buffered since the last non-empty `resume_token` must
    +   * be discarded before the other parts of this message, if any, are handled.
    +   * 
    + * + * bool reset = 7; + * + * @return The reset. + */ + boolean getReset(); + + /** + * + * + *
    +   * Estimated size of the buffer required to hold the next batch of results.
    +   *
    +   * This value will be sent with the first `partial_rows` of a batch. That is,
    +   * on the first `partial_rows` received in a stream, on the first message
    +   * after a `batch_checksum` message, and any time `reset` is true.
    +   *
    +   * The client can use this estimate to allocate a buffer for the next batch of
    +   * results. This helps minimize the number of allocations required, though the
    +   * buffer size may still need to be increased if the estimate is too low.
        * 
    * * int32 estimated_batch_size = 4; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfo.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfo.java new file mode 100644 index 0000000000..60d7fd2655 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfo.java @@ -0,0 +1,1616 @@ +/* + * Copyright 2026 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/bigtable/v2/peer_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * PeerInfo contains information about the peer that the client is
    + * connecting to.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.PeerInfo} + */ +@com.google.protobuf.Generated +public final class PeerInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PeerInfo) + PeerInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PeerInfo"); + } + + // Use PeerInfo.newBuilder() to construct. + private PeerInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PeerInfo() { + applicationFrontendRegion_ = ""; + applicationFrontendZone_ = ""; + applicationFrontendSubzone_ = ""; + transportType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.PeerInfoProto + .internal_static_google_bigtable_v2_PeerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.PeerInfoProto + .internal_static_google_bigtable_v2_PeerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PeerInfo.class, com.google.bigtable.v2.PeerInfo.Builder.class); + } + + /** + * + * + *
    +   * The transport type that the client used to connect to this peer.
    +   * 
    + * + * Protobuf enum {@code google.bigtable.v2.PeerInfo.TransportType} + */ + public enum TransportType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * The transport type is unknown.
    +     * 
    + * + * TRANSPORT_TYPE_UNKNOWN = 0; + */ + TRANSPORT_TYPE_UNKNOWN(0), + /** + * + * + *
    +     * The client connected to this peer via an external network
    +     * (e.g. outside Google Coud).
    +     * 
    + * + * TRANSPORT_TYPE_EXTERNAL = 1; + */ + TRANSPORT_TYPE_EXTERNAL(1), + /** + * + * + *
    +     * The client connected to this peer via CloudPath.
    +     * 
    + * + * TRANSPORT_TYPE_CLOUD_PATH = 2; + */ + TRANSPORT_TYPE_CLOUD_PATH(2), + /** + * + * + *
    +     * The client connected to this peer via DirectAccess.
    +     * 
    + * + * TRANSPORT_TYPE_DIRECT_ACCESS = 3; + */ + TRANSPORT_TYPE_DIRECT_ACCESS(3), + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using an unknown
    +     * transport type.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_UNKNOWN = 4; + */ + TRANSPORT_TYPE_SESSION_UNKNOWN(4), + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions on an external
    +     * network (e.g. outside Google Cloud).
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_EXTERNAL = 5; + */ + TRANSPORT_TYPE_SESSION_EXTERNAL(5), + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using CloudPath.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6; + */ + TRANSPORT_TYPE_SESSION_CLOUD_PATH(6), + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using
    +     * DirectAccess.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7; + */ + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransportType"); + } + + /** + * + * + *
    +     * The transport type is unknown.
    +     * 
    + * + * TRANSPORT_TYPE_UNKNOWN = 0; + */ + public static final int TRANSPORT_TYPE_UNKNOWN_VALUE = 0; + + /** + * + * + *
    +     * The client connected to this peer via an external network
    +     * (e.g. outside Google Coud).
    +     * 
    + * + * TRANSPORT_TYPE_EXTERNAL = 1; + */ + public static final int TRANSPORT_TYPE_EXTERNAL_VALUE = 1; + + /** + * + * + *
    +     * The client connected to this peer via CloudPath.
    +     * 
    + * + * TRANSPORT_TYPE_CLOUD_PATH = 2; + */ + public static final int TRANSPORT_TYPE_CLOUD_PATH_VALUE = 2; + + /** + * + * + *
    +     * The client connected to this peer via DirectAccess.
    +     * 
    + * + * TRANSPORT_TYPE_DIRECT_ACCESS = 3; + */ + public static final int TRANSPORT_TYPE_DIRECT_ACCESS_VALUE = 3; + + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using an unknown
    +     * transport type.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_UNKNOWN = 4; + */ + public static final int TRANSPORT_TYPE_SESSION_UNKNOWN_VALUE = 4; + + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions on an external
    +     * network (e.g. outside Google Cloud).
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_EXTERNAL = 5; + */ + public static final int TRANSPORT_TYPE_SESSION_EXTERNAL_VALUE = 5; + + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using CloudPath.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6; + */ + public static final int TRANSPORT_TYPE_SESSION_CLOUD_PATH_VALUE = 6; + + /** + * + * + *
    +     * The client connected to this peer via Bigtable Sessions using
    +     * DirectAccess.
    +     * 
    + * + * TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7; + */ + public static final int TRANSPORT_TYPE_SESSION_DIRECT_ACCESS_VALUE = 7; + + 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 TransportType 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 TransportType forNumber(int value) { + switch (value) { + case 0: + return TRANSPORT_TYPE_UNKNOWN; + case 1: + return TRANSPORT_TYPE_EXTERNAL; + case 2: + return TRANSPORT_TYPE_CLOUD_PATH; + case 3: + return TRANSPORT_TYPE_DIRECT_ACCESS; + case 4: + return TRANSPORT_TYPE_SESSION_UNKNOWN; + case 5: + return TRANSPORT_TYPE_SESSION_EXTERNAL; + case 6: + return TRANSPORT_TYPE_SESSION_CLOUD_PATH; + case 7: + return TRANSPORT_TYPE_SESSION_DIRECT_ACCESS; + 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 TransportType findValueByNumber(int number) { + return TransportType.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.bigtable.v2.PeerInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final TransportType[] VALUES = values(); + + public static TransportType 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 TransportType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.PeerInfo.TransportType) + } + + public static final int GOOGLE_FRONTEND_ID_FIELD_NUMBER = 1; + private long googleFrontendId_ = 0L; + + /** + * + * + *
    +   * An opaque identifier for the Google Frontend which serviced this request.
    +   * Only set when not using DirectAccess.
    +   * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + @java.lang.Override + public long getGoogleFrontendId() { + return googleFrontendId_; + } + + public static final int APPLICATION_FRONTEND_ID_FIELD_NUMBER = 2; + private long applicationFrontendId_ = 0L; + + /** + * + * + *
    +   * An opaque identifier for the application frontend which serviced this
    +   * request.
    +   * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + @java.lang.Override + public long getApplicationFrontendId() { + return applicationFrontendId_; + } + + public static final int APPLICATION_FRONTEND_REGION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationFrontendRegion_ = ""; + + /** + * + * + *
    +   * The Cloud region of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_region = 6; + * + * @return The applicationFrontendRegion. + */ + @java.lang.Override + public java.lang.String getApplicationFrontendRegion() { + java.lang.Object ref = applicationFrontendRegion_; + 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(); + applicationFrontendRegion_ = s; + return s; + } + } + + /** + * + * + *
    +   * The Cloud region of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_region = 6; + * + * @return The bytes for applicationFrontendRegion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationFrontendRegionBytes() { + java.lang.Object ref = applicationFrontendRegion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_FRONTEND_ZONE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationFrontendZone_ = ""; + + /** + * + * + *
    +   * The Cloud zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The applicationFrontendZone. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getApplicationFrontendZone() { + java.lang.Object ref = applicationFrontendZone_; + 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(); + applicationFrontendZone_ = s; + return s; + } + } + + /** + * + * + *
    +   * The Cloud zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The bytes for applicationFrontendZone. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getApplicationFrontendZoneBytes() { + java.lang.Object ref = applicationFrontendZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_FRONTEND_SUBZONE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationFrontendSubzone_ = ""; + + /** + * + * + *
    +   * The subzone of the application frontend that served this request, e.g. an
    +   * identifier for where within a zone (within the reported region) the
    +   * application frontend is.
    +   * 
    + * + * string application_frontend_subzone = 4; + * + * @return The applicationFrontendSubzone. + */ + @java.lang.Override + public java.lang.String getApplicationFrontendSubzone() { + java.lang.Object ref = applicationFrontendSubzone_; + 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(); + applicationFrontendSubzone_ = s; + return s; + } + } + + /** + * + * + *
    +   * The subzone of the application frontend that served this request, e.g. an
    +   * identifier for where within a zone (within the reported region) the
    +   * application frontend is.
    +   * 
    + * + * string application_frontend_subzone = 4; + * + * @return The bytes for applicationFrontendSubzone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationFrontendSubzoneBytes() { + java.lang.Object ref = applicationFrontendSubzone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendSubzone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSPORT_TYPE_FIELD_NUMBER = 5; + private int transportType_ = 0; + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The enum numeric value on the wire for transportType. + */ + @java.lang.Override + public int getTransportTypeValue() { + return transportType_; + } + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The transportType. + */ + @java.lang.Override + public com.google.bigtable.v2.PeerInfo.TransportType getTransportType() { + com.google.bigtable.v2.PeerInfo.TransportType result = + com.google.bigtable.v2.PeerInfo.TransportType.forNumber(transportType_); + return result == null ? com.google.bigtable.v2.PeerInfo.TransportType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (googleFrontendId_ != 0L) { + output.writeInt64(1, googleFrontendId_); + } + if (applicationFrontendId_ != 0L) { + output.writeInt64(2, applicationFrontendId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, applicationFrontendZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendSubzone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, applicationFrontendSubzone_); + } + if (transportType_ + != com.google.bigtable.v2.PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN.getNumber()) { + output.writeEnum(5, transportType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendRegion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, applicationFrontendRegion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (googleFrontendId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, googleFrontendId_); + } + if (applicationFrontendId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, applicationFrontendId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, applicationFrontendZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendSubzone_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(4, applicationFrontendSubzone_); + } + if (transportType_ + != com.google.bigtable.v2.PeerInfo.TransportType.TRANSPORT_TYPE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, transportType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationFrontendRegion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, applicationFrontendRegion_); + } + 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.bigtable.v2.PeerInfo)) { + return super.equals(obj); + } + com.google.bigtable.v2.PeerInfo other = (com.google.bigtable.v2.PeerInfo) obj; + + if (getGoogleFrontendId() != other.getGoogleFrontendId()) return false; + if (getApplicationFrontendId() != other.getApplicationFrontendId()) return false; + if (!getApplicationFrontendRegion().equals(other.getApplicationFrontendRegion())) return false; + if (!getApplicationFrontendZone().equals(other.getApplicationFrontendZone())) return false; + if (!getApplicationFrontendSubzone().equals(other.getApplicationFrontendSubzone())) + return false; + if (transportType_ != other.transportType_) 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) + GOOGLE_FRONTEND_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGoogleFrontendId()); + hash = (37 * hash) + APPLICATION_FRONTEND_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getApplicationFrontendId()); + hash = (37 * hash) + APPLICATION_FRONTEND_REGION_FIELD_NUMBER; + hash = (53 * hash) + getApplicationFrontendRegion().hashCode(); + hash = (37 * hash) + APPLICATION_FRONTEND_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getApplicationFrontendZone().hashCode(); + hash = (37 * hash) + APPLICATION_FRONTEND_SUBZONE_FIELD_NUMBER; + hash = (53 * hash) + getApplicationFrontendSubzone().hashCode(); + hash = (37 * hash) + TRANSPORT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + transportType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.PeerInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PeerInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PeerInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PeerInfo 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.bigtable.v2.PeerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PeerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PeerInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PeerInfo 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.bigtable.v2.PeerInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PeerInfo 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.bigtable.v2.PeerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PeerInfo 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.bigtable.v2.PeerInfo 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; + } + + /** + * + * + *
    +   * PeerInfo contains information about the peer that the client is
    +   * connecting to.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.PeerInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.PeerInfo) + com.google.bigtable.v2.PeerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.PeerInfoProto + .internal_static_google_bigtable_v2_PeerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.PeerInfoProto + .internal_static_google_bigtable_v2_PeerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PeerInfo.class, com.google.bigtable.v2.PeerInfo.Builder.class); + } + + // Construct using com.google.bigtable.v2.PeerInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + googleFrontendId_ = 0L; + applicationFrontendId_ = 0L; + applicationFrontendRegion_ = ""; + applicationFrontendZone_ = ""; + applicationFrontendSubzone_ = ""; + transportType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.PeerInfoProto + .internal_static_google_bigtable_v2_PeerInfo_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.PeerInfo getDefaultInstanceForType() { + return com.google.bigtable.v2.PeerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.PeerInfo build() { + com.google.bigtable.v2.PeerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.PeerInfo buildPartial() { + com.google.bigtable.v2.PeerInfo result = new com.google.bigtable.v2.PeerInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.PeerInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.googleFrontendId_ = googleFrontendId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.applicationFrontendId_ = applicationFrontendId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.applicationFrontendRegion_ = applicationFrontendRegion_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.applicationFrontendZone_ = applicationFrontendZone_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.applicationFrontendSubzone_ = applicationFrontendSubzone_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.transportType_ = transportType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.PeerInfo) { + return mergeFrom((com.google.bigtable.v2.PeerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.PeerInfo other) { + if (other == com.google.bigtable.v2.PeerInfo.getDefaultInstance()) return this; + if (other.getGoogleFrontendId() != 0L) { + setGoogleFrontendId(other.getGoogleFrontendId()); + } + if (other.getApplicationFrontendId() != 0L) { + setApplicationFrontendId(other.getApplicationFrontendId()); + } + if (!other.getApplicationFrontendRegion().isEmpty()) { + applicationFrontendRegion_ = other.applicationFrontendRegion_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getApplicationFrontendZone().isEmpty()) { + applicationFrontendZone_ = other.applicationFrontendZone_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getApplicationFrontendSubzone().isEmpty()) { + applicationFrontendSubzone_ = other.applicationFrontendSubzone_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.transportType_ != 0) { + setTransportTypeValue(other.getTransportTypeValue()); + } + 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: + { + googleFrontendId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + applicationFrontendId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + applicationFrontendZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + applicationFrontendSubzone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + transportType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + applicationFrontendRegion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long googleFrontendId_; + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + @java.lang.Override + public long getGoogleFrontendId() { + return googleFrontendId_; + } + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @param value The googleFrontendId to set. + * @return This builder for chaining. + */ + public Builder setGoogleFrontendId(long value) { + + googleFrontendId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An opaque identifier for the Google Frontend which serviced this request.
    +     * Only set when not using DirectAccess.
    +     * 
    + * + * int64 google_frontend_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearGoogleFrontendId() { + bitField0_ = (bitField0_ & ~0x00000001); + googleFrontendId_ = 0L; + onChanged(); + return this; + } + + private long applicationFrontendId_; + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + @java.lang.Override + public long getApplicationFrontendId() { + return applicationFrontendId_; + } + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @param value The applicationFrontendId to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendId(long value) { + + applicationFrontendId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An opaque identifier for the application frontend which serviced this
    +     * request.
    +     * 
    + * + * int64 application_frontend_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearApplicationFrontendId() { + bitField0_ = (bitField0_ & ~0x00000002); + applicationFrontendId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object applicationFrontendRegion_ = ""; + + /** + * + * + *
    +     * The Cloud region of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_region = 6; + * + * @return The applicationFrontendRegion. + */ + public java.lang.String getApplicationFrontendRegion() { + java.lang.Object ref = applicationFrontendRegion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationFrontendRegion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The Cloud region of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_region = 6; + * + * @return The bytes for applicationFrontendRegion. + */ + public com.google.protobuf.ByteString getApplicationFrontendRegionBytes() { + java.lang.Object ref = applicationFrontendRegion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendRegion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The Cloud region of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_region = 6; + * + * @param value The applicationFrontendRegion to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationFrontendRegion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Cloud region of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_region = 6; + * + * @return This builder for chaining. + */ + public Builder clearApplicationFrontendRegion() { + applicationFrontendRegion_ = getDefaultInstance().getApplicationFrontendRegion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Cloud region of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_region = 6; + * + * @param value The bytes for applicationFrontendRegion to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationFrontendRegion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object applicationFrontendZone_ = ""; + + /** + * + * + *
    +     * The Cloud zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The applicationFrontendZone. + */ + @java.lang.Deprecated + public java.lang.String getApplicationFrontendZone() { + java.lang.Object ref = applicationFrontendZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationFrontendZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The Cloud zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The bytes for applicationFrontendZone. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getApplicationFrontendZoneBytes() { + java.lang.Object ref = applicationFrontendZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The Cloud zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @param value The applicationFrontendZone to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setApplicationFrontendZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationFrontendZone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Cloud zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearApplicationFrontendZone() { + applicationFrontendZone_ = getDefaultInstance().getApplicationFrontendZone(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The Cloud zone of the application frontend that served this request.
    +     * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @param value The bytes for applicationFrontendZone to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setApplicationFrontendZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationFrontendZone_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object applicationFrontendSubzone_ = ""; + + /** + * + * + *
    +     * The subzone of the application frontend that served this request, e.g. an
    +     * identifier for where within a zone (within the reported region) the
    +     * application frontend is.
    +     * 
    + * + * string application_frontend_subzone = 4; + * + * @return The applicationFrontendSubzone. + */ + public java.lang.String getApplicationFrontendSubzone() { + java.lang.Object ref = applicationFrontendSubzone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationFrontendSubzone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * The subzone of the application frontend that served this request, e.g. an
    +     * identifier for where within a zone (within the reported region) the
    +     * application frontend is.
    +     * 
    + * + * string application_frontend_subzone = 4; + * + * @return The bytes for applicationFrontendSubzone. + */ + public com.google.protobuf.ByteString getApplicationFrontendSubzoneBytes() { + java.lang.Object ref = applicationFrontendSubzone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationFrontendSubzone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * The subzone of the application frontend that served this request, e.g. an
    +     * identifier for where within a zone (within the reported region) the
    +     * application frontend is.
    +     * 
    + * + * string application_frontend_subzone = 4; + * + * @param value The applicationFrontendSubzone to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendSubzone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationFrontendSubzone_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The subzone of the application frontend that served this request, e.g. an
    +     * identifier for where within a zone (within the reported region) the
    +     * application frontend is.
    +     * 
    + * + * string application_frontend_subzone = 4; + * + * @return This builder for chaining. + */ + public Builder clearApplicationFrontendSubzone() { + applicationFrontendSubzone_ = getDefaultInstance().getApplicationFrontendSubzone(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
    +     * The subzone of the application frontend that served this request, e.g. an
    +     * identifier for where within a zone (within the reported region) the
    +     * application frontend is.
    +     * 
    + * + * string application_frontend_subzone = 4; + * + * @param value The bytes for applicationFrontendSubzone to set. + * @return This builder for chaining. + */ + public Builder setApplicationFrontendSubzoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationFrontendSubzone_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int transportType_ = 0; + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The enum numeric value on the wire for transportType. + */ + @java.lang.Override + public int getTransportTypeValue() { + return transportType_; + } + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @param value The enum numeric value on the wire for transportType to set. + * @return This builder for chaining. + */ + public Builder setTransportTypeValue(int value) { + transportType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The transportType. + */ + @java.lang.Override + public com.google.bigtable.v2.PeerInfo.TransportType getTransportType() { + com.google.bigtable.v2.PeerInfo.TransportType result = + com.google.bigtable.v2.PeerInfo.TransportType.forNumber(transportType_); + return result == null ? com.google.bigtable.v2.PeerInfo.TransportType.UNRECOGNIZED : result; + } + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @param value The transportType to set. + * @return This builder for chaining. + */ + public Builder setTransportType(com.google.bigtable.v2.PeerInfo.TransportType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + transportType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearTransportType() { + bitField0_ = (bitField0_ & ~0x00000020); + transportType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.PeerInfo) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.PeerInfo) + private static final com.google.bigtable.v2.PeerInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.PeerInfo(); + } + + public static com.google.bigtable.v2.PeerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PeerInfo 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.bigtable.v2.PeerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoOrBuilder.java new file mode 100644 index 0000000000..3819533d0a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2026 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/bigtable/v2/peer_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface PeerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PeerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * An opaque identifier for the Google Frontend which serviced this request.
    +   * Only set when not using DirectAccess.
    +   * 
    + * + * int64 google_frontend_id = 1; + * + * @return The googleFrontendId. + */ + long getGoogleFrontendId(); + + /** + * + * + *
    +   * An opaque identifier for the application frontend which serviced this
    +   * request.
    +   * 
    + * + * int64 application_frontend_id = 2; + * + * @return The applicationFrontendId. + */ + long getApplicationFrontendId(); + + /** + * + * + *
    +   * The Cloud region of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_region = 6; + * + * @return The applicationFrontendRegion. + */ + java.lang.String getApplicationFrontendRegion(); + + /** + * + * + *
    +   * The Cloud region of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_region = 6; + * + * @return The bytes for applicationFrontendRegion. + */ + com.google.protobuf.ByteString getApplicationFrontendRegionBytes(); + + /** + * + * + *
    +   * The Cloud zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The applicationFrontendZone. + */ + @java.lang.Deprecated + java.lang.String getApplicationFrontendZone(); + + /** + * + * + *
    +   * The Cloud zone of the application frontend that served this request.
    +   * 
    + * + * string application_frontend_zone = 3 [deprecated = true]; + * + * @deprecated google.bigtable.v2.PeerInfo.application_frontend_zone is deprecated. See + * google/bigtable/v2/peer_info.proto;l=72 + * @return The bytes for applicationFrontendZone. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getApplicationFrontendZoneBytes(); + + /** + * + * + *
    +   * The subzone of the application frontend that served this request, e.g. an
    +   * identifier for where within a zone (within the reported region) the
    +   * application frontend is.
    +   * 
    + * + * string application_frontend_subzone = 4; + * + * @return The applicationFrontendSubzone. + */ + java.lang.String getApplicationFrontendSubzone(); + + /** + * + * + *
    +   * The subzone of the application frontend that served this request, e.g. an
    +   * identifier for where within a zone (within the reported region) the
    +   * application frontend is.
    +   * 
    + * + * string application_frontend_subzone = 4; + * + * @return The bytes for applicationFrontendSubzone. + */ + com.google.protobuf.ByteString getApplicationFrontendSubzoneBytes(); + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The enum numeric value on the wire for transportType. + */ + int getTransportTypeValue(); + + /** + * .google.bigtable.v2.PeerInfo.TransportType transport_type = 5; + * + * @return The transportType. + */ + com.google.bigtable.v2.PeerInfo.TransportType getTransportType(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoProto.java new file mode 100644 index 0000000000..70745c4ef9 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PeerInfoProto.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 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/bigtable/v2/peer_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public final class PeerInfoProto extends com.google.protobuf.GeneratedFile { + private PeerInfoProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PeerInfoProto"); + } + + 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_bigtable_v2_PeerInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_PeerInfo_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/bigtable/v2/peer_info.proto\022\022go" + + "ogle.bigtable.v2\"\243\004\n\010PeerInfo\022\032\n\022google_" + + "frontend_id\030\001 \001(\003\022\037\n\027application_fronten" + + "d_id\030\002 \001(\003\022#\n\033application_frontend_regio" + + "n\030\006 \001(\t\022%\n\031application_frontend_zone\030\003 \001" + + "(\tB\002\030\001\022$\n\034application_frontend_subzone\030\004" + + " \001(\t\022B\n\016transport_type\030\005 \001(\0162*.google.bi" + + "gtable.v2.PeerInfo.TransportType\"\243\002\n\rTra" + + "nsportType\022\032\n\026TRANSPORT_TYPE_UNKNOWN\020\000\022\033" + + "\n\027TRANSPORT_TYPE_EXTERNAL\020\001\022\035\n\031TRANSPORT" + + "_TYPE_CLOUD_PATH\020\002\022 \n\034TRANSPORT_TYPE_DIR" + + "ECT_ACCESS\020\003\022\"\n\036TRANSPORT_TYPE_SESSION_U" + + "NKNOWN\020\004\022#\n\037TRANSPORT_TYPE_SESSION_EXTER" + + "NAL\020\005\022%\n!TRANSPORT_TYPE_SESSION_CLOUD_PA" + + "TH\020\006\022(\n$TRANSPORT_TYPE_SESSION_DIRECT_AC" + + "CESS\020\007B\267\001\n\026com.google.bigtable.v2B\rPeerI" + + "nfoProtoP\001Z8cloud.google.com/go/bigtable" + + "/apiv2/bigtablepb;bigtablepb\252\002\030Google.Cl" + + "oud.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\" + + "V2\352\002\033Google::Cloud::Bigtable::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_bigtable_v2_PeerInfo_descriptor = getDescriptor().getMessageType(0); + internal_static_google_bigtable_v2_PeerInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_PeerInfo_descriptor, + new java.lang.String[] { + "GoogleFrontendId", + "ApplicationFrontendId", + "ApplicationFrontendRegion", + "ApplicationFrontendZone", + "ApplicationFrontendSubzone", + "TransportType", + }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java index 21db743e5f..a215684dfa 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.PingAndWarmRequest} */ -public final class PingAndWarmRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PingAndWarmRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.PingAndWarmRequest) PingAndWarmRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PingAndWarmRequest"); + } + // Use PingAndWarmRequest.newBuilder() to construct. - private PingAndWarmRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PingAndWarmRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private PingAndWarmRequest() { appProfileId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PingAndWarmRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmRequest_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; + /** * * @@ -95,6 +103,7 @@ public java.lang.String getName() { return s; } } + /** * * @@ -127,6 +136,7 @@ public com.google.protobuf.ByteString getNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -151,6 +161,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -190,11 +201,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(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } getUnknownFields().writeTo(output); } @@ -205,11 +216,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(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -286,38 +297,38 @@ public static com.google.bigtable.v2.PingAndWarmRequest parseFrom( public static com.google.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest 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,10 +351,11 @@ 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; } + /** * * @@ -353,7 +365,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.PingAndWarmRequest} */ - 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.bigtable.v2.PingAndWarmRequest) com.google.bigtable.v2.PingAndWarmRequestOrBuilder { @@ -363,7 +375,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmRequest_fieldAccessorTable @@ -375,7 +387,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.PingAndWarmRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -429,39 +441,6 @@ private void buildPartial0(com.google.bigtable.v2.PingAndWarmRequest 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.bigtable.v2.PingAndWarmRequest) { @@ -542,6 +521,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object name_ = ""; + /** * * @@ -568,6 +548,7 @@ public java.lang.String getName() { return (java.lang.String) ref; } } + /** * * @@ -594,6 +575,7 @@ public com.google.protobuf.ByteString getNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -619,6 +601,7 @@ public Builder setName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -640,6 +623,7 @@ public Builder clearName() { onChanged(); return this; } + /** * * @@ -668,6 +652,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -691,6 +676,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -714,6 +700,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -736,6 +723,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -754,6 +742,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -778,17 +767,6 @@ public Builder setAppProfileIdBytes(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.bigtable.v2.PingAndWarmRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequestOrBuilder.java index 8c1daea6c9..4fb5debf80 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface PingAndWarmRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PingAndWarmRequest) @@ -40,6 +42,7 @@ public interface PingAndWarmRequestOrBuilder * @return The name. */ java.lang.String getName(); + /** * * @@ -70,6 +73,7 @@ public interface PingAndWarmRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java index 80ac0e37ac..0b086c3d74 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.PingAndWarmResponse} */ -public final class PingAndWarmResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class PingAndWarmResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.PingAndWarmResponse) PingAndWarmResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PingAndWarmResponse"); + } + // Use PingAndWarmResponse.newBuilder() to construct. - private PingAndWarmResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private PingAndWarmResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private PingAndWarmResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PingAndWarmResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmResponse_fieldAccessorTable @@ -153,38 +160,38 @@ public static com.google.bigtable.v2.PingAndWarmResponse parseFrom( public static com.google.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse 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); } @@ -207,10 +214,11 @@ 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; } + /** * * @@ -220,7 +228,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.PingAndWarmResponse} */ - 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.bigtable.v2.PingAndWarmResponse) com.google.bigtable.v2.PingAndWarmResponseOrBuilder { @@ -230,7 +238,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmResponse_fieldAccessorTable @@ -242,7 +250,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.PingAndWarmResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -280,39 +288,6 @@ public com.google.bigtable.v2.PingAndWarmResponse 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.bigtable.v2.PingAndWarmResponse) { @@ -368,17 +343,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.bigtable.v2.PingAndWarmResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponseOrBuilder.java index b4688dd6ce..ae5f4c612b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface PingAndWarmResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PingAndWarmResponse) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequest.java new file mode 100644 index 0000000000..0f81145c0e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequest.java @@ -0,0 +1,1981 @@ +/* + * Copyright 2026 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Request message for Bigtable.PrepareQuery
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryRequest} + */ +@com.google.protobuf.Generated +public final class PrepareQueryRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PrepareQueryRequest) + PrepareQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrepareQueryRequest"); + } + + // Use PrepareQueryRequest.newBuilder() to construct. + private PrepareQueryRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrepareQueryRequest() { + instanceName_ = ""; + appProfileId_ = ""; + query_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetParamTypes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PrepareQueryRequest.class, + com.google.bigtable.v2.PrepareQueryRequest.Builder.class); + } + + private int dataFormatCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object dataFormat_; + + public enum DataFormatCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROTO_FORMAT(4), + DATAFORMAT_NOT_SET(0); + private final int value; + + private DataFormatCase(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 DataFormatCase valueOf(int value) { + return forNumber(value); + } + + public static DataFormatCase forNumber(int value) { + switch (value) { + case 4: + return PROTO_FORMAT; + case 0: + return DATAFORMAT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataFormatCase getDataFormatCase() { + return DataFormatCase.forNumber(dataFormatCase_); + } + + public static final int INSTANCE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceName_ = ""; + + /** + * + * + *
    +   * Required. The unique name of the instance against which the query should be
    +   * executed.
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + @java.lang.Override + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + 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(); + instanceName_ = s; + return s; + } + } + + /** + * + * + *
    +   * Required. The unique name of the instance against which the query should be
    +   * executed.
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +   * Optional. This value specifies routing for preparing the query. Note that
    +   * this `app_profile_id` is only used for preparing the query. The actual
    +   * query execution will use the app profile specified in the
    +   * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +   * will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + 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(); + appProfileId_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. This value specifies routing for preparing the query. Note that
    +   * this `app_profile_id` is only used for preparing the query. The actual
    +   * query execution will use the app profile specified in the
    +   * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +   * will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
    +   * Required. The query string.
    +   * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
    +   * Required. The query string.
    +   * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 PROTO_FORMAT_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return Whether the protoFormat field is set. + */ + @java.lang.Override + public boolean hasProtoFormat() { + return dataFormatCase_ == 4; + } + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return The protoFormat. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoFormat getProtoFormat() { + if (dataFormatCase_ == 4) { + return (com.google.bigtable.v2.ProtoFormat) dataFormat_; + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { + if (dataFormatCase_ == 4) { + return (com.google.bigtable.v2.ProtoFormat) dataFormat_; + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + + public static final int PARAM_TYPES_FIELD_NUMBER = 6; + + private static final class ParamTypesDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_ParamTypesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.bigtable.v2.Type.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField paramTypes_; + + private com.google.protobuf.MapField + internalGetParamTypes() { + if (paramTypes_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamTypesDefaultEntryHolder.defaultEntry); + } + return paramTypes_; + } + + public int getParamTypesCount() { + return internalGetParamTypes().getMap().size(); + } + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public boolean containsParamTypes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParamTypes().getMap().containsKey(key); + } + + /** Use {@link #getParamTypesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParamTypes() { + return getParamTypesMap(); + } + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.Map getParamTypesMap() { + return internalGetParamTypes().getMap(); + } + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public /* nullable */ com.google.bigtable.v2.Type getParamTypesOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Type defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetParamTypes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type getParamTypesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetParamTypes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, query_); + } + if (dataFormatCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.ProtoFormat) dataFormat_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetParamTypes(), ParamTypesDefaultEntryHolder.defaultEntry, 6); + 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(instanceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instanceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, query_); + } + if (dataFormatCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.ProtoFormat) dataFormat_); + } + for (java.util.Map.Entry entry : + internalGetParamTypes().getMap().entrySet()) { + com.google.protobuf.MapEntry paramTypes__ = + ParamTypesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, paramTypes__); + } + 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.bigtable.v2.PrepareQueryRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.PrepareQueryRequest other = + (com.google.bigtable.v2.PrepareQueryRequest) obj; + + if (!getInstanceName().equals(other.getInstanceName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!internalGetParamTypes().equals(other.internalGetParamTypes())) return false; + if (!getDataFormatCase().equals(other.getDataFormatCase())) return false; + switch (dataFormatCase_) { + case 4: + if (!getProtoFormat().equals(other.getProtoFormat())) 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) + INSTANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (!internalGetParamTypes().getMap().isEmpty()) { + hash = (37 * hash) + PARAM_TYPES_FIELD_NUMBER; + hash = (53 * hash) + internalGetParamTypes().hashCode(); + } + switch (dataFormatCase_) { + case 4: + hash = (37 * hash) + PROTO_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getProtoFormat().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryRequest 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.bigtable.v2.PrepareQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryRequest 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.bigtable.v2.PrepareQueryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryRequest 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.bigtable.v2.PrepareQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryRequest 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.bigtable.v2.PrepareQueryRequest 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; + } + + /** + * + * + *
    +   * Request message for Bigtable.PrepareQuery
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.PrepareQueryRequest) + com.google.bigtable.v2.PrepareQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetParamTypes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableParamTypes(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PrepareQueryRequest.class, + com.google.bigtable.v2.PrepareQueryRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.PrepareQueryRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceName_ = ""; + appProfileId_ = ""; + query_ = ""; + if (protoFormatBuilder_ != null) { + protoFormatBuilder_.clear(); + } + internalGetMutableParamTypes().clear(); + dataFormatCase_ = 0; + dataFormat_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.PrepareQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryRequest build() { + com.google.bigtable.v2.PrepareQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryRequest buildPartial() { + com.google.bigtable.v2.PrepareQueryRequest result = + new com.google.bigtable.v2.PrepareQueryRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.PrepareQueryRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceName_ = instanceName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.appProfileId_ = appProfileId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.paramTypes_ = + internalGetParamTypes().build(ParamTypesDefaultEntryHolder.defaultEntry); + } + } + + private void buildPartialOneofs(com.google.bigtable.v2.PrepareQueryRequest result) { + result.dataFormatCase_ = dataFormatCase_; + result.dataFormat_ = this.dataFormat_; + if (dataFormatCase_ == 4 && protoFormatBuilder_ != null) { + result.dataFormat_ = protoFormatBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.PrepareQueryRequest) { + return mergeFrom((com.google.bigtable.v2.PrepareQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.PrepareQueryRequest other) { + if (other == com.google.bigtable.v2.PrepareQueryRequest.getDefaultInstance()) return this; + if (!other.getInstanceName().isEmpty()) { + instanceName_ = other.instanceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000004; + onChanged(); + } + internalGetMutableParamTypes().mergeFrom(other.internalGetParamTypes()); + bitField0_ |= 0x00000010; + switch (other.getDataFormatCase()) { + case PROTO_FORMAT: + { + mergeProtoFormat(other.getProtoFormat()); + break; + } + case DATAFORMAT_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: + { + instanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetProtoFormatFieldBuilder().getBuilder(), extensionRegistry); + dataFormatCase_ = 4; + break; + } // case 34 + case 50: + { + com.google.protobuf.MapEntry + paramTypes__ = + input.readMessage( + ParamTypesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParamTypes() + .ensureBuilderMap() + .put(paramTypes__.getKey(), paramTypes__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataFormatCase_ = 0; + private java.lang.Object dataFormat_; + + public DataFormatCase getDataFormatCase() { + return DataFormatCase.forNumber(dataFormatCase_); + } + + public Builder clearDataFormat() { + dataFormatCase_ = 0; + dataFormat_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object instanceName_ = ""; + + /** + * + * + *
    +     * Required. The unique name of the instance against which the query should be
    +     * executed.
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Required. The unique name of the instance against which the query should be
    +     * executed.
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Required. The unique name of the instance against which the query should be
    +     * executed.
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The unique name of the instance against which the query should be
    +     * executed.
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInstanceName() { + instanceName_ = getDefaultInstance().getInstanceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The unique name of the instance against which the query should be
    +     * executed.
    +     * Values are of the form `projects/<project>/instances/<instance>`
    +     * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object appProfileId_ = ""; + + /** + * + * + *
    +     * Optional. This value specifies routing for preparing the query. Note that
    +     * this `app_profile_id` is only used for preparing the query. The actual
    +     * query execution will use the app profile specified in the
    +     * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +     * will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. This value specifies routing for preparing the query. Note that
    +     * this `app_profile_id` is only used for preparing the query. The actual
    +     * query execution will use the app profile specified in the
    +     * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +     * will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + java.lang.Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. This value specifies routing for preparing the query. Note that
    +     * this `app_profile_id` is only used for preparing the query. The actual
    +     * query execution will use the app profile specified in the
    +     * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +     * will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. This value specifies routing for preparing the query. Note that
    +     * this `app_profile_id` is only used for preparing the query. The actual
    +     * query execution will use the app profile specified in the
    +     * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +     * will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + appProfileId_ = getDefaultInstance().getAppProfileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. This value specifies routing for preparing the query. Note that
    +     * this `app_profile_id` is only used for preparing the query. The actual
    +     * query execution will use the app profile specified in the
    +     * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +     * will be used.
    +     * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appProfileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + + /** + * + * + *
    +     * Required. The query string.
    +     * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
    +     * Required. The query string.
    +     * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + /** + * + * + *
    +     * Required. The query string.
    +     * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The query string.
    +     * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Required. The query string.
    +     * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ProtoFormat, + com.google.bigtable.v2.ProtoFormat.Builder, + com.google.bigtable.v2.ProtoFormatOrBuilder> + protoFormatBuilder_; + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return Whether the protoFormat field is set. + */ + @java.lang.Override + public boolean hasProtoFormat() { + return dataFormatCase_ == 4; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return The protoFormat. + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoFormat getProtoFormat() { + if (protoFormatBuilder_ == null) { + if (dataFormatCase_ == 4) { + return (com.google.bigtable.v2.ProtoFormat) dataFormat_; + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } else { + if (dataFormatCase_ == 4) { + return protoFormatBuilder_.getMessage(); + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat value) { + if (protoFormatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataFormat_ = value; + onChanged(); + } else { + protoFormatBuilder_.setMessage(value); + } + dataFormatCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + public Builder setProtoFormat(com.google.bigtable.v2.ProtoFormat.Builder builderForValue) { + if (protoFormatBuilder_ == null) { + dataFormat_ = builderForValue.build(); + onChanged(); + } else { + protoFormatBuilder_.setMessage(builderForValue.build()); + } + dataFormatCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + public Builder mergeProtoFormat(com.google.bigtable.v2.ProtoFormat value) { + if (protoFormatBuilder_ == null) { + if (dataFormatCase_ == 4 + && dataFormat_ != com.google.bigtable.v2.ProtoFormat.getDefaultInstance()) { + dataFormat_ = + com.google.bigtable.v2.ProtoFormat.newBuilder( + (com.google.bigtable.v2.ProtoFormat) dataFormat_) + .mergeFrom(value) + .buildPartial(); + } else { + dataFormat_ = value; + } + onChanged(); + } else { + if (dataFormatCase_ == 4) { + protoFormatBuilder_.mergeFrom(value); + } else { + protoFormatBuilder_.setMessage(value); + } + } + dataFormatCase_ = 4; + return this; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + public Builder clearProtoFormat() { + if (protoFormatBuilder_ == null) { + if (dataFormatCase_ == 4) { + dataFormatCase_ = 0; + dataFormat_ = null; + onChanged(); + } + } else { + if (dataFormatCase_ == 4) { + dataFormatCase_ = 0; + dataFormat_ = null; + } + protoFormatBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + public com.google.bigtable.v2.ProtoFormat.Builder getProtoFormatBuilder() { + return internalGetProtoFormatFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + @java.lang.Override + public com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder() { + if ((dataFormatCase_ == 4) && (protoFormatBuilder_ != null)) { + return protoFormatBuilder_.getMessageOrBuilder(); + } else { + if (dataFormatCase_ == 4) { + return (com.google.bigtable.v2.ProtoFormat) dataFormat_; + } + return com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * Protocol buffer format as described by ProtoSchema and ProtoRows
    +     * messages.
    +     * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ProtoFormat, + com.google.bigtable.v2.ProtoFormat.Builder, + com.google.bigtable.v2.ProtoFormatOrBuilder> + internalGetProtoFormatFieldBuilder() { + if (protoFormatBuilder_ == null) { + if (!(dataFormatCase_ == 4)) { + dataFormat_ = com.google.bigtable.v2.ProtoFormat.getDefaultInstance(); + } + protoFormatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ProtoFormat, + com.google.bigtable.v2.ProtoFormat.Builder, + com.google.bigtable.v2.ProtoFormatOrBuilder>( + (com.google.bigtable.v2.ProtoFormat) dataFormat_, + getParentForChildren(), + isClean()); + dataFormat_ = null; + } + dataFormatCase_ = 4; + onChanged(); + return protoFormatBuilder_; + } + + private static final class ParamTypesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.bigtable.v2.TypeOrBuilder, com.google.bigtable.v2.Type> { + @java.lang.Override + public com.google.bigtable.v2.Type build(com.google.bigtable.v2.TypeOrBuilder val) { + if (val instanceof com.google.bigtable.v2.Type) { + return (com.google.bigtable.v2.Type) val; + } + return ((com.google.bigtable.v2.Type.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return ParamTypesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ParamTypesConverter paramTypesConverter = new ParamTypesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.TypeOrBuilder, + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder> + paramTypes_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.TypeOrBuilder, + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder> + internalGetParamTypes() { + if (paramTypes_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(paramTypesConverter); + } + return paramTypes_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.bigtable.v2.TypeOrBuilder, + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder> + internalGetMutableParamTypes() { + if (paramTypes_ == null) { + paramTypes_ = new com.google.protobuf.MapFieldBuilder<>(paramTypesConverter); + } + bitField0_ |= 0x00000010; + onChanged(); + return paramTypes_; + } + + public int getParamTypesCount() { + return internalGetParamTypes().ensureBuilderMap().size(); + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public boolean containsParamTypes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParamTypes().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getParamTypesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParamTypes() { + return getParamTypesMap(); + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.Map getParamTypesMap() { + return internalGetParamTypes().getImmutableMap(); + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public /* nullable */ com.google.bigtable.v2.Type getParamTypesOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Type defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParamTypes().ensureBuilderMap(); + return map.containsKey(key) ? paramTypesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type getParamTypesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParamTypes().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return paramTypesConverter.build(map.get(key)); + } + + public Builder clearParamTypes() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableParamTypes().clear(); + return this; + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeParamTypes(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableParamTypes().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParamTypes() { + bitField0_ |= 0x00000010; + return internalGetMutableParamTypes().ensureMessageMap(); + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putParamTypes(java.lang.String key, com.google.bigtable.v2.Type value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableParamTypes().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder putAllParamTypes( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableParamTypes().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
    +     * Required. `param_types` is a map of parameter identifier strings to their
    +     * `Type`s.
    +     *
    +     * In query string, a parameter placeholder consists of the
    +     * `@` character followed by the parameter name (for example, `@firstName`) in
    +     * the query string.
    +     *
    +     * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +     * query parameter of type Bytes. The specific `Value` to be used for the
    +     * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +     * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.v2.Type.Builder putParamTypesBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableParamTypes().ensureBuilderMap(); + com.google.bigtable.v2.TypeOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.bigtable.v2.Type.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.bigtable.v2.Type) { + entry = ((com.google.bigtable.v2.Type) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.bigtable.v2.Type.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.PrepareQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.PrepareQueryRequest) + private static final com.google.bigtable.v2.PrepareQueryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.PrepareQueryRequest(); + } + + public static com.google.bigtable.v2.PrepareQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrepareQueryRequest 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.bigtable.v2.PrepareQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequestOrBuilder.java new file mode 100644 index 0000000000..02cacd393d --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryRequestOrBuilder.java @@ -0,0 +1,282 @@ +/* + * Copyright 2026 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface PrepareQueryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PrepareQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The unique name of the instance against which the query should be
    +   * executed.
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instanceName. + */ + java.lang.String getInstanceName(); + + /** + * + * + *
    +   * Required. The unique name of the instance against which the query should be
    +   * executed.
    +   * Values are of the form `projects/<project>/instances/<instance>`
    +   * 
    + * + * + * string instance_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instanceName. + */ + com.google.protobuf.ByteString getInstanceNameBytes(); + + /** + * + * + *
    +   * Optional. This value specifies routing for preparing the query. Note that
    +   * this `app_profile_id` is only used for preparing the query. The actual
    +   * query execution will use the app profile specified in the
    +   * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +   * will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appProfileId. + */ + java.lang.String getAppProfileId(); + + /** + * + * + *
    +   * Optional. This value specifies routing for preparing the query. Note that
    +   * this `app_profile_id` is only used for preparing the query. The actual
    +   * query execution will use the app profile specified in the
    +   * `ExecuteQueryRequest`. If not specified, the `default` application profile
    +   * will be used.
    +   * 
    + * + * string app_profile_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * + * + *
    +   * Required. The query string.
    +   * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + java.lang.String getQuery(); + + /** + * + * + *
    +   * Required. The query string.
    +   * 
    + * + * string query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return Whether the protoFormat field is set. + */ + boolean hasProtoFormat(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + * + * @return The protoFormat. + */ + com.google.bigtable.v2.ProtoFormat getProtoFormat(); + + /** + * + * + *
    +   * Protocol buffer format as described by ProtoSchema and ProtoRows
    +   * messages.
    +   * 
    + * + * .google.bigtable.v2.ProtoFormat proto_format = 4; + */ + com.google.bigtable.v2.ProtoFormatOrBuilder getProtoFormatOrBuilder(); + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getParamTypesCount(); + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + boolean containsParamTypes(java.lang.String key); + + /** Use {@link #getParamTypesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getParamTypes(); + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.Map getParamTypesMap(); + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + /* nullable */ + com.google.bigtable.v2.Type getParamTypesOrDefault( + java.lang.String key, + /* nullable */ + com.google.bigtable.v2.Type defaultValue); + + /** + * + * + *
    +   * Required. `param_types` is a map of parameter identifier strings to their
    +   * `Type`s.
    +   *
    +   * In query string, a parameter placeholder consists of the
    +   * `@` character followed by the parameter name (for example, `@firstName`) in
    +   * the query string.
    +   *
    +   * For example, if param_types["firstName"] = Bytes then @firstName will be a
    +   * query parameter of type Bytes. The specific `Value` to be used for the
    +   * query execution must be sent in `ExecuteQueryRequest` in the `params` map.
    +   * 
    + * + * + * map<string, .google.bigtable.v2.Type> param_types = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.v2.Type getParamTypesOrThrow(java.lang.String key); + + com.google.bigtable.v2.PrepareQueryRequest.DataFormatCase getDataFormatCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponse.java new file mode 100644 index 0000000000..4f4fc8fa5c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponse.java @@ -0,0 +1,1115 @@ +/* + * Copyright 2026 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Response message for Bigtable.PrepareQueryResponse
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryResponse} + */ +@com.google.protobuf.Generated +public final class PrepareQueryResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.PrepareQueryResponse) + PrepareQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrepareQueryResponse"); + } + + // Use PrepareQueryResponse.newBuilder() to construct. + private PrepareQueryResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrepareQueryResponse() { + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PrepareQueryResponse.class, + com.google.bigtable.v2.PrepareQueryResponse.Builder.class); + } + + private int bitField0_; + public static final int METADATA_FIELD_NUMBER = 1; + private com.google.bigtable.v2.ResultSetMetadata metadata_; + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadata getMetadata() { + return metadata_ == null + ? com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance() + : metadata_; + } + + public static final int PREPARED_QUERY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * A serialized prepared query. Clients should treat this as an opaque
    +   * blob of bytes to send in `ExecuteQueryRequest`.
    +   * 
    + * + * bytes prepared_query = 2; + * + * @return The preparedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreparedQuery() { + return preparedQuery_; + } + + public static final int VALID_UNTIL_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp validUntil_; + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return Whether the validUntil field is set. + */ + @java.lang.Override + public boolean hasValidUntil() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return The validUntil. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getValidUntil() { + return validUntil_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : validUntil_; + } + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder() { + return validUntil_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : validUntil_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMetadata()); + } + if (!preparedQuery_.isEmpty()) { + output.writeBytes(2, preparedQuery_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getValidUntil()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); + } + if (!preparedQuery_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, preparedQuery_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getValidUntil()); + } + 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.bigtable.v2.PrepareQueryResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.PrepareQueryResponse other = + (com.google.bigtable.v2.PrepareQueryResponse) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getPreparedQuery().equals(other.getPreparedQuery())) return false; + if (hasValidUntil() != other.hasValidUntil()) return false; + if (hasValidUntil()) { + if (!getValidUntil().equals(other.getValidUntil())) 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 (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + PREPARED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getPreparedQuery().hashCode(); + if (hasValidUntil()) { + hash = (37 * hash) + VALID_UNTIL_FIELD_NUMBER; + hash = (53 * hash) + getValidUntil().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryResponse 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.bigtable.v2.PrepareQueryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.PrepareQueryResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryResponse 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.bigtable.v2.PrepareQueryResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryResponse 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.bigtable.v2.PrepareQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.PrepareQueryResponse 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.bigtable.v2.PrepareQueryResponse 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; + } + + /** + * + * + *
    +   * Response message for Bigtable.PrepareQueryResponse
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.PrepareQueryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.PrepareQueryResponse) + com.google.bigtable.v2.PrepareQueryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.PrepareQueryResponse.class, + com.google.bigtable.v2.PrepareQueryResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.PrepareQueryResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMetadataFieldBuilder(); + internalGetValidUntilFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + validUntil_ = null; + if (validUntilBuilder_ != null) { + validUntilBuilder_.dispose(); + validUntilBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_PrepareQueryResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.PrepareQueryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryResponse build() { + com.google.bigtable.v2.PrepareQueryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.PrepareQueryResponse buildPartial() { + com.google.bigtable.v2.PrepareQueryResponse result = + new com.google.bigtable.v2.PrepareQueryResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.PrepareQueryResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preparedQuery_ = preparedQuery_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validUntil_ = validUntilBuilder_ == null ? validUntil_ : validUntilBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.PrepareQueryResponse) { + return mergeFrom((com.google.bigtable.v2.PrepareQueryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.PrepareQueryResponse other) { + if (other == com.google.bigtable.v2.PrepareQueryResponse.getDefaultInstance()) return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.getPreparedQuery().isEmpty()) { + setPreparedQuery(other.getPreparedQuery()); + } + if (other.hasValidUntil()) { + mergeValidUntil(other.getValidUntil()); + } + 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( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preparedQuery_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetValidUntilFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.ResultSetMetadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + public com.google.bigtable.v2.ResultSetMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder setMetadata(com.google.bigtable.v2.ResultSetMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder mergeMetadata(com.google.bigtable.v2.ResultSetMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && metadata_ != null + && metadata_ != com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public com.google.bigtable.v2.ResultSetMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + public com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.bigtable.v2.ResultSetMetadata.getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
    +     * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +     * returned `prepared_query`.
    +     * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ResultSetMetadata, + com.google.bigtable.v2.ResultSetMetadata.Builder, + com.google.bigtable.v2.ResultSetMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.ByteString preparedQuery_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * A serialized prepared query. Clients should treat this as an opaque
    +     * blob of bytes to send in `ExecuteQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 2; + * + * @return The preparedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreparedQuery() { + return preparedQuery_; + } + + /** + * + * + *
    +     * A serialized prepared query. Clients should treat this as an opaque
    +     * blob of bytes to send in `ExecuteQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 2; + * + * @param value The preparedQuery to set. + * @return This builder for chaining. + */ + public Builder setPreparedQuery(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + preparedQuery_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * A serialized prepared query. Clients should treat this as an opaque
    +     * blob of bytes to send in `ExecuteQueryRequest`.
    +     * 
    + * + * bytes prepared_query = 2; + * + * @return This builder for chaining. + */ + public Builder clearPreparedQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + preparedQuery_ = getDefaultInstance().getPreparedQuery(); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp validUntil_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + validUntilBuilder_; + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return Whether the validUntil field is set. + */ + public boolean hasValidUntil() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return The validUntil. + */ + public com.google.protobuf.Timestamp getValidUntil() { + if (validUntilBuilder_ == null) { + return validUntil_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : validUntil_; + } else { + return validUntilBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public Builder setValidUntil(com.google.protobuf.Timestamp value) { + if (validUntilBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validUntil_ = value; + } else { + validUntilBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public Builder setValidUntil(com.google.protobuf.Timestamp.Builder builderForValue) { + if (validUntilBuilder_ == null) { + validUntil_ = builderForValue.build(); + } else { + validUntilBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public Builder mergeValidUntil(com.google.protobuf.Timestamp value) { + if (validUntilBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && validUntil_ != null + && validUntil_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getValidUntilBuilder().mergeFrom(value); + } else { + validUntil_ = value; + } + } else { + validUntilBuilder_.mergeFrom(value); + } + if (validUntil_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public Builder clearValidUntil() { + bitField0_ = (bitField0_ & ~0x00000004); + validUntil_ = null; + if (validUntilBuilder_ != null) { + validUntilBuilder_.dispose(); + validUntilBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public com.google.protobuf.Timestamp.Builder getValidUntilBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetValidUntilFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + public com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder() { + if (validUntilBuilder_ != null) { + return validUntilBuilder_.getMessageOrBuilder(); + } else { + return validUntil_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : validUntil_; + } + } + + /** + * + * + *
    +     * The time at which the prepared query token becomes invalid.
    +     * A token may become invalid early due to changes in the data being read, but
    +     * it provides a guideline to refresh query plans asynchronously.
    +     * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetValidUntilFieldBuilder() { + if (validUntilBuilder_ == null) { + validUntilBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getValidUntil(), getParentForChildren(), isClean()); + validUntil_ = null; + } + return validUntilBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.PrepareQueryResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.PrepareQueryResponse) + private static final com.google.bigtable.v2.PrepareQueryResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.PrepareQueryResponse(); + } + + public static com.google.bigtable.v2.PrepareQueryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrepareQueryResponse 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.bigtable.v2.PrepareQueryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponseOrBuilder.java new file mode 100644 index 0000000000..95fd497e2a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PrepareQueryResponseOrBuilder.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 + * + * 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface PrepareQueryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.PrepareQueryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + * + * @return The metadata. + */ + com.google.bigtable.v2.ResultSetMetadata getMetadata(); + + /** + * + * + *
    +   * Structure of rows in the response stream of `ExecuteQueryResponse` for the
    +   * returned `prepared_query`.
    +   * 
    + * + * .google.bigtable.v2.ResultSetMetadata metadata = 1; + */ + com.google.bigtable.v2.ResultSetMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
    +   * A serialized prepared query. Clients should treat this as an opaque
    +   * blob of bytes to send in `ExecuteQueryRequest`.
    +   * 
    + * + * bytes prepared_query = 2; + * + * @return The preparedQuery. + */ + com.google.protobuf.ByteString getPreparedQuery(); + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return Whether the validUntil field is set. + */ + boolean hasValidUntil(); + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + * + * @return The validUntil. + */ + com.google.protobuf.Timestamp getValidUntil(); + + /** + * + * + *
    +   * The time at which the prepared query token becomes invalid.
    +   * A token may become invalid early due to changes in the data being read, but
    +   * it provides a guideline to refresh query plans asynchronously.
    +   * 
    + * + * .google.protobuf.Timestamp valid_until = 3; + */ + com.google.protobuf.TimestampOrBuilder getValidUntilOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormat.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormat.java index 0fff1e6a83..4328352d16 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormat.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.v2.ProtoFormat} */ -public final class ProtoFormat extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ProtoFormat extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoFormat) ProtoFormatOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtoFormat"); + } + // Use ProtoFormat.newBuilder() to construct. - private ProtoFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ProtoFormat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ProtoFormat() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ProtoFormat(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoFormat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable @@ -152,38 +159,38 @@ public static com.google.bigtable.v2.ProtoFormat parseFrom( public static com.google.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat 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); } @@ -206,10 +213,11 @@ 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; } + /** * * @@ -220,7 +228,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ProtoFormat} */ - 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.bigtable.v2.ProtoFormat) com.google.bigtable.v2.ProtoFormatOrBuilder { @@ -230,7 +238,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoFormat_fieldAccessorTable @@ -242,7 +250,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ProtoFormat.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -279,39 +287,6 @@ public com.google.bigtable.v2.ProtoFormat 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.bigtable.v2.ProtoFormat) { @@ -367,17 +342,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.bigtable.v2.ProtoFormat) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormatOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormatOrBuilder.java index 2dd6df5b29..f3e1dd600f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormatOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoFormatOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ProtoFormatOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoFormat) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRows.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRows.java index fa2a5ae06a..7d06b910a4 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRows.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRows.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -32,13 +33,25 @@ * * Protobuf type {@code google.bigtable.v2.ProtoRows} */ -public final class ProtoRows extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ProtoRows extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoRows) ProtoRowsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtoRows"); + } + // Use ProtoRows.newBuilder() to construct. - private ProtoRows(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ProtoRows(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,18 +59,12 @@ private ProtoRows() { values_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ProtoRows(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_ProtoRows_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List values_; + /** * * @@ -84,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getValuesList() { return values_; } + /** * * @@ -99,6 +108,7 @@ public java.util.List getValuesList() { public java.util.List getValuesOrBuilderList() { return values_; } + /** * * @@ -114,6 +124,7 @@ public java.util.List getValues public int getValuesCount() { return values_.size(); } + /** * * @@ -129,6 +140,7 @@ public int getValuesCount() { public com.google.bigtable.v2.Value getValues(int index) { return values_.get(index); } + /** * * @@ -246,38 +258,38 @@ public static com.google.bigtable.v2.ProtoRows parseFrom( public static com.google.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows 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); } @@ -300,10 +312,11 @@ 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 +330,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ProtoRows} */ - 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.bigtable.v2.ProtoRows) com.google.bigtable.v2.ProtoRowsOrBuilder { @@ -327,7 +340,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoRows_fieldAccessorTable @@ -339,7 +352,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ProtoRows.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -404,39 +417,6 @@ private void buildPartial0(com.google.bigtable.v2.ProtoRows 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.bigtable.v2.ProtoRows) { @@ -468,8 +448,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ProtoRows other) { values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000001); valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); @@ -543,7 +523,7 @@ private void ensureValuesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> @@ -567,6 +547,7 @@ public java.util.List getValuesList() { return valuesBuilder_.getMessageList(); } } + /** * * @@ -585,6 +566,7 @@ public int getValuesCount() { return valuesBuilder_.getCount(); } } + /** * * @@ -603,6 +585,7 @@ public com.google.bigtable.v2.Value getValues(int index) { return valuesBuilder_.getMessage(index); } } + /** * * @@ -627,6 +610,7 @@ public Builder setValues(int index, com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -648,6 +632,7 @@ public Builder setValues(int index, com.google.bigtable.v2.Value.Builder builder } return this; } + /** * * @@ -672,6 +657,7 @@ public Builder addValues(com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -696,6 +682,7 @@ public Builder addValues(int index, com.google.bigtable.v2.Value value) { } return this; } + /** * * @@ -717,6 +704,7 @@ public Builder addValues(com.google.bigtable.v2.Value.Builder builderForValue) { } return this; } + /** * * @@ -738,6 +726,7 @@ public Builder addValues(int index, com.google.bigtable.v2.Value.Builder builder } return this; } + /** * * @@ -759,6 +748,7 @@ public Builder addAllValues(java.lang.Iterablerepeated .google.bigtable.v2.Value values = 2; */ public com.google.bigtable.v2.Value.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); + return internalGetValuesFieldBuilder().getBuilder(index); } + /** * * @@ -833,6 +826,7 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { return valuesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -852,6 +846,7 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { return java.util.Collections.unmodifiableList(values_); } } + /** * * @@ -864,8 +859,10 @@ public com.google.bigtable.v2.ValueOrBuilder getValuesOrBuilder(int index) { * repeated .google.bigtable.v2.Value values = 2; */ public com.google.bigtable.v2.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); + return internalGetValuesFieldBuilder() + .addBuilder(com.google.bigtable.v2.Value.getDefaultInstance()); } + /** * * @@ -878,9 +875,10 @@ public com.google.bigtable.v2.Value.Builder addValuesBuilder() { * repeated .google.bigtable.v2.Value values = 2; */ public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() + return internalGetValuesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Value.getDefaultInstance()); } + /** * * @@ -893,17 +891,17 @@ public com.google.bigtable.v2.Value.Builder addValuesBuilder(int index) { * repeated .google.bigtable.v2.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.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder> - getValuesFieldBuilder() { + internalGetValuesFieldBuilder() { if (valuesBuilder_ == null) { valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Value, com.google.bigtable.v2.Value.Builder, com.google.bigtable.v2.ValueOrBuilder>( @@ -913,17 +911,6 @@ public java.util.List getValuesBuilderList 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.bigtable.v2.ProtoRows) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatch.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatch.java index e2c981cb16..4f2b966975 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatch.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatch.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,27 +14,40 @@ * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE // source: google/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** * * *
    - * Batch of serialized ProtoRows.
    + * A part of a serialized `ProtoRows` message.
      * 
    * * Protobuf type {@code google.bigtable.v2.ProtoRowsBatch} */ -public final class ProtoRowsBatch extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ProtoRowsBatch extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoRowsBatch) ProtoRowsBatchOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtoRowsBatch"); + } + // Use ProtoRowsBatch.newBuilder() to construct. - private ProtoRowsBatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ProtoRowsBatch(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ProtoRowsBatch() { batchData_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ProtoRowsBatch(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoRowsBatch_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable @@ -65,12 +72,16 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int BATCH_DATA_FIELD_NUMBER = 1; private com.google.protobuf.ByteString batchData_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
    -   * Merge partial results by concatenating these bytes, then parsing the
    -   * overall value as a `ProtoRows` message.
    +   * Part of a serialized `ProtoRows` message.
    +   * A complete, parseable ProtoRows message is constructed by
    +   * concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The
    +   * `PartialResultSet` that contains the last part has `complete_batch` set to
    +   * `true`.
        * 
    * * bytes batch_data = 1; @@ -181,38 +192,38 @@ public static com.google.bigtable.v2.ProtoRowsBatch parseFrom( public static com.google.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch 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); } @@ -235,20 +246,21 @@ 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; } + /** * * *
    -   * Batch of serialized ProtoRows.
    +   * A part of a serialized `ProtoRows` message.
        * 
    * * Protobuf type {@code google.bigtable.v2.ProtoRowsBatch} */ - 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.bigtable.v2.ProtoRowsBatch) com.google.bigtable.v2.ProtoRowsBatchOrBuilder { @@ -258,7 +270,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoRowsBatch_fieldAccessorTable @@ -270,7 +282,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ProtoRowsBatch.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -320,39 +332,6 @@ private void buildPartial0(com.google.bigtable.v2.ProtoRowsBatch 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.bigtable.v2.ProtoRowsBatch) { @@ -365,7 +344,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.ProtoRowsBatch other) { if (other == com.google.bigtable.v2.ProtoRowsBatch.getDefaultInstance()) return this; - if (other.getBatchData() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getBatchData().isEmpty()) { setBatchData(other.getBatchData()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -420,12 +399,16 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString batchData_ = com.google.protobuf.ByteString.EMPTY; + /** * * *
    -     * Merge partial results by concatenating these bytes, then parsing the
    -     * overall value as a `ProtoRows` message.
    +     * Part of a serialized `ProtoRows` message.
    +     * A complete, parseable ProtoRows message is constructed by
    +     * concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The
    +     * `PartialResultSet` that contains the last part has `complete_batch` set to
    +     * `true`.
          * 
    * * bytes batch_data = 1; @@ -436,12 +419,16 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getBatchData() { return batchData_; } + /** * * *
    -     * Merge partial results by concatenating these bytes, then parsing the
    -     * overall value as a `ProtoRows` message.
    +     * Part of a serialized `ProtoRows` message.
    +     * A complete, parseable ProtoRows message is constructed by
    +     * concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The
    +     * `PartialResultSet` that contains the last part has `complete_batch` set to
    +     * `true`.
          * 
    * * bytes batch_data = 1; @@ -458,12 +445,16 @@ public Builder setBatchData(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * *
    -     * Merge partial results by concatenating these bytes, then parsing the
    -     * overall value as a `ProtoRows` message.
    +     * Part of a serialized `ProtoRows` message.
    +     * A complete, parseable ProtoRows message is constructed by
    +     * concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The
    +     * `PartialResultSet` that contains the last part has `complete_batch` set to
    +     * `true`.
          * 
    * * bytes batch_data = 1; @@ -477,17 +468,6 @@ public Builder clearBatchData() { 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.bigtable.v2.ProtoRowsBatch) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatchOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatchOrBuilder.java index e7ef6df0d9..58abe56591 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatchOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsBatchOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ProtoRowsBatchOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoRowsBatch) @@ -28,8 +30,11 @@ public interface ProtoRowsBatchOrBuilder * * *
    -   * Merge partial results by concatenating these bytes, then parsing the
    -   * overall value as a `ProtoRows` message.
    +   * Part of a serialized `ProtoRows` message.
    +   * A complete, parseable ProtoRows message is constructed by
    +   * concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The
    +   * `PartialResultSet` that contains the last part has `complete_batch` set to
    +   * `true`.
        * 
    * * bytes batch_data = 1; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsOrBuilder.java index 27c74177bc..928f4b54ed 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoRowsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ProtoRowsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoRows) @@ -36,6 +38,7 @@ public interface ProtoRowsOrBuilder * repeated .google.bigtable.v2.Value values = 2; */ java.util.List getValuesList(); + /** * * @@ -48,6 +51,7 @@ public interface ProtoRowsOrBuilder * repeated .google.bigtable.v2.Value values = 2; */ com.google.bigtable.v2.Value getValues(int index); + /** * * @@ -60,6 +64,7 @@ public interface ProtoRowsOrBuilder * repeated .google.bigtable.v2.Value values = 2; */ int getValuesCount(); + /** * * @@ -72,6 +77,7 @@ public interface ProtoRowsOrBuilder * repeated .google.bigtable.v2.Value values = 2; */ java.util.List getValuesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchema.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchema.java index 980f3b7cbb..e8efbf52a3 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchema.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchema.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.ProtoSchema} */ -public final class ProtoSchema extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ProtoSchema extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ProtoSchema) ProtoSchemaOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtoSchema"); + } + // Use ProtoSchema.newBuilder() to construct. - private ProtoSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ProtoSchema(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private ProtoSchema() { columns_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ProtoSchema(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoSchema_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List columns_; + /** * * @@ -80,6 +88,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getColumnsList() { return columns_; } + /** * * @@ -94,6 +103,7 @@ public java.util.List getColumnsList() { getColumnsOrBuilderList() { return columns_; } + /** * * @@ -107,6 +117,7 @@ public java.util.List getColumnsList() { public int getColumnsCount() { return columns_.size(); } + /** * * @@ -120,6 +131,7 @@ public int getColumnsCount() { public com.google.bigtable.v2.ColumnMetadata getColumns(int index) { return columns_.get(index); } + /** * * @@ -235,38 +247,38 @@ public static com.google.bigtable.v2.ProtoSchema parseFrom( public static com.google.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema 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); } @@ -289,10 +301,11 @@ 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; } + /** * * @@ -302,7 +315,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ProtoSchema} */ - 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.bigtable.v2.ProtoSchema) com.google.bigtable.v2.ProtoSchemaOrBuilder { @@ -312,7 +325,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ProtoSchema_fieldAccessorTable @@ -324,7 +337,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ProtoSchema.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -389,39 +402,6 @@ private void buildPartial0(com.google.bigtable.v2.ProtoSchema 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.bigtable.v2.ProtoSchema) { @@ -453,8 +433,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ProtoSchema other) { columns_ = other.columns_; bitField0_ = (bitField0_ & ~0x00000001); columnsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetColumnsFieldBuilder() : null; } else { columnsBuilder_.addAllMessages(other.columns_); @@ -529,7 +509,7 @@ private void ensureColumnsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ColumnMetadata, com.google.bigtable.v2.ColumnMetadata.Builder, com.google.bigtable.v2.ColumnMetadataOrBuilder> @@ -551,6 +531,7 @@ public java.util.List getColumnsList() { return columnsBuilder_.getMessageList(); } } + /** * * @@ -567,6 +548,7 @@ public int getColumnsCount() { return columnsBuilder_.getCount(); } } + /** * * @@ -583,6 +565,7 @@ public com.google.bigtable.v2.ColumnMetadata getColumns(int index) { return columnsBuilder_.getMessage(index); } } + /** * * @@ -605,6 +588,7 @@ public Builder setColumns(int index, com.google.bigtable.v2.ColumnMetadata value } return this; } + /** * * @@ -625,6 +609,7 @@ public Builder setColumns( } return this; } + /** * * @@ -647,6 +632,7 @@ public Builder addColumns(com.google.bigtable.v2.ColumnMetadata value) { } return this; } + /** * * @@ -669,6 +655,7 @@ public Builder addColumns(int index, com.google.bigtable.v2.ColumnMetadata value } return this; } + /** * * @@ -688,6 +675,7 @@ public Builder addColumns(com.google.bigtable.v2.ColumnMetadata.Builder builderF } return this; } + /** * * @@ -708,6 +696,7 @@ public Builder addColumns( } return this; } + /** * * @@ -728,6 +717,7 @@ public Builder addAllColumns( } return this; } + /** * * @@ -747,6 +737,7 @@ public Builder clearColumns() { } return this; } + /** * * @@ -766,6 +757,7 @@ public Builder removeColumns(int index) { } return this; } + /** * * @@ -776,8 +768,9 @@ public Builder removeColumns(int index) { * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ public com.google.bigtable.v2.ColumnMetadata.Builder getColumnsBuilder(int index) { - return getColumnsFieldBuilder().getBuilder(index); + return internalGetColumnsFieldBuilder().getBuilder(index); } + /** * * @@ -794,6 +787,7 @@ public com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int in return columnsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -811,6 +805,7 @@ public com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int in return java.util.Collections.unmodifiableList(columns_); } } + /** * * @@ -821,9 +816,10 @@ public com.google.bigtable.v2.ColumnMetadataOrBuilder getColumnsOrBuilder(int in * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder() { - return getColumnsFieldBuilder() + return internalGetColumnsFieldBuilder() .addBuilder(com.google.bigtable.v2.ColumnMetadata.getDefaultInstance()); } + /** * * @@ -834,9 +830,10 @@ public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder() { * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder(int index) { - return getColumnsFieldBuilder() + return internalGetColumnsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.ColumnMetadata.getDefaultInstance()); } + /** * * @@ -847,17 +844,17 @@ public com.google.bigtable.v2.ColumnMetadata.Builder addColumnsBuilder(int index * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ public java.util.List getColumnsBuilderList() { - return getColumnsFieldBuilder().getBuilderList(); + return internalGetColumnsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ColumnMetadata, com.google.bigtable.v2.ColumnMetadata.Builder, com.google.bigtable.v2.ColumnMetadataOrBuilder> - getColumnsFieldBuilder() { + internalGetColumnsFieldBuilder() { if (columnsBuilder_ == null) { columnsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ColumnMetadata, com.google.bigtable.v2.ColumnMetadata.Builder, com.google.bigtable.v2.ColumnMetadataOrBuilder>( @@ -867,17 +864,6 @@ public java.util.List getColumnsB return columnsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ProtoSchema) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchemaOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchemaOrBuilder.java index 24cc5d0146..1b29f94d7c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchemaOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ProtoSchemaOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ProtoSchemaOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ProtoSchema) @@ -34,6 +36,7 @@ public interface ProtoSchemaOrBuilder * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ java.util.List getColumnsList(); + /** * * @@ -44,6 +47,7 @@ public interface ProtoSchemaOrBuilder * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ com.google.bigtable.v2.ColumnMetadata getColumns(int index); + /** * * @@ -54,6 +58,7 @@ public interface ProtoSchemaOrBuilder * repeated .google.bigtable.v2.ColumnMetadata columns = 1; */ int getColumnsCount(); + /** * * @@ -65,6 +70,7 @@ public interface ProtoSchemaOrBuilder */ java.util.List getColumnsOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java index ea23225104..eb4d942003 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.RateLimitInfo} */ -public final class RateLimitInfo extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RateLimitInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RateLimitInfo) RateLimitInfoOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RateLimitInfo"); + } + // Use RateLimitInfo.newBuilder() to construct. - private RateLimitInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RateLimitInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RateLimitInfo() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RateLimitInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_RateLimitInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PERIOD_FIELD_NUMBER = 1; private com.google.protobuf.Duration period_; + /** * * @@ -84,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -104,6 +113,7 @@ public boolean hasPeriod() { public com.google.protobuf.Duration getPeriod() { return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_; } + /** * * @@ -125,6 +135,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { public static final int FACTOR_FIELD_NUMBER = 2; private double factor_ = 0D; + /** * * @@ -135,7 +146,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { * target load should be 80. After adjusting, the client should ignore * `factor` until another `period` has passed. * - * The client can measure its load using any unit that's comparable over time + * The client can measure its load using any unit that's comparable over time. * For example, QPS can be used as long as each request involves a similar * amount of work. * @@ -265,38 +276,38 @@ public static com.google.bigtable.v2.RateLimitInfo parseFrom( public static com.google.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo 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); } @@ -319,10 +330,11 @@ 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; } + /** * * @@ -332,7 +344,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.RateLimitInfo} */ - 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.bigtable.v2.RateLimitInfo) com.google.bigtable.v2.RateLimitInfoOrBuilder { @@ -342,7 +354,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable @@ -356,14 +368,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) { - getPeriodFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPeriodFieldBuilder(); } } @@ -423,39 +435,6 @@ private void buildPartial0(com.google.bigtable.v2.RateLimitInfo 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.bigtable.v2.RateLimitInfo) { @@ -471,7 +450,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RateLimitInfo other) { if (other.hasPeriod()) { mergePeriod(other.getPeriod()); } - if (other.getFactor() != 0D) { + if (java.lang.Double.doubleToRawLongBits(other.getFactor()) != 0) { setFactor(other.getFactor()); } this.mergeUnknownFields(other.getUnknownFields()); @@ -502,7 +481,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getPeriodFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetPeriodFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -532,11 +511,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration period_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> periodBuilder_; + /** * * @@ -556,6 +536,7 @@ public Builder mergeFrom( public boolean hasPeriod() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -579,6 +560,7 @@ public com.google.protobuf.Duration getPeriod() { return periodBuilder_.getMessage(); } } + /** * * @@ -606,6 +588,7 @@ public Builder setPeriod(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -630,6 +613,7 @@ public Builder setPeriod(com.google.protobuf.Duration.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -662,6 +646,7 @@ public Builder mergePeriod(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -686,6 +671,7 @@ public Builder clearPeriod() { onChanged(); return this; } + /** * * @@ -703,8 +689,9 @@ public Builder clearPeriod() { public com.google.protobuf.Duration.Builder getPeriodBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getPeriodFieldBuilder().getBuilder(); + return internalGetPeriodFieldBuilder().getBuilder(); } + /** * * @@ -726,6 +713,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_; } } + /** * * @@ -740,14 +728,14 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { * * .google.protobuf.Duration period = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getPeriodFieldBuilder() { + internalGetPeriodFieldBuilder() { if (periodBuilder_ == null) { periodBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -758,6 +746,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { } private double factor_; + /** * * @@ -768,7 +757,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { * target load should be 80. After adjusting, the client should ignore * `factor` until another `period` has passed. * - * The client can measure its load using any unit that's comparable over time + * The client can measure its load using any unit that's comparable over time. * For example, QPS can be used as long as each request involves a similar * amount of work. * @@ -781,6 +770,7 @@ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() { public double getFactor() { return factor_; } + /** * * @@ -791,7 +781,7 @@ public double getFactor() { * target load should be 80. After adjusting, the client should ignore * `factor` until another `period` has passed. * - * The client can measure its load using any unit that's comparable over time + * The client can measure its load using any unit that's comparable over time. * For example, QPS can be used as long as each request involves a similar * amount of work. * @@ -808,6 +798,7 @@ public Builder setFactor(double value) { onChanged(); return this; } + /** * * @@ -818,7 +809,7 @@ public Builder setFactor(double value) { * target load should be 80. After adjusting, the client should ignore * `factor` until another `period` has passed. * - * The client can measure its load using any unit that's comparable over time + * The client can measure its load using any unit that's comparable over time. * For example, QPS can be used as long as each request involves a similar * amount of work. * @@ -834,17 +825,6 @@ public Builder clearFactor() { 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.bigtable.v2.RateLimitInfo) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java index 73a318d1da..f6798ac14a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RateLimitInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RateLimitInfo) @@ -41,6 +43,7 @@ public interface RateLimitInfoOrBuilder * @return Whether the period field is set. */ boolean hasPeriod(); + /** * * @@ -58,6 +61,7 @@ public interface RateLimitInfoOrBuilder * @return The period. */ com.google.protobuf.Duration getPeriod(); + /** * * @@ -84,7 +88,7 @@ public interface RateLimitInfoOrBuilder * target load should be 80. After adjusting, the client should ignore * `factor` until another `period` has passed. * - * The client can measure its load using any unit that's comparable over time + * The client can measure its load using any unit that's comparable over time. * For example, QPS can be used as long as each request involves a similar * amount of work. * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java index 0574c30a89..5ce915028b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamRequest} */ -public final class ReadChangeStreamRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadChangeStreamRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamRequest) ReadChangeStreamRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadChangeStreamRequest"); + } + // Use ReadChangeStreamRequest.newBuilder() to construct. - private ReadChangeStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadChangeStreamRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ReadChangeStreamRequest() { appProfileId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadChangeStreamRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable @@ -83,6 +90,7 @@ public enum StartFromCase private StartFromCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -119,6 +127,7 @@ public StartFromCase getStartFromCase() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -147,6 +156,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -180,6 +190,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -205,6 +216,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -233,6 +245,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int PARTITION_FIELD_NUMBER = 3; private com.google.bigtable.v2.StreamPartition partition_; + /** * * @@ -248,6 +261,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -265,6 +279,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -282,6 +297,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { } public static final int START_TIME_FIELD_NUMBER = 4; + /** * * @@ -300,6 +316,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { public boolean hasStartTime() { return startFromCase_ == 4; } + /** * * @@ -321,6 +338,7 @@ public com.google.protobuf.Timestamp getStartTime() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -342,6 +360,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } public static final int CONTINUATION_TOKENS_FIELD_NUMBER = 6; + /** * * @@ -351,10 +370,10 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -366,6 +385,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasContinuationTokens() { return startFromCase_ == 6; } + /** * * @@ -375,10 +395,10 @@ public boolean hasContinuationTokens() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -393,6 +413,7 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { } return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } + /** * * @@ -402,10 +423,10 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -421,6 +442,7 @@ public com.google.bigtable.v2.StreamContinuationTokensOrBuilder getContinuationT public static final int END_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp endTime_; + /** * * @@ -438,6 +460,7 @@ public com.google.bigtable.v2.StreamContinuationTokensOrBuilder getContinuationT public boolean hasEndTime() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -455,6 +478,7 @@ public boolean hasEndTime() { public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } + /** * * @@ -473,6 +497,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public static final int HEARTBEAT_DURATION_FIELD_NUMBER = 7; private com.google.protobuf.Duration heartbeatDuration_; + /** * * @@ -489,6 +514,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public boolean hasHeartbeatDuration() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -507,6 +533,7 @@ public com.google.protobuf.Duration getHeartbeatDuration() { ? com.google.protobuf.Duration.getDefaultInstance() : heartbeatDuration_; } + /** * * @@ -538,11 +565,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getPartition()); @@ -568,11 +595,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPartition()); @@ -715,38 +742,38 @@ public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( public static com.google.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest 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); } @@ -769,10 +796,11 @@ 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; } + /** * * @@ -783,7 +811,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamRequest} */ - 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.bigtable.v2.ReadChangeStreamRequest) com.google.bigtable.v2.ReadChangeStreamRequestOrBuilder { @@ -793,7 +821,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable @@ -807,16 +835,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) { - getPartitionFieldBuilder(); - getEndTimeFieldBuilder(); - getHeartbeatDurationFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPartitionFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetHeartbeatDurationFieldBuilder(); } } @@ -922,39 +950,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ReadChangeStreamRequest 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.bigtable.v2.ReadChangeStreamRequest) { @@ -1042,33 +1037,35 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); startFromCase_ = 4; break; } // case 34 case 42: { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 42 case 50: { input.readMessage( - getContinuationTokensFieldBuilder().getBuilder(), extensionRegistry); + internalGetContinuationTokensFieldBuilder().getBuilder(), extensionRegistry); startFromCase_ = 6; break; } // case 50 case 58: { input.readMessage( - getHeartbeatDurationFieldBuilder().getBuilder(), extensionRegistry); + internalGetHeartbeatDurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 @@ -1106,6 +1103,7 @@ public Builder clearStartFrom() { private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1133,6 +1131,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1160,6 +1159,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1186,6 +1186,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1208,6 +1209,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1237,6 +1239,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1261,6 +1264,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1285,6 +1289,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1308,6 +1313,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1327,6 +1333,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1353,11 +1360,12 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.bigtable.v2.StreamPartition partition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -1372,6 +1380,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public boolean hasPartition() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1392,6 +1401,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -1414,6 +1424,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -1433,6 +1444,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -1460,6 +1472,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -1479,6 +1492,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -1491,8 +1505,9 @@ public Builder clearPartition() { public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getPartitionFieldBuilder().getBuilder(); + return internalGetPartitionFieldBuilder().getBuilder(); } + /** * * @@ -1511,6 +1526,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * @@ -1520,14 +1536,14 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { * * .google.bigtable.v2.StreamPartition partition = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> - getPartitionFieldBuilder() { + internalGetPartitionFieldBuilder() { if (partitionBuilder_ == null) { partitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder>( @@ -1537,11 +1553,12 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { return partitionBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** * * @@ -1560,6 +1577,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { public boolean hasStartTime() { return startFromCase_ == 4; } + /** * * @@ -1588,6 +1606,7 @@ public com.google.protobuf.Timestamp getStartTime() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1613,6 +1632,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { startFromCase_ = 4; return this; } + /** * * @@ -1635,6 +1655,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu startFromCase_ = 4; return this; } + /** * * @@ -1669,6 +1690,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { startFromCase_ = 4; return this; } + /** * * @@ -1697,6 +1719,7 @@ public Builder clearStartTime() { } return this; } + /** * * @@ -1710,8 +1733,9 @@ public Builder clearStartTime() { * .google.protobuf.Timestamp start_time = 4; */ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - return getStartTimeFieldBuilder().getBuilder(); + return internalGetStartTimeFieldBuilder().getBuilder(); } + /** * * @@ -1735,6 +1759,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -1747,17 +1772,17 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * .google.protobuf.Timestamp start_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> - getStartTimeFieldBuilder() { + internalGetStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { if (!(startFromCase_ == 4)) { startFrom_ = com.google.protobuf.Timestamp.getDefaultInstance(); } startTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -1769,11 +1794,12 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return startTimeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationTokens, com.google.bigtable.v2.StreamContinuationTokens.Builder, com.google.bigtable.v2.StreamContinuationTokensOrBuilder> continuationTokensBuilder_; + /** * * @@ -1783,10 +1809,10 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1798,6 +1824,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { public boolean hasContinuationTokens() { return startFromCase_ == 6; } + /** * * @@ -1807,10 +1834,10 @@ public boolean hasContinuationTokens() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1832,6 +1859,7 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } + /** * * @@ -1841,10 +1869,10 @@ public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1863,6 +1891,7 @@ public Builder setContinuationTokens(com.google.bigtable.v2.StreamContinuationTo startFromCase_ = 6; return this; } + /** * * @@ -1872,10 +1901,10 @@ public Builder setContinuationTokens(com.google.bigtable.v2.StreamContinuationTo * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1892,6 +1921,7 @@ public Builder setContinuationTokens( startFromCase_ = 6; return this; } + /** * * @@ -1901,10 +1931,10 @@ public Builder setContinuationTokens( * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1933,6 +1963,7 @@ public Builder mergeContinuationTokens(com.google.bigtable.v2.StreamContinuation startFromCase_ = 6; return this; } + /** * * @@ -1942,10 +1973,10 @@ public Builder mergeContinuationTokens(com.google.bigtable.v2.StreamContinuation * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -1967,6 +1998,7 @@ public Builder clearContinuationTokens() { } return this; } + /** * * @@ -1976,18 +2008,19 @@ public Builder clearContinuationTokens() { * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTokensBuilder() { - return getContinuationTokensFieldBuilder().getBuilder(); + return internalGetContinuationTokensFieldBuilder().getBuilder(); } + /** * * @@ -1997,10 +2030,10 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -2018,6 +2051,7 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } + /** * * @@ -2027,26 +2061,26 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationTokens, com.google.bigtable.v2.StreamContinuationTokens.Builder, com.google.bigtable.v2.StreamContinuationTokensOrBuilder> - getContinuationTokensFieldBuilder() { + internalGetContinuationTokensFieldBuilder() { if (continuationTokensBuilder_ == null) { if (!(startFromCase_ == 6)) { startFrom_ = com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } continuationTokensBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationTokens, com.google.bigtable.v2.StreamContinuationTokens.Builder, com.google.bigtable.v2.StreamContinuationTokensOrBuilder>( @@ -2061,11 +2095,12 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo } 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> endTimeBuilder_; + /** * * @@ -2082,6 +2117,7 @@ public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTo public boolean hasEndTime() { return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -2102,6 +2138,7 @@ public com.google.protobuf.Timestamp getEndTime() { return endTimeBuilder_.getMessage(); } } + /** * * @@ -2126,6 +2163,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -2147,6 +2185,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) onChanged(); return this; } + /** * * @@ -2176,6 +2215,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -2197,6 +2237,7 @@ public Builder clearEndTime() { onChanged(); return this; } + /** * * @@ -2211,8 +2252,9 @@ public Builder clearEndTime() { public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { bitField0_ |= 0x00000020; onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + return internalGetEndTimeFieldBuilder().getBuilder(); } + /** * * @@ -2231,6 +2273,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } + /** * * @@ -2242,14 +2285,14 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * .google.protobuf.Timestamp end_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> - 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>( @@ -2260,11 +2303,12 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } private com.google.protobuf.Duration heartbeatDuration_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> heartbeatDurationBuilder_; + /** * * @@ -2280,6 +2324,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { public boolean hasHeartbeatDuration() { return ((bitField0_ & 0x00000040) != 0); } + /** * * @@ -2301,6 +2346,7 @@ public com.google.protobuf.Duration getHeartbeatDuration() { return heartbeatDurationBuilder_.getMessage(); } } + /** * * @@ -2324,6 +2370,7 @@ public Builder setHeartbeatDuration(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -2344,6 +2391,7 @@ public Builder setHeartbeatDuration(com.google.protobuf.Duration.Builder builder onChanged(); return this; } + /** * * @@ -2372,6 +2420,7 @@ public Builder mergeHeartbeatDuration(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -2392,6 +2441,7 @@ public Builder clearHeartbeatDuration() { onChanged(); return this; } + /** * * @@ -2405,8 +2455,9 @@ public Builder clearHeartbeatDuration() { public com.google.protobuf.Duration.Builder getHeartbeatDurationBuilder() { bitField0_ |= 0x00000040; onChanged(); - return getHeartbeatDurationFieldBuilder().getBuilder(); + return internalGetHeartbeatDurationFieldBuilder().getBuilder(); } + /** * * @@ -2426,6 +2477,7 @@ public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { : heartbeatDuration_; } } + /** * * @@ -2436,14 +2488,14 @@ public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { * * .google.protobuf.Duration heartbeat_duration = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getHeartbeatDurationFieldBuilder() { + internalGetHeartbeatDurationFieldBuilder() { if (heartbeatDurationBuilder_ == null) { heartbeatDurationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -2453,17 +2505,6 @@ public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { return heartbeatDurationBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java index 4eda43c728..6f675afcd7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadChangeStreamRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamRequest) @@ -41,6 +43,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -73,6 +76,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -100,6 +104,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -112,6 +117,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The partition. */ com.google.bigtable.v2.StreamPartition getPartition(); + /** * * @@ -138,6 +144,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the startTime field is set. */ boolean hasStartTime(); + /** * * @@ -153,6 +160,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The startTime. */ com.google.protobuf.Timestamp getStartTime(); + /** * * @@ -176,10 +184,10 @@ public interface ReadChangeStreamRequestOrBuilder * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -188,6 +196,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the continuationTokens field is set. */ boolean hasContinuationTokens(); + /** * * @@ -197,10 +206,10 @@ public interface ReadChangeStreamRequestOrBuilder * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -209,6 +218,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The continuationTokens. */ com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens(); + /** * * @@ -218,10 +228,10 @@ public interface ReadChangeStreamRequestOrBuilder * the position. Tokens are delivered on the stream as part of `Heartbeat` * and `CloseStream` messages. * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case + * If a single token is provided, the token's partition must exactly match + * the request's partition. If multiple tokens are provided, as in the case * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + * cover the request's partition. Otherwise, INVALID_ARGUMENT will be * returned. * * @@ -243,6 +253,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the endTime field is set. */ boolean hasEndTime(); + /** * * @@ -257,6 +268,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The endTime. */ com.google.protobuf.Timestamp getEndTime(); + /** * * @@ -283,6 +295,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return Whether the heartbeatDuration field is set. */ boolean hasHeartbeatDuration(); + /** * * @@ -296,6 +309,7 @@ public interface ReadChangeStreamRequestOrBuilder * @return The heartbeatDuration. */ com.google.protobuf.Duration getHeartbeatDuration(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java index fa0044f72c..b6e30ba04b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse} */ -public final class ReadChangeStreamResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadChangeStreamResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse) ReadChangeStreamResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadChangeStreamResponse"); + } + // Use ReadChangeStreamResponse.newBuilder() to construct. - private ReadChangeStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadChangeStreamResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReadChangeStreamResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadChangeStreamResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable @@ -81,6 +88,7 @@ public interface MutationChunkOrBuilder * @return Whether the chunkInfo field is set. */ boolean hasChunkInfo(); + /** * * @@ -95,6 +103,7 @@ public interface MutationChunkOrBuilder * @return The chunkInfo. */ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo getChunkInfo(); + /** * * @@ -123,6 +132,7 @@ public interface MutationChunkOrBuilder * @return Whether the mutation field is set. */ boolean hasMutation(); + /** * * @@ -137,6 +147,7 @@ public interface MutationChunkOrBuilder * @return The mutation. */ com.google.bigtable.v2.Mutation getMutation(); + /** * * @@ -150,6 +161,7 @@ public interface MutationChunkOrBuilder */ com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder(); } + /** * * @@ -159,31 +171,36 @@ public interface MutationChunkOrBuilder * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} */ - public static final class MutationChunk extends com.google.protobuf.GeneratedMessageV3 + public static final class MutationChunk extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) MutationChunkOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MutationChunk"); + } + // Use MutationChunk.newBuilder() to construct. - private MutationChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private MutationChunk(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private MutationChunk() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new MutationChunk(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable @@ -237,6 +254,7 @@ public interface ChunkInfoOrBuilder */ boolean getLastChunk(); } + /** * * @@ -248,31 +266,36 @@ public interface ChunkInfoOrBuilder * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} */ - public static final class ChunkInfo extends com.google.protobuf.GeneratedMessageV3 + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) ChunkInfoOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkInfo"); + } + // Use ChunkInfo.newBuilder() to construct. - private ChunkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ChunkInfo() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ChunkInfo(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable @@ -284,6 +307,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int CHUNKED_VALUE_SIZE_FIELD_NUMBER = 1; private int chunkedValueSize_ = 0; + /** * * @@ -302,6 +326,7 @@ public int getChunkedValueSize() { public static final int CHUNKED_VALUE_OFFSET_FIELD_NUMBER = 2; private int chunkedValueOffset_ = 0; + /** * * @@ -321,6 +346,7 @@ public int getChunkedValueOffset() { public static final int LAST_CHUNK_FIELD_NUMBER = 3; private boolean lastChunk_ = false; + /** * * @@ -460,7 +486,7 @@ public int hashCode() { public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo @@ -468,13 +494,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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo @@ -482,13 +508,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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo @@ -496,7 +522,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); } @@ -521,10 +547,11 @@ 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; } + /** * * @@ -537,7 +564,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder { @@ -547,7 +574,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable @@ -561,7 +588,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -624,41 +651,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 @@ -749,6 +741,7 @@ public Builder mergeFrom( private int bitField0_; private int chunkedValueSize_; + /** * * @@ -764,6 +757,7 @@ public Builder mergeFrom( public int getChunkedValueSize() { return chunkedValueSize_; } + /** * * @@ -783,6 +777,7 @@ public Builder setChunkedValueSize(int value) { onChanged(); return this; } + /** * * @@ -802,6 +797,7 @@ public Builder clearChunkedValueSize() { } private int chunkedValueOffset_; + /** * * @@ -818,6 +814,7 @@ public Builder clearChunkedValueSize() { public int getChunkedValueOffset() { return chunkedValueOffset_; } + /** * * @@ -838,6 +835,7 @@ public Builder setChunkedValueOffset(int value) { onChanged(); return this; } + /** * * @@ -858,6 +856,7 @@ public Builder clearChunkedValueOffset() { } private boolean lastChunk_; + /** * * @@ -873,6 +872,7 @@ public Builder clearChunkedValueOffset() { public boolean getLastChunk() { return lastChunk_; } + /** * * @@ -892,6 +892,7 @@ public Builder setLastChunk(boolean value) { onChanged(); return this; } + /** * * @@ -910,18 +911,6 @@ public Builder clearLastChunk() { 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) } @@ -981,6 +970,7 @@ public com.google.protobuf.Parser getParserForType() { private int bitField0_; public static final int CHUNK_INFO_FIELD_NUMBER = 1; private com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunkInfo_; + /** * * @@ -998,6 +988,7 @@ public com.google.protobuf.Parser getParserForType() { public boolean hasChunkInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1018,6 +1009,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo g .getDefaultInstance() : chunkInfo_; } + /** * * @@ -1040,6 +1032,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo g public static final int MUTATION_FIELD_NUMBER = 2; private com.google.bigtable.v2.Mutation mutation_; + /** * * @@ -1057,6 +1050,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo g public boolean hasMutation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1074,6 +1068,7 @@ public boolean hasMutation() { public com.google.bigtable.v2.Mutation getMutation() { return mutation_ == null ? com.google.bigtable.v2.Mutation.getDefaultInstance() : mutation_; } + /** * * @@ -1210,38 +1205,38 @@ public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk pars public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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); } @@ -1265,11 +1260,11 @@ 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; } + /** * * @@ -1279,8 +1274,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} */ - 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk) com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder { @@ -1290,7 +1284,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable @@ -1304,15 +1298,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) { - getChunkInfoFieldBuilder(); - getMutationFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetChunkInfoFieldBuilder(); + internalGetMutationFieldBuilder(); } } @@ -1380,41 +1374,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.bigtable.v2.ReadChangeStreamResponse.MutationChunk) { @@ -1464,13 +1423,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getChunkInfoFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getMutationFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetMutationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -1494,11 +1455,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunkInfo_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder> chunkInfoBuilder_; + /** * * @@ -1515,6 +1477,7 @@ public Builder mergeFrom( public boolean hasChunkInfo() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1539,6 +1502,7 @@ public boolean hasChunkInfo() { return chunkInfoBuilder_.getMessage(); } } + /** * * @@ -1564,6 +1528,7 @@ public Builder setChunkInfo( onChanged(); return this; } + /** * * @@ -1587,6 +1552,7 @@ public Builder setChunkInfo( onChanged(); return this; } + /** * * @@ -1619,6 +1585,7 @@ public Builder mergeChunkInfo( } return this; } + /** * * @@ -1640,6 +1607,7 @@ public Builder clearChunkInfo() { onChanged(); return this; } + /** * * @@ -1655,8 +1623,9 @@ public Builder clearChunkInfo() { getChunkInfoBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getChunkInfoFieldBuilder().getBuilder(); + return internalGetChunkInfoFieldBuilder().getBuilder(); } + /** * * @@ -1679,6 +1648,7 @@ public Builder clearChunkInfo() { : chunkInfo_; } } + /** * * @@ -1690,14 +1660,14 @@ public Builder clearChunkInfo() { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder> - getChunkInfoFieldBuilder() { + internalGetChunkInfoFieldBuilder() { if (chunkInfoBuilder_ == null) { chunkInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder>( @@ -1708,11 +1678,12 @@ public Builder clearChunkInfo() { } private com.google.bigtable.v2.Mutation mutation_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> mutationBuilder_; + /** * * @@ -1729,6 +1700,7 @@ public Builder clearChunkInfo() { public boolean hasMutation() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1751,6 +1723,7 @@ public com.google.bigtable.v2.Mutation getMutation() { return mutationBuilder_.getMessage(); } } + /** * * @@ -1775,6 +1748,7 @@ public Builder setMutation(com.google.bigtable.v2.Mutation value) { onChanged(); return this; } + /** * * @@ -1796,6 +1770,7 @@ public Builder setMutation(com.google.bigtable.v2.Mutation.Builder builderForVal onChanged(); return this; } + /** * * @@ -1825,6 +1800,7 @@ public Builder mergeMutation(com.google.bigtable.v2.Mutation value) { } return this; } + /** * * @@ -1846,6 +1822,7 @@ public Builder clearMutation() { onChanged(); return this; } + /** * * @@ -1860,8 +1837,9 @@ public Builder clearMutation() { public com.google.bigtable.v2.Mutation.Builder getMutationBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getMutationFieldBuilder().getBuilder(); + return internalGetMutationFieldBuilder().getBuilder(); } + /** * * @@ -1882,6 +1860,7 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { : mutation_; } } + /** * * @@ -1893,14 +1872,14 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { * * .google.bigtable.v2.Mutation mutation = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder> - getMutationFieldBuilder() { + internalGetMutationFieldBuilder() { if (mutationBuilder_ == null) { mutationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Mutation, com.google.bigtable.v2.Mutation.Builder, com.google.bigtable.v2.MutationOrBuilder>( @@ -1910,18 +1889,6 @@ public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { 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.bigtable.v2.ReadChangeStreamResponse.MutationChunk) } @@ -1994,6 +1961,7 @@ public interface DataChangeOrBuilder * @return The enum numeric value on the wire for type. */ int getTypeValue(); + /** * * @@ -2020,6 +1988,7 @@ public interface DataChangeOrBuilder * @return The sourceClusterId. */ java.lang.String getSourceClusterId(); + /** * * @@ -2061,6 +2030,7 @@ public interface DataChangeOrBuilder * @return Whether the commitTimestamp field is set. */ boolean hasCommitTimestamp(); + /** * * @@ -2073,6 +2043,7 @@ public interface DataChangeOrBuilder * @return The commitTimestamp. */ com.google.protobuf.Timestamp getCommitTimestamp(); + /** * * @@ -2115,6 +2086,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ java.util.List getChunksList(); + /** * * @@ -2127,6 +2099,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index); + /** * * @@ -2139,6 +2112,7 @@ public interface DataChangeOrBuilder * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ int getChunksCount(); + /** * * @@ -2152,6 +2126,7 @@ public interface DataChangeOrBuilder */ java.util.List getChunksOrBuilderList(); + /** * * @@ -2193,6 +2168,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return The token. */ java.lang.String getToken(); + /** * * @@ -2214,8 +2190,8 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2224,6 +2200,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return Whether the estimatedLowWatermark field is set. */ boolean hasEstimatedLowWatermark(); + /** * * @@ -2231,8 +2208,8 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2241,6 +2218,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * @return The estimatedLowWatermark. */ com.google.protobuf.Timestamp getEstimatedLowWatermark(); + /** * * @@ -2248,8 +2226,8 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2257,6 +2235,7 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks */ com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder(); } + /** * * @@ -2271,13 +2250,24 @@ com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunks * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.DataChange} */ - public static final class DataChange extends com.google.protobuf.GeneratedMessageV3 + public static final class DataChange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.DataChange) DataChangeOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataChange"); + } + // Use DataChange.newBuilder() to construct. - private DataChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private DataChange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -2289,19 +2279,13 @@ private DataChange() { token_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataChange(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable @@ -2364,6 +2348,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"); + } + /** * * @@ -2374,6 +2368,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** * * @@ -2384,6 +2379,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * USER = 1; */ public static final int USER_VALUE = 1; + /** * * @@ -2395,6 +2391,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * GARBAGE_COLLECTION = 2; */ public static final int GARBAGE_COLLECTION_VALUE = 2; + /** * * @@ -2466,7 +2463,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.bigtable.v2.ReadChangeStreamResponse.DataChange.getDescriptor() .getEnumTypes() .get(0); @@ -2496,6 +2493,7 @@ private Type(int value) { private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private int type_ = 0; + /** * * @@ -2511,6 +2509,7 @@ private Type(int value) { public int getTypeValue() { return type_; } + /** * * @@ -2535,6 +2534,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() @SuppressWarnings("serial") private volatile java.lang.Object sourceClusterId_ = ""; + /** * * @@ -2559,6 +2559,7 @@ public java.lang.String getSourceClusterId() { return s; } } + /** * * @@ -2586,6 +2587,7 @@ public com.google.protobuf.ByteString getSourceClusterIdBytes() { public static final int ROW_KEY_FIELD_NUMBER = 3; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -2606,6 +2608,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int COMMIT_TIMESTAMP_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp commitTimestamp_; + /** * * @@ -2621,6 +2624,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasCommitTimestamp() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2638,6 +2642,7 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTimestamp_; } + /** * * @@ -2656,6 +2661,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { public static final int TIEBREAKER_FIELD_NUMBER = 5; private int tiebreaker_ = 0; + /** * * @@ -2682,6 +2688,7 @@ public int getTiebreaker() { @SuppressWarnings("serial") private java.util.List chunks_; + /** * * @@ -2698,6 +2705,7 @@ public int getTiebreaker() { getChunksList() { return chunks_; } + /** * * @@ -2715,6 +2723,7 @@ public int getTiebreaker() { getChunksOrBuilderList() { return chunks_; } + /** * * @@ -2730,6 +2739,7 @@ public int getTiebreaker() { public int getChunksCount() { return chunks_.size(); } + /** * * @@ -2745,6 +2755,7 @@ public int getChunksCount() { public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index) { return chunks_.get(index); } + /** * * @@ -2764,6 +2775,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(i public static final int DONE_FIELD_NUMBER = 8; private boolean done_ = false; + /** * * @@ -2785,6 +2797,7 @@ public boolean getDone() { @SuppressWarnings("serial") private volatile java.lang.Object token_ = ""; + /** * * @@ -2809,6 +2822,7 @@ public java.lang.String getToken() { return s; } } + /** * * @@ -2836,6 +2850,7 @@ public com.google.protobuf.ByteString getTokenBytes() { public static final int ESTIMATED_LOW_WATERMARK_FIELD_NUMBER = 10; private com.google.protobuf.Timestamp estimatedLowWatermark_; + /** * * @@ -2843,8 +2858,8 @@ public com.google.protobuf.ByteString getTokenBytes() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2856,6 +2871,7 @@ public com.google.protobuf.ByteString getTokenBytes() { public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -2863,8 +2879,8 @@ public boolean hasEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2878,6 +2894,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { ? com.google.protobuf.Timestamp.getDefaultInstance() : estimatedLowWatermark_; } + /** * * @@ -2885,8 +2902,8 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -2918,8 +2935,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceClusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceClusterId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceClusterId_); } if (!rowKey_.isEmpty()) { output.writeBytes(3, rowKey_); @@ -2936,8 +2953,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (done_ != false) { output.writeBool(8, done_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, token_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, token_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(10, getEstimatedLowWatermark()); @@ -2956,8 +2973,8 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceClusterId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceClusterId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceClusterId_); } if (!rowKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, rowKey_); @@ -2974,8 +2991,8 @@ public int getSerializedSize() { if (done_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, done_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, token_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, token_); } if (((bitField0_ & 0x00000002) != 0)) { size += @@ -3090,38 +3107,38 @@ public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFr public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange 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.bigtable.v2.ReadChangeStreamResponse.DataChange 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.bigtable.v2.ReadChangeStreamResponse.DataChange 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.bigtable.v2.ReadChangeStreamResponse.DataChange 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.bigtable.v2.ReadChangeStreamResponse.DataChange 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.bigtable.v2.ReadChangeStreamResponse.DataChange 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); } @@ -3145,11 +3162,11 @@ 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; } + /** * * @@ -3164,8 +3181,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.DataChange} */ - 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.bigtable.v2.ReadChangeStreamResponse.DataChange) com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder { @@ -3175,7 +3191,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable @@ -3189,16 +3205,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(); - getChunksFieldBuilder(); - getEstimatedLowWatermarkFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCommitTimestampFieldBuilder(); + internalGetChunksFieldBuilder(); + internalGetEstimatedLowWatermarkFieldBuilder(); } } @@ -3315,41 +3331,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.bigtable.v2.ReadChangeStreamResponse.DataChange) { @@ -3372,7 +3353,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.DataCha bitField0_ |= 0x00000002; onChanged(); } - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (other.hasCommitTimestamp()) { @@ -3400,8 +3381,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.DataCha chunks_ = other.chunks_; bitField0_ = (bitField0_ & ~0x00000020); chunksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getChunksFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunksFieldBuilder() : null; } else { chunksBuilder_.addAllMessages(other.chunks_); @@ -3466,7 +3447,7 @@ public Builder mergeFrom( case 34: { input.readMessage( - getCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); + internalGetCommitTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 @@ -3505,7 +3486,8 @@ public Builder mergeFrom( case 82: { input.readMessage( - getEstimatedLowWatermarkFieldBuilder().getBuilder(), extensionRegistry); + internalGetEstimatedLowWatermarkFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000100; break; } // case 82 @@ -3529,6 +3511,7 @@ public Builder mergeFrom( private int bitField0_; private int type_ = 0; + /** * * @@ -3544,6 +3527,7 @@ public Builder mergeFrom( public int getTypeValue() { return type_; } + /** * * @@ -3562,6 +3546,7 @@ public Builder setTypeValue(int value) { onChanged(); return this; } + /** * * @@ -3581,6 +3566,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() ? com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.UNRECOGNIZED : result; } + /** * * @@ -3603,6 +3589,7 @@ public Builder setType( onChanged(); return this; } + /** * * @@ -3622,6 +3609,7 @@ public Builder clearType() { } private java.lang.Object sourceClusterId_ = ""; + /** * * @@ -3645,6 +3633,7 @@ public java.lang.String getSourceClusterId() { return (java.lang.String) ref; } } + /** * * @@ -3668,6 +3657,7 @@ public com.google.protobuf.ByteString getSourceClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -3690,6 +3680,7 @@ public Builder setSourceClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -3708,6 +3699,7 @@ public Builder clearSourceClusterId() { onChanged(); return this; } + /** * * @@ -3733,6 +3725,7 @@ public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -3750,6 +3743,7 @@ public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -3773,6 +3767,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3794,11 +3789,12 @@ public Builder clearRowKey() { } 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> commitTimestampBuilder_; + /** * * @@ -3813,6 +3809,7 @@ public Builder clearRowKey() { public boolean hasCommitTimestamp() { return ((bitField0_ & 0x00000008) != 0); } + /** * * @@ -3833,6 +3830,7 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { return commitTimestampBuilder_.getMessage(); } } + /** * * @@ -3855,6 +3853,7 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -3874,6 +3873,7 @@ public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderF onChanged(); return this; } + /** * * @@ -3901,6 +3901,7 @@ public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -3920,6 +3921,7 @@ public Builder clearCommitTimestamp() { onChanged(); return this; } + /** * * @@ -3932,8 +3934,9 @@ public Builder clearCommitTimestamp() { public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { bitField0_ |= 0x00000008; onChanged(); - return getCommitTimestampFieldBuilder().getBuilder(); + return internalGetCommitTimestampFieldBuilder().getBuilder(); } + /** * * @@ -3952,6 +3955,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { : commitTimestamp_; } } + /** * * @@ -3961,14 +3965,14 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * .google.protobuf.Timestamp commit_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> - 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>( @@ -3979,6 +3983,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { } private int tiebreaker_; + /** * * @@ -4000,6 +4005,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { public int getTiebreaker() { return tiebreaker_; } + /** * * @@ -4025,6 +4031,7 @@ public Builder setTiebreaker(int value) { onChanged(); return this; } + /** * * @@ -4061,7 +4068,7 @@ private void ensureChunksIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> @@ -4087,6 +4094,7 @@ private void ensureChunksIsMutable() { return chunksBuilder_.getMessageList(); } } + /** * * @@ -4106,6 +4114,7 @@ public int getChunksCount() { return chunksBuilder_.getCount(); } } + /** * * @@ -4125,6 +4134,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(i return chunksBuilder_.getMessage(index); } } + /** * * @@ -4151,6 +4161,7 @@ public Builder setChunks( } return this; } + /** * * @@ -4175,6 +4186,7 @@ public Builder setChunks( } return this; } + /** * * @@ -4201,6 +4213,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4227,6 +4240,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4250,6 +4264,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4274,6 +4289,7 @@ public Builder addChunks( } return this; } + /** * * @@ -4299,6 +4315,7 @@ public Builder addAllChunks( } return this; } + /** * * @@ -4321,6 +4338,7 @@ public Builder clearChunks() { } return this; } + /** * * @@ -4343,6 +4361,7 @@ public Builder removeChunks(int index) { } return this; } + /** * * @@ -4357,8 +4376,9 @@ public Builder removeChunks(int index) { */ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder getChunksBuilder( int index) { - return getChunksFieldBuilder().getBuilder(index); + return internalGetChunksFieldBuilder().getBuilder(index); } + /** * * @@ -4379,6 +4399,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get return chunksBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -4400,6 +4421,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get return java.util.Collections.unmodifiableList(chunks_); } } + /** * * @@ -4414,10 +4436,11 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get */ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder addChunksBuilder() { - return getChunksFieldBuilder() + return internalGetChunksFieldBuilder() .addBuilder( com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } + /** * * @@ -4432,11 +4455,12 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder get */ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder addChunksBuilder( int index) { - return getChunksFieldBuilder() + return internalGetChunksFieldBuilder() .addBuilder( index, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } + /** * * @@ -4451,17 +4475,17 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add */ public java.util.List getChunksBuilderList() { - return getChunksFieldBuilder().getBuilderList(); + return internalGetChunksFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> - getChunksFieldBuilder() { + internalGetChunksFieldBuilder() { if (chunksBuilder_ == null) { chunksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder>( @@ -4472,6 +4496,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add } private boolean done_; + /** * * @@ -4488,6 +4513,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder add public boolean getDone() { return done_; } + /** * * @@ -4508,6 +4534,7 @@ public Builder setDone(boolean value) { onChanged(); return this; } + /** * * @@ -4528,6 +4555,7 @@ public Builder clearDone() { } private java.lang.Object token_ = ""; + /** * * @@ -4551,6 +4579,7 @@ public java.lang.String getToken() { return (java.lang.String) ref; } } + /** * * @@ -4574,6 +4603,7 @@ public com.google.protobuf.ByteString getTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -4596,6 +4626,7 @@ public Builder setToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -4614,6 +4645,7 @@ public Builder clearToken() { onChanged(); return this; } + /** * * @@ -4639,11 +4671,12 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.Timestamp estimatedLowWatermark_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> estimatedLowWatermarkBuilder_; + /** * * @@ -4651,8 +4684,8 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4663,6 +4696,7 @@ public Builder setTokenBytes(com.google.protobuf.ByteString value) { public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000100) != 0); } + /** * * @@ -4670,8 +4704,8 @@ public boolean hasEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4688,6 +4722,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { return estimatedLowWatermarkBuilder_.getMessage(); } } + /** * * @@ -4695,8 +4730,8 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4715,6 +4750,7 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -4722,8 +4758,8 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4740,6 +4776,7 @@ public Builder setEstimatedLowWatermark( onChanged(); return this; } + /** * * @@ -4747,8 +4784,8 @@ public Builder setEstimatedLowWatermark( * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4772,6 +4809,7 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -4779,8 +4817,8 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4796,6 +4834,7 @@ public Builder clearEstimatedLowWatermark() { onChanged(); return this; } + /** * * @@ -4803,8 +4842,8 @@ public Builder clearEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4813,8 +4852,9 @@ public Builder clearEstimatedLowWatermark() { public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { bitField0_ |= 0x00000100; onChanged(); - return getEstimatedLowWatermarkFieldBuilder().getBuilder(); + return internalGetEstimatedLowWatermarkFieldBuilder().getBuilder(); } + /** * * @@ -4822,8 +4862,8 @@ public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4838,6 +4878,7 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( : estimatedLowWatermark_; } } + /** * * @@ -4845,21 +4886,21 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * * .google.protobuf.Timestamp estimated_low_watermark = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEstimatedLowWatermarkFieldBuilder() { + internalGetEstimatedLowWatermarkFieldBuilder() { if (estimatedLowWatermarkBuilder_ == null) { estimatedLowWatermarkBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -4869,18 +4910,6 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( return estimatedLowWatermarkBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.DataChange) } @@ -4952,6 +4981,7 @@ public interface HeartbeatOrBuilder * @return Whether the continuationToken field is set. */ boolean hasContinuationToken(); + /** * * @@ -4965,6 +4995,7 @@ public interface HeartbeatOrBuilder * @return The continuationToken. */ com.google.bigtable.v2.StreamContinuationToken getContinuationToken(); + /** * * @@ -4984,8 +5015,8 @@ public interface HeartbeatOrBuilder * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -4994,6 +5025,7 @@ public interface HeartbeatOrBuilder * @return Whether the estimatedLowWatermark field is set. */ boolean hasEstimatedLowWatermark(); + /** * * @@ -5001,8 +5033,8 @@ public interface HeartbeatOrBuilder * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5011,6 +5043,7 @@ public interface HeartbeatOrBuilder * @return The estimatedLowWatermark. */ com.google.protobuf.Timestamp getEstimatedLowWatermark(); + /** * * @@ -5018,8 +5051,8 @@ public interface HeartbeatOrBuilder * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5027,6 +5060,7 @@ public interface HeartbeatOrBuilder */ com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder(); } + /** * * @@ -5037,31 +5071,36 @@ public interface HeartbeatOrBuilder * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} */ - public static final class Heartbeat extends com.google.protobuf.GeneratedMessageV3 + public static final class Heartbeat extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) HeartbeatOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Heartbeat"); + } + // Use Heartbeat.newBuilder() to construct. - private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Heartbeat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Heartbeat() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Heartbeat(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable @@ -5073,6 +5112,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int CONTINUATION_TOKEN_FIELD_NUMBER = 1; private com.google.bigtable.v2.StreamContinuationToken continuationToken_; + /** * * @@ -5089,6 +5129,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasContinuationToken() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5107,6 +5148,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { ? com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance() : continuationToken_; } + /** * * @@ -5126,6 +5168,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo public static final int ESTIMATED_LOW_WATERMARK_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp estimatedLowWatermark_; + /** * * @@ -5133,8 +5176,8 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5146,6 +5189,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -5153,8 +5197,8 @@ public boolean hasEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5168,6 +5212,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { ? com.google.protobuf.Timestamp.getDefaultInstance() : estimatedLowWatermark_; } + /** * * @@ -5175,8 +5220,8 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5310,38 +5355,38 @@ public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFro public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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); } @@ -5365,11 +5410,11 @@ 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; } + /** * * @@ -5380,8 +5425,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} */ - 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat) com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder { @@ -5391,7 +5435,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable @@ -5405,15 +5449,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) { - getContinuationTokenFieldBuilder(); - getEstimatedLowWatermarkFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContinuationTokenFieldBuilder(); + internalGetEstimatedLowWatermarkFieldBuilder(); } } @@ -5485,41 +5529,6 @@ private void buildPartial0(com.google.bigtable.v2.ReadChangeStreamResponse.Heart 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.bigtable.v2.ReadChangeStreamResponse.Heartbeat) { @@ -5568,14 +5577,15 @@ public Builder mergeFrom( case 10: { input.readMessage( - getContinuationTokenFieldBuilder().getBuilder(), extensionRegistry); + internalGetContinuationTokenFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( - getEstimatedLowWatermarkFieldBuilder().getBuilder(), extensionRegistry); + internalGetEstimatedLowWatermarkFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -5599,11 +5609,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.StreamContinuationToken continuationToken_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> continuationTokenBuilder_; + /** * * @@ -5619,6 +5630,7 @@ public Builder mergeFrom( public boolean hasContinuationToken() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5640,6 +5652,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { return continuationTokenBuilder_.getMessage(); } } + /** * * @@ -5663,6 +5676,7 @@ public Builder setContinuationToken(com.google.bigtable.v2.StreamContinuationTok onChanged(); return this; } + /** * * @@ -5684,6 +5698,7 @@ public Builder setContinuationToken( onChanged(); return this; } + /** * * @@ -5713,6 +5728,7 @@ public Builder mergeContinuationToken(com.google.bigtable.v2.StreamContinuationT } return this; } + /** * * @@ -5733,6 +5749,7 @@ public Builder clearContinuationToken() { onChanged(); return this; } + /** * * @@ -5746,8 +5763,9 @@ public Builder clearContinuationToken() { public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTokenBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getContinuationTokenFieldBuilder().getBuilder(); + return internalGetContinuationTokenFieldBuilder().getBuilder(); } + /** * * @@ -5768,6 +5786,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok : continuationToken_; } } + /** * * @@ -5778,14 +5797,14 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> - getContinuationTokenFieldBuilder() { + internalGetContinuationTokenFieldBuilder() { if (continuationTokenBuilder_ == null) { continuationTokenBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder>( @@ -5796,11 +5815,12 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok } private com.google.protobuf.Timestamp estimatedLowWatermark_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> estimatedLowWatermarkBuilder_; + /** * * @@ -5808,8 +5828,8 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5820,6 +5840,7 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTok public boolean hasEstimatedLowWatermark() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -5827,8 +5848,8 @@ public boolean hasEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5845,6 +5866,7 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { return estimatedLowWatermarkBuilder_.getMessage(); } } + /** * * @@ -5852,8 +5874,8 @@ public com.google.protobuf.Timestamp getEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5872,6 +5894,7 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { onChanged(); return this; } + /** * * @@ -5879,8 +5902,8 @@ public Builder setEstimatedLowWatermark(com.google.protobuf.Timestamp value) { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5897,6 +5920,7 @@ public Builder setEstimatedLowWatermark( onChanged(); return this; } + /** * * @@ -5904,8 +5928,8 @@ public Builder setEstimatedLowWatermark( * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5929,6 +5953,7 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { } return this; } + /** * * @@ -5936,8 +5961,8 @@ public Builder mergeEstimatedLowWatermark(com.google.protobuf.Timestamp value) { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5953,6 +5978,7 @@ public Builder clearEstimatedLowWatermark() { onChanged(); return this; } + /** * * @@ -5960,8 +5986,8 @@ public Builder clearEstimatedLowWatermark() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5970,8 +5996,9 @@ public Builder clearEstimatedLowWatermark() { public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getEstimatedLowWatermarkFieldBuilder().getBuilder(); + return internalGetEstimatedLowWatermarkFieldBuilder().getBuilder(); } + /** * * @@ -5979,8 +6006,8 @@ public com.google.protobuf.Timestamp.Builder getEstimatedLowWatermarkBuilder() { * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * @@ -5995,6 +6022,7 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( : estimatedLowWatermark_; } } + /** * * @@ -6002,21 +6030,21 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( * An estimate of the commit timestamp that is usually lower than or equal * to any timestamp for a record that will be delivered in the future on the * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see + * record has a timestamp that is lower than a previously seen timestamp. + * For an example usage see * https://beam.apache.org/documentation/basics/#watermarks * * * .google.protobuf.Timestamp estimated_low_watermark = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEstimatedLowWatermarkFieldBuilder() { + internalGetEstimatedLowWatermarkFieldBuilder() { if (estimatedLowWatermarkBuilder_ == null) { estimatedLowWatermarkBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( @@ -6026,18 +6054,6 @@ public com.google.protobuf.TimestampOrBuilder getEstimatedLowWatermarkOrBuilder( return estimatedLowWatermarkBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) } @@ -6107,6 +6123,7 @@ public interface CloseStreamOrBuilder * @return Whether the status field is set. */ boolean hasStatus(); + /** * * @@ -6119,6 +6136,7 @@ public interface CloseStreamOrBuilder * @return The status. */ com.google.rpc.Status getStatus(); + /** * * @@ -6141,6 +6159,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ java.util.List getContinuationTokensList(); + /** * * @@ -6152,6 +6171,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index); + /** * * @@ -6163,6 +6183,7 @@ public interface CloseStreamOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ int getContinuationTokensCount(); + /** * * @@ -6175,6 +6196,7 @@ public interface CloseStreamOrBuilder */ java.util.List getContinuationTokensOrBuilderList(); + /** * * @@ -6200,6 +6222,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ java.util.List getNewPartitionsList(); + /** * * @@ -6212,6 +6235,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ com.google.bigtable.v2.StreamPartition getNewPartitions(int index); + /** * * @@ -6224,6 +6248,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ int getNewPartitionsCount(); + /** * * @@ -6237,6 +6262,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB */ java.util.List getNewPartitionsOrBuilderList(); + /** * * @@ -6250,6 +6276,7 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB */ com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder(int index); } + /** * * @@ -6260,17 +6287,19 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * If `continuation_tokens` & `new_partitions` are present, then a change in * partitioning requires the client to open a new stream for each token to * resume reading. Example: - * [B, D) ends - * | - * v - * new_partitions: [A, C) [C, E) + * + * [B, D) ends + * | + * v + * new_partitions: [A, C) [C, E) * continuation_tokens.partitions: [B,C) [C,D) - * ^---^ ^---^ - * ^ ^ - * | | - * | StreamContinuationToken 2 - * | - * StreamContinuationToken 1 + * ^---^ ^---^ + * ^ ^ + * | | + * | StreamContinuationToken 2 + * | + * StreamContinuationToken 1 + * * To read the new partition [A,C), supply the continuation tokens whose * ranges cover the new partition, for example ContinuationToken[A,B) & * ContinuationToken[B,C). @@ -6278,13 +6307,24 @@ com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrB * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.CloseStream} */ - public static final class CloseStream extends com.google.protobuf.GeneratedMessageV3 + public static final class CloseStream extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) CloseStreamOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloseStream"); + } + // Use CloseStream.newBuilder() to construct. - private CloseStream(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CloseStream(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -6293,19 +6333,13 @@ private CloseStream() { newPartitions_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CloseStream(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable @@ -6317,6 +6351,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int STATUS_FIELD_NUMBER = 1; private com.google.rpc.Status status_; + /** * * @@ -6332,6 +6367,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -6347,6 +6383,7 @@ public boolean hasStatus() { public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } + /** * * @@ -6365,6 +6402,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { @SuppressWarnings("serial") private java.util.List continuationTokens_; + /** * * @@ -6380,6 +6418,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { getContinuationTokensList() { return continuationTokens_; } + /** * * @@ -6395,6 +6434,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { getContinuationTokensOrBuilderList() { return continuationTokens_; } + /** * * @@ -6409,6 +6449,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { public int getContinuationTokensCount() { return continuationTokens_.size(); } + /** * * @@ -6423,6 +6464,7 @@ public int getContinuationTokensCount() { public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index) { return continuationTokens_.get(index); } + /** * * @@ -6443,6 +6485,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo @SuppressWarnings("serial") private java.util.List newPartitions_; + /** * * @@ -6458,6 +6501,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo public java.util.List getNewPartitionsList() { return newPartitions_; } + /** * * @@ -6474,6 +6518,7 @@ public java.util.List getNewPartitionsLi getNewPartitionsOrBuilderList() { return newPartitions_; } + /** * * @@ -6489,6 +6534,7 @@ public java.util.List getNewPartitionsLi public int getNewPartitionsCount() { return newPartitions_.size(); } + /** * * @@ -6504,6 +6550,7 @@ public int getNewPartitionsCount() { public com.google.bigtable.v2.StreamPartition getNewPartitions(int index) { return newPartitions_.get(index); } + /** * * @@ -6649,38 +6696,38 @@ public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseF public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream 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.bigtable.v2.ReadChangeStreamResponse.CloseStream 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.bigtable.v2.ReadChangeStreamResponse.CloseStream 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.bigtable.v2.ReadChangeStreamResponse.CloseStream 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.bigtable.v2.ReadChangeStreamResponse.CloseStream 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.bigtable.v2.ReadChangeStreamResponse.CloseStream 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); } @@ -6704,11 +6751,11 @@ 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; } + /** * * @@ -6719,17 +6766,19 @@ protected Builder newBuilderForType( * If `continuation_tokens` & `new_partitions` are present, then a change in * partitioning requires the client to open a new stream for each token to * resume reading. Example: - * [B, D) ends - * | - * v - * new_partitions: [A, C) [C, E) + * + * [B, D) ends + * | + * v + * new_partitions: [A, C) [C, E) * continuation_tokens.partitions: [B,C) [C,D) - * ^---^ ^---^ - * ^ ^ - * | | - * | StreamContinuationToken 2 - * | - * StreamContinuationToken 1 + * ^---^ ^---^ + * ^ ^ + * | | + * | StreamContinuationToken 2 + * | + * StreamContinuationToken 1 + * * To read the new partition [A,C), supply the continuation tokens whose * ranges cover the new partition, for example ContinuationToken[A,B) & * ContinuationToken[B,C). @@ -6737,8 +6786,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.CloseStream} */ - 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.bigtable.v2.ReadChangeStreamResponse.CloseStream) com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder { @@ -6748,7 +6796,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable @@ -6762,16 +6810,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) { - getStatusFieldBuilder(); - getContinuationTokensFieldBuilder(); - getNewPartitionsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStatusFieldBuilder(); + internalGetContinuationTokensFieldBuilder(); + internalGetNewPartitionsFieldBuilder(); } } @@ -6867,41 +6915,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.bigtable.v2.ReadChangeStreamResponse.CloseStream) { @@ -6938,8 +6951,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.CloseSt continuationTokens_ = other.continuationTokens_; bitField0_ = (bitField0_ & ~0x00000002); continuationTokensBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getContinuationTokensFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetContinuationTokensFieldBuilder() : null; } else { continuationTokensBuilder_.addAllMessages(other.continuationTokens_); @@ -6965,8 +6978,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.CloseSt newPartitions_ = other.newPartitions_; bitField0_ = (bitField0_ & ~0x00000004); newPartitionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNewPartitionsFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNewPartitionsFieldBuilder() : null; } else { newPartitionsBuilder_.addAllMessages(other.newPartitions_); @@ -7001,7 +7014,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStatusFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -7052,9 +7066,10 @@ 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_; + /** * * @@ -7069,6 +7084,7 @@ public Builder mergeFrom( public boolean hasStatus() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -7087,6 +7103,7 @@ public com.google.rpc.Status getStatus() { return statusBuilder_.getMessage(); } } + /** * * @@ -7109,6 +7126,7 @@ public Builder setStatus(com.google.rpc.Status value) { onChanged(); return this; } + /** * * @@ -7128,6 +7146,7 @@ public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -7155,6 +7174,7 @@ public Builder mergeStatus(com.google.rpc.Status value) { } return this; } + /** * * @@ -7174,6 +7194,7 @@ public Builder clearStatus() { onChanged(); return this; } + /** * * @@ -7186,8 +7207,9 @@ public Builder clearStatus() { public com.google.rpc.Status.Builder getStatusBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getStatusFieldBuilder().getBuilder(); + return internalGetStatusFieldBuilder().getBuilder(); } + /** * * @@ -7204,6 +7226,7 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } } + /** * * @@ -7213,12 +7236,12 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * .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()); @@ -7239,7 +7262,7 @@ private void ensureContinuationTokensIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> @@ -7263,6 +7286,7 @@ private void ensureContinuationTokensIsMutable() { return continuationTokensBuilder_.getMessageList(); } } + /** * * @@ -7280,6 +7304,7 @@ public int getContinuationTokensCount() { return continuationTokensBuilder_.getCount(); } } + /** * * @@ -7297,6 +7322,7 @@ public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int return continuationTokensBuilder_.getMessage(index); } } + /** * * @@ -7321,6 +7347,7 @@ public Builder setContinuationTokens( } return this; } + /** * * @@ -7342,6 +7369,7 @@ public Builder setContinuationTokens( } return this; } + /** * * @@ -7365,6 +7393,7 @@ public Builder addContinuationTokens(com.google.bigtable.v2.StreamContinuationTo } return this; } + /** * * @@ -7389,6 +7418,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7410,6 +7440,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7431,6 +7462,7 @@ public Builder addContinuationTokens( } return this; } + /** * * @@ -7452,6 +7484,7 @@ public Builder addAllContinuationTokens( } return this; } + /** * * @@ -7472,6 +7505,7 @@ public Builder clearContinuationTokens() { } return this; } + /** * * @@ -7492,6 +7526,7 @@ public Builder removeContinuationTokens(int index) { } return this; } + /** * * @@ -7504,8 +7539,9 @@ public Builder removeContinuationTokens(int index) { */ public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTokensBuilder( int index) { - return getContinuationTokensFieldBuilder().getBuilder(index); + return internalGetContinuationTokensFieldBuilder().getBuilder(index); } + /** * * @@ -7524,6 +7560,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo return continuationTokensBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -7542,6 +7579,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo return java.util.Collections.unmodifiableList(continuationTokens_); } } + /** * * @@ -7553,9 +7591,10 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTo * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTokensBuilder() { - return getContinuationTokensFieldBuilder() + return internalGetContinuationTokensFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -7568,9 +7607,10 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTok */ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTokensBuilder( int index) { - return getContinuationTokensFieldBuilder() + return internalGetContinuationTokensFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -7583,17 +7623,17 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTok */ public java.util.List getContinuationTokensBuilderList() { - return getContinuationTokensFieldBuilder().getBuilderList(); + return internalGetContinuationTokensFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> - getContinuationTokensFieldBuilder() { + internalGetContinuationTokensFieldBuilder() { if (continuationTokensBuilder_ == null) { continuationTokensBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder>( @@ -7617,7 +7657,7 @@ private void ensureNewPartitionsIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> @@ -7641,6 +7681,7 @@ public java.util.List getNewPartitionsLi return newPartitionsBuilder_.getMessageList(); } } + /** * * @@ -7659,6 +7700,7 @@ public int getNewPartitionsCount() { return newPartitionsBuilder_.getCount(); } } + /** * * @@ -7677,6 +7719,7 @@ public com.google.bigtable.v2.StreamPartition getNewPartitions(int index) { return newPartitionsBuilder_.getMessage(index); } } + /** * * @@ -7701,6 +7744,7 @@ public Builder setNewPartitions(int index, com.google.bigtable.v2.StreamPartitio } return this; } + /** * * @@ -7723,6 +7767,7 @@ public Builder setNewPartitions( } return this; } + /** * * @@ -7747,6 +7792,7 @@ public Builder addNewPartitions(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -7771,6 +7817,7 @@ public Builder addNewPartitions(int index, com.google.bigtable.v2.StreamPartitio } return this; } + /** * * @@ -7793,6 +7840,7 @@ public Builder addNewPartitions( } return this; } + /** * * @@ -7815,6 +7863,7 @@ public Builder addNewPartitions( } return this; } + /** * * @@ -7837,6 +7886,7 @@ public Builder addAllNewPartitions( } return this; } + /** * * @@ -7858,6 +7908,7 @@ public Builder clearNewPartitions() { } return this; } + /** * * @@ -7879,6 +7930,7 @@ public Builder removeNewPartitions(int index) { } return this; } + /** * * @@ -7891,8 +7943,9 @@ public Builder removeNewPartitions(int index) { * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ public com.google.bigtable.v2.StreamPartition.Builder getNewPartitionsBuilder(int index) { - return getNewPartitionsFieldBuilder().getBuilder(index); + return internalGetNewPartitionsFieldBuilder().getBuilder(index); } + /** * * @@ -7911,6 +7964,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder return newPartitionsBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -7930,6 +7984,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder return java.util.Collections.unmodifiableList(newPartitions_); } } + /** * * @@ -7942,9 +7997,10 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getNewPartitionsOrBuilder * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder() { - return getNewPartitionsFieldBuilder() + return internalGetNewPartitionsFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamPartition.getDefaultInstance()); } + /** * * @@ -7957,9 +8013,10 @@ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder() * repeated .google.bigtable.v2.StreamPartition new_partitions = 3; */ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder(int index) { - return getNewPartitionsFieldBuilder() + return internalGetNewPartitionsFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamPartition.getDefaultInstance()); } + /** * * @@ -7973,17 +8030,17 @@ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder(in */ public java.util.List getNewPartitionsBuilderList() { - return getNewPartitionsFieldBuilder().getBuilderList(); + return internalGetNewPartitionsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> - getNewPartitionsFieldBuilder() { + internalGetNewPartitionsFieldBuilder() { if (newPartitionsBuilder_ == null) { newPartitionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder>( @@ -7996,18 +8053,6 @@ public com.google.bigtable.v2.StreamPartition.Builder addNewPartitionsBuilder(in return newPartitionsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) } @@ -8079,6 +8124,7 @@ public enum StreamRecordCase private StreamRecordCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -8114,6 +8160,7 @@ public StreamRecordCase getStreamRecordCase() { } public static final int DATA_CHANGE_FIELD_NUMBER = 1; + /** * * @@ -8129,6 +8176,7 @@ public StreamRecordCase getStreamRecordCase() { public boolean hasDataChange() { return streamRecordCase_ == 1; } + /** * * @@ -8147,6 +8195,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( } return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } + /** * * @@ -8166,6 +8215,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( } public static final int HEARTBEAT_FIELD_NUMBER = 2; + /** * * @@ -8181,6 +8231,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( public boolean hasHeartbeat() { return streamRecordCase_ == 2; } + /** * * @@ -8199,6 +8250,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() } return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } + /** * * @@ -8218,6 +8270,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() } public static final int CLOSE_STREAM_FIELD_NUMBER = 3; + /** * * @@ -8233,6 +8286,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() public boolean hasCloseStream() { return streamRecordCase_ == 3; } + /** * * @@ -8251,6 +8305,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStrea } return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } + /** * * @@ -8418,38 +8473,38 @@ public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( public static com.google.bigtable.v2.ReadChangeStreamResponse 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.bigtable.v2.ReadChangeStreamResponse 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.bigtable.v2.ReadChangeStreamResponse 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.bigtable.v2.ReadChangeStreamResponse 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.bigtable.v2.ReadChangeStreamResponse 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.bigtable.v2.ReadChangeStreamResponse 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); } @@ -8472,10 +8527,11 @@ 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; } + /** * * @@ -8486,7 +8542,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse} */ - 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.bigtable.v2.ReadChangeStreamResponse) com.google.bigtable.v2.ReadChangeStreamResponseOrBuilder { @@ -8496,7 +8552,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable @@ -8508,7 +8564,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8580,39 +8636,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ReadChangeStreamResponse } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse) { @@ -8675,19 +8698,22 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getDataChangeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDataChangeFieldBuilder().getBuilder(), extensionRegistry); streamRecordCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getHeartbeatFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetHeartbeatFieldBuilder().getBuilder(), extensionRegistry); streamRecordCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getCloseStreamFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetCloseStreamFieldBuilder().getBuilder(), extensionRegistry); streamRecordCase_ = 3; break; } // case 26 @@ -8724,11 +8750,12 @@ public Builder clearStreamRecord() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder> dataChangeBuilder_; + /** * * @@ -8744,6 +8771,7 @@ public Builder clearStreamRecord() { public boolean hasDataChange() { return streamRecordCase_ == 1; } + /** * * @@ -8769,6 +8797,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange( return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } + /** * * @@ -8791,6 +8820,7 @@ public Builder setDataChange(com.google.bigtable.v2.ReadChangeStreamResponse.Dat streamRecordCase_ = 1; return this; } + /** * * @@ -8811,6 +8841,7 @@ public Builder setDataChange( streamRecordCase_ = 1; return this; } + /** * * @@ -8846,6 +8877,7 @@ public Builder mergeDataChange( streamRecordCase_ = 1; return this; } + /** * * @@ -8871,6 +8903,7 @@ public Builder clearDataChange() { } return this; } + /** * * @@ -8882,8 +8915,9 @@ public Builder clearDataChange() { */ public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder getDataChangeBuilder() { - return getDataChangeFieldBuilder().getBuilder(); + return internalGetDataChangeFieldBuilder().getBuilder(); } + /** * * @@ -8905,6 +8939,7 @@ public Builder clearDataChange() { return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } + /** * * @@ -8914,18 +8949,18 @@ public Builder clearDataChange() { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder> - getDataChangeFieldBuilder() { + internalGetDataChangeFieldBuilder() { if (dataChangeBuilder_ == null) { if (!(streamRecordCase_ == 1)) { streamRecord_ = com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } dataChangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder>( @@ -8939,11 +8974,12 @@ public Builder clearDataChange() { return dataChangeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder> heartbeatBuilder_; + /** * * @@ -8959,6 +8995,7 @@ public Builder clearDataChange() { public boolean hasHeartbeat() { return streamRecordCase_ == 2; } + /** * * @@ -8984,6 +9021,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } + /** * * @@ -9006,6 +9044,7 @@ public Builder setHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.Hear streamRecordCase_ = 2; return this; } + /** * * @@ -9026,6 +9065,7 @@ public Builder setHeartbeat( streamRecordCase_ = 2; return this; } + /** * * @@ -9059,6 +9099,7 @@ public Builder mergeHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.He streamRecordCase_ = 2; return this; } + /** * * @@ -9084,6 +9125,7 @@ public Builder clearHeartbeat() { } return this; } + /** * * @@ -9094,8 +9136,9 @@ public Builder clearHeartbeat() { * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHeartbeatBuilder() { - return getHeartbeatFieldBuilder().getBuilder(); + return internalGetHeartbeatFieldBuilder().getBuilder(); } + /** * * @@ -9117,6 +9160,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } + /** * * @@ -9126,18 +9170,18 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder> - getHeartbeatFieldBuilder() { + internalGetHeartbeatFieldBuilder() { if (heartbeatBuilder_ == null) { if (!(streamRecordCase_ == 2)) { streamRecord_ = com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } heartbeatBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder>( @@ -9151,11 +9195,12 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear return heartbeatBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder> closeStreamBuilder_; + /** * * @@ -9171,6 +9216,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHear public boolean hasCloseStream() { return streamRecordCase_ == 3; } + /** * * @@ -9196,6 +9242,7 @@ public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStrea return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } + /** * * @@ -9219,6 +9266,7 @@ public Builder setCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9239,6 +9287,7 @@ public Builder setCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9274,6 +9323,7 @@ public Builder mergeCloseStream( streamRecordCase_ = 3; return this; } + /** * * @@ -9299,6 +9349,7 @@ public Builder clearCloseStream() { } return this; } + /** * * @@ -9310,8 +9361,9 @@ public Builder clearCloseStream() { */ public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder getCloseStreamBuilder() { - return getCloseStreamFieldBuilder().getBuilder(); + return internalGetCloseStreamFieldBuilder().getBuilder(); } + /** * * @@ -9333,6 +9385,7 @@ public Builder clearCloseStream() { return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } + /** * * @@ -9342,18 +9395,18 @@ public Builder clearCloseStream() { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder> - getCloseStreamFieldBuilder() { + internalGetCloseStreamFieldBuilder() { if (closeStreamBuilder_ == null) { if (!(streamRecordCase_ == 3)) { streamRecord_ = com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } closeStreamBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder>( @@ -9367,17 +9420,6 @@ public Builder clearCloseStream() { return closeStreamBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java index ab989814d8..f38885c8ac 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadChangeStreamResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse) @@ -36,6 +38,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the dataChange field is set. */ boolean hasDataChange(); + /** * * @@ -48,6 +51,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return The dataChange. */ com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange(); + /** * * @@ -71,6 +75,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the heartbeat field is set. */ boolean hasHeartbeat(); + /** * * @@ -83,6 +88,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return The heartbeat. */ com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat(); + /** * * @@ -106,6 +112,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return Whether the closeStream field is set. */ boolean hasCloseStream(); + /** * * @@ -118,6 +125,7 @@ public interface ReadChangeStreamResponseOrBuilder * @return The closeStream. */ com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStream(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java index cd099bcf94..c7120cf557 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -30,31 +31,37 @@ * * Protobuf type {@code google.bigtable.v2.ReadIterationStats} */ -public final class ReadIterationStats extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadIterationStats extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadIterationStats) ReadIterationStatsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadIterationStats"); + } + // Use ReadIterationStats.newBuilder() to construct. - private ReadIterationStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadIterationStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReadIterationStats() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadIterationStats(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_ReadIterationStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int ROWS_SEEN_COUNT_FIELD_NUMBER = 1; private long rowsSeenCount_ = 0L; + /** * * @@ -84,6 +92,7 @@ public long getRowsSeenCount() { public static final int ROWS_RETURNED_COUNT_FIELD_NUMBER = 2; private long rowsReturnedCount_ = 0L; + /** * * @@ -102,6 +111,7 @@ public long getRowsReturnedCount() { public static final int CELLS_SEEN_COUNT_FIELD_NUMBER = 3; private long cellsSeenCount_ = 0L; + /** * * @@ -121,6 +131,7 @@ public long getCellsSeenCount() { public static final int CELLS_RETURNED_COUNT_FIELD_NUMBER = 4; private long cellsReturnedCount_ = 0L; + /** * * @@ -265,38 +276,38 @@ public static com.google.bigtable.v2.ReadIterationStats parseFrom( public static com.google.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats 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); } @@ -319,10 +330,11 @@ 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; } + /** * * @@ -334,7 +346,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadIterationStats} */ - 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.bigtable.v2.ReadIterationStats) com.google.bigtable.v2.ReadIterationStatsOrBuilder { @@ -344,7 +356,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.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable @@ -356,7 +368,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ReadIterationStats.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -418,39 +430,6 @@ private void buildPartial0(com.google.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats) { @@ -545,6 +524,7 @@ public Builder mergeFrom( private int bitField0_; private long rowsSeenCount_; + /** * * @@ -561,6 +541,7 @@ public Builder mergeFrom( public long getRowsSeenCount() { return rowsSeenCount_; } + /** * * @@ -581,6 +562,7 @@ public Builder setRowsSeenCount(long value) { onChanged(); return this; } + /** * * @@ -601,6 +583,7 @@ public Builder clearRowsSeenCount() { } private long rowsReturnedCount_; + /** * * @@ -616,6 +599,7 @@ public Builder clearRowsSeenCount() { public long getRowsReturnedCount() { return rowsReturnedCount_; } + /** * * @@ -635,6 +619,7 @@ public Builder setRowsReturnedCount(long value) { onChanged(); return this; } + /** * * @@ -654,6 +639,7 @@ public Builder clearRowsReturnedCount() { } private long cellsSeenCount_; + /** * * @@ -670,6 +656,7 @@ public Builder clearRowsReturnedCount() { public long getCellsSeenCount() { return cellsSeenCount_; } + /** * * @@ -690,6 +677,7 @@ public Builder setCellsSeenCount(long value) { onChanged(); return this; } + /** * * @@ -710,6 +698,7 @@ public Builder clearCellsSeenCount() { } private long cellsReturnedCount_; + /** * * @@ -725,6 +714,7 @@ public Builder clearCellsSeenCount() { public long getCellsReturnedCount() { return cellsReturnedCount_; } + /** * * @@ -744,6 +734,7 @@ public Builder setCellsReturnedCount(long value) { onChanged(); return this; } + /** * * @@ -762,17 +753,6 @@ public Builder clearCellsReturnedCount() { 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.bigtable.v2.ReadIterationStats) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java index a9a05ef740..1c84e56f7b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadIterationStatsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadIterationStats) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java index ad95706974..3976466576 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRowRequest} */ -public final class ReadModifyWriteRowRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadModifyWriteRowRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRowRequest) ReadModifyWriteRowRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadModifyWriteRowRequest"); + } + // Use ReadModifyWriteRowRequest.newBuilder() to construct. - private ReadModifyWriteRowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadModifyWriteRowRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +59,13 @@ private ReadModifyWriteRowRequest() { rules_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadModifyWriteRowRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_fieldAccessorTable @@ -71,6 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -100,6 +108,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -134,6 +143,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -163,6 +173,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -197,6 +208,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -221,6 +233,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -248,6 +261,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int ROW_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -269,13 +283,15 @@ public com.google.protobuf.ByteString getRowKey() { @SuppressWarnings("serial") private java.util.List rules_; + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -286,13 +302,15 @@ public com.google.protobuf.ByteString getRowKey() { public java.util.List getRulesList() { return rules_; } + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -304,13 +322,15 @@ public java.util.List getRulesList() getRulesOrBuilderList() { return rules_; } + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -321,13 +341,15 @@ public java.util.List getRulesList() public int getRulesCount() { return rules_.size(); } + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -338,13 +360,15 @@ public int getRulesCount() { public com.google.bigtable.v2.ReadModifyWriteRule getRules(int index) { return rules_.get(index); } + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -370,8 +394,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } if (!rowKey_.isEmpty()) { output.writeBytes(2, rowKey_); @@ -379,11 +403,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(3, rules_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, authorizedViewName_); } getUnknownFields().writeTo(output); } @@ -394,8 +418,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } if (!rowKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, rowKey_); @@ -403,11 +427,11 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rules_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, authorizedViewName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -495,38 +519,38 @@ public static com.google.bigtable.v2.ReadModifyWriteRowRequest parseFrom( public static com.google.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest 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); } @@ -549,10 +573,11 @@ 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; } + /** * * @@ -562,7 +587,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRowRequest} */ - 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.bigtable.v2.ReadModifyWriteRowRequest) com.google.bigtable.v2.ReadModifyWriteRowRequestOrBuilder { @@ -572,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_fieldAccessorTable @@ -584,7 +609,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ReadModifyWriteRowRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -667,39 +692,6 @@ private void buildPartial0(com.google.bigtable.v2.ReadModifyWriteRowRequest 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.bigtable.v2.ReadModifyWriteRowRequest) { @@ -728,7 +720,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowRequest other) bitField0_ |= 0x00000004; onChanged(); } - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (rulesBuilder_ == null) { @@ -750,8 +742,8 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowRequest other) rules_ = other.rules_; bitField0_ = (bitField0_ & ~0x00000010); rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRulesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesFieldBuilder() : null; } else { rulesBuilder_.addAllMessages(other.rules_); @@ -841,6 +833,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -869,6 +862,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -897,6 +891,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -924,6 +919,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -947,6 +943,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -977,6 +974,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1005,6 +1003,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1033,6 +1032,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1060,6 +1060,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1083,6 +1084,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1113,6 +1115,7 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) } private java.lang.Object appProfileId_ = ""; + /** * * @@ -1136,6 +1139,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1159,6 +1163,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1181,6 +1186,7 @@ public Builder setAppProfileId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1199,6 +1205,7 @@ public Builder clearAppProfileId() { onChanged(); return this; } + /** * * @@ -1224,6 +1231,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1240,6 +1248,7 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1262,6 +1271,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1291,7 +1301,7 @@ private void ensureRulesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadModifyWriteRule, com.google.bigtable.v2.ReadModifyWriteRule.Builder, com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder> @@ -1303,7 +1313,8 @@ private void ensureRulesIsMutable() { *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1317,13 +1328,15 @@ public java.util.List getRulesList() return rulesBuilder_.getMessageList(); } } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1337,13 +1350,15 @@ public int getRulesCount() { return rulesBuilder_.getCount(); } } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1357,13 +1372,15 @@ public com.google.bigtable.v2.ReadModifyWriteRule getRules(int index) { return rulesBuilder_.getMessage(index); } } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1383,13 +1400,15 @@ public Builder setRules(int index, com.google.bigtable.v2.ReadModifyWriteRule va } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1407,13 +1426,15 @@ public Builder setRules( } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1433,13 +1454,15 @@ public Builder addRules(com.google.bigtable.v2.ReadModifyWriteRule value) { } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1459,13 +1482,15 @@ public Builder addRules(int index, com.google.bigtable.v2.ReadModifyWriteRule va } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1482,13 +1507,15 @@ public Builder addRules(com.google.bigtable.v2.ReadModifyWriteRule.Builder build } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1506,13 +1533,15 @@ public Builder addRules( } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1530,13 +1559,15 @@ public Builder addAllRules( } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1553,13 +1584,15 @@ public Builder clearRules() { } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1576,13 +1609,15 @@ public Builder removeRules(int index) { } return this; } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1590,15 +1625,17 @@ public Builder removeRules(int index) { * */ public com.google.bigtable.v2.ReadModifyWriteRule.Builder getRulesBuilder(int index) { - return getRulesFieldBuilder().getBuilder(index); + return internalGetRulesFieldBuilder().getBuilder(index); } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1612,13 +1649,15 @@ public com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder getRulesOrBuilder(int return rulesBuilder_.getMessageOrBuilder(index); } } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1633,13 +1672,15 @@ public com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder getRulesOrBuilder(int return java.util.Collections.unmodifiableList(rules_); } } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1647,16 +1688,18 @@ public com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder getRulesOrBuilder(int * */ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder() { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance()); } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1664,16 +1707,18 @@ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder() { * */ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder(int index) { - return getRulesFieldBuilder() + return internalGetRulesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance()); } + /** * * *
          * Required. Rules specifying how the specified row's contents are to be
          * transformed into writes. Entries are applied in order, meaning that earlier
    -     * rules will affect the results of later ones.
    +     * rules will affect the results of later ones. At least one entry must be
    +     * specified, and there can be at most 100000 rules.
          * 
    * * @@ -1682,17 +1727,17 @@ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder(int in */ public java.util.List getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); + return internalGetRulesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadModifyWriteRule, com.google.bigtable.v2.ReadModifyWriteRule.Builder, com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder> - getRulesFieldBuilder() { + internalGetRulesFieldBuilder() { if (rulesBuilder_ == null) { rulesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadModifyWriteRule, com.google.bigtable.v2.ReadModifyWriteRule.Builder, com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder>( @@ -1702,17 +1747,6 @@ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder(int in return rulesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadModifyWriteRowRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequestOrBuilder.java index b5951dbaf6..fdda803980 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadModifyWriteRowRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadModifyWriteRowRequest) @@ -42,6 +44,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -79,6 +82,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -111,6 +115,7 @@ public interface ReadModifyWriteRowRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -145,7 +150,8 @@ public interface ReadModifyWriteRowRequestOrBuilder *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -153,13 +159,15 @@ public interface ReadModifyWriteRowRequestOrBuilder * */ java.util.List getRulesList(); + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -167,13 +175,15 @@ public interface ReadModifyWriteRowRequestOrBuilder * */ com.google.bigtable.v2.ReadModifyWriteRule getRules(int index); + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -181,13 +191,15 @@ public interface ReadModifyWriteRowRequestOrBuilder * */ int getRulesCount(); + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * @@ -196,13 +208,15 @@ public interface ReadModifyWriteRowRequestOrBuilder */ java.util.List getRulesOrBuilderList(); + /** * * *
        * Required. Rules specifying how the specified row's contents are to be
        * transformed into writes. Entries are applied in order, meaning that earlier
    -   * rules will affect the results of later ones.
    +   * rules will affect the results of later ones. At least one entry must be
    +   * specified, and there can be at most 100000 rules.
        * 
    * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java index 133c3d4232..e9bb1ff2ac 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRowResponse} */ -public final class ReadModifyWriteRowResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadModifyWriteRowResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRowResponse) ReadModifyWriteRowResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadModifyWriteRowResponse"); + } + // Use ReadModifyWriteRowResponse.newBuilder() to construct. - private ReadModifyWriteRowResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadModifyWriteRowResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReadModifyWriteRowResponse() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadModifyWriteRowResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable @@ -64,6 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ROW_FIELD_NUMBER = 1; private com.google.bigtable.v2.Row row_; + /** * * @@ -79,6 +87,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRow() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -94,6 +103,7 @@ public boolean hasRow() { public com.google.bigtable.v2.Row getRow() { return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; } + /** * * @@ -214,38 +224,38 @@ public static com.google.bigtable.v2.ReadModifyWriteRowResponse parseFrom( public static com.google.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse 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); } @@ -268,10 +278,11 @@ 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; } + /** * * @@ -281,7 +292,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRowResponse} */ - 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.bigtable.v2.ReadModifyWriteRowResponse) com.google.bigtable.v2.ReadModifyWriteRowResponseOrBuilder { @@ -291,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable @@ -305,14 +316,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) { - getRowFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowFieldBuilder(); } } @@ -369,39 +380,6 @@ private void buildPartial0(com.google.bigtable.v2.ReadModifyWriteRowResponse 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.bigtable.v2.ReadModifyWriteRowResponse) { @@ -446,7 +424,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRowFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRowFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -470,11 +448,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Row row_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Row, com.google.bigtable.v2.Row.Builder, com.google.bigtable.v2.RowOrBuilder> rowBuilder_; + /** * * @@ -489,6 +468,7 @@ public Builder mergeFrom( public boolean hasRow() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -507,6 +487,7 @@ public com.google.bigtable.v2.Row getRow() { return rowBuilder_.getMessage(); } } + /** * * @@ -529,6 +510,7 @@ public Builder setRow(com.google.bigtable.v2.Row value) { onChanged(); return this; } + /** * * @@ -548,6 +530,7 @@ public Builder setRow(com.google.bigtable.v2.Row.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -575,6 +558,7 @@ public Builder mergeRow(com.google.bigtable.v2.Row value) { } return this; } + /** * * @@ -594,6 +578,7 @@ public Builder clearRow() { onChanged(); return this; } + /** * * @@ -606,8 +591,9 @@ public Builder clearRow() { public com.google.bigtable.v2.Row.Builder getRowBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRowFieldBuilder().getBuilder(); + return internalGetRowFieldBuilder().getBuilder(); } + /** * * @@ -624,6 +610,7 @@ public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; } } + /** * * @@ -633,14 +620,14 @@ public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { * * .google.bigtable.v2.Row row = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Row, com.google.bigtable.v2.Row.Builder, com.google.bigtable.v2.RowOrBuilder> - getRowFieldBuilder() { + internalGetRowFieldBuilder() { if (rowBuilder_ == null) { rowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Row, com.google.bigtable.v2.Row.Builder, com.google.bigtable.v2.RowOrBuilder>(getRow(), getParentForChildren(), isClean()); @@ -649,17 +636,6 @@ public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { return rowBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadModifyWriteRowResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponseOrBuilder.java index fcb113232b..73de2685c3 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadModifyWriteRowResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadModifyWriteRowResponse) @@ -36,6 +38,7 @@ public interface ReadModifyWriteRowResponseOrBuilder * @return Whether the row field is set. */ boolean hasRow(); + /** * * @@ -48,6 +51,7 @@ public interface ReadModifyWriteRowResponseOrBuilder * @return The row. */ com.google.bigtable.v2.Row getRow(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java index af80f888c8..8d740aa7d0 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRule} */ -public final class ReadModifyWriteRule extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadModifyWriteRule extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadModifyWriteRule) ReadModifyWriteRuleOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadModifyWriteRule"); + } + // Use ReadModifyWriteRule.newBuilder() to construct. - private ReadModifyWriteRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadModifyWriteRule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private ReadModifyWriteRule() { columnQualifier_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadModifyWriteRule(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable @@ -82,6 +89,7 @@ public enum RuleCase private RuleCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -118,6 +126,7 @@ public RuleCase getRuleCase() { @SuppressWarnings("serial") private volatile java.lang.Object familyName_ = ""; + /** * * @@ -142,6 +151,7 @@ public java.lang.String getFamilyName() { return s; } } + /** * * @@ -169,6 +179,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { public static final int COLUMN_QUALIFIER_FIELD_NUMBER = 2; private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -188,6 +199,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { } public static final int APPEND_VALUE_FIELD_NUMBER = 3; + /** * * @@ -205,6 +217,7 @@ public com.google.protobuf.ByteString getColumnQualifier() { public boolean hasAppendValue() { return ruleCase_ == 3; } + /** * * @@ -227,6 +240,7 @@ public com.google.protobuf.ByteString getAppendValue() { } public static final int INCREMENT_AMOUNT_FIELD_NUMBER = 4; + /** * * @@ -245,6 +259,7 @@ public com.google.protobuf.ByteString getAppendValue() { public boolean hasIncrementAmount() { return ruleCase_ == 4; } + /** * * @@ -281,8 +296,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(familyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, familyName_); } if (!columnQualifier_.isEmpty()) { output.writeBytes(2, columnQualifier_); @@ -302,8 +317,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(familyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, familyName_); } if (!columnQualifier_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, columnQualifier_); @@ -416,38 +431,38 @@ public static com.google.bigtable.v2.ReadModifyWriteRule parseFrom( public static com.google.bigtable.v2.ReadModifyWriteRule 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.bigtable.v2.ReadModifyWriteRule 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.bigtable.v2.ReadModifyWriteRule 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.bigtable.v2.ReadModifyWriteRule 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.bigtable.v2.ReadModifyWriteRule 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.bigtable.v2.ReadModifyWriteRule 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); } @@ -470,10 +485,11 @@ 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; } + /** * * @@ -484,7 +500,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadModifyWriteRule} */ - 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.bigtable.v2.ReadModifyWriteRule) com.google.bigtable.v2.ReadModifyWriteRuleOrBuilder { @@ -494,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable @@ -506,7 +522,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ReadModifyWriteRule.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -568,39 +584,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ReadModifyWriteRule resul result.rule_ = this.rule_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ReadModifyWriteRule) { @@ -618,7 +601,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRule other) { bitField0_ |= 0x00000001; onChanged(); } - if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getColumnQualifier().isEmpty()) { setColumnQualifier(other.getColumnQualifier()); } switch (other.getRuleCase()) { @@ -721,6 +704,7 @@ public Builder clearRule() { private int bitField0_; private java.lang.Object familyName_ = ""; + /** * * @@ -744,6 +728,7 @@ public java.lang.String getFamilyName() { return (java.lang.String) ref; } } + /** * * @@ -767,6 +752,7 @@ public com.google.protobuf.ByteString getFamilyNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -789,6 +775,7 @@ public Builder setFamilyName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -807,6 +794,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -832,6 +820,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString columnQualifier_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -849,6 +838,7 @@ public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getColumnQualifier() { return columnQualifier_; } + /** * * @@ -872,6 +862,7 @@ public Builder setColumnQualifier(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -908,6 +899,7 @@ public Builder clearColumnQualifier() { public boolean hasAppendValue() { return ruleCase_ == 3; } + /** * * @@ -927,6 +919,7 @@ public com.google.protobuf.ByteString getAppendValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -950,6 +943,7 @@ public Builder setAppendValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -989,6 +983,7 @@ public Builder clearAppendValue() { public boolean hasIncrementAmount() { return ruleCase_ == 4; } + /** * * @@ -1009,6 +1004,7 @@ public long getIncrementAmount() { } return 0L; } + /** * * @@ -1031,6 +1027,7 @@ public Builder setIncrementAmount(long value) { onChanged(); return this; } + /** * * @@ -1054,17 +1051,6 @@ public Builder clearIncrementAmount() { 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.bigtable.v2.ReadModifyWriteRule) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRuleOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRuleOrBuilder.java index 0c635070fe..50c9e47b53 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRuleOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRuleOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadModifyWriteRuleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadModifyWriteRule) @@ -37,6 +39,7 @@ public interface ReadModifyWriteRuleOrBuilder * @return The familyName. */ java.lang.String getFamilyName(); + /** * * @@ -80,6 +83,7 @@ public interface ReadModifyWriteRuleOrBuilder * @return Whether the appendValue field is set. */ boolean hasAppendValue(); + /** * * @@ -110,6 +114,7 @@ public interface ReadModifyWriteRuleOrBuilder * @return Whether the incrementAmount field is set. */ boolean hasIncrementAmount(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java index ceb4c1457a..b257416746 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,36 +29,43 @@ * * Protobuf type {@code google.bigtable.v2.ReadRowsRequest} */ -public final class ReadRowsRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadRowsRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsRequest) ReadRowsRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadRowsRequest"); + } + // Use ReadRowsRequest.newBuilder() to construct. - private ReadRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadRowsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ReadRowsRequest() { tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; requestStatsView_ = 0; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadRowsRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsRequest_fieldAccessorTable @@ -113,6 +121,16 @@ public enum RequestStatsView 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= */ "", + "RequestStatsView"); + } + /** * * @@ -123,6 +141,7 @@ public enum RequestStatsView implements com.google.protobuf.ProtocolMessageEnum * REQUEST_STATS_VIEW_UNSPECIFIED = 0; */ public static final int REQUEST_STATS_VIEW_UNSPECIFIED_VALUE = 0; + /** * * @@ -134,6 +153,7 @@ public enum RequestStatsView implements com.google.protobuf.ProtocolMessageEnum * REQUEST_STATS_NONE = 1; */ public static final int REQUEST_STATS_NONE_VALUE = 1; + /** * * @@ -205,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.bigtable.v2.ReadRowsRequest.getDescriptor().getEnumTypes().get(0); } @@ -236,6 +256,7 @@ private RequestStatsView(int value) { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -264,6 +285,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -297,6 +319,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -325,6 +348,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -354,10 +378,74 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { } } + public static final int MATERIALIZED_VIEW_NAME_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + @java.lang.Override + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + 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(); + materializedViewName_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int APP_PROFILE_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -382,6 +470,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -409,6 +498,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public static final int ROWS_FIELD_NUMBER = 2; private com.google.bigtable.v2.RowSet rows_; + /** * * @@ -425,6 +515,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { public boolean hasRows() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -441,6 +532,7 @@ public boolean hasRows() { public com.google.bigtable.v2.RowSet getRows() { return rows_ == null ? com.google.bigtable.v2.RowSet.getDefaultInstance() : rows_; } + /** * * @@ -458,6 +550,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { public static final int FILTER_FIELD_NUMBER = 3; private com.google.bigtable.v2.RowFilter filter_; + /** * * @@ -474,6 +567,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { public boolean hasFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -490,6 +584,7 @@ public boolean hasFilter() { public com.google.bigtable.v2.RowFilter getFilter() { return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; } + /** * * @@ -507,6 +602,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { public static final int ROWS_LIMIT_FIELD_NUMBER = 4; private long rowsLimit_ = 0L; + /** * * @@ -526,6 +622,7 @@ public long getRowsLimit() { public static final int REQUEST_STATS_VIEW_FIELD_NUMBER = 6; private int requestStatsView_ = 0; + /** * * @@ -541,6 +638,7 @@ public long getRowsLimit() { public int getRequestStatsViewValue() { return requestStatsView_; } + /** * * @@ -563,6 +661,7 @@ public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsVi public static final int REVERSED_FIELD_NUMBER = 7; private boolean reversed_ = false; + /** * * @@ -575,10 +674,10 @@ public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsVi * * Example result set: * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] * * * bool reversed = 7; @@ -604,8 +703,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getRows()); @@ -616,8 +715,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (rowsLimit_ != 0L) { output.writeInt64(4, rowsLimit_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, appProfileId_); } if (requestStatsView_ != com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.REQUEST_STATS_VIEW_UNSPECIFIED @@ -627,8 +726,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (reversed_ != false) { output.writeBool(7, reversed_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, authorizedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, materializedViewName_); } getUnknownFields().writeTo(output); } @@ -639,8 +741,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRows()); @@ -651,8 +753,8 @@ public int getSerializedSize() { if (rowsLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, rowsLimit_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, appProfileId_); } if (requestStatsView_ != com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.REQUEST_STATS_VIEW_UNSPECIFIED @@ -662,8 +764,11 @@ public int getSerializedSize() { if (reversed_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, reversed_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, authorizedViewName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, materializedViewName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -682,6 +787,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTableName().equals(other.getTableName())) return false; if (!getAuthorizedViewName().equals(other.getAuthorizedViewName())) return false; + if (!getMaterializedViewName().equals(other.getMaterializedViewName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (hasRows() != other.hasRows()) return false; if (hasRows()) { @@ -709,6 +815,8 @@ public int hashCode() { hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + AUTHORIZED_VIEW_NAME_FIELD_NUMBER; hash = (53 * hash) + getAuthorizedViewName().hashCode(); + hash = (37 * hash) + MATERIALIZED_VIEW_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedViewName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); if (hasRows()) { @@ -767,38 +875,38 @@ public static com.google.bigtable.v2.ReadRowsRequest parseFrom( public static com.google.bigtable.v2.ReadRowsRequest 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.bigtable.v2.ReadRowsRequest 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.bigtable.v2.ReadRowsRequest 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.bigtable.v2.ReadRowsRequest 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.bigtable.v2.ReadRowsRequest 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.bigtable.v2.ReadRowsRequest 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); } @@ -821,10 +929,11 @@ 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; } + /** * * @@ -834,7 +943,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadRowsRequest} */ - 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.bigtable.v2.ReadRowsRequest) com.google.bigtable.v2.ReadRowsRequestOrBuilder { @@ -844,7 +953,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsRequest_fieldAccessorTable @@ -858,15 +967,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) { - getRowsFieldBuilder(); - getFilterFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowsFieldBuilder(); + internalGetFilterFieldBuilder(); } } @@ -876,6 +985,7 @@ public Builder clear() { bitField0_ = 0; tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; rows_ = null; if (rowsBuilder_ != null) { @@ -933,62 +1043,32 @@ private void buildPartial0(com.google.bigtable.v2.ReadRowsRequest result) { result.authorizedViewName_ = authorizedViewName_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.materializedViewName_ = materializedViewName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.appProfileId_ = appProfileId_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.rows_ = rowsBuilder_ == null ? rows_ : rowsBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.rowsLimit_ = rowsLimit_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.requestStatsView_ = requestStatsView_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.reversed_ = reversed_; } 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.bigtable.v2.ReadRowsRequest) { @@ -1011,9 +1091,14 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getMaterializedViewName().isEmpty()) { + materializedViewName_ = other.materializedViewName_; + bitField0_ |= 0x00000004; + onChanged(); + } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (other.hasRows()) { @@ -1065,38 +1150,38 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getRowsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + input.readMessage(internalGetRowsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; break; } // case 18 case 26: { - input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + input.readMessage(internalGetFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; break; } // case 26 case 32: { rowsLimit_ = input.readInt64(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 32 case 42: { appProfileId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 42 case 48: { requestStatsView_ = input.readEnum(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 48 case 56: { reversed_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 56 case 74: @@ -1105,6 +1190,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 74 + case 90: + { + materializedViewName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1125,6 +1216,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -1152,6 +1244,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -1179,6 +1272,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1205,6 +1299,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1227,6 +1322,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -1256,6 +1352,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -1283,6 +1380,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -1310,6 +1408,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1336,6 +1435,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1358,6 +1458,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -1386,7 +1487,144 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) return this; } + private java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + materializedViewName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + materializedViewName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearMaterializedViewName() { + materializedViewName_ = getDefaultInstance().getMaterializedViewName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + materializedViewName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private java.lang.Object appProfileId_ = ""; + /** * * @@ -1410,6 +1648,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -1433,6 +1672,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1451,10 +1691,11 @@ public Builder setAppProfileId(java.lang.String value) { throw new NullPointerException(); } appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } + /** * * @@ -1469,10 +1710,11 @@ public Builder setAppProfileId(java.lang.String value) { */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } + /** * * @@ -1492,17 +1734,18 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } private com.google.bigtable.v2.RowSet rows_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowSet, com.google.bigtable.v2.RowSet.Builder, com.google.bigtable.v2.RowSetOrBuilder> rowsBuilder_; + /** * * @@ -1516,8 +1759,9 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { * @return Whether the rows field is set. */ public boolean hasRows() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } + /** * * @@ -1537,6 +1781,7 @@ public com.google.bigtable.v2.RowSet getRows() { return rowsBuilder_.getMessage(); } } + /** * * @@ -1556,10 +1801,11 @@ public Builder setRows(com.google.bigtable.v2.RowSet value) { } else { rowsBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } + /** * * @@ -1576,10 +1822,11 @@ public Builder setRows(com.google.bigtable.v2.RowSet.Builder builderForValue) { } else { rowsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } + /** * * @@ -1592,7 +1839,7 @@ public Builder setRows(com.google.bigtable.v2.RowSet.Builder builderForValue) { */ public Builder mergeRows(com.google.bigtable.v2.RowSet value) { if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && rows_ != null && rows_ != com.google.bigtable.v2.RowSet.getDefaultInstance()) { getRowsBuilder().mergeFrom(value); @@ -1603,11 +1850,12 @@ public Builder mergeRows(com.google.bigtable.v2.RowSet value) { rowsBuilder_.mergeFrom(value); } if (rows_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } return this; } + /** * * @@ -1619,7 +1867,7 @@ public Builder mergeRows(com.google.bigtable.v2.RowSet value) { * .google.bigtable.v2.RowSet rows = 2; */ public Builder clearRows() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); rows_ = null; if (rowsBuilder_ != null) { rowsBuilder_.dispose(); @@ -1628,6 +1876,7 @@ public Builder clearRows() { onChanged(); return this; } + /** * * @@ -1639,10 +1888,11 @@ public Builder clearRows() { * .google.bigtable.v2.RowSet rows = 2; */ public com.google.bigtable.v2.RowSet.Builder getRowsBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); - return getRowsFieldBuilder().getBuilder(); + return internalGetRowsFieldBuilder().getBuilder(); } + /** * * @@ -1660,6 +1910,7 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { return rows_ == null ? com.google.bigtable.v2.RowSet.getDefaultInstance() : rows_; } } + /** * * @@ -1670,14 +1921,14 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { * * .google.bigtable.v2.RowSet rows = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowSet, com.google.bigtable.v2.RowSet.Builder, com.google.bigtable.v2.RowSetOrBuilder> - getRowsFieldBuilder() { + internalGetRowsFieldBuilder() { if (rowsBuilder_ == null) { rowsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowSet, com.google.bigtable.v2.RowSet.Builder, com.google.bigtable.v2.RowSetOrBuilder>( @@ -1688,11 +1939,12 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { } private com.google.bigtable.v2.RowFilter filter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> filterBuilder_; + /** * * @@ -1706,8 +1958,9 @@ public com.google.bigtable.v2.RowSetOrBuilder getRowsOrBuilder() { * @return Whether the filter field is set. */ public boolean hasFilter() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } + /** * * @@ -1727,6 +1980,7 @@ public com.google.bigtable.v2.RowFilter getFilter() { return filterBuilder_.getMessage(); } } + /** * * @@ -1746,10 +2000,11 @@ public Builder setFilter(com.google.bigtable.v2.RowFilter value) { } else { filterBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -1766,10 +2021,11 @@ public Builder setFilter(com.google.bigtable.v2.RowFilter.Builder builderForValu } else { filterBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } + /** * * @@ -1782,7 +2038,7 @@ public Builder setFilter(com.google.bigtable.v2.RowFilter.Builder builderForValu */ public Builder mergeFilter(com.google.bigtable.v2.RowFilter value) { if (filterBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && filter_ != null && filter_ != com.google.bigtable.v2.RowFilter.getDefaultInstance()) { getFilterBuilder().mergeFrom(value); @@ -1793,11 +2049,12 @@ public Builder mergeFilter(com.google.bigtable.v2.RowFilter value) { filterBuilder_.mergeFrom(value); } if (filter_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } return this; } + /** * * @@ -1809,7 +2066,7 @@ public Builder mergeFilter(com.google.bigtable.v2.RowFilter value) { * .google.bigtable.v2.RowFilter filter = 3; */ public Builder clearFilter() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); filter_ = null; if (filterBuilder_ != null) { filterBuilder_.dispose(); @@ -1818,6 +2075,7 @@ public Builder clearFilter() { onChanged(); return this; } + /** * * @@ -1829,10 +2087,11 @@ public Builder clearFilter() { * .google.bigtable.v2.RowFilter filter = 3; */ public com.google.bigtable.v2.RowFilter.Builder getFilterBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); - return getFilterFieldBuilder().getBuilder(); + return internalGetFilterFieldBuilder().getBuilder(); } + /** * * @@ -1850,6 +2109,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; } } + /** * * @@ -1860,14 +2120,14 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { * * .google.bigtable.v2.RowFilter filter = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getFilterFieldBuilder() { + internalGetFilterFieldBuilder() { if (filterBuilder_ == null) { filterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -1878,6 +2138,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { } private long rowsLimit_; + /** * * @@ -1894,6 +2155,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { public long getRowsLimit() { return rowsLimit_; } + /** * * @@ -1910,10 +2172,11 @@ public long getRowsLimit() { public Builder setRowsLimit(long value) { rowsLimit_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } + /** * * @@ -1927,13 +2190,14 @@ public Builder setRowsLimit(long value) { * @return This builder for chaining. */ public Builder clearRowsLimit() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); rowsLimit_ = 0L; onChanged(); return this; } private int requestStatsView_ = 0; + /** * * @@ -1949,6 +2213,7 @@ public Builder clearRowsLimit() { public int getRequestStatsViewValue() { return requestStatsView_; } + /** * * @@ -1963,10 +2228,11 @@ public int getRequestStatsViewValue() { */ public Builder setRequestStatsViewValue(int value) { requestStatsView_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } + /** * * @@ -1986,6 +2252,7 @@ public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsVi ? com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.UNRECOGNIZED : result; } + /** * * @@ -2003,11 +2270,12 @@ public Builder setRequestStatsView( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; requestStatsView_ = value.getNumber(); onChanged(); return this; } + /** * * @@ -2020,13 +2288,14 @@ public Builder setRequestStatsView( * @return This builder for chaining. */ public Builder clearRequestStatsView() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); requestStatsView_ = 0; onChanged(); return this; } private boolean reversed_; + /** * * @@ -2039,10 +2308,10 @@ public Builder clearRequestStatsView() { * * Example result set: * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] * * * bool reversed = 7; @@ -2053,6 +2322,7 @@ public Builder clearRequestStatsView() { public boolean getReversed() { return reversed_; } + /** * * @@ -2065,10 +2335,10 @@ public boolean getReversed() { * * Example result set: * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] * * * bool reversed = 7; @@ -2079,10 +2349,11 @@ public boolean getReversed() { public Builder setReversed(boolean value) { reversed_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } + /** * * @@ -2095,10 +2366,10 @@ public Builder setReversed(boolean value) { * * Example result set: * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] * * * bool reversed = 7; @@ -2106,23 +2377,12 @@ public Builder setReversed(boolean value) { * @return This builder for chaining. */ public Builder clearReversed() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); reversed_ = false; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadRowsRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java index 3c18d5228d..b5d0dc2438 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadRowsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadRowsRequest) @@ -41,6 +43,7 @@ public interface ReadRowsRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -76,6 +79,7 @@ public interface ReadRowsRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -94,6 +98,42 @@ public interface ReadRowsRequestOrBuilder */ com.google.protobuf.ByteString getAuthorizedViewNameBytes(); + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + java.lang.String getMaterializedViewName(); + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + com.google.protobuf.ByteString getMaterializedViewNameBytes(); + /** * * @@ -107,6 +147,7 @@ public interface ReadRowsRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * @@ -134,6 +175,7 @@ public interface ReadRowsRequestOrBuilder * @return Whether the rows field is set. */ boolean hasRows(); + /** * * @@ -147,6 +189,7 @@ public interface ReadRowsRequestOrBuilder * @return The rows. */ com.google.bigtable.v2.RowSet getRows(); + /** * * @@ -172,6 +215,7 @@ public interface ReadRowsRequestOrBuilder * @return Whether the filter field is set. */ boolean hasFilter(); + /** * * @@ -185,6 +229,7 @@ public interface ReadRowsRequestOrBuilder * @return The filter. */ com.google.bigtable.v2.RowFilter getFilter(); + /** * * @@ -223,6 +268,7 @@ public interface ReadRowsRequestOrBuilder * @return The enum numeric value on the wire for requestStatsView. */ int getRequestStatsViewValue(); + /** * * @@ -248,10 +294,10 @@ public interface ReadRowsRequestOrBuilder * * Example result set: * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] + * [ + * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + * {key: "k1", "f:col1": "v2", "f:col2": "v2"} + * ] * * * bool reversed = 7; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java index b89ffbfcea..ff3dc5309f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.ReadRowsResponse} */ -public final class ReadRowsResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ReadRowsResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsResponse) ReadRowsResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReadRowsResponse"); + } + // Use ReadRowsResponse.newBuilder() to construct. - private ReadRowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ReadRowsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,19 +56,13 @@ private ReadRowsResponse() { lastScannedRowKey_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ReadRowsResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_fieldAccessorTable @@ -102,6 +109,7 @@ public interface CellChunkOrBuilder * @return Whether the familyName field is set. */ boolean hasFamilyName(); + /** * * @@ -119,6 +127,7 @@ public interface CellChunkOrBuilder * @return The familyName. */ com.google.protobuf.StringValue getFamilyName(); + /** * * @@ -151,6 +160,7 @@ public interface CellChunkOrBuilder * @return Whether the qualifier field is set. */ boolean hasQualifier(); + /** * * @@ -167,6 +177,7 @@ public interface CellChunkOrBuilder * @return The qualifier. */ com.google.protobuf.BytesValue getQualifier(); + /** * * @@ -216,6 +227,7 @@ public interface CellChunkOrBuilder * @return A list containing the labels. */ java.util.List getLabelsList(); + /** * * @@ -230,6 +242,7 @@ public interface CellChunkOrBuilder * @return The count of labels. */ int getLabelsCount(); + /** * * @@ -245,6 +258,7 @@ public interface CellChunkOrBuilder * @return The labels at the given index. */ java.lang.String getLabels(int index); + /** * * @@ -307,6 +321,7 @@ public interface CellChunkOrBuilder * @return Whether the resetRow field is set. */ boolean hasResetRow(); + /** * * @@ -334,6 +349,7 @@ public interface CellChunkOrBuilder * @return Whether the commitRow field is set. */ boolean hasCommitRow(); + /** * * @@ -350,6 +366,7 @@ public interface CellChunkOrBuilder com.google.bigtable.v2.ReadRowsResponse.CellChunk.RowStatusCase getRowStatusCase(); } + /** * * @@ -360,13 +377,24 @@ public interface CellChunkOrBuilder * * Protobuf type {@code google.bigtable.v2.ReadRowsResponse.CellChunk} */ - public static final class CellChunk extends com.google.protobuf.GeneratedMessageV3 + public static final class CellChunk extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadRowsResponse.CellChunk) CellChunkOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CellChunk"); + } + // Use CellChunk.newBuilder() to construct. - private CellChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private CellChunk(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -376,19 +404,13 @@ private CellChunk() { value_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CellChunk(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_fieldAccessorTable @@ -415,6 +437,7 @@ public enum RowStatusCase private RowStatusCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -449,6 +472,7 @@ public RowStatusCase getRowStatusCase() { public static final int ROW_KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -470,6 +494,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int FAMILY_NAME_FIELD_NUMBER = 2; private com.google.protobuf.StringValue familyName_; + /** * * @@ -490,6 +515,7 @@ public com.google.protobuf.ByteString getRowKey() { public boolean hasFamilyName() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -512,6 +538,7 @@ public com.google.protobuf.StringValue getFamilyName() { ? com.google.protobuf.StringValue.getDefaultInstance() : familyName_; } + /** * * @@ -535,6 +562,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public static final int QUALIFIER_FIELD_NUMBER = 3; private com.google.protobuf.BytesValue qualifier_; + /** * * @@ -554,6 +582,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public boolean hasQualifier() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -573,6 +602,7 @@ public boolean hasQualifier() { public com.google.protobuf.BytesValue getQualifier() { return qualifier_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : qualifier_; } + /** * * @@ -593,6 +623,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { public static final int TIMESTAMP_MICROS_FIELD_NUMBER = 4; private long timestampMicros_ = 0L; + /** * * @@ -621,6 +652,7 @@ public long getTimestampMicros() { @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** * * @@ -637,6 +669,7 @@ public long getTimestampMicros() { public com.google.protobuf.ProtocolStringList getLabelsList() { return labels_; } + /** * * @@ -653,6 +686,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -670,6 +704,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -690,6 +725,7 @@ public com.google.protobuf.ByteString getLabelsBytes(int index) { public static final int VALUE_FIELD_NUMBER = 6; private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -712,6 +748,7 @@ public com.google.protobuf.ByteString getValue() { public static final int VALUE_SIZE_FIELD_NUMBER = 7; private int valueSize_ = 0; + /** * * @@ -732,6 +769,7 @@ public int getValueSize() { } public static final int RESET_ROW_FIELD_NUMBER = 8; + /** * * @@ -748,6 +786,7 @@ public int getValueSize() { public boolean hasResetRow() { return rowStatusCase_ == 8; } + /** * * @@ -769,6 +808,7 @@ public boolean getResetRow() { } public static final int COMMIT_ROW_FIELD_NUMBER = 9; + /** * * @@ -785,6 +825,7 @@ public boolean getResetRow() { public boolean hasCommitRow() { return rowStatusCase_ == 9; } + /** * * @@ -832,7 +873,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeInt64(4, timestampMicros_); } for (int i = 0; i < labels_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, labels_.getRaw(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 5, labels_.getRaw(i)); } if (!value_.isEmpty()) { output.writeBytes(6, value_); @@ -1016,38 +1057,38 @@ public static com.google.bigtable.v2.ReadRowsResponse.CellChunk parseFrom( public static com.google.bigtable.v2.ReadRowsResponse.CellChunk 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.bigtable.v2.ReadRowsResponse.CellChunk 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.bigtable.v2.ReadRowsResponse.CellChunk 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.bigtable.v2.ReadRowsResponse.CellChunk 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.bigtable.v2.ReadRowsResponse.CellChunk 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.bigtable.v2.ReadRowsResponse.CellChunk 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); } @@ -1070,11 +1111,11 @@ 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; } + /** * * @@ -1085,8 +1126,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.ReadRowsResponse.CellChunk} */ - 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.bigtable.v2.ReadRowsResponse.CellChunk) com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder { @@ -1096,7 +1136,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_fieldAccessorTable @@ -1110,15 +1150,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) { - getFamilyNameFieldBuilder(); - getQualifierFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFamilyNameFieldBuilder(); + internalGetQualifierFieldBuilder(); } } @@ -1214,41 +1254,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ReadRowsResponse.CellChun result.rowStatus_ = this.rowStatus_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ReadRowsResponse.CellChunk) { @@ -1262,7 +1267,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.ReadRowsResponse.CellChunk other) { if (other == com.google.bigtable.v2.ReadRowsResponse.CellChunk.getDefaultInstance()) return this; - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (other.hasFamilyName()) { @@ -1284,7 +1289,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsResponse.CellChunk other } onChanged(); } - if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getValue().isEmpty()) { setValue(other.getValue()); } if (other.getValueSize() != 0) { @@ -1340,13 +1345,15 @@ public Builder mergeFrom( } // case 10 case 18: { - input.readMessage(getFamilyNameFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFamilyNameFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getQualifierFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetQualifierFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -1421,6 +1428,7 @@ public Builder clearRowStatus() { private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -1439,6 +1447,7 @@ public Builder clearRowStatus() { public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -1463,6 +1472,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1485,11 +1495,12 @@ public Builder clearRowKey() { } private com.google.protobuf.StringValue familyName_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> familyNameBuilder_; + /** * * @@ -1509,6 +1520,7 @@ public Builder clearRowKey() { public boolean hasFamilyName() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -1534,6 +1546,7 @@ public com.google.protobuf.StringValue getFamilyName() { return familyNameBuilder_.getMessage(); } } + /** * * @@ -1561,6 +1574,7 @@ public Builder setFamilyName(com.google.protobuf.StringValue value) { onChanged(); return this; } + /** * * @@ -1585,6 +1599,7 @@ public Builder setFamilyName(com.google.protobuf.StringValue.Builder builderForV onChanged(); return this; } + /** * * @@ -1617,6 +1632,7 @@ public Builder mergeFamilyName(com.google.protobuf.StringValue value) { } return this; } + /** * * @@ -1641,6 +1657,7 @@ public Builder clearFamilyName() { onChanged(); return this; } + /** * * @@ -1658,8 +1675,9 @@ public Builder clearFamilyName() { public com.google.protobuf.StringValue.Builder getFamilyNameBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getFamilyNameFieldBuilder().getBuilder(); + return internalGetFamilyNameFieldBuilder().getBuilder(); } + /** * * @@ -1683,6 +1701,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { : familyName_; } } + /** * * @@ -1697,14 +1716,14 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { * * .google.protobuf.StringValue family_name = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> - getFamilyNameFieldBuilder() { + internalGetFamilyNameFieldBuilder() { if (familyNameBuilder_ == null) { familyNameBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( @@ -1715,11 +1734,12 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { } private com.google.protobuf.BytesValue qualifier_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> qualifierBuilder_; + /** * * @@ -1738,6 +1758,7 @@ public com.google.protobuf.StringValueOrBuilder getFamilyNameOrBuilder() { public boolean hasQualifier() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -1762,6 +1783,7 @@ public com.google.protobuf.BytesValue getQualifier() { return qualifierBuilder_.getMessage(); } } + /** * * @@ -1788,6 +1810,7 @@ public Builder setQualifier(com.google.protobuf.BytesValue value) { onChanged(); return this; } + /** * * @@ -1811,6 +1834,7 @@ public Builder setQualifier(com.google.protobuf.BytesValue.Builder builderForVal onChanged(); return this; } + /** * * @@ -1842,6 +1866,7 @@ public Builder mergeQualifier(com.google.protobuf.BytesValue value) { } return this; } + /** * * @@ -1865,6 +1890,7 @@ public Builder clearQualifier() { onChanged(); return this; } + /** * * @@ -1881,8 +1907,9 @@ public Builder clearQualifier() { public com.google.protobuf.BytesValue.Builder getQualifierBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getQualifierFieldBuilder().getBuilder(); + return internalGetQualifierFieldBuilder().getBuilder(); } + /** * * @@ -1905,6 +1932,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { : qualifier_; } } + /** * * @@ -1918,14 +1946,14 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { * * .google.protobuf.BytesValue qualifier = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> - getQualifierFieldBuilder() { + internalGetQualifierFieldBuilder() { if (qualifierBuilder_ == null) { qualifierBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( @@ -1936,6 +1964,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { } private long timestampMicros_; + /** * * @@ -1958,6 +1987,7 @@ public com.google.protobuf.BytesValueOrBuilder getQualifierOrBuilder() { public long getTimestampMicros() { return timestampMicros_; } + /** * * @@ -1984,6 +2014,7 @@ public Builder setTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -2018,6 +2049,7 @@ private void ensureLabelsIsMutable() { } bitField0_ |= 0x00000010; } + /** * * @@ -2035,6 +2067,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { labels_.makeImmutable(); return labels_; } + /** * * @@ -2051,6 +2084,7 @@ public com.google.protobuf.ProtocolStringList getLabelsList() { public int getLabelsCount() { return labels_.size(); } + /** * * @@ -2068,6 +2102,7 @@ public int getLabelsCount() { public java.lang.String getLabels(int index) { return labels_.get(index); } + /** * * @@ -2085,6 +2120,7 @@ public java.lang.String getLabels(int index) { public com.google.protobuf.ByteString getLabelsBytes(int index) { return labels_.getByteString(index); } + /** * * @@ -2110,6 +2146,7 @@ public Builder setLabels(int index, java.lang.String value) { onChanged(); return this; } + /** * * @@ -2134,6 +2171,7 @@ public Builder addLabels(java.lang.String value) { onChanged(); return this; } + /** * * @@ -2155,6 +2193,7 @@ public Builder addAllLabels(java.lang.Iterable values) { onChanged(); return this; } + /** * * @@ -2175,6 +2214,7 @@ public Builder clearLabels() { onChanged(); return this; } + /** * * @@ -2202,6 +2242,7 @@ public Builder addLabelsBytes(com.google.protobuf.ByteString value) { } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -2221,6 +2262,7 @@ public Builder addLabelsBytes(com.google.protobuf.ByteString value) { public com.google.protobuf.ByteString getValue() { return value_; } + /** * * @@ -2246,6 +2288,7 @@ public Builder setValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -2269,6 +2312,7 @@ public Builder clearValue() { } private int valueSize_; + /** * * @@ -2287,6 +2331,7 @@ public Builder clearValue() { public int getValueSize() { return valueSize_; } + /** * * @@ -2309,6 +2354,7 @@ public Builder setValueSize(int value) { onChanged(); return this; } + /** * * @@ -2345,6 +2391,7 @@ public Builder clearValueSize() { public boolean hasResetRow() { return rowStatusCase_ == 8; } + /** * * @@ -2363,6 +2410,7 @@ public boolean getResetRow() { } return false; } + /** * * @@ -2383,6 +2431,7 @@ public Builder setResetRow(boolean value) { onChanged(); return this; } + /** * * @@ -2419,6 +2468,7 @@ public Builder clearResetRow() { public boolean hasCommitRow() { return rowStatusCase_ == 9; } + /** * * @@ -2437,6 +2487,7 @@ public boolean getCommitRow() { } return false; } + /** * * @@ -2457,6 +2508,7 @@ public Builder setCommitRow(boolean value) { onChanged(); return this; } + /** * * @@ -2478,18 +2530,6 @@ public Builder clearCommitRow() { 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.bigtable.v2.ReadRowsResponse.CellChunk) } @@ -2547,6 +2587,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getDefaultInstanceForTy @SuppressWarnings("serial") private java.util.List chunks_; + /** * * @@ -2560,6 +2601,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getDefaultInstanceForTy public java.util.List getChunksList() { return chunks_; } + /** * * @@ -2574,6 +2616,7 @@ public java.util.List getChun getChunksOrBuilderList() { return chunks_; } + /** * * @@ -2587,6 +2630,7 @@ public java.util.List getChun public int getChunksCount() { return chunks_.size(); } + /** * * @@ -2600,6 +2644,7 @@ public int getChunksCount() { public com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index) { return chunks_.get(index); } + /** * * @@ -2616,6 +2661,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui public static final int LAST_SCANNED_ROW_KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString lastScannedRowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -2640,30 +2686,16 @@ public com.google.protobuf.ByteString getLastScannedRowKey() { public static final int REQUEST_STATS_FIELD_NUMBER = 3; private com.google.bigtable.v2.RequestStats requestStats_; + /** * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -2674,30 +2706,16 @@ public com.google.protobuf.ByteString getLastScannedRowKey() { public boolean hasRequestStats() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -2710,30 +2728,16 @@ public com.google.bigtable.v2.RequestStats getRequestStats() { ? com.google.bigtable.v2.RequestStats.getDefaultInstance() : requestStats_; } + /** * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -2870,38 +2874,38 @@ public static com.google.bigtable.v2.ReadRowsResponse parseFrom( public static com.google.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse 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); } @@ -2924,10 +2928,11 @@ 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; } + /** * * @@ -2937,7 +2942,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ReadRowsResponse} */ - 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.bigtable.v2.ReadRowsResponse) com.google.bigtable.v2.ReadRowsResponseOrBuilder { @@ -2947,7 +2952,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_fieldAccessorTable @@ -2961,15 +2966,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) { - getChunksFieldBuilder(); - getRequestStatsFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetChunksFieldBuilder(); + internalGetRequestStatsFieldBuilder(); } } @@ -3051,39 +3056,6 @@ private void buildPartial0(com.google.bigtable.v2.ReadRowsResponse 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.bigtable.v2.ReadRowsResponse) { @@ -3115,15 +3087,15 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsResponse other) { chunks_ = other.chunks_; bitField0_ = (bitField0_ & ~0x00000001); chunksBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getChunksFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunksFieldBuilder() : null; } else { chunksBuilder_.addAllMessages(other.chunks_); } } } - if (other.getLastScannedRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getLastScannedRowKey().isEmpty()) { setLastScannedRowKey(other.getLastScannedRowKey()); } if (other.hasRequestStats()) { @@ -3177,7 +3149,8 @@ public Builder mergeFrom( } // case 18 case 26: { - input.readMessage(getRequestStatsFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRequestStatsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -3211,7 +3184,7 @@ private void ensureChunksIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadRowsResponse.CellChunk, com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder, com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder> @@ -3233,6 +3206,7 @@ public java.util.List getChun return chunksBuilder_.getMessageList(); } } + /** * * @@ -3249,6 +3223,7 @@ public int getChunksCount() { return chunksBuilder_.getCount(); } } + /** * * @@ -3265,6 +3240,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index) { return chunksBuilder_.getMessage(index); } } + /** * * @@ -3287,6 +3263,7 @@ public Builder setChunks(int index, com.google.bigtable.v2.ReadRowsResponse.Cell } return this; } + /** * * @@ -3307,6 +3284,7 @@ public Builder setChunks( } return this; } + /** * * @@ -3329,6 +3307,7 @@ public Builder addChunks(com.google.bigtable.v2.ReadRowsResponse.CellChunk value } return this; } + /** * * @@ -3351,6 +3330,7 @@ public Builder addChunks(int index, com.google.bigtable.v2.ReadRowsResponse.Cell } return this; } + /** * * @@ -3371,6 +3351,7 @@ public Builder addChunks( } return this; } + /** * * @@ -3391,6 +3372,7 @@ public Builder addChunks( } return this; } + /** * * @@ -3411,6 +3393,7 @@ public Builder addAllChunks( } return this; } + /** * * @@ -3430,6 +3413,7 @@ public Builder clearChunks() { } return this; } + /** * * @@ -3449,6 +3433,7 @@ public Builder removeChunks(int index) { } return this; } + /** * * @@ -3459,8 +3444,9 @@ public Builder removeChunks(int index) { * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder getChunksBuilder(int index) { - return getChunksFieldBuilder().getBuilder(index); + return internalGetChunksFieldBuilder().getBuilder(index); } + /** * * @@ -3478,6 +3464,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui return chunksBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -3495,6 +3482,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui return java.util.Collections.unmodifiableList(chunks_); } } + /** * * @@ -3505,9 +3493,10 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder getChunksOrBui * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilder() { - return getChunksFieldBuilder() + return internalGetChunksFieldBuilder() .addBuilder(com.google.bigtable.v2.ReadRowsResponse.CellChunk.getDefaultInstance()); } + /** * * @@ -3518,10 +3507,11 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilder(int index) { - return getChunksFieldBuilder() + return internalGetChunksFieldBuilder() .addBuilder( index, com.google.bigtable.v2.ReadRowsResponse.CellChunk.getDefaultInstance()); } + /** * * @@ -3533,17 +3523,17 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde */ public java.util.List getChunksBuilderList() { - return getChunksFieldBuilder().getBuilderList(); + return internalGetChunksFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadRowsResponse.CellChunk, com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder, com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder> - getChunksFieldBuilder() { + internalGetChunksFieldBuilder() { if (chunksBuilder_ == null) { chunksBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.ReadRowsResponse.CellChunk, com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder, com.google.bigtable.v2.ReadRowsResponse.CellChunkOrBuilder>( @@ -3555,6 +3545,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde private com.google.protobuf.ByteString lastScannedRowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -3576,6 +3567,7 @@ public com.google.bigtable.v2.ReadRowsResponse.CellChunk.Builder addChunksBuilde public com.google.protobuf.ByteString getLastScannedRowKey() { return lastScannedRowKey_; } + /** * * @@ -3603,6 +3595,7 @@ public Builder setLastScannedRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -3628,35 +3621,21 @@ public Builder clearLastScannedRowKey() { } private com.google.bigtable.v2.RequestStats requestStats_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestStats, com.google.bigtable.v2.RequestStats.Builder, com.google.bigtable.v2.RequestStatsOrBuilder> requestStatsBuilder_; + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3666,30 +3645,16 @@ public Builder clearLastScannedRowKey() { public boolean hasRequestStats() { return ((bitField0_ & 0x00000004) != 0); } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3705,30 +3670,16 @@ public com.google.bigtable.v2.RequestStats getRequestStats() { return requestStatsBuilder_.getMessage(); } } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3746,30 +3697,16 @@ public Builder setRequestStats(com.google.bigtable.v2.RequestStats value) { onChanged(); return this; } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3784,30 +3721,16 @@ public Builder setRequestStats(com.google.bigtable.v2.RequestStats.Builder build onChanged(); return this; } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3830,30 +3753,16 @@ public Builder mergeRequestStats(com.google.bigtable.v2.RequestStats value) { } return this; } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3868,30 +3777,16 @@ public Builder clearRequestStats() { onChanged(); return this; } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3899,32 +3794,18 @@ public Builder clearRequestStats() { public com.google.bigtable.v2.RequestStats.Builder getRequestStatsBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getRequestStatsFieldBuilder().getBuilder(); + return internalGetRequestStatsFieldBuilder().getBuilder(); } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -3938,42 +3819,28 @@ public com.google.bigtable.v2.RequestStatsOrBuilder getRequestStatsOrBuilder() { : requestStats_; } } + /** * * *
    -     *
    -     * If requested, provide enhanced query performance statistics. The semantics
    -     * dictate:
    -     *   * request_stats is empty on every (streamed) response, except
    -     *   * request_stats has non-empty information after all chunks have been
    -     *     streamed, where the ReadRowsResponse message only contains
    -     *     request_stats.
    -     *       * For example, if a read request would have returned an empty
    -     *         response instead a single ReadRowsResponse is streamed with empty
    -     *         chunks and request_stats filled.
    -     *
    -     * Visually, response messages will stream as follows:
    -     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -     *   \______________________/  \________________________________/
    -     *       Primary response         Trailer of RequestStats info
    -     *
    -     * Or if the read did not return any values:
    -     *   {chunks: [], request_stats: {...}}
    -     *   \________________________________/
    -     *      Trailer of RequestStats info
    +     * If requested, return enhanced query performance statistics. The field
    +     * request_stats is empty in a streamed response unless the ReadRowsResponse
    +     * message contains request_stats in the last message of the stream. Always
    +     * returned when requested, even when the read request returns an empty
    +     * response.
          * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestStats, com.google.bigtable.v2.RequestStats.Builder, com.google.bigtable.v2.RequestStatsOrBuilder> - getRequestStatsFieldBuilder() { + internalGetRequestStatsFieldBuilder() { if (requestStatsBuilder_ == null) { requestStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RequestStats, com.google.bigtable.v2.RequestStats.Builder, com.google.bigtable.v2.RequestStatsOrBuilder>( @@ -3983,17 +3850,6 @@ public com.google.bigtable.v2.RequestStatsOrBuilder getRequestStatsOrBuilder() { return requestStatsBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadRowsResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java index fdcc097eb9..a1202a4020 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ReadRowsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadRowsResponse) @@ -34,6 +36,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ java.util.List getChunksList(); + /** * * @@ -44,6 +47,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ com.google.bigtable.v2.ReadRowsResponse.CellChunk getChunks(int index); + /** * * @@ -54,6 +58,7 @@ public interface ReadRowsResponseOrBuilder * repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; */ int getChunksCount(); + /** * * @@ -65,6 +70,7 @@ public interface ReadRowsResponseOrBuilder */ java.util.List getChunksOrBuilderList(); + /** * * @@ -99,26 +105,11 @@ public interface ReadRowsResponseOrBuilder * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -126,30 +117,16 @@ public interface ReadRowsResponseOrBuilder * @return Whether the requestStats field is set. */ boolean hasRequestStats(); + /** * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; @@ -157,30 +134,16 @@ public interface ReadRowsResponseOrBuilder * @return The requestStats. */ com.google.bigtable.v2.RequestStats getRequestStats(); + /** * * *
    -   *
    -   * If requested, provide enhanced query performance statistics. The semantics
    -   * dictate:
    -   *   * request_stats is empty on every (streamed) response, except
    -   *   * request_stats has non-empty information after all chunks have been
    -   *     streamed, where the ReadRowsResponse message only contains
    -   *     request_stats.
    -   *       * For example, if a read request would have returned an empty
    -   *         response instead a single ReadRowsResponse is streamed with empty
    -   *         chunks and request_stats filled.
    -   *
    -   * Visually, response messages will stream as follows:
    -   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    -   *   \______________________/  \________________________________/
    -   *       Primary response         Trailer of RequestStats info
    -   *
    -   * Or if the read did not return any values:
    -   *   {chunks: [], request_stats: {...}}
    -   *   \________________________________/
    -   *      Trailer of RequestStats info
    +   * If requested, return enhanced query performance statistics. The field
    +   * request_stats is empty in a streamed response unless the ReadRowsResponse
    +   * message contains request_stats in the last message of the stream. Always
    +   * returned when requested, even when the read request returns an empty
    +   * response.
        * 
    * * .google.bigtable.v2.RequestStats request_stats = 3; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java index 8387e549d0..c84b987d3e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -30,31 +31,37 @@ * * Protobuf type {@code google.bigtable.v2.RequestLatencyStats} */ -public final class RequestLatencyStats extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RequestLatencyStats extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestLatencyStats) RequestLatencyStatsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RequestLatencyStats"); + } + // Use RequestLatencyStats.newBuilder() to construct. - private RequestLatencyStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RequestLatencyStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RequestLatencyStats() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RequestLatencyStats(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable @@ -66,6 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int FRONTEND_SERVER_LATENCY_FIELD_NUMBER = 1; private com.google.protobuf.Duration frontendServerLatency_; + /** * * @@ -97,6 +105,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasFrontendServerLatency() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -130,6 +139,7 @@ public com.google.protobuf.Duration getFrontendServerLatency() { ? com.google.protobuf.Duration.getDefaultInstance() : frontendServerLatency_; } + /** * * @@ -269,38 +279,38 @@ public static com.google.bigtable.v2.RequestLatencyStats parseFrom( public static com.google.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats 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); } @@ -323,10 +333,11 @@ 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; } + /** * * @@ -338,7 +349,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.RequestLatencyStats} */ - 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.bigtable.v2.RequestLatencyStats) com.google.bigtable.v2.RequestLatencyStatsOrBuilder { @@ -348,7 +359,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.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable @@ -362,14 +373,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) { - getFrontendServerLatencyFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFrontendServerLatencyFieldBuilder(); } } @@ -429,39 +440,6 @@ private void buildPartial0(com.google.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats) { @@ -506,7 +484,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getFrontendServerLatencyFieldBuilder().getBuilder(), extensionRegistry); + internalGetFrontendServerLatencyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -530,11 +508,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.Duration frontendServerLatency_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> frontendServerLatencyBuilder_; + /** * * @@ -565,6 +544,7 @@ public Builder mergeFrom( public boolean hasFrontendServerLatency() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -601,6 +581,7 @@ public com.google.protobuf.Duration getFrontendServerLatency() { return frontendServerLatencyBuilder_.getMessage(); } } + /** * * @@ -639,6 +620,7 @@ public Builder setFrontendServerLatency(com.google.protobuf.Duration value) { onChanged(); return this; } + /** * * @@ -674,6 +656,7 @@ public Builder setFrontendServerLatency(com.google.protobuf.Duration.Builder bui onChanged(); return this; } + /** * * @@ -717,6 +700,7 @@ public Builder mergeFrontendServerLatency(com.google.protobuf.Duration value) { } return this; } + /** * * @@ -752,6 +736,7 @@ public Builder clearFrontendServerLatency() { onChanged(); return this; } + /** * * @@ -780,8 +765,9 @@ public Builder clearFrontendServerLatency() { public com.google.protobuf.Duration.Builder getFrontendServerLatencyBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getFrontendServerLatencyFieldBuilder().getBuilder(); + return internalGetFrontendServerLatencyFieldBuilder().getBuilder(); } + /** * * @@ -816,6 +802,7 @@ public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() : frontendServerLatency_; } } + /** * * @@ -841,14 +828,14 @@ public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() * * .google.protobuf.Duration frontend_server_latency = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getFrontendServerLatencyFieldBuilder() { + internalGetFrontendServerLatencyFieldBuilder() { if (frontendServerLatencyBuilder_ == null) { frontendServerLatencyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( @@ -858,17 +845,6 @@ public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() return frontendServerLatencyBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RequestLatencyStats) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java index 266fcfdd97..5ab3acc57f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RequestLatencyStatsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RequestLatencyStats) @@ -52,6 +54,7 @@ public interface RequestLatencyStatsOrBuilder * @return Whether the frontendServerLatency field is set. */ boolean hasFrontendServerLatency(); + /** * * @@ -80,6 +83,7 @@ public interface RequestLatencyStatsOrBuilder * @return The frontendServerLatency. */ com.google.protobuf.Duration getFrontendServerLatency(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java index 37b9577e45..20a41ad0bf 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -25,37 +26,42 @@ *
      * RequestStats is the container for additional information pertaining to a
      * single request, helpful for evaluating the performance of the sent request.
    - * Currently, there are the following supported methods:
    - *   * google.bigtable.v2.ReadRows
    + * Currently, the following method is supported: google.bigtable.v2.ReadRows
      * 
    * * Protobuf type {@code google.bigtable.v2.RequestStats} */ -public final class RequestStats extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RequestStats extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestStats) RequestStatsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RequestStats"); + } + // Use RequestStats.newBuilder() to construct. - private RequestStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RequestStats(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RequestStats() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RequestStats(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestStats_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable @@ -80,6 +86,7 @@ public enum StatsViewCase private StatsViewCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -111,6 +118,7 @@ public StatsViewCase getStatsViewCase() { } public static final int FULL_READ_STATS_VIEW_FIELD_NUMBER = 1; + /** * * @@ -127,6 +135,7 @@ public StatsViewCase getStatsViewCase() { public boolean hasFullReadStatsView() { return statsViewCase_ == 1; } + /** * * @@ -146,6 +155,7 @@ public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { } return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } + /** * * @@ -278,38 +288,38 @@ public static com.google.bigtable.v2.RequestStats parseFrom( public static com.google.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats 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); } @@ -332,23 +342,23 @@ 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; } + /** * * *
        * RequestStats is the container for additional information pertaining to a
        * single request, helpful for evaluating the performance of the sent request.
    -   * Currently, there are the following supported methods:
    -   *   * google.bigtable.v2.ReadRows
    +   * Currently, the following method is supported: google.bigtable.v2.ReadRows
        * 
    * * Protobuf type {@code google.bigtable.v2.RequestStats} */ - 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.bigtable.v2.RequestStats) com.google.bigtable.v2.RequestStatsOrBuilder { @@ -358,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.bigtable.v2.RequestStatsProto .internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable @@ -370,7 +380,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RequestStats.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -429,39 +439,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats) { @@ -514,7 +491,7 @@ public Builder mergeFrom( case 10: { input.readMessage( - getFullReadStatsViewFieldBuilder().getBuilder(), extensionRegistry); + internalGetFullReadStatsViewFieldBuilder().getBuilder(), extensionRegistry); statsViewCase_ = 1; break; } // case 10 @@ -551,11 +528,12 @@ public Builder clearStatsView() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.FullReadStatsView, com.google.bigtable.v2.FullReadStatsView.Builder, com.google.bigtable.v2.FullReadStatsViewOrBuilder> fullReadStatsViewBuilder_; + /** * * @@ -572,6 +550,7 @@ public Builder clearStatsView() { public boolean hasFullReadStatsView() { return statsViewCase_ == 1; } + /** * * @@ -598,6 +577,7 @@ public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } } + /** * * @@ -621,6 +601,7 @@ public Builder setFullReadStatsView(com.google.bigtable.v2.FullReadStatsView val statsViewCase_ = 1; return this; } + /** * * @@ -642,6 +623,7 @@ public Builder setFullReadStatsView( statsViewCase_ = 1; return this; } + /** * * @@ -675,6 +657,7 @@ public Builder mergeFullReadStatsView(com.google.bigtable.v2.FullReadStatsView v statsViewCase_ = 1; return this; } + /** * * @@ -701,6 +684,7 @@ public Builder clearFullReadStatsView() { } return this; } + /** * * @@ -712,8 +696,9 @@ public Builder clearFullReadStatsView() { * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; */ public com.google.bigtable.v2.FullReadStatsView.Builder getFullReadStatsViewBuilder() { - return getFullReadStatsViewFieldBuilder().getBuilder(); + return internalGetFullReadStatsViewFieldBuilder().getBuilder(); } + /** * * @@ -735,6 +720,7 @@ public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrB return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } } + /** * * @@ -745,17 +731,17 @@ public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrB * * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.FullReadStatsView, com.google.bigtable.v2.FullReadStatsView.Builder, com.google.bigtable.v2.FullReadStatsViewOrBuilder> - getFullReadStatsViewFieldBuilder() { + internalGetFullReadStatsViewFieldBuilder() { if (fullReadStatsViewBuilder_ == null) { if (!(statsViewCase_ == 1)) { statsView_ = com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); } fullReadStatsViewBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.FullReadStatsView, com.google.bigtable.v2.FullReadStatsView.Builder, com.google.bigtable.v2.FullReadStatsViewOrBuilder>( @@ -769,17 +755,6 @@ public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrB return fullReadStatsViewBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RequestStats) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java index cafef40a0e..34e1e2b00f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RequestStatsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RequestStats) @@ -37,6 +39,7 @@ public interface RequestStatsOrBuilder * @return Whether the fullReadStatsView field is set. */ boolean hasFullReadStatsView(); + /** * * @@ -50,6 +53,7 @@ public interface RequestStatsOrBuilder * @return The fullReadStatsView. */ com.google.bigtable.v2.FullReadStatsView getFullReadStatsView(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java index dc503b9ef6..f07650ff78 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/request_stats.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class RequestStatsProto { +@com.google.protobuf.Generated +public final class RequestStatsProto extends com.google.protobuf.GeneratedFile { private RequestStatsProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RequestStatsProto"); + } + 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_bigtable_v2_ReadIterationStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_FullReadStatsView_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_RequestStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -81,37 +93,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(), }); internal_static_google_bigtable_v2_ReadIterationStats_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ReadIterationStats_descriptor, new java.lang.String[] { "RowsSeenCount", "RowsReturnedCount", "CellsSeenCount", "CellsReturnedCount", }); internal_static_google_bigtable_v2_RequestLatencyStats_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageType(1); internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RequestLatencyStats_descriptor, new java.lang.String[] { "FrontendServerLatency", }); internal_static_google_bigtable_v2_FullReadStatsView_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageType(2); internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_FullReadStatsView_descriptor, new java.lang.String[] { "ReadIterationStats", "RequestLatencyStats", }); - internal_static_google_bigtable_v2_RequestStats_descriptor = - getDescriptor().getMessageTypes().get(3); + internal_static_google_bigtable_v2_RequestStats_descriptor = getDescriptor().getMessageType(3); internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_RequestStats_descriptor, new java.lang.String[] { "FullReadStatsView", "StatsView", }); + descriptor.resolveAllFeaturesImmutable(); com.google.protobuf.DurationProto.getDescriptor(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java index da62b590d1..47cf26a024 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/response_params.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -24,20 +25,29 @@ * *
      * Response metadata proto
    - * This is an experimental feature that will be used to get zone_id and
    - * cluster_id from response trailers to tag the metrics. This should not be
    - * used by customers directly
      * 
    * * Protobuf type {@code google.bigtable.v2.ResponseParams} */ -public final class ResponseParams extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ResponseParams extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ResponseParams) ResponseParamsOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResponseParams"); + } + // Use ResponseParams.newBuilder() to construct. - private ResponseParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ResponseParams(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -46,19 +56,13 @@ private ResponseParams() { clusterId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ResponseParams(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.ResponseParamsProto .internal_static_google_bigtable_v2_ResponseParams_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.ResponseParamsProto .internal_static_google_bigtable_v2_ResponseParams_fieldAccessorTable @@ -72,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object zoneId_ = ""; + /** * * @@ -87,6 +92,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasZoneId() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -110,6 +116,7 @@ public java.lang.String getZoneId() { return s; } } + /** * * @@ -138,6 +145,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { @SuppressWarnings("serial") private volatile java.lang.Object clusterId_ = ""; + /** * * @@ -154,6 +162,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { public boolean hasClusterId() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -178,6 +187,7 @@ public java.lang.String getClusterId() { return s; } } + /** * * @@ -203,6 +213,41 @@ public com.google.protobuf.ByteString getClusterIdBytes() { } } + public static final int AFE_ID_FIELD_NUMBER = 3; + private long afeId_ = 0L; + + /** + * + * + *
    +   * The AFE ID for the AFE that is served this request.
    +   * 
    + * + * optional int64 afe_id = 3; + * + * @return Whether the afeId field is set. + */ + @java.lang.Override + public boolean hasAfeId() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +   * The AFE ID for the AFE that is served this request.
    +   * 
    + * + * optional int64 afe_id = 3; + * + * @return The afeId. + */ + @java.lang.Override + public long getAfeId() { + return afeId_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -218,10 +263,13 @@ 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, zoneId_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, zoneId_); } if (((bitField0_ & 0x00000002) != 0)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, clusterId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, afeId_); } getUnknownFields().writeTo(output); } @@ -233,10 +281,13 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zoneId_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, zoneId_); } if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clusterId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, afeId_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -261,6 +312,10 @@ public boolean equals(final java.lang.Object obj) { if (hasClusterId()) { if (!getClusterId().equals(other.getClusterId())) return false; } + if (hasAfeId() != other.hasAfeId()) return false; + if (hasAfeId()) { + if (getAfeId() != other.getAfeId()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -280,6 +335,10 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; hash = (53 * hash) + getClusterId().hashCode(); } + if (hasAfeId()) { + hash = (37 * hash) + AFE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAfeId()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -321,38 +380,38 @@ public static com.google.bigtable.v2.ResponseParams parseFrom( public static com.google.bigtable.v2.ResponseParams 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.bigtable.v2.ResponseParams 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.bigtable.v2.ResponseParams 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.bigtable.v2.ResponseParams 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.bigtable.v2.ResponseParams 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.bigtable.v2.ResponseParams 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); } @@ -375,23 +434,21 @@ 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; } + /** * * *
        * Response metadata proto
    -   * This is an experimental feature that will be used to get zone_id and
    -   * cluster_id from response trailers to tag the metrics. This should not be
    -   * used by customers directly
        * 
    * * Protobuf type {@code google.bigtable.v2.ResponseParams} */ - 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.bigtable.v2.ResponseParams) com.google.bigtable.v2.ResponseParamsOrBuilder { @@ -401,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.bigtable.v2.ResponseParamsProto .internal_static_google_bigtable_v2_ResponseParams_fieldAccessorTable @@ -413,7 +470,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ResponseParams.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -423,6 +480,7 @@ public Builder clear() { bitField0_ = 0; zoneId_ = ""; clusterId_ = ""; + afeId_ = 0L; return this; } @@ -468,42 +526,13 @@ private void buildPartial0(com.google.bigtable.v2.ResponseParams result) { result.clusterId_ = clusterId_; to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.afeId_ = afeId_; + 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.bigtable.v2.ResponseParams) { @@ -526,6 +555,9 @@ public Builder mergeFrom(com.google.bigtable.v2.ResponseParams other) { bitField0_ |= 0x00000002; onChanged(); } + if (other.hasAfeId()) { + setAfeId(other.getAfeId()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -564,6 +596,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 24: + { + afeId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -584,6 +622,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object zoneId_ = ""; + /** * * @@ -598,6 +637,7 @@ public Builder mergeFrom( public boolean hasZoneId() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -620,6 +660,7 @@ public java.lang.String getZoneId() { return (java.lang.String) ref; } } + /** * * @@ -642,6 +683,7 @@ public com.google.protobuf.ByteString getZoneIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -663,6 +705,7 @@ public Builder setZoneId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -680,6 +723,7 @@ public Builder clearZoneId() { onChanged(); return this; } + /** * * @@ -704,6 +748,7 @@ public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { } private java.lang.Object clusterId_ = ""; + /** * * @@ -719,6 +764,7 @@ public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { public boolean hasClusterId() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -742,6 +788,7 @@ public java.lang.String getClusterId() { return (java.lang.String) ref; } } + /** * * @@ -765,6 +812,7 @@ public com.google.protobuf.ByteString getClusterIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -787,6 +835,7 @@ public Builder setClusterId(java.lang.String value) { onChanged(); return this; } + /** * * @@ -805,6 +854,7 @@ public Builder clearClusterId() { onChanged(); return this; } + /** * * @@ -829,15 +879,76 @@ public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { return this; } + private long afeId_; + + /** + * + * + *
    +     * The AFE ID for the AFE that is served this request.
    +     * 
    + * + * optional int64 afe_id = 3; + * + * @return Whether the afeId field is set. + */ @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean hasAfeId() { + return ((bitField0_ & 0x00000004) != 0); } + /** + * + * + *
    +     * The AFE ID for the AFE that is served this request.
    +     * 
    + * + * optional int64 afe_id = 3; + * + * @return The afeId. + */ @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public long getAfeId() { + return afeId_; + } + + /** + * + * + *
    +     * The AFE ID for the AFE that is served this request.
    +     * 
    + * + * optional int64 afe_id = 3; + * + * @param value The afeId to set. + * @return This builder for chaining. + */ + public Builder setAfeId(long value) { + + afeId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * The AFE ID for the AFE that is served this request.
    +     * 
    + * + * optional int64 afe_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearAfeId() { + bitField0_ = (bitField0_ & ~0x00000004); + afeId_ = 0L; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ResponseParams) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsOrBuilder.java index 904e195b19..b51f794c2e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/response_params.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ResponseParamsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ResponseParams) @@ -36,6 +38,7 @@ public interface ResponseParamsOrBuilder * @return Whether the zoneId field is set. */ boolean hasZoneId(); + /** * * @@ -48,6 +51,7 @@ public interface ResponseParamsOrBuilder * @return The zoneId. */ java.lang.String getZoneId(); + /** * * @@ -74,6 +78,7 @@ public interface ResponseParamsOrBuilder * @return Whether the clusterId field is set. */ boolean hasClusterId(); + /** * * @@ -87,6 +92,7 @@ public interface ResponseParamsOrBuilder * @return The clusterId. */ java.lang.String getClusterId(); + /** * * @@ -100,4 +106,30 @@ public interface ResponseParamsOrBuilder * @return The bytes for clusterId. */ com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
    +   * The AFE ID for the AFE that is served this request.
    +   * 
    + * + * optional int64 afe_id = 3; + * + * @return Whether the afeId field is set. + */ + boolean hasAfeId(); + + /** + * + * + *
    +   * The AFE ID for the AFE that is served this request.
    +   * 
    + * + * optional int64 afe_id = 3; + * + * @return The afeId. + */ + long getAfeId(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsProto.java index b27bbaf2a4..023c64d587 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParamsProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/response_params.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class ResponseParamsProto { +@com.google.protobuf.Generated +public final class ResponseParamsProto extends com.google.protobuf.GeneratedFile { private ResponseParamsProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ResponseParamsProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,7 +42,7 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ResponseParams_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_ResponseParams_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -41,27 +53,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n(google/bigtable/v2/response_params.pro" - + "to\022\022google.bigtable.v2\"Z\n\016ResponseParams" - + "\022\024\n\007zone_id\030\001 \001(\tH\000\210\001\001\022\027\n\ncluster_id\030\002 \001" - + "(\tH\001\210\001\001B\n\n\010_zone_idB\r\n\013_cluster_idB\275\001\n\026c" - + "om.google.bigtable.v2B\023ResponseParamsPro" - + "toP\001Z8cloud.google.com/go/bigtable/apiv2" - + "/bigtablepb;bigtablepb\252\002\030Google.Cloud.Bi" - + "gtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033G" - + "oogle::Cloud::Bigtable::V2b\006proto3" + "\n" + + "(google/bigtable/v2/response_params.proto\022\022google.bigtable.v2\"z\n" + + "\016ResponseParams\022\024\n" + + "\007zone_id\030\001 \001(\tH\000\210\001\001\022\027\n\n" + + "cluster_id\030\002 \001(\tH\001\210\001\001\022\023\n" + + "\006afe_id\030\003 \001(\003H\002\210\001\001B\n\n" + + "\010_zone_idB\r\n" + + "\013_cluster_idB\t\n" + + "\007_afe_idB\275\001\n" + + "\026com.google.bigtable.v2B\023ResponseParamsProtoP\001Z8cl" + + "oud.google.com/go/bigtable/apiv2/bigtabl" + + "epb;bigtablepb\252\002\030Google.Cloud.Bigtable.V" + + "2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::C" + + "loud::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_google_bigtable_v2_ResponseParams_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_ResponseParams_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_ResponseParams_descriptor, new java.lang.String[] { - "ZoneId", "ClusterId", + "ZoneId", "ClusterId", "AfeId", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadata.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadata.java index 13c2ba93ba..e5704a7a3d 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadata.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ResultSetMetadata_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable @@ -77,6 +84,7 @@ public enum SchemaCase private SchemaCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -108,6 +116,7 @@ public SchemaCase getSchemaCase() { } public static final int PROTO_SCHEMA_FIELD_NUMBER = 1; + /** * * @@ -123,6 +132,7 @@ public SchemaCase getSchemaCase() { public boolean hasProtoSchema() { return schemaCase_ == 1; } + /** * * @@ -141,6 +151,7 @@ public com.google.bigtable.v2.ProtoSchema getProtoSchema() { } return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); } + /** * * @@ -273,38 +284,38 @@ public static com.google.bigtable.v2.ResultSetMetadata parseFrom( public static com.google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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); } @@ -327,10 +338,11 @@ 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 +352,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.ResultSetMetadata) com.google.bigtable.v2.ResultSetMetadataOrBuilder { @@ -350,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ResultSetMetadata_fieldAccessorTable @@ -362,7 +374,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ResultSetMetadata.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -422,39 +434,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ResultSetMetadata 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.bigtable.v2.ResultSetMetadata) { @@ -506,7 +485,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getProtoSchemaFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetProtoSchemaFieldBuilder().getBuilder(), extensionRegistry); schemaCase_ = 1; break; } // case 10 @@ -543,11 +523,12 @@ public Builder clearSchema() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoSchema, com.google.bigtable.v2.ProtoSchema.Builder, com.google.bigtable.v2.ProtoSchemaOrBuilder> protoSchemaBuilder_; + /** * * @@ -563,6 +544,7 @@ public Builder clearSchema() { public boolean hasProtoSchema() { return schemaCase_ == 1; } + /** * * @@ -588,6 +570,7 @@ public com.google.bigtable.v2.ProtoSchema getProtoSchema() { return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); } } + /** * * @@ -610,6 +593,7 @@ public Builder setProtoSchema(com.google.bigtable.v2.ProtoSchema value) { schemaCase_ = 1; return this; } + /** * * @@ -629,6 +613,7 @@ public Builder setProtoSchema(com.google.bigtable.v2.ProtoSchema.Builder builder schemaCase_ = 1; return this; } + /** * * @@ -661,6 +646,7 @@ public Builder mergeProtoSchema(com.google.bigtable.v2.ProtoSchema value) { schemaCase_ = 1; return this; } + /** * * @@ -686,6 +672,7 @@ public Builder clearProtoSchema() { } return this; } + /** * * @@ -696,8 +683,9 @@ public Builder clearProtoSchema() { * .google.bigtable.v2.ProtoSchema proto_schema = 1; */ public com.google.bigtable.v2.ProtoSchema.Builder getProtoSchemaBuilder() { - return getProtoSchemaFieldBuilder().getBuilder(); + return internalGetProtoSchemaFieldBuilder().getBuilder(); } + /** * * @@ -718,6 +706,7 @@ public com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { return com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); } } + /** * * @@ -727,17 +716,17 @@ public com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { * * .google.bigtable.v2.ProtoSchema proto_schema = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoSchema, com.google.bigtable.v2.ProtoSchema.Builder, com.google.bigtable.v2.ProtoSchemaOrBuilder> - getProtoSchemaFieldBuilder() { + internalGetProtoSchemaFieldBuilder() { if (protoSchemaBuilder_ == null) { if (!(schemaCase_ == 1)) { schema_ = com.google.bigtable.v2.ProtoSchema.getDefaultInstance(); } protoSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ProtoSchema, com.google.bigtable.v2.ProtoSchema.Builder, com.google.bigtable.v2.ProtoSchemaOrBuilder>( @@ -749,17 +738,6 @@ public com.google.bigtable.v2.ProtoSchemaOrBuilder getProtoSchemaOrBuilder() { return protoSchemaBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ResultSetMetadata) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadataOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadataOrBuilder.java index ac35e34694..355dd9eb59 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadataOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResultSetMetadataOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ResultSetMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ResultSetMetadata) @@ -36,6 +38,7 @@ public interface ResultSetMetadataOrBuilder * @return Whether the protoSchema field is set. */ boolean hasProtoSchema(); + /** * * @@ -48,6 +51,7 @@ public interface ResultSetMetadataOrBuilder * @return The protoSchema. */ com.google.bigtable.v2.ProtoSchema getProtoSchema(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java index 19115cc42a..c56f38d4a9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,13 +30,25 @@ * * Protobuf type {@code google.bigtable.v2.Row} */ -public final class Row extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class Row extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Row) RowOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Row"); + } + // Use Row.newBuilder() to construct. - private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Row(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,18 +57,12 @@ private Row() { families_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Row(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Row_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Row_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -87,6 +95,7 @@ public com.google.protobuf.ByteString getKey() { @SuppressWarnings("serial") private java.util.List families_; + /** * * @@ -101,6 +110,7 @@ public com.google.protobuf.ByteString getKey() { public java.util.List getFamiliesList() { return families_; } + /** * * @@ -116,6 +126,7 @@ public java.util.List getFamiliesList() { getFamiliesOrBuilderList() { return families_; } + /** * * @@ -130,6 +141,7 @@ public java.util.List getFamiliesList() { public int getFamiliesCount() { return families_.size(); } + /** * * @@ -144,6 +156,7 @@ public int getFamiliesCount() { public com.google.bigtable.v2.Family getFamilies(int index) { return families_.get(index); } + /** * * @@ -269,38 +282,38 @@ public static com.google.bigtable.v2.Row parseFrom( public static com.google.bigtable.v2.Row 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.bigtable.v2.Row 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.bigtable.v2.Row 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.bigtable.v2.Row 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.bigtable.v2.Row 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.bigtable.v2.Row 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); } @@ -323,10 +336,11 @@ 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; } + /** * * @@ -337,7 +351,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.Row} */ - 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.bigtable.v2.Row) com.google.bigtable.v2.RowOrBuilder { @@ -346,7 +360,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Row_fieldAccessorTable @@ -357,7 +371,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Row.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -425,39 +439,6 @@ private void buildPartial0(com.google.bigtable.v2.Row 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.bigtable.v2.Row) { @@ -470,7 +451,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Row other) { if (other == com.google.bigtable.v2.Row.getDefaultInstance()) return this; - if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getKey().isEmpty()) { setKey(other.getKey()); } if (familiesBuilder_ == null) { @@ -492,8 +473,8 @@ public Builder mergeFrom(com.google.bigtable.v2.Row other) { families_ = other.families_; bitField0_ = (bitField0_ & ~0x00000002); familiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFamiliesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFamiliesFieldBuilder() : null; } else { familiesBuilder_.addAllMessages(other.families_); @@ -564,6 +545,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -581,6 +563,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getKey() { return key_; } + /** * * @@ -604,6 +587,7 @@ public Builder setKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -634,7 +618,7 @@ private void ensureFamiliesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Family, com.google.bigtable.v2.Family.Builder, com.google.bigtable.v2.FamilyOrBuilder> @@ -657,6 +641,7 @@ public java.util.List getFamiliesList() { return familiesBuilder_.getMessageList(); } } + /** * * @@ -674,6 +659,7 @@ public int getFamiliesCount() { return familiesBuilder_.getCount(); } } + /** * * @@ -691,6 +677,7 @@ public com.google.bigtable.v2.Family getFamilies(int index) { return familiesBuilder_.getMessage(index); } } + /** * * @@ -714,6 +701,7 @@ public Builder setFamilies(int index, com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -734,6 +722,7 @@ public Builder setFamilies(int index, com.google.bigtable.v2.Family.Builder buil } return this; } + /** * * @@ -757,6 +746,7 @@ public Builder addFamilies(com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -780,6 +770,7 @@ public Builder addFamilies(int index, com.google.bigtable.v2.Family value) { } return this; } + /** * * @@ -800,6 +791,7 @@ public Builder addFamilies(com.google.bigtable.v2.Family.Builder builderForValue } return this; } + /** * * @@ -820,6 +812,7 @@ public Builder addFamilies(int index, com.google.bigtable.v2.Family.Builder buil } return this; } + /** * * @@ -841,6 +834,7 @@ public Builder addAllFamilies( } return this; } + /** * * @@ -861,6 +855,7 @@ public Builder clearFamilies() { } return this; } + /** * * @@ -881,6 +876,7 @@ public Builder removeFamilies(int index) { } return this; } + /** * * @@ -892,8 +888,9 @@ public Builder removeFamilies(int index) { * repeated .google.bigtable.v2.Family families = 2; */ public com.google.bigtable.v2.Family.Builder getFamiliesBuilder(int index) { - return getFamiliesFieldBuilder().getBuilder(index); + return internalGetFamiliesFieldBuilder().getBuilder(index); } + /** * * @@ -911,6 +908,7 @@ public com.google.bigtable.v2.FamilyOrBuilder getFamiliesOrBuilder(int index) { return familiesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -929,6 +927,7 @@ public com.google.bigtable.v2.FamilyOrBuilder getFamiliesOrBuilder(int index) { return java.util.Collections.unmodifiableList(families_); } } + /** * * @@ -940,9 +939,10 @@ public com.google.bigtable.v2.FamilyOrBuilder getFamiliesOrBuilder(int index) { * repeated .google.bigtable.v2.Family families = 2; */ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder() { - return getFamiliesFieldBuilder() + return internalGetFamiliesFieldBuilder() .addBuilder(com.google.bigtable.v2.Family.getDefaultInstance()); } + /** * * @@ -954,9 +954,10 @@ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder() { * repeated .google.bigtable.v2.Family families = 2; */ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder(int index) { - return getFamiliesFieldBuilder() + return internalGetFamiliesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.Family.getDefaultInstance()); } + /** * * @@ -968,17 +969,17 @@ public com.google.bigtable.v2.Family.Builder addFamiliesBuilder(int index) { * repeated .google.bigtable.v2.Family families = 2; */ public java.util.List getFamiliesBuilderList() { - return getFamiliesFieldBuilder().getBuilderList(); + return internalGetFamiliesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Family, com.google.bigtable.v2.Family.Builder, com.google.bigtable.v2.FamilyOrBuilder> - getFamiliesFieldBuilder() { + internalGetFamiliesFieldBuilder() { if (familiesBuilder_ == null) { familiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.Family, com.google.bigtable.v2.Family.Builder, com.google.bigtable.v2.FamilyOrBuilder>( @@ -988,17 +989,6 @@ public java.util.List getFamiliesBuilderL return familiesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Row) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java index 211e5d3bda..7de898b4f3 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -60,30 +61,36 @@ * * Protobuf type {@code google.bigtable.v2.RowFilter} */ -public final class RowFilter extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RowFilter extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter) RowFilterOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RowFilter"); + } + // Use RowFilter.newBuilder() to construct. - private RowFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RowFilter(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RowFilter() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RowFilter(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowFilter_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_fieldAccessorTable @@ -108,6 +115,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersList(); + /** * * @@ -120,6 +128,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ com.google.bigtable.v2.RowFilter getFilters(int index); + /** * * @@ -132,6 +141,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ int getFiltersCount(); + /** * * @@ -144,6 +154,7 @@ public interface ChainOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersOrBuilderList(); + /** * * @@ -157,6 +168,7 @@ public interface ChainOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index); } + /** * * @@ -166,13 +178,24 @@ public interface ChainOrBuilder * * Protobuf type {@code google.bigtable.v2.RowFilter.Chain} */ - public static final class Chain extends com.google.protobuf.GeneratedMessageV3 + public static final class Chain extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Chain) ChainOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Chain"); + } + // Use Chain.newBuilder() to construct. - private Chain(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Chain(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -180,19 +203,13 @@ private Chain() { filters_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Chain(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Chain_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Chain_fieldAccessorTable @@ -205,6 +222,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List filters_; + /** * * @@ -220,6 +238,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFiltersList() { return filters_; } + /** * * @@ -236,6 +255,7 @@ public java.util.List getFiltersList() { getFiltersOrBuilderList() { return filters_; } + /** * * @@ -251,6 +271,7 @@ public java.util.List getFiltersList() { public int getFiltersCount() { return filters_.size(); } + /** * * @@ -266,6 +287,7 @@ public int getFiltersCount() { public com.google.bigtable.v2.RowFilter getFilters(int index) { return filters_.get(index); } + /** * * @@ -384,38 +406,38 @@ public static com.google.bigtable.v2.RowFilter.Chain parseFrom( public static com.google.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain 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); } @@ -438,11 +460,11 @@ 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; } + /** * * @@ -452,8 +474,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.RowFilter.Chain} */ - 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.bigtable.v2.RowFilter.Chain) com.google.bigtable.v2.RowFilter.ChainOrBuilder { @@ -463,7 +484,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Chain_fieldAccessorTable @@ -475,7 +496,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RowFilter.Chain.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -541,41 +562,6 @@ private void buildPartial0(com.google.bigtable.v2.RowFilter.Chain 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.bigtable.v2.RowFilter.Chain) { @@ -607,8 +593,8 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter.Chain other) { filters_ = other.filters_; bitField0_ = (bitField0_ & ~0x00000001); filtersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFiltersFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFiltersFieldBuilder() : null; } else { filtersBuilder_.addAllMessages(other.filters_); @@ -683,7 +669,7 @@ private void ensureFiltersIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> @@ -707,6 +693,7 @@ public java.util.List getFiltersList() { return filtersBuilder_.getMessageList(); } } + /** * * @@ -725,6 +712,7 @@ public int getFiltersCount() { return filtersBuilder_.getCount(); } } + /** * * @@ -743,6 +731,7 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { return filtersBuilder_.getMessage(index); } } + /** * * @@ -767,6 +756,7 @@ public Builder setFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -789,6 +779,7 @@ public Builder setFilters( } return this; } + /** * * @@ -813,6 +804,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -837,6 +829,7 @@ public Builder addFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -858,6 +851,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter.Builder builderForVal } return this; } + /** * * @@ -880,6 +874,7 @@ public Builder addFilters( } return this; } + /** * * @@ -902,6 +897,7 @@ public Builder addAllFilters( } return this; } + /** * * @@ -923,6 +919,7 @@ public Builder clearFilters() { } return this; } + /** * * @@ -944,6 +941,7 @@ public Builder removeFilters(int index) { } return this; } + /** * * @@ -956,8 +954,9 @@ public Builder removeFilters(int index) { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder getFiltersBuilder(int index) { - return getFiltersFieldBuilder().getBuilder(index); + return internalGetFiltersFieldBuilder().getBuilder(index); } + /** * * @@ -976,6 +975,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return filtersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -995,6 +995,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return java.util.Collections.unmodifiableList(filters_); } } + /** * * @@ -1007,9 +1008,10 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { - return getFiltersFieldBuilder() + return internalGetFiltersFieldBuilder() .addBuilder(com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -1022,9 +1024,10 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { - return getFiltersFieldBuilder() + return internalGetFiltersFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -1037,17 +1040,17 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public java.util.List getFiltersBuilderList() { - return getFiltersFieldBuilder().getBuilderList(); + return internalGetFiltersFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getFiltersFieldBuilder() { + internalGetFiltersFieldBuilder() { if (filtersBuilder_ == null) { filtersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -1057,18 +1060,6 @@ public java.util.List getFiltersBuilde return filtersBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RowFilter.Chain) } @@ -1136,23 +1127,23 @@ public interface InterleaveOrBuilder * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1160,6 +1151,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersList(); + /** * * @@ -1170,23 +1162,23 @@ public interface InterleaveOrBuilder * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1194,6 +1186,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ com.google.bigtable.v2.RowFilter getFilters(int index); + /** * * @@ -1204,23 +1197,23 @@ public interface InterleaveOrBuilder * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1228,6 +1221,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ int getFiltersCount(); + /** * * @@ -1238,23 +1232,23 @@ public interface InterleaveOrBuilder * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1262,6 +1256,7 @@ public interface InterleaveOrBuilder * repeated .google.bigtable.v2.RowFilter filters = 1; */ java.util.List getFiltersOrBuilderList(); + /** * * @@ -1272,23 +1267,23 @@ public interface InterleaveOrBuilder * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1297,6 +1292,7 @@ public interface InterleaveOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index); } + /** * * @@ -1307,13 +1303,24 @@ public interface InterleaveOrBuilder * * Protobuf type {@code google.bigtable.v2.RowFilter.Interleave} */ - public static final class Interleave extends com.google.protobuf.GeneratedMessageV3 + public static final class Interleave extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Interleave) InterleaveOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Interleave"); + } + // Use Interleave.newBuilder() to construct. - private Interleave(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Interleave(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -1321,19 +1328,13 @@ private Interleave() { filters_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Interleave(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Interleave_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Interleave_fieldAccessorTable @@ -1346,6 +1347,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List filters_; + /** * * @@ -1356,23 +1358,23 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1383,6 +1385,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getFiltersList() { return filters_; } + /** * * @@ -1393,23 +1396,23 @@ public java.util.List getFiltersList() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1421,6 +1424,7 @@ public java.util.List getFiltersList() { getFiltersOrBuilderList() { return filters_; } + /** * * @@ -1431,23 +1435,23 @@ public java.util.List getFiltersList() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1458,6 +1462,7 @@ public java.util.List getFiltersList() { public int getFiltersCount() { return filters_.size(); } + /** * * @@ -1468,23 +1473,23 @@ public int getFiltersCount() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1495,6 +1500,7 @@ public int getFiltersCount() { public com.google.bigtable.v2.RowFilter getFilters(int index) { return filters_.get(index); } + /** * * @@ -1505,23 +1511,23 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1636,38 +1642,38 @@ public static com.google.bigtable.v2.RowFilter.Interleave parseFrom( public static com.google.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave 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); } @@ -1690,11 +1696,11 @@ 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; } + /** * * @@ -1705,8 +1711,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.RowFilter.Interleave} */ - 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.bigtable.v2.RowFilter.Interleave) com.google.bigtable.v2.RowFilter.InterleaveOrBuilder { @@ -1716,7 +1721,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Interleave_fieldAccessorTable @@ -1728,7 +1733,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RowFilter.Interleave.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1794,41 +1799,6 @@ private void buildPartial0(com.google.bigtable.v2.RowFilter.Interleave 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.bigtable.v2.RowFilter.Interleave) { @@ -1860,8 +1830,8 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter.Interleave other) { filters_ = other.filters_; bitField0_ = (bitField0_ & ~0x00000001); filtersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFiltersFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFiltersFieldBuilder() : null; } else { filtersBuilder_.addAllMessages(other.filters_); @@ -1936,7 +1906,7 @@ private void ensureFiltersIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> @@ -1952,23 +1922,23 @@ private void ensureFiltersIsMutable() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -1982,6 +1952,7 @@ public java.util.List getFiltersList() { return filtersBuilder_.getMessageList(); } } + /** * * @@ -1992,23 +1963,23 @@ public java.util.List getFiltersList() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2022,6 +1993,7 @@ public int getFiltersCount() { return filtersBuilder_.getCount(); } } + /** * * @@ -2032,23 +2004,23 @@ public int getFiltersCount() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2062,6 +2034,7 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { return filtersBuilder_.getMessage(index); } } + /** * * @@ -2072,23 +2045,23 @@ public com.google.bigtable.v2.RowFilter getFilters(int index) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2108,6 +2081,7 @@ public Builder setFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2118,23 +2092,23 @@ public Builder setFilters(int index, com.google.bigtable.v2.RowFilter value) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2152,6 +2126,7 @@ public Builder setFilters( } return this; } + /** * * @@ -2162,23 +2137,23 @@ public Builder setFilters( * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2198,6 +2173,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2208,23 +2184,23 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter value) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2244,6 +2220,7 @@ public Builder addFilters(int index, com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -2254,23 +2231,23 @@ public Builder addFilters(int index, com.google.bigtable.v2.RowFilter value) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2287,6 +2264,7 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter.Builder builderForVal } return this; } + /** * * @@ -2297,23 +2275,23 @@ public Builder addFilters(com.google.bigtable.v2.RowFilter.Builder builderForVal * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2331,6 +2309,7 @@ public Builder addFilters( } return this; } + /** * * @@ -2341,23 +2320,23 @@ public Builder addFilters( * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2375,6 +2354,7 @@ public Builder addAllFilters( } return this; } + /** * * @@ -2385,23 +2365,23 @@ public Builder addAllFilters( * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2418,6 +2398,7 @@ public Builder clearFilters() { } return this; } + /** * * @@ -2428,23 +2409,23 @@ public Builder clearFilters() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2461,6 +2442,7 @@ public Builder removeFilters(int index) { } return this; } + /** * * @@ -2471,23 +2453,23 @@ public Builder removeFilters(int index) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2495,8 +2477,9 @@ public Builder removeFilters(int index) { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder getFiltersBuilder(int index) { - return getFiltersFieldBuilder().getBuilder(index); + return internalGetFiltersFieldBuilder().getBuilder(index); } + /** * * @@ -2507,23 +2490,23 @@ public com.google.bigtable.v2.RowFilter.Builder getFiltersBuilder(int index) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2537,6 +2520,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return filtersBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -2547,23 +2531,23 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2578,6 +2562,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) return java.util.Collections.unmodifiableList(filters_); } } + /** * * @@ -2588,23 +2573,23 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2612,9 +2597,10 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFiltersOrBuilder(int index) * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { - return getFiltersFieldBuilder() + return internalGetFiltersFieldBuilder() .addBuilder(com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -2625,23 +2611,23 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2649,9 +2635,10 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder() { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { - return getFiltersFieldBuilder() + return internalGetFiltersFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowFilter.getDefaultInstance()); } + /** * * @@ -2662,23 +2649,23 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { * they will all appear in the output row in an unspecified mutual order. * Consider the following example, with three filters: * - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 + * input row + * | + * ----------------------------------------------------- + * | | | + * f(0) f(1) f(2) + * | | | + * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + * 2: foo,blah,11,z far,blah,5,x far,blah,5,x + * | | | + * ----------------------------------------------------- + * | + * 1: foo,bar,10,z // could have switched with #2 + * 2: foo,bar,10,x // could have switched with #1 + * 3: foo,blah,11,z + * 4: far,bar,7,a + * 5: far,blah,5,x // identical to #6 + * 6: far,blah,5,x // identical to #5 * * All interleaved filters are executed atomically. * @@ -2686,17 +2673,17 @@ public com.google.bigtable.v2.RowFilter.Builder addFiltersBuilder(int index) { * repeated .google.bigtable.v2.RowFilter filters = 1; */ public java.util.List getFiltersBuilderList() { - return getFiltersFieldBuilder().getBuilderList(); + return internalGetFiltersFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getFiltersFieldBuilder() { + internalGetFiltersFieldBuilder() { if (filtersBuilder_ == null) { filtersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -2706,18 +2693,6 @@ public java.util.List getFiltersBuilde return filtersBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RowFilter.Interleave) } @@ -2788,6 +2763,7 @@ public interface ConditionOrBuilder * @return Whether the predicateFilter field is set. */ boolean hasPredicateFilter(); + /** * * @@ -2801,6 +2777,7 @@ public interface ConditionOrBuilder * @return The predicateFilter. */ com.google.bigtable.v2.RowFilter getPredicateFilter(); + /** * * @@ -2826,6 +2803,7 @@ public interface ConditionOrBuilder * @return Whether the trueFilter field is set. */ boolean hasTrueFilter(); + /** * * @@ -2839,6 +2817,7 @@ public interface ConditionOrBuilder * @return The trueFilter. */ com.google.bigtable.v2.RowFilter getTrueFilter(); + /** * * @@ -2865,6 +2844,7 @@ public interface ConditionOrBuilder * @return Whether the falseFilter field is set. */ boolean hasFalseFilter(); + /** * * @@ -2879,6 +2859,7 @@ public interface ConditionOrBuilder * @return The falseFilter. */ com.google.bigtable.v2.RowFilter getFalseFilter(); + /** * * @@ -2892,6 +2873,7 @@ public interface ConditionOrBuilder */ com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder(); } + /** * * @@ -2907,31 +2889,36 @@ public interface ConditionOrBuilder * * Protobuf type {@code google.bigtable.v2.RowFilter.Condition} */ - public static final class Condition extends com.google.protobuf.GeneratedMessageV3 + public static final class Condition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowFilter.Condition) ConditionOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Condition"); + } + // Use Condition.newBuilder() to construct. - private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Condition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Condition() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Condition(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Condition_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Condition_fieldAccessorTable @@ -2943,6 +2930,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PREDICATE_FILTER_FIELD_NUMBER = 1; private com.google.bigtable.v2.RowFilter predicateFilter_; + /** * * @@ -2959,6 +2947,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -2977,6 +2966,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : predicateFilter_; } + /** * * @@ -2996,6 +2986,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public static final int TRUE_FILTER_FIELD_NUMBER = 2; private com.google.bigtable.v2.RowFilter trueFilter_; + /** * * @@ -3012,6 +3003,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public boolean hasTrueFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3030,6 +3022,7 @@ public com.google.bigtable.v2.RowFilter getTrueFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : trueFilter_; } + /** * * @@ -3049,6 +3042,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { public static final int FALSE_FILTER_FIELD_NUMBER = 3; private com.google.bigtable.v2.RowFilter falseFilter_; + /** * * @@ -3066,6 +3060,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { public boolean hasFalseFilter() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3085,6 +3080,7 @@ public com.google.bigtable.v2.RowFilter getFalseFilter() { ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : falseFilter_; } + /** * * @@ -3237,38 +3233,38 @@ public static com.google.bigtable.v2.RowFilter.Condition parseFrom( public static com.google.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition 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); } @@ -3291,11 +3287,11 @@ 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; } + /** * * @@ -3311,8 +3307,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.RowFilter.Condition} */ - 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.bigtable.v2.RowFilter.Condition) com.google.bigtable.v2.RowFilter.ConditionOrBuilder { @@ -3322,7 +3317,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Condition_fieldAccessorTable @@ -3336,16 +3331,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) { - getPredicateFilterFieldBuilder(); - getTrueFilterFieldBuilder(); - getFalseFilterFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPredicateFilterFieldBuilder(); + internalGetTrueFilterFieldBuilder(); + internalGetFalseFilterFieldBuilder(); } } @@ -3423,41 +3418,6 @@ private void buildPartial0(com.google.bigtable.v2.RowFilter.Condition 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.bigtable.v2.RowFilter.Condition) { @@ -3508,19 +3468,21 @@ public Builder mergeFrom( case 10: { input.readMessage( - getPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); + internalGetPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getTrueFilterFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTrueFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - input.readMessage(getFalseFilterFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetFalseFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 @@ -3544,11 +3506,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.RowFilter predicateFilter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> predicateFilterBuilder_; + /** * * @@ -3564,6 +3527,7 @@ public Builder mergeFrom( public boolean hasPredicateFilter() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -3585,6 +3549,7 @@ public com.google.bigtable.v2.RowFilter getPredicateFilter() { return predicateFilterBuilder_.getMessage(); } } + /** * * @@ -3608,6 +3573,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -3628,6 +3594,7 @@ public Builder setPredicateFilter(com.google.bigtable.v2.RowFilter.Builder build onChanged(); return this; } + /** * * @@ -3656,6 +3623,7 @@ public Builder mergePredicateFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -3676,6 +3644,7 @@ public Builder clearPredicateFilter() { onChanged(); return this; } + /** * * @@ -3689,8 +3658,9 @@ public Builder clearPredicateFilter() { public com.google.bigtable.v2.RowFilter.Builder getPredicateFilterBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getPredicateFilterFieldBuilder().getBuilder(); + return internalGetPredicateFilterFieldBuilder().getBuilder(); } + /** * * @@ -3710,6 +3680,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { : predicateFilter_; } } + /** * * @@ -3720,14 +3691,14 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { * * .google.bigtable.v2.RowFilter predicate_filter = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getPredicateFilterFieldBuilder() { + internalGetPredicateFilterFieldBuilder() { if (predicateFilterBuilder_ == null) { predicateFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -3738,11 +3709,12 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { } private com.google.bigtable.v2.RowFilter trueFilter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> trueFilterBuilder_; + /** * * @@ -3758,6 +3730,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getPredicateFilterOrBuilder() { public boolean hasTrueFilter() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -3779,6 +3752,7 @@ public com.google.bigtable.v2.RowFilter getTrueFilter() { return trueFilterBuilder_.getMessage(); } } + /** * * @@ -3802,6 +3776,7 @@ public Builder setTrueFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -3822,6 +3797,7 @@ public Builder setTrueFilter(com.google.bigtable.v2.RowFilter.Builder builderFor onChanged(); return this; } + /** * * @@ -3850,6 +3826,7 @@ public Builder mergeTrueFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -3870,6 +3847,7 @@ public Builder clearTrueFilter() { onChanged(); return this; } + /** * * @@ -3883,8 +3861,9 @@ public Builder clearTrueFilter() { public com.google.bigtable.v2.RowFilter.Builder getTrueFilterBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getTrueFilterFieldBuilder().getBuilder(); + return internalGetTrueFilterFieldBuilder().getBuilder(); } + /** * * @@ -3904,6 +3883,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { : trueFilter_; } } + /** * * @@ -3914,14 +3894,14 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { * * .google.bigtable.v2.RowFilter true_filter = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getTrueFilterFieldBuilder() { + internalGetTrueFilterFieldBuilder() { if (trueFilterBuilder_ == null) { trueFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -3932,11 +3912,12 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { } private com.google.bigtable.v2.RowFilter falseFilter_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> falseFilterBuilder_; + /** * * @@ -3953,6 +3934,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getTrueFilterOrBuilder() { public boolean hasFalseFilter() { return ((bitField0_ & 0x00000004) != 0); } + /** * * @@ -3975,6 +3957,7 @@ public com.google.bigtable.v2.RowFilter getFalseFilter() { return falseFilterBuilder_.getMessage(); } } + /** * * @@ -3999,6 +3982,7 @@ public Builder setFalseFilter(com.google.bigtable.v2.RowFilter value) { onChanged(); return this; } + /** * * @@ -4020,6 +4004,7 @@ public Builder setFalseFilter(com.google.bigtable.v2.RowFilter.Builder builderFo onChanged(); return this; } + /** * * @@ -4049,6 +4034,7 @@ public Builder mergeFalseFilter(com.google.bigtable.v2.RowFilter value) { } return this; } + /** * * @@ -4070,6 +4056,7 @@ public Builder clearFalseFilter() { onChanged(); return this; } + /** * * @@ -4084,8 +4071,9 @@ public Builder clearFalseFilter() { public com.google.bigtable.v2.RowFilter.Builder getFalseFilterBuilder() { bitField0_ |= 0x00000004; onChanged(); - return getFalseFilterFieldBuilder().getBuilder(); + return internalGetFalseFilterFieldBuilder().getBuilder(); } + /** * * @@ -4106,6 +4094,7 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder() { : falseFilter_; } } + /** * * @@ -4117,14 +4106,14 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder() { * * .google.bigtable.v2.RowFilter false_filter = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> - getFalseFilterFieldBuilder() { + internalGetFalseFilterFieldBuilder() { if (falseFilterBuilder_ == null) { falseFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( @@ -4134,18 +4123,6 @@ public com.google.bigtable.v2.RowFilterOrBuilder getFalseFilterOrBuilder() { return falseFilterBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RowFilter.Condition) } @@ -4232,6 +4209,7 @@ public enum FilterCase private FilterCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -4299,6 +4277,7 @@ public FilterCase getFilterCase() { } public static final int CHAIN_FIELD_NUMBER = 1; + /** * * @@ -4315,6 +4294,7 @@ public FilterCase getFilterCase() { public boolean hasChain() { return filterCase_ == 1; } + /** * * @@ -4334,6 +4314,7 @@ public com.google.bigtable.v2.RowFilter.Chain getChain() { } return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } + /** * * @@ -4353,6 +4334,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { } public static final int INTERLEAVE_FIELD_NUMBER = 2; + /** * * @@ -4369,6 +4351,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { public boolean hasInterleave() { return filterCase_ == 2; } + /** * * @@ -4388,6 +4371,7 @@ public com.google.bigtable.v2.RowFilter.Interleave getInterleave() { } return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } + /** * * @@ -4407,6 +4391,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild } public static final int CONDITION_FIELD_NUMBER = 3; + /** * * @@ -4423,6 +4408,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild public boolean hasCondition() { return filterCase_ == 3; } + /** * * @@ -4442,6 +4428,7 @@ public com.google.bigtable.v2.RowFilter.Condition getCondition() { } return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } + /** * * @@ -4461,6 +4448,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder } public static final int SINK_FIELD_NUMBER = 16; + /** * * @@ -4470,47 +4458,47 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -4534,6 +4522,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder public boolean hasSink() { return filterCase_ == 16; } + /** * * @@ -4543,47 +4532,47 @@ public boolean hasSink() { * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -4612,6 +4601,7 @@ public boolean getSink() { } public static final int PASS_ALL_FILTER_FIELD_NUMBER = 17; + /** * * @@ -4628,6 +4618,7 @@ public boolean getSink() { public boolean hasPassAllFilter() { return filterCase_ == 17; } + /** * * @@ -4649,6 +4640,7 @@ public boolean getPassAllFilter() { } public static final int BLOCK_ALL_FILTER_FIELD_NUMBER = 18; + /** * * @@ -4665,6 +4657,7 @@ public boolean getPassAllFilter() { public boolean hasBlockAllFilter() { return filterCase_ == 18; } + /** * * @@ -4686,6 +4679,7 @@ public boolean getBlockAllFilter() { } public static final int ROW_KEY_REGEX_FILTER_FIELD_NUMBER = 4; + /** * * @@ -4707,6 +4701,7 @@ public boolean getBlockAllFilter() { public boolean hasRowKeyRegexFilter() { return filterCase_ == 4; } + /** * * @@ -4733,6 +4728,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { } public static final int ROW_SAMPLE_FILTER_FIELD_NUMBER = 14; + /** * * @@ -4749,6 +4745,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { public boolean hasRowSampleFilter() { return filterCase_ == 14; } + /** * * @@ -4770,6 +4767,7 @@ public double getRowSampleFilter() { } public static final int FAMILY_NAME_REGEX_FILTER_FIELD_NUMBER = 5; + /** * * @@ -4789,6 +4787,7 @@ public double getRowSampleFilter() { public boolean hasFamilyNameRegexFilter() { return filterCase_ == 5; } + /** * * @@ -4821,6 +4820,7 @@ public java.lang.String getFamilyNameRegexFilter() { return s; } } + /** * * @@ -4855,6 +4855,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { } public static final int COLUMN_QUALIFIER_REGEX_FILTER_FIELD_NUMBER = 6; + /** * * @@ -4875,6 +4876,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { public boolean hasColumnQualifierRegexFilter() { return filterCase_ == 6; } + /** * * @@ -4900,6 +4902,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { } public static final int COLUMN_RANGE_FILTER_FIELD_NUMBER = 7; + /** * * @@ -4915,6 +4918,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { public boolean hasColumnRangeFilter() { return filterCase_ == 7; } + /** * * @@ -4933,6 +4937,7 @@ public com.google.bigtable.v2.ColumnRange getColumnRangeFilter() { } return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } + /** * * @@ -4951,6 +4956,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder } public static final int TIMESTAMP_RANGE_FILTER_FIELD_NUMBER = 8; + /** * * @@ -4966,6 +4972,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder public boolean hasTimestampRangeFilter() { return filterCase_ == 8; } + /** * * @@ -4984,6 +4991,7 @@ public com.google.bigtable.v2.TimestampRange getTimestampRangeFilter() { } return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } + /** * * @@ -5002,6 +5010,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB } public static final int VALUE_REGEX_FILTER_FIELD_NUMBER = 9; + /** * * @@ -5021,6 +5030,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB public boolean hasValueRegexFilter() { return filterCase_ == 9; } + /** * * @@ -5045,6 +5055,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { } public static final int VALUE_RANGE_FILTER_FIELD_NUMBER = 15; + /** * * @@ -5060,6 +5071,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { public boolean hasValueRangeFilter() { return filterCase_ == 15; } + /** * * @@ -5078,6 +5090,7 @@ public com.google.bigtable.v2.ValueRange getValueRangeFilter() { } return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } + /** * * @@ -5096,6 +5109,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() } public static final int CELLS_PER_ROW_OFFSET_FILTER_FIELD_NUMBER = 10; + /** * * @@ -5113,6 +5127,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() public boolean hasCellsPerRowOffsetFilter() { return filterCase_ == 10; } + /** * * @@ -5135,6 +5150,7 @@ public int getCellsPerRowOffsetFilter() { } public static final int CELLS_PER_ROW_LIMIT_FILTER_FIELD_NUMBER = 11; + /** * * @@ -5152,6 +5168,7 @@ public int getCellsPerRowOffsetFilter() { public boolean hasCellsPerRowLimitFilter() { return filterCase_ == 11; } + /** * * @@ -5174,6 +5191,7 @@ public int getCellsPerRowLimitFilter() { } public static final int CELLS_PER_COLUMN_LIMIT_FILTER_FIELD_NUMBER = 12; + /** * * @@ -5194,6 +5212,7 @@ public int getCellsPerRowLimitFilter() { public boolean hasCellsPerColumnLimitFilter() { return filterCase_ == 12; } + /** * * @@ -5219,6 +5238,7 @@ public int getCellsPerColumnLimitFilter() { } public static final int STRIP_VALUE_TRANSFORMER_FIELD_NUMBER = 13; + /** * * @@ -5234,6 +5254,7 @@ public int getCellsPerColumnLimitFilter() { public boolean hasStripValueTransformer() { return filterCase_ == 13; } + /** * * @@ -5254,6 +5275,7 @@ public boolean getStripValueTransformer() { } public static final int APPLY_LABEL_TRANSFORMER_FIELD_NUMBER = 19; + /** * * @@ -5280,6 +5302,7 @@ public boolean getStripValueTransformer() { public boolean hasApplyLabelTransformer() { return filterCase_ == 19; } + /** * * @@ -5319,6 +5342,7 @@ public java.lang.String getApplyLabelTransformer() { return s; } } + /** * * @@ -5386,7 +5410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBytes(4, (com.google.protobuf.ByteString) filter_); } if (filterCase_ == 5) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); } if (filterCase_ == 6) { output.writeBytes(6, (com.google.protobuf.ByteString) filter_); @@ -5428,7 +5452,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBool(18, (boolean) ((java.lang.Boolean) filter_)); } if (filterCase_ == 19) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 19, filter_); + com.google.protobuf.GeneratedMessage.writeString(output, 19, filter_); } getUnknownFields().writeTo(output); } @@ -5460,7 +5484,7 @@ public int getSerializedSize() { 4, (com.google.protobuf.ByteString) filter_); } if (filterCase_ == 5) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); } if (filterCase_ == 6) { size += @@ -5528,7 +5552,7 @@ public int getSerializedSize() { 18, (boolean) ((java.lang.Boolean) filter_)); } if (filterCase_ == 19) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, filter_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(19, filter_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -5744,38 +5768,38 @@ public static com.google.bigtable.v2.RowFilter parseFrom( public static com.google.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter 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); } @@ -5798,10 +5822,11 @@ 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; } + /** * * @@ -5843,7 +5868,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.RowFilter} */ - 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.bigtable.v2.RowFilter) com.google.bigtable.v2.RowFilterOrBuilder { @@ -5853,7 +5878,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_fieldAccessorTable @@ -5865,7 +5890,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RowFilter.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -5954,39 +5979,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.RowFilter 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.bigtable.v2.RowFilter) { @@ -6132,19 +6124,21 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getChainFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetChainFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getInterleaveFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInterleaveFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 2; break; } // case 18 case 26: { - input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetConditionFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 3; break; } // case 26 @@ -6170,14 +6164,14 @@ public Builder mergeFrom( case 58: { input.readMessage( - getColumnRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + internalGetColumnRangeFilterFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 7; break; } // case 58 case 66: { input.readMessage( - getTimestampRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + internalGetTimestampRangeFilterFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 8; break; } // case 66 @@ -6220,7 +6214,7 @@ public Builder mergeFrom( case 122: { input.readMessage( - getValueRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + internalGetValueRangeFilterFieldBuilder().getBuilder(), extensionRegistry); filterCase_ = 15; break; } // case 122 @@ -6282,11 +6276,12 @@ public Builder clearFilter() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Chain, com.google.bigtable.v2.RowFilter.Chain.Builder, com.google.bigtable.v2.RowFilter.ChainOrBuilder> chainBuilder_; + /** * * @@ -6303,6 +6298,7 @@ public Builder clearFilter() { public boolean hasChain() { return filterCase_ == 1; } + /** * * @@ -6329,6 +6325,7 @@ public com.google.bigtable.v2.RowFilter.Chain getChain() { return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } } + /** * * @@ -6352,6 +6349,7 @@ public Builder setChain(com.google.bigtable.v2.RowFilter.Chain value) { filterCase_ = 1; return this; } + /** * * @@ -6372,6 +6370,7 @@ public Builder setChain(com.google.bigtable.v2.RowFilter.Chain.Builder builderFo filterCase_ = 1; return this; } + /** * * @@ -6405,6 +6404,7 @@ public Builder mergeChain(com.google.bigtable.v2.RowFilter.Chain value) { filterCase_ = 1; return this; } + /** * * @@ -6431,6 +6431,7 @@ public Builder clearChain() { } return this; } + /** * * @@ -6442,8 +6443,9 @@ public Builder clearChain() { * .google.bigtable.v2.RowFilter.Chain chain = 1; */ public com.google.bigtable.v2.RowFilter.Chain.Builder getChainBuilder() { - return getChainFieldBuilder().getBuilder(); + return internalGetChainFieldBuilder().getBuilder(); } + /** * * @@ -6465,6 +6467,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { return com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } } + /** * * @@ -6475,17 +6478,17 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { * * .google.bigtable.v2.RowFilter.Chain chain = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Chain, com.google.bigtable.v2.RowFilter.Chain.Builder, com.google.bigtable.v2.RowFilter.ChainOrBuilder> - getChainFieldBuilder() { + internalGetChainFieldBuilder() { if (chainBuilder_ == null) { if (!(filterCase_ == 1)) { filter_ = com.google.bigtable.v2.RowFilter.Chain.getDefaultInstance(); } chainBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Chain, com.google.bigtable.v2.RowFilter.Chain.Builder, com.google.bigtable.v2.RowFilter.ChainOrBuilder>( @@ -6499,11 +6502,12 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { return chainBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Interleave, com.google.bigtable.v2.RowFilter.Interleave.Builder, com.google.bigtable.v2.RowFilter.InterleaveOrBuilder> interleaveBuilder_; + /** * * @@ -6520,6 +6524,7 @@ public com.google.bigtable.v2.RowFilter.ChainOrBuilder getChainOrBuilder() { public boolean hasInterleave() { return filterCase_ == 2; } + /** * * @@ -6546,6 +6551,7 @@ public com.google.bigtable.v2.RowFilter.Interleave getInterleave() { return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } } + /** * * @@ -6569,6 +6575,7 @@ public Builder setInterleave(com.google.bigtable.v2.RowFilter.Interleave value) filterCase_ = 2; return this; } + /** * * @@ -6590,6 +6597,7 @@ public Builder setInterleave( filterCase_ = 2; return this; } + /** * * @@ -6623,6 +6631,7 @@ public Builder mergeInterleave(com.google.bigtable.v2.RowFilter.Interleave value filterCase_ = 2; return this; } + /** * * @@ -6649,6 +6658,7 @@ public Builder clearInterleave() { } return this; } + /** * * @@ -6660,8 +6670,9 @@ public Builder clearInterleave() { * .google.bigtable.v2.RowFilter.Interleave interleave = 2; */ public com.google.bigtable.v2.RowFilter.Interleave.Builder getInterleaveBuilder() { - return getInterleaveFieldBuilder().getBuilder(); + return internalGetInterleaveFieldBuilder().getBuilder(); } + /** * * @@ -6683,6 +6694,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild return com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } } + /** * * @@ -6693,17 +6705,17 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild * * .google.bigtable.v2.RowFilter.Interleave interleave = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Interleave, com.google.bigtable.v2.RowFilter.Interleave.Builder, com.google.bigtable.v2.RowFilter.InterleaveOrBuilder> - getInterleaveFieldBuilder() { + internalGetInterleaveFieldBuilder() { if (interleaveBuilder_ == null) { if (!(filterCase_ == 2)) { filter_ = com.google.bigtable.v2.RowFilter.Interleave.getDefaultInstance(); } interleaveBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Interleave, com.google.bigtable.v2.RowFilter.Interleave.Builder, com.google.bigtable.v2.RowFilter.InterleaveOrBuilder>( @@ -6717,11 +6729,12 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild return interleaveBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Condition, com.google.bigtable.v2.RowFilter.Condition.Builder, com.google.bigtable.v2.RowFilter.ConditionOrBuilder> conditionBuilder_; + /** * * @@ -6738,6 +6751,7 @@ public com.google.bigtable.v2.RowFilter.InterleaveOrBuilder getInterleaveOrBuild public boolean hasCondition() { return filterCase_ == 3; } + /** * * @@ -6764,6 +6778,7 @@ public com.google.bigtable.v2.RowFilter.Condition getCondition() { return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } } + /** * * @@ -6787,6 +6802,7 @@ public Builder setCondition(com.google.bigtable.v2.RowFilter.Condition value) { filterCase_ = 3; return this; } + /** * * @@ -6808,6 +6824,7 @@ public Builder setCondition( filterCase_ = 3; return this; } + /** * * @@ -6841,6 +6858,7 @@ public Builder mergeCondition(com.google.bigtable.v2.RowFilter.Condition value) filterCase_ = 3; return this; } + /** * * @@ -6867,6 +6885,7 @@ public Builder clearCondition() { } return this; } + /** * * @@ -6878,8 +6897,9 @@ public Builder clearCondition() { * .google.bigtable.v2.RowFilter.Condition condition = 3; */ public com.google.bigtable.v2.RowFilter.Condition.Builder getConditionBuilder() { - return getConditionFieldBuilder().getBuilder(); + return internalGetConditionFieldBuilder().getBuilder(); } + /** * * @@ -6901,6 +6921,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder return com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } } + /** * * @@ -6911,17 +6932,17 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder * * .google.bigtable.v2.RowFilter.Condition condition = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Condition, com.google.bigtable.v2.RowFilter.Condition.Builder, com.google.bigtable.v2.RowFilter.ConditionOrBuilder> - getConditionFieldBuilder() { + internalGetConditionFieldBuilder() { if (conditionBuilder_ == null) { if (!(filterCase_ == 3)) { filter_ = com.google.bigtable.v2.RowFilter.Condition.getDefaultInstance(); } conditionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowFilter.Condition, com.google.bigtable.v2.RowFilter.Condition.Builder, com.google.bigtable.v2.RowFilter.ConditionOrBuilder>( @@ -6944,47 +6965,47 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -7007,6 +7028,7 @@ public com.google.bigtable.v2.RowFilter.ConditionOrBuilder getConditionOrBuilder public boolean hasSink() { return filterCase_ == 16; } + /** * * @@ -7016,47 +7038,47 @@ public boolean hasSink() { * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -7082,6 +7104,7 @@ public boolean getSink() { } return false; } + /** * * @@ -7091,47 +7114,47 @@ public boolean getSink() { * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -7159,6 +7182,7 @@ public Builder setSink(boolean value) { onChanged(); return this; } + /** * * @@ -7168,47 +7192,47 @@ public Builder setSink(boolean value) { * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -7252,6 +7276,7 @@ public Builder clearSink() { public boolean hasPassAllFilter() { return filterCase_ == 17; } + /** * * @@ -7270,6 +7295,7 @@ public boolean getPassAllFilter() { } return false; } + /** * * @@ -7290,6 +7316,7 @@ public Builder setPassAllFilter(boolean value) { onChanged(); return this; } + /** * * @@ -7326,6 +7353,7 @@ public Builder clearPassAllFilter() { public boolean hasBlockAllFilter() { return filterCase_ == 18; } + /** * * @@ -7344,6 +7372,7 @@ public boolean getBlockAllFilter() { } return false; } + /** * * @@ -7364,6 +7393,7 @@ public Builder setBlockAllFilter(boolean value) { onChanged(); return this; } + /** * * @@ -7405,6 +7435,7 @@ public Builder clearBlockAllFilter() { public boolean hasRowKeyRegexFilter() { return filterCase_ == 4; } + /** * * @@ -7428,6 +7459,7 @@ public com.google.protobuf.ByteString getRowKeyRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -7455,6 +7487,7 @@ public Builder setRowKeyRegexFilter(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -7496,6 +7529,7 @@ public Builder clearRowKeyRegexFilter() { public boolean hasRowSampleFilter() { return filterCase_ == 14; } + /** * * @@ -7514,6 +7548,7 @@ public double getRowSampleFilter() { } return 0D; } + /** * * @@ -7534,6 +7569,7 @@ public Builder setRowSampleFilter(double value) { onChanged(); return this; } + /** * * @@ -7575,6 +7611,7 @@ public Builder clearRowSampleFilter() { public boolean hasFamilyNameRegexFilter() { return filterCase_ == 5; } + /** * * @@ -7608,6 +7645,7 @@ public java.lang.String getFamilyNameRegexFilter() { return (java.lang.String) ref; } } + /** * * @@ -7641,6 +7679,7 @@ public com.google.protobuf.ByteString getFamilyNameRegexFilterBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -7667,6 +7706,7 @@ public Builder setFamilyNameRegexFilter(java.lang.String value) { onChanged(); return this; } + /** * * @@ -7691,6 +7731,7 @@ public Builder clearFamilyNameRegexFilter() { } return this; } + /** * * @@ -7738,6 +7779,7 @@ public Builder setFamilyNameRegexFilterBytes(com.google.protobuf.ByteString valu public boolean hasColumnQualifierRegexFilter() { return filterCase_ == 6; } + /** * * @@ -7760,6 +7802,7 @@ public com.google.protobuf.ByteString getColumnQualifierRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -7786,6 +7829,7 @@ public Builder setColumnQualifierRegexFilter(com.google.protobuf.ByteString valu onChanged(); return this; } + /** * * @@ -7811,11 +7855,12 @@ public Builder clearColumnQualifierRegexFilter() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ColumnRange, com.google.bigtable.v2.ColumnRange.Builder, com.google.bigtable.v2.ColumnRangeOrBuilder> columnRangeFilterBuilder_; + /** * * @@ -7831,6 +7876,7 @@ public Builder clearColumnQualifierRegexFilter() { public boolean hasColumnRangeFilter() { return filterCase_ == 7; } + /** * * @@ -7856,6 +7902,7 @@ public com.google.bigtable.v2.ColumnRange getColumnRangeFilter() { return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } } + /** * * @@ -7878,6 +7925,7 @@ public Builder setColumnRangeFilter(com.google.bigtable.v2.ColumnRange value) { filterCase_ = 7; return this; } + /** * * @@ -7898,6 +7946,7 @@ public Builder setColumnRangeFilter( filterCase_ = 7; return this; } + /** * * @@ -7930,6 +7979,7 @@ public Builder mergeColumnRangeFilter(com.google.bigtable.v2.ColumnRange value) filterCase_ = 7; return this; } + /** * * @@ -7955,6 +8005,7 @@ public Builder clearColumnRangeFilter() { } return this; } + /** * * @@ -7965,8 +8016,9 @@ public Builder clearColumnRangeFilter() { * .google.bigtable.v2.ColumnRange column_range_filter = 7; */ public com.google.bigtable.v2.ColumnRange.Builder getColumnRangeFilterBuilder() { - return getColumnRangeFilterFieldBuilder().getBuilder(); + return internalGetColumnRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -7987,6 +8039,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder return com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } } + /** * * @@ -7996,17 +8049,17 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder * * .google.bigtable.v2.ColumnRange column_range_filter = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ColumnRange, com.google.bigtable.v2.ColumnRange.Builder, com.google.bigtable.v2.ColumnRangeOrBuilder> - getColumnRangeFilterFieldBuilder() { + internalGetColumnRangeFilterFieldBuilder() { if (columnRangeFilterBuilder_ == null) { if (!(filterCase_ == 7)) { filter_ = com.google.bigtable.v2.ColumnRange.getDefaultInstance(); } columnRangeFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ColumnRange, com.google.bigtable.v2.ColumnRange.Builder, com.google.bigtable.v2.ColumnRangeOrBuilder>( @@ -8018,11 +8071,12 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder return columnRangeFilterBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> timestampRangeFilterBuilder_; + /** * * @@ -8038,6 +8092,7 @@ public com.google.bigtable.v2.ColumnRangeOrBuilder getColumnRangeFilterOrBuilder public boolean hasTimestampRangeFilter() { return filterCase_ == 8; } + /** * * @@ -8063,6 +8118,7 @@ public com.google.bigtable.v2.TimestampRange getTimestampRangeFilter() { return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } } + /** * * @@ -8085,6 +8141,7 @@ public Builder setTimestampRangeFilter(com.google.bigtable.v2.TimestampRange val filterCase_ = 8; return this; } + /** * * @@ -8105,6 +8162,7 @@ public Builder setTimestampRangeFilter( filterCase_ = 8; return this; } + /** * * @@ -8137,6 +8195,7 @@ public Builder mergeTimestampRangeFilter(com.google.bigtable.v2.TimestampRange v filterCase_ = 8; return this; } + /** * * @@ -8162,6 +8221,7 @@ public Builder clearTimestampRangeFilter() { } return this; } + /** * * @@ -8172,8 +8232,9 @@ public Builder clearTimestampRangeFilter() { * .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; */ public com.google.bigtable.v2.TimestampRange.Builder getTimestampRangeFilterBuilder() { - return getTimestampRangeFilterFieldBuilder().getBuilder(); + return internalGetTimestampRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -8194,6 +8255,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB return com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } } + /** * * @@ -8203,17 +8265,17 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB * * .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder> - getTimestampRangeFilterFieldBuilder() { + internalGetTimestampRangeFilterFieldBuilder() { if (timestampRangeFilterBuilder_ == null) { if (!(filterCase_ == 8)) { filter_ = com.google.bigtable.v2.TimestampRange.getDefaultInstance(); } timestampRangeFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.TimestampRange, com.google.bigtable.v2.TimestampRange.Builder, com.google.bigtable.v2.TimestampRangeOrBuilder>( @@ -8243,6 +8305,7 @@ public com.google.bigtable.v2.TimestampRangeOrBuilder getTimestampRangeFilterOrB public boolean hasValueRegexFilter() { return filterCase_ == 9; } + /** * * @@ -8264,6 +8327,7 @@ public com.google.protobuf.ByteString getValueRegexFilter() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -8289,6 +8353,7 @@ public Builder setValueRegexFilter(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -8313,11 +8378,12 @@ public Builder clearValueRegexFilter() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ValueRange, com.google.bigtable.v2.ValueRange.Builder, com.google.bigtable.v2.ValueRangeOrBuilder> valueRangeFilterBuilder_; + /** * * @@ -8333,6 +8399,7 @@ public Builder clearValueRegexFilter() { public boolean hasValueRangeFilter() { return filterCase_ == 15; } + /** * * @@ -8358,6 +8425,7 @@ public com.google.bigtable.v2.ValueRange getValueRangeFilter() { return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } } + /** * * @@ -8380,6 +8448,7 @@ public Builder setValueRangeFilter(com.google.bigtable.v2.ValueRange value) { filterCase_ = 15; return this; } + /** * * @@ -8399,6 +8468,7 @@ public Builder setValueRangeFilter(com.google.bigtable.v2.ValueRange.Builder bui filterCase_ = 15; return this; } + /** * * @@ -8431,6 +8501,7 @@ public Builder mergeValueRangeFilter(com.google.bigtable.v2.ValueRange value) { filterCase_ = 15; return this; } + /** * * @@ -8456,6 +8527,7 @@ public Builder clearValueRangeFilter() { } return this; } + /** * * @@ -8466,8 +8538,9 @@ public Builder clearValueRangeFilter() { * .google.bigtable.v2.ValueRange value_range_filter = 15; */ public com.google.bigtable.v2.ValueRange.Builder getValueRangeFilterBuilder() { - return getValueRangeFilterFieldBuilder().getBuilder(); + return internalGetValueRangeFilterFieldBuilder().getBuilder(); } + /** * * @@ -8488,6 +8561,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() return com.google.bigtable.v2.ValueRange.getDefaultInstance(); } } + /** * * @@ -8497,17 +8571,17 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() * * .google.bigtable.v2.ValueRange value_range_filter = 15; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ValueRange, com.google.bigtable.v2.ValueRange.Builder, com.google.bigtable.v2.ValueRangeOrBuilder> - getValueRangeFilterFieldBuilder() { + internalGetValueRangeFilterFieldBuilder() { if (valueRangeFilterBuilder_ == null) { if (!(filterCase_ == 15)) { filter_ = com.google.bigtable.v2.ValueRange.getDefaultInstance(); } valueRangeFilterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ValueRange, com.google.bigtable.v2.ValueRange.Builder, com.google.bigtable.v2.ValueRangeOrBuilder>( @@ -8535,6 +8609,7 @@ public com.google.bigtable.v2.ValueRangeOrBuilder getValueRangeFilterOrBuilder() public boolean hasCellsPerRowOffsetFilter() { return filterCase_ == 10; } + /** * * @@ -8554,6 +8629,7 @@ public int getCellsPerRowOffsetFilter() { } return 0; } + /** * * @@ -8575,6 +8651,7 @@ public Builder setCellsPerRowOffsetFilter(int value) { onChanged(); return this; } + /** * * @@ -8613,6 +8690,7 @@ public Builder clearCellsPerRowOffsetFilter() { public boolean hasCellsPerRowLimitFilter() { return filterCase_ == 11; } + /** * * @@ -8632,6 +8710,7 @@ public int getCellsPerRowLimitFilter() { } return 0; } + /** * * @@ -8653,6 +8732,7 @@ public Builder setCellsPerRowLimitFilter(int value) { onChanged(); return this; } + /** * * @@ -8694,6 +8774,7 @@ public Builder clearCellsPerRowLimitFilter() { public boolean hasCellsPerColumnLimitFilter() { return filterCase_ == 12; } + /** * * @@ -8716,6 +8797,7 @@ public int getCellsPerColumnLimitFilter() { } return 0; } + /** * * @@ -8740,6 +8822,7 @@ public Builder setCellsPerColumnLimitFilter(int value) { onChanged(); return this; } + /** * * @@ -8779,6 +8862,7 @@ public Builder clearCellsPerColumnLimitFilter() { public boolean hasStripValueTransformer() { return filterCase_ == 13; } + /** * * @@ -8796,6 +8880,7 @@ public boolean getStripValueTransformer() { } return false; } + /** * * @@ -8815,6 +8900,7 @@ public Builder setStripValueTransformer(boolean value) { onChanged(); return this; } + /** * * @@ -8862,6 +8948,7 @@ public Builder clearStripValueTransformer() { public boolean hasApplyLabelTransformer() { return filterCase_ == 19; } + /** * * @@ -8902,6 +8989,7 @@ public java.lang.String getApplyLabelTransformer() { return (java.lang.String) ref; } } + /** * * @@ -8942,6 +9030,7 @@ public com.google.protobuf.ByteString getApplyLabelTransformerBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -8975,6 +9064,7 @@ public Builder setApplyLabelTransformer(java.lang.String value) { onChanged(); return this; } + /** * * @@ -9006,6 +9096,7 @@ public Builder clearApplyLabelTransformer() { } return this; } + /** * * @@ -9041,17 +9132,6 @@ public Builder setApplyLabelTransformerBytes(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.bigtable.v2.RowFilter) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilterOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilterOrBuilder.java index 155bb73db8..d2627aa77c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilterOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilterOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RowFilterOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RowFilter) @@ -37,6 +39,7 @@ public interface RowFilterOrBuilder * @return Whether the chain field is set. */ boolean hasChain(); + /** * * @@ -50,6 +53,7 @@ public interface RowFilterOrBuilder * @return The chain. */ com.google.bigtable.v2.RowFilter.Chain getChain(); + /** * * @@ -75,6 +79,7 @@ public interface RowFilterOrBuilder * @return Whether the interleave field is set. */ boolean hasInterleave(); + /** * * @@ -88,6 +93,7 @@ public interface RowFilterOrBuilder * @return The interleave. */ com.google.bigtable.v2.RowFilter.Interleave getInterleave(); + /** * * @@ -113,6 +119,7 @@ public interface RowFilterOrBuilder * @return Whether the condition field is set. */ boolean hasCondition(); + /** * * @@ -126,6 +133,7 @@ public interface RowFilterOrBuilder * @return The condition. */ com.google.bigtable.v2.RowFilter.Condition getCondition(); + /** * * @@ -147,47 +155,47 @@ public interface RowFilterOrBuilder * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -208,6 +216,7 @@ public interface RowFilterOrBuilder * @return Whether the sink field is set. */ boolean hasSink(); + /** * * @@ -217,47 +226,47 @@ public interface RowFilterOrBuilder * the output of the read rather than to any parent filter. Consider the * following example: * - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched + * Chain( + * FamilyRegex("A"), + * Interleave( + * All(), + * Chain(Label("foo"), Sink()) + * ), + * QualifierRegex("B") + * ) + * + * A,A,1,w + * A,B,2,x + * B,B,4,z + * | + * FamilyRegex("A") + * | + * A,A,1,w + * A,B,2,x + * | + * +------------+-------------+ + * | | + * All() Label(foo) + * | | + * A,A,1,w A,A,1,w,labels:[foo] + * A,B,2,x A,B,2,x,labels:[foo] + * | | + * | Sink() --------------+ + * | | | + * +------------+ x------+ A,A,1,w,labels:[foo] + * | A,B,2,x,labels:[foo] + * A,A,1,w | + * A,B,2,x | + * | | + * QualifierRegex("B") | + * | | + * A,B,2,x | + * | | + * +--------------------------------+ + * | + * A,A,1,w,labels:[foo] + * A,B,2,x,labels:[foo] // could be switched + * A,B,2,x // could be switched * * Despite being excluded by the qualifier filter, a copy of every cell * that reaches the sink is present in the final result. @@ -292,6 +301,7 @@ public interface RowFilterOrBuilder * @return Whether the passAllFilter field is set. */ boolean hasPassAllFilter(); + /** * * @@ -319,6 +329,7 @@ public interface RowFilterOrBuilder * @return Whether the blockAllFilter field is set. */ boolean hasBlockAllFilter(); + /** * * @@ -351,6 +362,7 @@ public interface RowFilterOrBuilder * @return Whether the rowKeyRegexFilter field is set. */ boolean hasRowKeyRegexFilter(); + /** * * @@ -383,6 +395,7 @@ public interface RowFilterOrBuilder * @return Whether the rowSampleFilter field is set. */ boolean hasRowSampleFilter(); + /** * * @@ -414,6 +427,7 @@ public interface RowFilterOrBuilder * @return Whether the familyNameRegexFilter field is set. */ boolean hasFamilyNameRegexFilter(); + /** * * @@ -431,6 +445,7 @@ public interface RowFilterOrBuilder * @return The familyNameRegexFilter. */ java.lang.String getFamilyNameRegexFilter(); + /** * * @@ -466,6 +481,7 @@ public interface RowFilterOrBuilder * @return Whether the columnQualifierRegexFilter field is set. */ boolean hasColumnQualifierRegexFilter(); + /** * * @@ -496,6 +512,7 @@ public interface RowFilterOrBuilder * @return Whether the columnRangeFilter field is set. */ boolean hasColumnRangeFilter(); + /** * * @@ -508,6 +525,7 @@ public interface RowFilterOrBuilder * @return The columnRangeFilter. */ com.google.bigtable.v2.ColumnRange getColumnRangeFilter(); + /** * * @@ -531,6 +549,7 @@ public interface RowFilterOrBuilder * @return Whether the timestampRangeFilter field is set. */ boolean hasTimestampRangeFilter(); + /** * * @@ -543,6 +562,7 @@ public interface RowFilterOrBuilder * @return The timestampRangeFilter. */ com.google.bigtable.v2.TimestampRange getTimestampRangeFilter(); + /** * * @@ -570,6 +590,7 @@ public interface RowFilterOrBuilder * @return Whether the valueRegexFilter field is set. */ boolean hasValueRegexFilter(); + /** * * @@ -599,6 +620,7 @@ public interface RowFilterOrBuilder * @return Whether the valueRangeFilter field is set. */ boolean hasValueRangeFilter(); + /** * * @@ -611,6 +633,7 @@ public interface RowFilterOrBuilder * @return The valueRangeFilter. */ com.google.bigtable.v2.ValueRange getValueRangeFilter(); + /** * * @@ -636,6 +659,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerRowOffsetFilter field is set. */ boolean hasCellsPerRowOffsetFilter(); + /** * * @@ -665,6 +689,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerRowLimitFilter field is set. */ boolean hasCellsPerRowLimitFilter(); + /** * * @@ -697,6 +722,7 @@ public interface RowFilterOrBuilder * @return Whether the cellsPerColumnLimitFilter field is set. */ boolean hasCellsPerColumnLimitFilter(); + /** * * @@ -727,6 +753,7 @@ public interface RowFilterOrBuilder * @return Whether the stripValueTransformer field is set. */ boolean hasStripValueTransformer(); + /** * * @@ -764,6 +791,7 @@ public interface RowFilterOrBuilder * @return Whether the applyLabelTransformer field is set. */ boolean hasApplyLabelTransformer(); + /** * * @@ -788,6 +816,7 @@ public interface RowFilterOrBuilder * @return The applyLabelTransformer. */ java.lang.String getApplyLabelTransformer(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowOrBuilder.java index 4335a75fe5..413af8ee29 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RowOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Row) @@ -50,6 +52,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ java.util.List getFamiliesList(); + /** * * @@ -61,6 +64,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ com.google.bigtable.v2.Family getFamilies(int index); + /** * * @@ -72,6 +76,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ int getFamiliesCount(); + /** * * @@ -83,6 +88,7 @@ public interface RowOrBuilder * repeated .google.bigtable.v2.Family families = 2; */ java.util.List getFamiliesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java index e2f218b630..67e25ef04a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,30 +29,36 @@ * * Protobuf type {@code google.bigtable.v2.RowRange} */ -public final class RowRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RowRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowRange) RowRangeOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RowRange"); + } + // Use RowRange.newBuilder() to construct. - private RowRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RowRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private RowRange() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RowRange(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowRange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowRange_fieldAccessorTable @@ -76,6 +83,7 @@ public enum StartKeyCase private StartKeyCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -125,6 +133,7 @@ public enum EndKeyCase private EndKeyCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -158,6 +167,7 @@ public EndKeyCase getEndKeyCase() { } public static final int START_KEY_CLOSED_FIELD_NUMBER = 1; + /** * * @@ -173,6 +183,7 @@ public EndKeyCase getEndKeyCase() { public boolean hasStartKeyClosed() { return startKeyCase_ == 1; } + /** * * @@ -193,6 +204,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { } public static final int START_KEY_OPEN_FIELD_NUMBER = 2; + /** * * @@ -208,6 +220,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { public boolean hasStartKeyOpen() { return startKeyCase_ == 2; } + /** * * @@ -228,6 +241,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { } public static final int END_KEY_OPEN_FIELD_NUMBER = 3; + /** * * @@ -243,6 +257,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { public boolean hasEndKeyOpen() { return endKeyCase_ == 3; } + /** * * @@ -263,6 +278,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { } public static final int END_KEY_CLOSED_FIELD_NUMBER = 4; + /** * * @@ -278,6 +294,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { public boolean hasEndKeyClosed() { return endKeyCase_ == 4; } + /** * * @@ -465,38 +482,38 @@ public static com.google.bigtable.v2.RowRange parseFrom( public static com.google.bigtable.v2.RowRange 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.bigtable.v2.RowRange 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.bigtable.v2.RowRange 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.bigtable.v2.RowRange 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.bigtable.v2.RowRange 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.bigtable.v2.RowRange 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); } @@ -519,10 +536,11 @@ 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; } + /** * * @@ -532,7 +550,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.RowRange} */ - 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.bigtable.v2.RowRange) com.google.bigtable.v2.RowRangeOrBuilder { @@ -542,7 +560,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowRange_fieldAccessorTable @@ -553,7 +571,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RowRange.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -610,39 +628,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.RowRange result) { result.endKey_ = this.endKey_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.RowRange) { @@ -798,6 +783,7 @@ public Builder clearEndKey() { public boolean hasStartKeyClosed() { return startKeyCase_ == 1; } + /** * * @@ -815,6 +801,7 @@ public com.google.protobuf.ByteString getStartKeyClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -836,6 +823,7 @@ public Builder setStartKeyClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -870,6 +858,7 @@ public Builder clearStartKeyClosed() { public boolean hasStartKeyOpen() { return startKeyCase_ == 2; } + /** * * @@ -887,6 +876,7 @@ public com.google.protobuf.ByteString getStartKeyOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -908,6 +898,7 @@ public Builder setStartKeyOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -942,6 +933,7 @@ public Builder clearStartKeyOpen() { public boolean hasEndKeyOpen() { return endKeyCase_ == 3; } + /** * * @@ -959,6 +951,7 @@ public com.google.protobuf.ByteString getEndKeyOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -980,6 +973,7 @@ public Builder setEndKeyOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1014,6 +1008,7 @@ public Builder clearEndKeyOpen() { public boolean hasEndKeyClosed() { return endKeyCase_ == 4; } + /** * * @@ -1031,6 +1026,7 @@ public com.google.protobuf.ByteString getEndKeyClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1052,6 +1048,7 @@ public Builder setEndKeyClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1072,17 +1069,6 @@ public Builder clearEndKeyClosed() { 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.bigtable.v2.RowRange) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRangeOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRangeOrBuilder.java index 575f015b5d..369f1b31cc 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRangeOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RowRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RowRange) @@ -36,6 +38,7 @@ public interface RowRangeOrBuilder * @return Whether the startKeyClosed field is set. */ boolean hasStartKeyClosed(); + /** * * @@ -61,6 +64,7 @@ public interface RowRangeOrBuilder * @return Whether the startKeyOpen field is set. */ boolean hasStartKeyOpen(); + /** * * @@ -86,6 +90,7 @@ public interface RowRangeOrBuilder * @return Whether the endKeyOpen field is set. */ boolean hasEndKeyOpen(); + /** * * @@ -111,6 +116,7 @@ public interface RowRangeOrBuilder * @return Whether the endKeyClosed field is set. */ boolean hasEndKeyClosed(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java index 7a56fe001a..1a42c658cf 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.RowSet} */ -public final class RowSet extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class RowSet extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.RowSet) RowSetOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RowSet"); + } + // Use RowSet.newBuilder() to construct. - private RowSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private RowSet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -43,18 +56,12 @@ private RowSet() { rowRanges_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RowSet(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowSet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowSet_fieldAccessorTable @@ -67,6 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private com.google.protobuf.Internal.ProtobufList rowKeys_ = emptyList(com.google.protobuf.ByteString.class); + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getRowKeysList() { return rowKeys_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getRowKeysList() { public int getRowKeysCount() { return rowKeys_.size(); } + /** * * @@ -116,6 +126,7 @@ public com.google.protobuf.ByteString getRowKeys(int index) { @SuppressWarnings("serial") private java.util.List rowRanges_; + /** * * @@ -129,6 +140,7 @@ public com.google.protobuf.ByteString getRowKeys(int index) { public java.util.List getRowRangesList() { return rowRanges_; } + /** * * @@ -143,6 +155,7 @@ public java.util.List getRowRangesList() { getRowRangesOrBuilderList() { return rowRanges_; } + /** * * @@ -156,6 +169,7 @@ public java.util.List getRowRangesList() { public int getRowRangesCount() { return rowRanges_.size(); } + /** * * @@ -169,6 +183,7 @@ public int getRowRangesCount() { public com.google.bigtable.v2.RowRange getRowRanges(int index) { return rowRanges_.get(index); } + /** * * @@ -300,38 +315,38 @@ public static com.google.bigtable.v2.RowSet parseFrom( public static com.google.bigtable.v2.RowSet 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.bigtable.v2.RowSet 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.bigtable.v2.RowSet 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.bigtable.v2.RowSet 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.bigtable.v2.RowSet 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.bigtable.v2.RowSet 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); } @@ -354,10 +369,11 @@ 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; } + /** * * @@ -367,7 +383,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.RowSet} */ - 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.bigtable.v2.RowSet) com.google.bigtable.v2.RowSetOrBuilder { @@ -376,7 +392,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowSet_fieldAccessorTable @@ -387,7 +403,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.RowSet.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -456,39 +472,6 @@ private void buildPartial0(com.google.bigtable.v2.RowSet 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.bigtable.v2.RowSet) { @@ -531,8 +514,8 @@ public Builder mergeFrom(com.google.bigtable.v2.RowSet other) { rowRanges_ = other.rowRanges_; bitField0_ = (bitField0_ & ~0x00000002); rowRangesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRowRangesFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRowRangesFieldBuilder() : null; } else { rowRangesBuilder_.addAllMessages(other.rowRanges_); @@ -612,6 +595,7 @@ private void ensureRowKeysIsMutable() { } bitField0_ |= 0x00000001; } + /** * * @@ -627,6 +611,7 @@ public java.util.List getRowKeysList() { rowKeys_.makeImmutable(); return rowKeys_; } + /** * * @@ -641,6 +626,7 @@ public java.util.List getRowKeysList() { public int getRowKeysCount() { return rowKeys_.size(); } + /** * * @@ -656,6 +642,7 @@ public int getRowKeysCount() { public com.google.protobuf.ByteString getRowKeys(int index) { return rowKeys_.get(index); } + /** * * @@ -679,6 +666,7 @@ public Builder setRowKeys(int index, com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -701,6 +689,7 @@ public Builder addRowKeys(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -721,6 +710,7 @@ public Builder addAllRowKeys( onChanged(); return this; } + /** * * @@ -749,7 +739,7 @@ private void ensureRowRangesIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder> @@ -771,6 +761,7 @@ public java.util.List getRowRangesList() { return rowRangesBuilder_.getMessageList(); } } + /** * * @@ -787,6 +778,7 @@ public int getRowRangesCount() { return rowRangesBuilder_.getCount(); } } + /** * * @@ -803,6 +795,7 @@ public com.google.bigtable.v2.RowRange getRowRanges(int index) { return rowRangesBuilder_.getMessage(index); } } + /** * * @@ -825,6 +818,7 @@ public Builder setRowRanges(int index, com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -845,6 +839,7 @@ public Builder setRowRanges( } return this; } + /** * * @@ -867,6 +862,7 @@ public Builder addRowRanges(com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -889,6 +885,7 @@ public Builder addRowRanges(int index, com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -908,6 +905,7 @@ public Builder addRowRanges(com.google.bigtable.v2.RowRange.Builder builderForVa } return this; } + /** * * @@ -928,6 +926,7 @@ public Builder addRowRanges( } return this; } + /** * * @@ -948,6 +947,7 @@ public Builder addAllRowRanges( } return this; } + /** * * @@ -967,6 +967,7 @@ public Builder clearRowRanges() { } return this; } + /** * * @@ -986,6 +987,7 @@ public Builder removeRowRanges(int index) { } return this; } + /** * * @@ -996,8 +998,9 @@ public Builder removeRowRanges(int index) { * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ public com.google.bigtable.v2.RowRange.Builder getRowRangesBuilder(int index) { - return getRowRangesFieldBuilder().getBuilder(index); + return internalGetRowRangesFieldBuilder().getBuilder(index); } + /** * * @@ -1014,6 +1017,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangesOrBuilder(int index) return rowRangesBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -1031,6 +1035,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangesOrBuilder(int index) return java.util.Collections.unmodifiableList(rowRanges_); } } + /** * * @@ -1041,9 +1046,10 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangesOrBuilder(int index) * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder() { - return getRowRangesFieldBuilder() + return internalGetRowRangesFieldBuilder() .addBuilder(com.google.bigtable.v2.RowRange.getDefaultInstance()); } + /** * * @@ -1054,9 +1060,10 @@ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder() { * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder(int index) { - return getRowRangesFieldBuilder() + return internalGetRowRangesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.RowRange.getDefaultInstance()); } + /** * * @@ -1067,17 +1074,17 @@ public com.google.bigtable.v2.RowRange.Builder addRowRangesBuilder(int index) { * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ public java.util.List getRowRangesBuilderList() { - return getRowRangesFieldBuilder().getBuilderList(); + return internalGetRowRangesFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder> - getRowRangesFieldBuilder() { + internalGetRowRangesFieldBuilder() { if (rowRangesBuilder_ == null) { rowRangesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder>( @@ -1087,17 +1094,6 @@ public java.util.List getRowRangesBuild return rowRangesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RowSet) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSetOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSetOrBuilder.java index d12d6f44d9..dc88b941df 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSetOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSetOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface RowSetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RowSet) @@ -36,6 +38,7 @@ public interface RowSetOrBuilder * @return A list containing the rowKeys. */ java.util.List getRowKeysList(); + /** * * @@ -48,6 +51,7 @@ public interface RowSetOrBuilder * @return The count of rowKeys. */ int getRowKeysCount(); + /** * * @@ -72,6 +76,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ java.util.List getRowRangesList(); + /** * * @@ -82,6 +87,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ com.google.bigtable.v2.RowRange getRowRanges(int index); + /** * * @@ -92,6 +98,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ int getRowRangesCount(); + /** * * @@ -102,6 +109,7 @@ public interface RowSetOrBuilder * repeated .google.bigtable.v2.RowRange row_ranges = 2; */ java.util.List getRowRangesOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java index 205525f3a4..94757329ab 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,35 +29,42 @@ * * Protobuf type {@code google.bigtable.v2.SampleRowKeysRequest} */ -public final class SampleRowKeysRequest extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SampleRowKeysRequest extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.SampleRowKeysRequest) SampleRowKeysRequestOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SampleRowKeysRequest"); + } + // Use SampleRowKeysRequest.newBuilder() to construct. - private SampleRowKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SampleRowKeysRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private SampleRowKeysRequest() { tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SampleRowKeysRequest(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysRequest_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysRequest_fieldAccessorTable @@ -69,6 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private volatile java.lang.Object tableName_ = ""; + /** * * @@ -97,6 +106,7 @@ public java.lang.String getTableName() { return s; } } + /** * * @@ -130,6 +140,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { @SuppressWarnings("serial") private volatile java.lang.Object authorizedViewName_ = ""; + /** * * @@ -159,6 +170,7 @@ public java.lang.String getAuthorizedViewName() { return s; } } + /** * * @@ -189,10 +201,74 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { } } + public static final int MATERIALIZED_VIEW_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + @java.lang.Override + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + 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(); + materializedViewName_ = s; + return s; + } + } + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object appProfileId_ = ""; + /** * * @@ -217,6 +293,7 @@ public java.lang.String getAppProfileId() { return s; } } + /** * * @@ -256,14 +333,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(tableName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tableName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, authorizedViewName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, materializedViewName_); } getUnknownFields().writeTo(output); } @@ -274,14 +354,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tableName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, appProfileId_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, authorizedViewName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedViewName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, authorizedViewName_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(materializedViewName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, materializedViewName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -301,6 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTableName().equals(other.getTableName())) return false; if (!getAuthorizedViewName().equals(other.getAuthorizedViewName())) return false; + if (!getMaterializedViewName().equals(other.getMaterializedViewName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -317,6 +401,8 @@ public int hashCode() { hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + AUTHORIZED_VIEW_NAME_FIELD_NUMBER; hash = (53 * hash) + getAuthorizedViewName().hashCode(); + hash = (37 * hash) + MATERIALIZED_VIEW_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMaterializedViewName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -361,38 +447,38 @@ public static com.google.bigtable.v2.SampleRowKeysRequest parseFrom( public static com.google.bigtable.v2.SampleRowKeysRequest 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.bigtable.v2.SampleRowKeysRequest 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.bigtable.v2.SampleRowKeysRequest 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.bigtable.v2.SampleRowKeysRequest 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.bigtable.v2.SampleRowKeysRequest 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.bigtable.v2.SampleRowKeysRequest 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,10 +501,11 @@ 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; } + /** * * @@ -428,7 +515,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.SampleRowKeysRequest} */ - 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.bigtable.v2.SampleRowKeysRequest) com.google.bigtable.v2.SampleRowKeysRequestOrBuilder { @@ -438,7 +525,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysRequest_fieldAccessorTable @@ -450,7 +537,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.SampleRowKeysRequest.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -460,6 +547,7 @@ public Builder clear() { bitField0_ = 0; tableName_ = ""; authorizedViewName_ = ""; + materializedViewName_ = ""; appProfileId_ = ""; return this; } @@ -504,43 +592,13 @@ private void buildPartial0(com.google.bigtable.v2.SampleRowKeysRequest result) { result.authorizedViewName_ = authorizedViewName_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.materializedViewName_ = materializedViewName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.appProfileId_ = appProfileId_; } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.SampleRowKeysRequest) { @@ -563,9 +621,14 @@ public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysRequest other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getMaterializedViewName().isEmpty()) { + materializedViewName_ = other.materializedViewName_; + bitField0_ |= 0x00000004; + onChanged(); + } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -603,7 +666,7 @@ public Builder mergeFrom( case 18: { appProfileId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 18 case 34: @@ -612,6 +675,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 34 + case 42: + { + materializedViewName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -632,6 +701,7 @@ public Builder mergeFrom( private int bitField0_; private java.lang.Object tableName_ = ""; + /** * * @@ -659,6 +729,7 @@ public java.lang.String getTableName() { return (java.lang.String) ref; } } + /** * * @@ -686,6 +757,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -712,6 +784,7 @@ public Builder setTableName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -734,6 +807,7 @@ public Builder clearTableName() { onChanged(); return this; } + /** * * @@ -763,6 +837,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { } private java.lang.Object authorizedViewName_ = ""; + /** * * @@ -791,6 +866,7 @@ public java.lang.String getAuthorizedViewName() { return (java.lang.String) ref; } } + /** * * @@ -819,6 +895,7 @@ public com.google.protobuf.ByteString getAuthorizedViewNameBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -846,6 +923,7 @@ public Builder setAuthorizedViewName(java.lang.String value) { onChanged(); return this; } + /** * * @@ -869,6 +947,7 @@ public Builder clearAuthorizedViewName() { onChanged(); return this; } + /** * * @@ -898,7 +977,144 @@ public Builder setAuthorizedViewNameBytes(com.google.protobuf.ByteString value) return this; } + private java.lang.Object materializedViewName_ = ""; + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + public java.lang.String getMaterializedViewName() { + java.lang.Object ref = materializedViewName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + materializedViewName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + public com.google.protobuf.ByteString getMaterializedViewNameBytes() { + java.lang.Object ref = materializedViewName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + materializedViewName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + materializedViewName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearMaterializedViewName() { + materializedViewName_ = getDefaultInstance().getMaterializedViewName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Optional. The unique name of the MaterializedView from which to read.
    +     *
    +     * Values are of the form
    +     * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +     * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for materializedViewName to set. + * @return This builder for chaining. + */ + public Builder setMaterializedViewNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + materializedViewName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private java.lang.Object appProfileId_ = ""; + /** * * @@ -922,6 +1138,7 @@ public java.lang.String getAppProfileId() { return (java.lang.String) ref; } } + /** * * @@ -945,6 +1162,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -963,10 +1181,11 @@ public Builder setAppProfileId(java.lang.String value) { throw new NullPointerException(); } appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } + /** * * @@ -981,10 +1200,11 @@ public Builder setAppProfileId(java.lang.String value) { */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } + /** * * @@ -1004,22 +1224,11 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); appProfileId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SampleRowKeysRequest) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequestOrBuilder.java index e47f5ae38e..05555052a7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequestOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface SampleRowKeysRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SampleRowKeysRequest) @@ -41,6 +43,7 @@ public interface SampleRowKeysRequestOrBuilder * @return The tableName. */ java.lang.String getTableName(); + /** * * @@ -77,6 +80,7 @@ public interface SampleRowKeysRequestOrBuilder * @return The authorizedViewName. */ java.lang.String getAuthorizedViewName(); + /** * * @@ -96,6 +100,42 @@ public interface SampleRowKeysRequestOrBuilder */ com.google.protobuf.ByteString getAuthorizedViewNameBytes(); + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The materializedViewName. + */ + java.lang.String getMaterializedViewName(); + + /** + * + * + *
    +   * Optional. The unique name of the MaterializedView from which to read.
    +   *
    +   * Values are of the form
    +   * `projects/<project>/instances/<instance>/materializedViews/<materialized_view>`.
    +   * 
    + * + * + * string materialized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for materializedViewName. + */ + com.google.protobuf.ByteString getMaterializedViewNameBytes(); + /** * * @@ -109,6 +149,7 @@ public interface SampleRowKeysRequestOrBuilder * @return The appProfileId. */ java.lang.String getAppProfileId(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java index c974faa19f..5b558958b5 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,13 +29,25 @@ * * Protobuf type {@code google.bigtable.v2.SampleRowKeysResponse} */ -public final class SampleRowKeysResponse extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class SampleRowKeysResponse extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.SampleRowKeysResponse) SampleRowKeysResponseOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SampleRowKeysResponse"); + } + // Use SampleRowKeysResponse.newBuilder() to construct. - private SampleRowKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private SampleRowKeysResponse(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -42,19 +55,13 @@ private SampleRowKeysResponse() { rowKey_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SampleRowKeysResponse(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysResponse_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysResponse_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int ROW_KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -89,6 +97,7 @@ public com.google.protobuf.ByteString getRowKey() { public static final int OFFSET_BYTES_FIELD_NUMBER = 2; private long offsetBytes_ = 0L; + /** * * @@ -218,38 +227,38 @@ public static com.google.bigtable.v2.SampleRowKeysResponse parseFrom( public static com.google.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse 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,10 +281,11 @@ 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; } + /** * * @@ -285,7 +295,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.SampleRowKeysResponse} */ - 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.bigtable.v2.SampleRowKeysResponse) com.google.bigtable.v2.SampleRowKeysResponseOrBuilder { @@ -295,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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysResponse_fieldAccessorTable @@ -307,7 +317,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.SampleRowKeysResponse.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -361,39 +371,6 @@ private void buildPartial0(com.google.bigtable.v2.SampleRowKeysResponse 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.bigtable.v2.SampleRowKeysResponse) { @@ -406,7 +383,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysResponse other) { if (other == com.google.bigtable.v2.SampleRowKeysResponse.getDefaultInstance()) return this; - if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + if (!other.getRowKey().isEmpty()) { setRowKey(other.getRowKey()); } if (other.getOffsetBytes() != 0L) { @@ -470,6 +447,7 @@ public Builder mergeFrom( private int bitField0_; private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** * * @@ -491,6 +469,7 @@ public Builder mergeFrom( public com.google.protobuf.ByteString getRowKey() { return rowKey_; } + /** * * @@ -518,6 +497,7 @@ public Builder setRowKey(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -543,6 +523,7 @@ public Builder clearRowKey() { } private long offsetBytes_; + /** * * @@ -561,6 +542,7 @@ public Builder clearRowKey() { public long getOffsetBytes() { return offsetBytes_; } + /** * * @@ -583,6 +565,7 @@ public Builder setOffsetBytes(long value) { onChanged(); return this; } + /** * * @@ -604,17 +587,6 @@ public Builder clearOffsetBytes() { 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.bigtable.v2.SampleRowKeysResponse) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponseOrBuilder.java index 2aa726ad22..92a7ba2385 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponseOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/bigtable.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface SampleRowKeysResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SampleRowKeysResponse) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfiguration.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfiguration.java new file mode 100644 index 0000000000..36d01b61f5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfiguration.java @@ -0,0 +1,7243 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Configuration for the Session API. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration} + */ +@com.google.protobuf.Generated +public final class SessionClientConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration) + SessionClientConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionClientConfiguration"); + } + + // Use SessionClientConfiguration.newBuilder() to construct. + private SessionClientConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionClientConfiguration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.Builder.class); + } + + public interface ChannelPoolConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The minimum number of distcint servers to connect to in the channel pool.
    +     * The client will ensure that the channel pool will have at least this many
    +     * distinct servers, but may have multiple channels connected to the same
    +     * server (e.g. the client may have M channels on N machines, where M > N).
    +     * 
    + * + * int32 min_server_count = 1; + * + * @return The minServerCount. + */ + int getMinServerCount(); + + /** + * + * + *
    +     * The maximum number of distinct servers to connect to in the channel pool.
    +     * The client will ensure that the channel pool will have at most this many
    +     * distinct servers.
    +     * 
    + * + * int32 max_server_count = 2; + * + * @return The maxServerCount. + */ + int getMaxServerCount(); + + /** + * + * + *
    +     * Soft maximum for how many sessions are allowed per server. Normally, the
    +     * client will ensure that it does not host more than this count of sessions
    +     * per server, unless there are other limits encountered (e.g. the connected
    +     * servers is already at max_servers).
    +     * 
    + * + * int32 per_server_session_count = 3; + * + * @return The perServerSessionCount. + */ + int getPerServerSessionCount(); + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return Whether the directAccessWithFallback field is set. + */ + boolean hasDirectAccessWithFallback(); + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return The directAccessWithFallback. + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDirectAccessWithFallback(); + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder + getDirectAccessWithFallbackOrBuilder(); + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return Whether the directAccessOnly field is set. + */ + boolean hasDirectAccessOnly(); + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return The directAccessOnly. + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + getDirectAccessOnly(); + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder + getDirectAccessOnlyOrBuilder(); + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return Whether the cloudPathOnly field is set. + */ + boolean hasCloudPathOnly(); + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return The cloudPathOnly. + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + getCloudPathOnly(); + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder + getCloudPathOnlyOrBuilder(); + + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.ModeCase + getModeCase(); + } + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} + */ + public static final class ChannelPoolConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + ChannelPoolConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChannelPoolConfiguration"); + } + + // Use ChannelPoolConfiguration.newBuilder() to construct. + private ChannelPoolConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChannelPoolConfiguration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder + .class); + } + + public interface DirectAccessWithFallbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * The threshold for errors on DirectAccess to trigger CloudPath fallback.
    +       * The error rate is calculated based on a count of vRPCs with errors
    +       * divided by a total count of vRPCs, over a rolling window of the past
    +       * check_interval. If this ratio exceeds this threshold, the fallback to
    +       * CloudPath is triggered. [0, 1].
    +       * 
    + * + * float error_rate_threshold = 1; + * + * @return The errorRateThreshold. + */ + float getErrorRateThreshold(); + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return Whether the checkInterval field is set. + */ + boolean hasCheckInterval(); + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return The checkInterval. + */ + com.google.protobuf.Duration getCheckInterval(); + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder(); + } + + /** + * + * + *
    +     * A channel mode which allows DirectAccess with a fallback to CloudPath if
    +     * DirectAccess is unavailable.
    +     * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} + */ + public static final class DirectAccessWithFallback extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + DirectAccessWithFallbackOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DirectAccessWithFallback"); + } + + // Use DirectAccessWithFallback.newBuilder() to construct. + private DirectAccessWithFallback(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DirectAccessWithFallback() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder.class); + } + + private int bitField0_; + public static final int ERROR_RATE_THRESHOLD_FIELD_NUMBER = 1; + private float errorRateThreshold_ = 0F; + + /** + * + * + *
    +       * The threshold for errors on DirectAccess to trigger CloudPath fallback.
    +       * The error rate is calculated based on a count of vRPCs with errors
    +       * divided by a total count of vRPCs, over a rolling window of the past
    +       * check_interval. If this ratio exceeds this threshold, the fallback to
    +       * CloudPath is triggered. [0, 1].
    +       * 
    + * + * float error_rate_threshold = 1; + * + * @return The errorRateThreshold. + */ + @java.lang.Override + public float getErrorRateThreshold() { + return errorRateThreshold_; + } + + public static final int CHECK_INTERVAL_FIELD_NUMBER = 2; + private com.google.protobuf.Duration checkInterval_; + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return Whether the checkInterval field is set. + */ + @java.lang.Override + public boolean hasCheckInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return The checkInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getCheckInterval() { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + + /** + * + * + *
    +       * The interval to check the error rate over.
    +       * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + + 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 (java.lang.Float.floatToRawIntBits(errorRateThreshold_) != 0) { + output.writeFloat(1, errorRateThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCheckInterval()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(errorRateThreshold_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, errorRateThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCheckInterval()); + } + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + other = + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + obj; + + if (java.lang.Float.floatToIntBits(getErrorRateThreshold()) + != java.lang.Float.floatToIntBits(other.getErrorRateThreshold())) return false; + if (hasCheckInterval() != other.hasCheckInterval()) return false; + if (hasCheckInterval()) { + if (!getCheckInterval().equals(other.getCheckInterval())) 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) + ERROR_RATE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getErrorRateThreshold()); + if (hasCheckInterval()) { + hash = (37 * hash) + CHECK_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getCheckInterval().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + 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 channel mode which allows DirectAccess with a fallback to CloudPath if
    +       * DirectAccess is unavailable.
    +       * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder.class); + } + + // Construct using + // com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCheckIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + errorRateThreshold_ = 0F; + checkInterval_ = null; + if (checkIntervalBuilder_ != null) { + checkIntervalBuilder_.dispose(); + checkIntervalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + build() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + result = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.errorRateThreshold_ = errorRateThreshold_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.checkInterval_ = + checkIntervalBuilder_ == null ? checkInterval_ : checkIntervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) { + return mergeFrom( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + other) { + if (other + == com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance()) return this; + if (java.lang.Float.floatToRawIntBits(other.getErrorRateThreshold()) != 0) { + setErrorRateThreshold(other.getErrorRateThreshold()); + } + if (other.hasCheckInterval()) { + mergeCheckInterval(other.getCheckInterval()); + } + 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 13: + { + errorRateThreshold_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 18: + { + input.readMessage( + internalGetCheckIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float errorRateThreshold_; + + /** + * + * + *
    +         * The threshold for errors on DirectAccess to trigger CloudPath fallback.
    +         * The error rate is calculated based on a count of vRPCs with errors
    +         * divided by a total count of vRPCs, over a rolling window of the past
    +         * check_interval. If this ratio exceeds this threshold, the fallback to
    +         * CloudPath is triggered. [0, 1].
    +         * 
    + * + * float error_rate_threshold = 1; + * + * @return The errorRateThreshold. + */ + @java.lang.Override + public float getErrorRateThreshold() { + return errorRateThreshold_; + } + + /** + * + * + *
    +         * The threshold for errors on DirectAccess to trigger CloudPath fallback.
    +         * The error rate is calculated based on a count of vRPCs with errors
    +         * divided by a total count of vRPCs, over a rolling window of the past
    +         * check_interval. If this ratio exceeds this threshold, the fallback to
    +         * CloudPath is triggered. [0, 1].
    +         * 
    + * + * float error_rate_threshold = 1; + * + * @param value The errorRateThreshold to set. + * @return This builder for chaining. + */ + public Builder setErrorRateThreshold(float value) { + + errorRateThreshold_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The threshold for errors on DirectAccess to trigger CloudPath fallback.
    +         * The error rate is calculated based on a count of vRPCs with errors
    +         * divided by a total count of vRPCs, over a rolling window of the past
    +         * check_interval. If this ratio exceeds this threshold, the fallback to
    +         * CloudPath is triggered. [0, 1].
    +         * 
    + * + * float error_rate_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearErrorRateThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + errorRateThreshold_ = 0F; + onChanged(); + return this; + } + + private com.google.protobuf.Duration checkInterval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + checkIntervalBuilder_; + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return Whether the checkInterval field is set. + */ + public boolean hasCheckInterval() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + * + * @return The checkInterval. + */ + public com.google.protobuf.Duration getCheckInterval() { + if (checkIntervalBuilder_ == null) { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } else { + return checkIntervalBuilder_.getMessage(); + } + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public Builder setCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + checkInterval_ = value; + } else { + checkIntervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public Builder setCheckInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (checkIntervalBuilder_ == null) { + checkInterval_ = builderForValue.build(); + } else { + checkIntervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public Builder mergeCheckInterval(com.google.protobuf.Duration value) { + if (checkIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && checkInterval_ != null + && checkInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { + getCheckIntervalBuilder().mergeFrom(value); + } else { + checkInterval_ = value; + } + } else { + checkIntervalBuilder_.mergeFrom(value); + } + if (checkInterval_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public Builder clearCheckInterval() { + bitField0_ = (bitField0_ & ~0x00000002); + checkInterval_ = null; + if (checkIntervalBuilder_ != null) { + checkIntervalBuilder_.dispose(); + checkIntervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public com.google.protobuf.Duration.Builder getCheckIntervalBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCheckIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + public com.google.protobuf.DurationOrBuilder getCheckIntervalOrBuilder() { + if (checkIntervalBuilder_ != null) { + return checkIntervalBuilder_.getMessageOrBuilder(); + } else { + return checkInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : checkInterval_; + } + } + + /** + * + * + *
    +         * The interval to check the error rate over.
    +         * 
    + * + * .google.protobuf.Duration check_interval = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetCheckIntervalFieldBuilder() { + if (checkIntervalBuilder_ == null) { + checkIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getCheckInterval(), getParentForChildren(), isClean()); + checkInterval_ = null; + } + return checkIntervalBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback) + private static final com.google.bigtable.v2.SessionClientConfiguration + .ChannelPoolConfiguration.DirectAccessWithFallback + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DirectAccessWithFallback 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DirectAccessOnlyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * A channel mode which only allows DirectAccess.
    +     * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} + */ + public static final class DirectAccessOnly extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + DirectAccessOnlyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DirectAccessOnly"); + } + + // Use DirectAccessOnly.newBuilder() to construct. + private DirectAccessOnly(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DirectAccessOnly() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly + other = + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + 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 channel mode which only allows DirectAccess.
    +       * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder.class); + } + + // Construct using + // com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + build() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + result = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) { + return mergeFrom( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + other) { + if (other + == com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly) + private static final com.google.bigtable.v2.SessionClientConfiguration + .ChannelPoolConfiguration.DirectAccessOnly + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DirectAccessOnly 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CloudPathOnlyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +     * A channel mode which only allows CloudPath.
    +     * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} + */ + public static final class CloudPathOnly extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + CloudPathOnlyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudPathOnly"); + } + + // Use CloudPathOnly.newBuilder() to construct. + private CloudPathOnly(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudPathOnly() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + other = + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + 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 channel mode which only allows CloudPath.
    +       * 
    + * + * Protobuf type {@code + * google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder.class); + } + + // Construct using + // com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + build() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + result = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) { + return mergeFrom( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + other) { + if (other + == com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly) + private static final com.google.bigtable.v2.SessionClientConfiguration + .ChannelPoolConfiguration.CloudPathOnly + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudPathOnly 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int modeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object mode_; + + public enum ModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DIRECT_ACCESS_WITH_FALLBACK(4), + DIRECT_ACCESS_ONLY(5), + CLOUD_PATH_ONLY(6), + MODE_NOT_SET(0); + private final int value; + + private ModeCase(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 ModeCase valueOf(int value) { + return forNumber(value); + } + + public static ModeCase forNumber(int value) { + switch (value) { + case 4: + return DIRECT_ACCESS_WITH_FALLBACK; + case 5: + return DIRECT_ACCESS_ONLY; + case 6: + return CLOUD_PATH_ONLY; + case 0: + return MODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public static final int MIN_SERVER_COUNT_FIELD_NUMBER = 1; + private int minServerCount_ = 0; + + /** + * + * + *
    +     * The minimum number of distcint servers to connect to in the channel pool.
    +     * The client will ensure that the channel pool will have at least this many
    +     * distinct servers, but may have multiple channels connected to the same
    +     * server (e.g. the client may have M channels on N machines, where M > N).
    +     * 
    + * + * int32 min_server_count = 1; + * + * @return The minServerCount. + */ + @java.lang.Override + public int getMinServerCount() { + return minServerCount_; + } + + public static final int MAX_SERVER_COUNT_FIELD_NUMBER = 2; + private int maxServerCount_ = 0; + + /** + * + * + *
    +     * The maximum number of distinct servers to connect to in the channel pool.
    +     * The client will ensure that the channel pool will have at most this many
    +     * distinct servers.
    +     * 
    + * + * int32 max_server_count = 2; + * + * @return The maxServerCount. + */ + @java.lang.Override + public int getMaxServerCount() { + return maxServerCount_; + } + + public static final int PER_SERVER_SESSION_COUNT_FIELD_NUMBER = 3; + private int perServerSessionCount_ = 0; + + /** + * + * + *
    +     * Soft maximum for how many sessions are allowed per server. Normally, the
    +     * client will ensure that it does not host more than this count of sessions
    +     * per server, unless there are other limits encountered (e.g. the connected
    +     * servers is already at max_servers).
    +     * 
    + * + * int32 per_server_session_count = 3; + * + * @return The perServerSessionCount. + */ + @java.lang.Override + public int getPerServerSessionCount() { + return perServerSessionCount_; + } + + public static final int DIRECT_ACCESS_WITH_FALLBACK_FIELD_NUMBER = 4; + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return Whether the directAccessWithFallback field is set. + */ + @java.lang.Override + public boolean hasDirectAccessWithFallback() { + return modeCase_ == 4; + } + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return The directAccessWithFallback. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDirectAccessWithFallback() { + if (modeCase_ == 4) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + + /** + * + * + *
    +     * DirectAccess with a fallback to CloudPath.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder + getDirectAccessWithFallbackOrBuilder() { + if (modeCase_ == 4) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + + public static final int DIRECT_ACCESS_ONLY_FIELD_NUMBER = 5; + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return Whether the directAccessOnly field is set. + */ + @java.lang.Override + public boolean hasDirectAccessOnly() { + return modeCase_ == 5; + } + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return The directAccessOnly. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + getDirectAccessOnly() { + if (modeCase_ == 5) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + + /** + * + * + *
    +     * DirectAccess only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder + getDirectAccessOnlyOrBuilder() { + if (modeCase_ == 5) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + + public static final int CLOUD_PATH_ONLY_FIELD_NUMBER = 6; + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return Whether the cloudPathOnly field is set. + */ + @java.lang.Override + public boolean hasCloudPathOnly() { + return modeCase_ == 6; + } + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return The cloudPathOnly. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + getCloudPathOnly() { + if (modeCase_ == 6) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + + /** + * + * + *
    +     * CloudPath only.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder + getCloudPathOnlyOrBuilder() { + if (modeCase_ == 6) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minServerCount_ != 0) { + output.writeInt32(1, minServerCount_); + } + if (maxServerCount_ != 0) { + output.writeInt32(2, maxServerCount_); + } + if (perServerSessionCount_ != 0) { + output.writeInt32(3, perServerSessionCount_); + } + if (modeCase_ == 4) { + output.writeMessage( + 4, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_); + } + if (modeCase_ == 5) { + output.writeMessage( + 5, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_); + } + if (modeCase_ == 6) { + output.writeMessage( + 6, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minServerCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, minServerCount_); + } + if (maxServerCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxServerCount_); + } + if (perServerSessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, perServerSessionCount_); + } + if (modeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_); + } + if (modeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_); + } + if (modeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration other = + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) obj; + + if (getMinServerCount() != other.getMinServerCount()) return false; + if (getMaxServerCount() != other.getMaxServerCount()) return false; + if (getPerServerSessionCount() != other.getPerServerSessionCount()) return false; + if (!getModeCase().equals(other.getModeCase())) return false; + switch (modeCase_) { + case 4: + if (!getDirectAccessWithFallback().equals(other.getDirectAccessWithFallback())) + return false; + break; + case 5: + if (!getDirectAccessOnly().equals(other.getDirectAccessOnly())) return false; + break; + case 6: + if (!getCloudPathOnly().equals(other.getCloudPathOnly())) 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) + MIN_SERVER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinServerCount(); + hash = (37 * hash) + MAX_SERVER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxServerCount(); + hash = (37 * hash) + PER_SERVER_SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPerServerSessionCount(); + switch (modeCase_) { + case 4: + hash = (37 * hash) + DIRECT_ACCESS_WITH_FALLBACK_FIELD_NUMBER; + hash = (53 * hash) + getDirectAccessWithFallback().hashCode(); + break; + case 5: + hash = (37 * hash) + DIRECT_ACCESS_ONLY_FIELD_NUMBER; + hash = (53 * hash) + getDirectAccessOnly().hashCode(); + break; + case 6: + hash = (37 * hash) + CLOUD_PATH_ONLY_FIELD_NUMBER; + hash = (53 * hash) + getCloudPathOnly().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration 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; + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder + .class); + } + + // Construct using + // com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minServerCount_ = 0; + maxServerCount_ = 0; + perServerSessionCount_ = 0; + if (directAccessWithFallbackBuilder_ != null) { + directAccessWithFallbackBuilder_.clear(); + } + if (directAccessOnlyBuilder_ != null) { + directAccessOnlyBuilder_.clear(); + } + if (cloudPathOnlyBuilder_ != null) { + cloudPathOnlyBuilder_.clear(); + } + modeCase_ = 0; + mode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration build() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration result = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minServerCount_ = minServerCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxServerCount_ = maxServerCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.perServerSessionCount_ = perServerSessionCount_; + } + } + + private void buildPartialOneofs( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration result) { + result.modeCase_ = modeCase_; + result.mode_ = this.mode_; + if (modeCase_ == 4 && directAccessWithFallbackBuilder_ != null) { + result.mode_ = directAccessWithFallbackBuilder_.build(); + } + if (modeCase_ == 5 && directAccessOnlyBuilder_ != null) { + result.mode_ = directAccessOnlyBuilder_.build(); + } + if (modeCase_ == 6 && cloudPathOnlyBuilder_ != null) { + result.mode_ = cloudPathOnlyBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) { + return mergeFrom( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration other) { + if (other + == com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance()) return this; + if (other.getMinServerCount() != 0) { + setMinServerCount(other.getMinServerCount()); + } + if (other.getMaxServerCount() != 0) { + setMaxServerCount(other.getMaxServerCount()); + } + if (other.getPerServerSessionCount() != 0) { + setPerServerSessionCount(other.getPerServerSessionCount()); + } + switch (other.getModeCase()) { + case DIRECT_ACCESS_WITH_FALLBACK: + { + mergeDirectAccessWithFallback(other.getDirectAccessWithFallback()); + break; + } + case DIRECT_ACCESS_ONLY: + { + mergeDirectAccessOnly(other.getDirectAccessOnly()); + break; + } + case CLOUD_PATH_ONLY: + { + mergeCloudPathOnly(other.getCloudPathOnly()); + break; + } + case MODE_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: + { + minServerCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxServerCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + perServerSessionCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetDirectAccessWithFallbackFieldBuilder().getBuilder(), + extensionRegistry); + modeCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDirectAccessOnlyFieldBuilder().getBuilder(), extensionRegistry); + modeCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCloudPathOnlyFieldBuilder().getBuilder(), extensionRegistry); + modeCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public Builder clearMode() { + modeCase_ = 0; + mode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private int minServerCount_; + + /** + * + * + *
    +       * The minimum number of distcint servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at least this many
    +       * distinct servers, but may have multiple channels connected to the same
    +       * server (e.g. the client may have M channels on N machines, where M > N).
    +       * 
    + * + * int32 min_server_count = 1; + * + * @return The minServerCount. + */ + @java.lang.Override + public int getMinServerCount() { + return minServerCount_; + } + + /** + * + * + *
    +       * The minimum number of distcint servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at least this many
    +       * distinct servers, but may have multiple channels connected to the same
    +       * server (e.g. the client may have M channels on N machines, where M > N).
    +       * 
    + * + * int32 min_server_count = 1; + * + * @param value The minServerCount to set. + * @return This builder for chaining. + */ + public Builder setMinServerCount(int value) { + + minServerCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The minimum number of distcint servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at least this many
    +       * distinct servers, but may have multiple channels connected to the same
    +       * server (e.g. the client may have M channels on N machines, where M > N).
    +       * 
    + * + * int32 min_server_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearMinServerCount() { + bitField0_ = (bitField0_ & ~0x00000001); + minServerCount_ = 0; + onChanged(); + return this; + } + + private int maxServerCount_; + + /** + * + * + *
    +       * The maximum number of distinct servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at most this many
    +       * distinct servers.
    +       * 
    + * + * int32 max_server_count = 2; + * + * @return The maxServerCount. + */ + @java.lang.Override + public int getMaxServerCount() { + return maxServerCount_; + } + + /** + * + * + *
    +       * The maximum number of distinct servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at most this many
    +       * distinct servers.
    +       * 
    + * + * int32 max_server_count = 2; + * + * @param value The maxServerCount to set. + * @return This builder for chaining. + */ + public Builder setMaxServerCount(int value) { + + maxServerCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The maximum number of distinct servers to connect to in the channel pool.
    +       * The client will ensure that the channel pool will have at most this many
    +       * distinct servers.
    +       * 
    + * + * int32 max_server_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxServerCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxServerCount_ = 0; + onChanged(); + return this; + } + + private int perServerSessionCount_; + + /** + * + * + *
    +       * Soft maximum for how many sessions are allowed per server. Normally, the
    +       * client will ensure that it does not host more than this count of sessions
    +       * per server, unless there are other limits encountered (e.g. the connected
    +       * servers is already at max_servers).
    +       * 
    + * + * int32 per_server_session_count = 3; + * + * @return The perServerSessionCount. + */ + @java.lang.Override + public int getPerServerSessionCount() { + return perServerSessionCount_; + } + + /** + * + * + *
    +       * Soft maximum for how many sessions are allowed per server. Normally, the
    +       * client will ensure that it does not host more than this count of sessions
    +       * per server, unless there are other limits encountered (e.g. the connected
    +       * servers is already at max_servers).
    +       * 
    + * + * int32 per_server_session_count = 3; + * + * @param value The perServerSessionCount to set. + * @return This builder for chaining. + */ + public Builder setPerServerSessionCount(int value) { + + perServerSessionCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Soft maximum for how many sessions are allowed per server. Normally, the
    +       * client will ensure that it does not host more than this count of sessions
    +       * per server, unless there are other limits encountered (e.g. the connected
    +       * servers is already at max_servers).
    +       * 
    + * + * int32 per_server_session_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearPerServerSessionCount() { + bitField0_ = (bitField0_ & ~0x00000004); + perServerSessionCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder> + directAccessWithFallbackBuilder_; + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return Whether the directAccessWithFallback field is set. + */ + @java.lang.Override + public boolean hasDirectAccessWithFallback() { + return modeCase_ == 4; + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + * + * @return The directAccessWithFallback. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + getDirectAccessWithFallback() { + if (directAccessWithFallbackBuilder_ == null) { + if (modeCase_ == 4) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } else { + if (modeCase_ == 4) { + return directAccessWithFallbackBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + public Builder setDirectAccessWithFallback( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + value) { + if (directAccessWithFallbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + directAccessWithFallbackBuilder_.setMessage(value); + } + modeCase_ = 4; + return this; + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + public Builder setDirectAccessWithFallback( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder + builderForValue) { + if (directAccessWithFallbackBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + directAccessWithFallbackBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 4; + return this; + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + public Builder mergeDirectAccessWithFallback( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback + value) { + if (directAccessWithFallbackBuilder_ == null) { + if (modeCase_ == 4 + && mode_ + != com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance()) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.newBuilder( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_) + .mergeFrom(value) + .buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 4) { + directAccessWithFallbackBuilder_.mergeFrom(value); + } else { + directAccessWithFallbackBuilder_.setMessage(value); + } + } + modeCase_ = 4; + return this; + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + public Builder clearDirectAccessWithFallback() { + if (directAccessWithFallbackBuilder_ == null) { + if (modeCase_ == 4) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 4) { + modeCase_ = 0; + mode_ = null; + } + directAccessWithFallbackBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder + getDirectAccessWithFallbackBuilder() { + return internalGetDirectAccessWithFallbackFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder + getDirectAccessWithFallbackOrBuilder() { + if ((modeCase_ == 4) && (directAccessWithFallbackBuilder_ != null)) { + return directAccessWithFallbackBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 4) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * DirectAccess with a fallback to CloudPath.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessWithFallback direct_access_with_fallback = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder> + internalGetDirectAccessWithFallbackFieldBuilder() { + if (directAccessWithFallbackBuilder_ == null) { + if (!(modeCase_ == 4)) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.getDefaultInstance(); + } + directAccessWithFallbackBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallbackOrBuilder>( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessWithFallback) + mode_, + getParentForChildren(), + isClean()); + mode_ = null; + } + modeCase_ = 4; + onChanged(); + return directAccessWithFallbackBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder> + directAccessOnlyBuilder_; + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return Whether the directAccessOnly field is set. + */ + @java.lang.Override + public boolean hasDirectAccessOnly() { + return modeCase_ == 5; + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + * + * @return The directAccessOnly. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + getDirectAccessOnly() { + if (directAccessOnlyBuilder_ == null) { + if (modeCase_ == 5) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } else { + if (modeCase_ == 5) { + return directAccessOnlyBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + public Builder setDirectAccessOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + value) { + if (directAccessOnlyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + directAccessOnlyBuilder_.setMessage(value); + } + modeCase_ = 5; + return this; + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + public Builder setDirectAccessOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder + builderForValue) { + if (directAccessOnlyBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + directAccessOnlyBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 5; + return this; + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + public Builder mergeDirectAccessOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly + value) { + if (directAccessOnlyBuilder_ == null) { + if (modeCase_ == 5 + && mode_ + != com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance()) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.newBuilder( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_) + .mergeFrom(value) + .buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 5) { + directAccessOnlyBuilder_.mergeFrom(value); + } else { + directAccessOnlyBuilder_.setMessage(value); + } + } + modeCase_ = 5; + return this; + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + public Builder clearDirectAccessOnly() { + if (directAccessOnlyBuilder_ == null) { + if (modeCase_ == 5) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 5) { + modeCase_ = 0; + mode_ = null; + } + directAccessOnlyBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder + getDirectAccessOnlyBuilder() { + return internalGetDirectAccessOnlyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder + getDirectAccessOnlyOrBuilder() { + if ((modeCase_ == 5) && (directAccessOnlyBuilder_ != null)) { + return directAccessOnlyBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 5) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * DirectAccess only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.DirectAccessOnly direct_access_only = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder> + internalGetDirectAccessOnlyFieldBuilder() { + if (directAccessOnlyBuilder_ == null) { + if (!(modeCase_ == 5)) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.getDefaultInstance(); + } + directAccessOnlyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnlyOrBuilder>( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .DirectAccessOnly) + mode_, + getParentForChildren(), + isClean()); + mode_ = null; + } + modeCase_ = 5; + onChanged(); + return directAccessOnlyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder> + cloudPathOnlyBuilder_; + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return Whether the cloudPathOnly field is set. + */ + @java.lang.Override + public boolean hasCloudPathOnly() { + return modeCase_ == 6; + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + * + * @return The cloudPathOnly. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly + getCloudPathOnly() { + if (cloudPathOnlyBuilder_ == null) { + if (modeCase_ == 6) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } else { + if (modeCase_ == 6) { + return cloudPathOnlyBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + public Builder setCloudPathOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + value) { + if (cloudPathOnlyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + cloudPathOnlyBuilder_.setMessage(value); + } + modeCase_ = 6; + return this; + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + public Builder setCloudPathOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + .Builder + builderForValue) { + if (cloudPathOnlyBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + cloudPathOnlyBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 6; + return this; + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + public Builder mergeCloudPathOnly( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly + value) { + if (cloudPathOnlyBuilder_ == null) { + if (modeCase_ == 6 + && mode_ + != com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance()) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.newBuilder( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_) + .mergeFrom(value) + .buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 6) { + cloudPathOnlyBuilder_.mergeFrom(value); + } else { + cloudPathOnlyBuilder_.setMessage(value); + } + } + modeCase_ = 6; + return this; + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + public Builder clearCloudPathOnly() { + if (cloudPathOnlyBuilder_ == null) { + if (modeCase_ == 6) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 6) { + modeCase_ = 0; + mode_ = null; + } + cloudPathOnlyBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder + getCloudPathOnlyBuilder() { + return internalGetCloudPathOnlyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder + getCloudPathOnlyOrBuilder() { + if ((modeCase_ == 6) && (cloudPathOnlyBuilder_ != null)) { + return cloudPathOnlyBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 6) { + return (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_; + } + return com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + } + + /** + * + * + *
    +       * CloudPath only.
    +       * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnly cloud_path_only = 6; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder> + internalGetCloudPathOnlyFieldBuilder() { + if (cloudPathOnlyBuilder_ == null) { + if (!(modeCase_ == 6)) { + mode_ = + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.getDefaultInstance(); + } + cloudPathOnlyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnlyOrBuilder>( + (com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .CloudPathOnly) + mode_, + getParentForChildren(), + isClean()); + mode_ = null; + } + modeCase_ = 6; + onChanged(); + return cloudPathOnlyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration) + private static final com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelPoolConfiguration 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.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SessionPoolConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Fraction of idle sessions to keep in order to manage an increase in
    +     * requests-in-flight. For example, a headroom of 0.5 will keep enough
    +     * sessions to deal with a 50% increase in QPS.
    +     * 
    + * + * float headroom = 1; + * + * @return The headroom. + */ + float getHeadroom(); + + /** + * + * + *
    +     * The minimum number of sessions for a given scope.
    +     * 
    + * + * int32 min_session_count = 2; + * + * @return The minSessionCount. + */ + int getMinSessionCount(); + + /** + * + * + *
    +     * The maximum number of sessions for a given scope.
    +     * 
    + * + * int32 max_session_count = 3; + * + * @return The maxSessionCount. + */ + int getMaxSessionCount(); + + /** + * + * + *
    +     * Number of vRPCs that can be queued per starting session.
    +     * 
    + * + * int32 new_session_queue_length = 4; + * + * @return The newSessionQueueLength. + */ + int getNewSessionQueueLength(); + + /** + * + * + *
    +     * How many concurrent session establishments are allowed. The client will
    +     * hold onto a count against this budget whenever it is establishing a new
    +     * session, and release that count once the session is successfully
    +     * established or failed to establish.
    +     * 
    + * + * int32 new_session_creation_budget = 5; + * + * @return The newSessionCreationBudget. + */ + int getNewSessionCreationBudget(); + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return Whether the newSessionCreationPenalty field is set. + */ + boolean hasNewSessionCreationPenalty(); + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return The newSessionCreationPenalty. + */ + com.google.protobuf.Duration getNewSessionCreationPenalty(); + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + com.google.protobuf.DurationOrBuilder getNewSessionCreationPenaltyOrBuilder(); + + /** + * + * + *
    +     * A threshold for cancelling all pending vRPCs based on how many
    +     * consecutive session establishment errors have been observed. The client
    +     * will eagerly cancel queued vRPCs after this threshold is met to avoid
    +     * them waiting their entire deadlines before terminating (while waiting for
    +     * any session to establish to actually send the vRPC).
    +     * 
    + * + * int32 consecutive_session_failure_threshold = 8; + * + * @return The consecutiveSessionFailureThreshold. + */ + int getConsecutiveSessionFailureThreshold(); + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return Whether the loadBalancingOptions field is set. + */ + boolean hasLoadBalancingOptions(); + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return The loadBalancingOptions. + */ + com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions(); + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder getLoadBalancingOptionsOrBuilder(); + } + + /** + * + * + *
    +   * Configuration for the session pools. Session pools are tied to a scope
    +   * like a table, an app profile, and a permission.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} + */ + public static final class SessionPoolConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + SessionPoolConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionPoolConfiguration"); + } + + // Use SessionPoolConfiguration.newBuilder() to construct. + private SessionPoolConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionPoolConfiguration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder + .class); + } + + private int bitField0_; + public static final int HEADROOM_FIELD_NUMBER = 1; + private float headroom_ = 0F; + + /** + * + * + *
    +     * Fraction of idle sessions to keep in order to manage an increase in
    +     * requests-in-flight. For example, a headroom of 0.5 will keep enough
    +     * sessions to deal with a 50% increase in QPS.
    +     * 
    + * + * float headroom = 1; + * + * @return The headroom. + */ + @java.lang.Override + public float getHeadroom() { + return headroom_; + } + + public static final int MIN_SESSION_COUNT_FIELD_NUMBER = 2; + private int minSessionCount_ = 0; + + /** + * + * + *
    +     * The minimum number of sessions for a given scope.
    +     * 
    + * + * int32 min_session_count = 2; + * + * @return The minSessionCount. + */ + @java.lang.Override + public int getMinSessionCount() { + return minSessionCount_; + } + + public static final int MAX_SESSION_COUNT_FIELD_NUMBER = 3; + private int maxSessionCount_ = 0; + + /** + * + * + *
    +     * The maximum number of sessions for a given scope.
    +     * 
    + * + * int32 max_session_count = 3; + * + * @return The maxSessionCount. + */ + @java.lang.Override + public int getMaxSessionCount() { + return maxSessionCount_; + } + + public static final int NEW_SESSION_QUEUE_LENGTH_FIELD_NUMBER = 4; + private int newSessionQueueLength_ = 0; + + /** + * + * + *
    +     * Number of vRPCs that can be queued per starting session.
    +     * 
    + * + * int32 new_session_queue_length = 4; + * + * @return The newSessionQueueLength. + */ + @java.lang.Override + public int getNewSessionQueueLength() { + return newSessionQueueLength_; + } + + public static final int NEW_SESSION_CREATION_BUDGET_FIELD_NUMBER = 5; + private int newSessionCreationBudget_ = 0; + + /** + * + * + *
    +     * How many concurrent session establishments are allowed. The client will
    +     * hold onto a count against this budget whenever it is establishing a new
    +     * session, and release that count once the session is successfully
    +     * established or failed to establish.
    +     * 
    + * + * int32 new_session_creation_budget = 5; + * + * @return The newSessionCreationBudget. + */ + @java.lang.Override + public int getNewSessionCreationBudget() { + return newSessionCreationBudget_; + } + + public static final int NEW_SESSION_CREATION_PENALTY_FIELD_NUMBER = 6; + private com.google.protobuf.Duration newSessionCreationPenalty_; + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return Whether the newSessionCreationPenalty field is set. + */ + @java.lang.Override + public boolean hasNewSessionCreationPenalty() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return The newSessionCreationPenalty. + */ + @java.lang.Override + public com.google.protobuf.Duration getNewSessionCreationPenalty() { + return newSessionCreationPenalty_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : newSessionCreationPenalty_; + } + + /** + * + * + *
    +     * How long to penalize the creation budget for a failed session creation
    +     * attempt.
    +     * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getNewSessionCreationPenaltyOrBuilder() { + return newSessionCreationPenalty_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : newSessionCreationPenalty_; + } + + public static final int CONSECUTIVE_SESSION_FAILURE_THRESHOLD_FIELD_NUMBER = 8; + private int consecutiveSessionFailureThreshold_ = 0; + + /** + * + * + *
    +     * A threshold for cancelling all pending vRPCs based on how many
    +     * consecutive session establishment errors have been observed. The client
    +     * will eagerly cancel queued vRPCs after this threshold is met to avoid
    +     * them waiting their entire deadlines before terminating (while waiting for
    +     * any session to establish to actually send the vRPC).
    +     * 
    + * + * int32 consecutive_session_failure_threshold = 8; + * + * @return The consecutiveSessionFailureThreshold. + */ + @java.lang.Override + public int getConsecutiveSessionFailureThreshold() { + return consecutiveSessionFailureThreshold_; + } + + public static final int LOAD_BALANCING_OPTIONS_FIELD_NUMBER = 9; + private com.google.bigtable.v2.LoadBalancingOptions loadBalancingOptions_; + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return Whether the loadBalancingOptions field is set. + */ + @java.lang.Override + public boolean hasLoadBalancingOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return The loadBalancingOptions. + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions() { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + + /** + * + * + *
    +     * How to balance vRPC load over connections to AFEs.
    +     * Set only if session_load > 0.
    +     * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + @java.lang.Override + public com.google.bigtable.v2.LoadBalancingOptionsOrBuilder getLoadBalancingOptionsOrBuilder() { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + + 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 (java.lang.Float.floatToRawIntBits(headroom_) != 0) { + output.writeFloat(1, headroom_); + } + if (minSessionCount_ != 0) { + output.writeInt32(2, minSessionCount_); + } + if (maxSessionCount_ != 0) { + output.writeInt32(3, maxSessionCount_); + } + if (newSessionQueueLength_ != 0) { + output.writeInt32(4, newSessionQueueLength_); + } + if (newSessionCreationBudget_ != 0) { + output.writeInt32(5, newSessionCreationBudget_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getNewSessionCreationPenalty()); + } + if (consecutiveSessionFailureThreshold_ != 0) { + output.writeInt32(8, consecutiveSessionFailureThreshold_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getLoadBalancingOptions()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(headroom_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, headroom_); + } + if (minSessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minSessionCount_); + } + if (maxSessionCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxSessionCount_); + } + if (newSessionQueueLength_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, newSessionQueueLength_); + } + if (newSessionCreationBudget_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(5, newSessionCreationBudget_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getNewSessionCreationPenalty()); + } + if (consecutiveSessionFailureThreshold_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 8, consecutiveSessionFailureThreshold_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLoadBalancingOptions()); + } + 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration other = + (com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) obj; + + if (java.lang.Float.floatToIntBits(getHeadroom()) + != java.lang.Float.floatToIntBits(other.getHeadroom())) return false; + if (getMinSessionCount() != other.getMinSessionCount()) return false; + if (getMaxSessionCount() != other.getMaxSessionCount()) return false; + if (getNewSessionQueueLength() != other.getNewSessionQueueLength()) return false; + if (getNewSessionCreationBudget() != other.getNewSessionCreationBudget()) return false; + if (hasNewSessionCreationPenalty() != other.hasNewSessionCreationPenalty()) return false; + if (hasNewSessionCreationPenalty()) { + if (!getNewSessionCreationPenalty().equals(other.getNewSessionCreationPenalty())) + return false; + } + if (getConsecutiveSessionFailureThreshold() != other.getConsecutiveSessionFailureThreshold()) + return false; + if (hasLoadBalancingOptions() != other.hasLoadBalancingOptions()) return false; + if (hasLoadBalancingOptions()) { + if (!getLoadBalancingOptions().equals(other.getLoadBalancingOptions())) 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) + HEADROOM_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeadroom()); + hash = (37 * hash) + MIN_SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinSessionCount(); + hash = (37 * hash) + MAX_SESSION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxSessionCount(); + hash = (37 * hash) + NEW_SESSION_QUEUE_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getNewSessionQueueLength(); + hash = (37 * hash) + NEW_SESSION_CREATION_BUDGET_FIELD_NUMBER; + hash = (53 * hash) + getNewSessionCreationBudget(); + if (hasNewSessionCreationPenalty()) { + hash = (37 * hash) + NEW_SESSION_CREATION_PENALTY_FIELD_NUMBER; + hash = (53 * hash) + getNewSessionCreationPenalty().hashCode(); + } + hash = (37 * hash) + CONSECUTIVE_SESSION_FAILURE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getConsecutiveSessionFailureThreshold(); + if (hasLoadBalancingOptions()) { + hash = (37 * hash) + LOAD_BALANCING_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancingOptions().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration 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; + } + + /** + * + * + *
    +     * Configuration for the session pools. Session pools are tied to a scope
    +     * like a table, an app profile, and a permission.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder + .class); + } + + // Construct using + // com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetNewSessionCreationPenaltyFieldBuilder(); + internalGetLoadBalancingOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + headroom_ = 0F; + minSessionCount_ = 0; + maxSessionCount_ = 0; + newSessionQueueLength_ = 0; + newSessionCreationBudget_ = 0; + newSessionCreationPenalty_ = null; + if (newSessionCreationPenaltyBuilder_ != null) { + newSessionCreationPenaltyBuilder_.dispose(); + newSessionCreationPenaltyBuilder_ = null; + } + consecutiveSessionFailureThreshold_ = 0; + loadBalancingOptions_ = null; + if (loadBalancingOptionsBuilder_ != null) { + loadBalancingOptionsBuilder_.dispose(); + loadBalancingOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration build() { + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration result = + new com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.headroom_ = headroom_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minSessionCount_ = minSessionCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxSessionCount_ = maxSessionCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.newSessionQueueLength_ = newSessionQueueLength_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.newSessionCreationBudget_ = newSessionCreationBudget_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.newSessionCreationPenalty_ = + newSessionCreationPenaltyBuilder_ == null + ? newSessionCreationPenalty_ + : newSessionCreationPenaltyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.consecutiveSessionFailureThreshold_ = consecutiveSessionFailureThreshold_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.loadBalancingOptions_ = + loadBalancingOptionsBuilder_ == null + ? loadBalancingOptions_ + : loadBalancingOptionsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) { + return mergeFrom( + (com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration other) { + if (other + == com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance()) return this; + if (java.lang.Float.floatToRawIntBits(other.getHeadroom()) != 0) { + setHeadroom(other.getHeadroom()); + } + if (other.getMinSessionCount() != 0) { + setMinSessionCount(other.getMinSessionCount()); + } + if (other.getMaxSessionCount() != 0) { + setMaxSessionCount(other.getMaxSessionCount()); + } + if (other.getNewSessionQueueLength() != 0) { + setNewSessionQueueLength(other.getNewSessionQueueLength()); + } + if (other.getNewSessionCreationBudget() != 0) { + setNewSessionCreationBudget(other.getNewSessionCreationBudget()); + } + if (other.hasNewSessionCreationPenalty()) { + mergeNewSessionCreationPenalty(other.getNewSessionCreationPenalty()); + } + if (other.getConsecutiveSessionFailureThreshold() != 0) { + setConsecutiveSessionFailureThreshold(other.getConsecutiveSessionFailureThreshold()); + } + if (other.hasLoadBalancingOptions()) { + mergeLoadBalancingOptions(other.getLoadBalancingOptions()); + } + 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 13: + { + headroom_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 16: + { + minSessionCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + maxSessionCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + newSessionQueueLength_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + newSessionCreationBudget_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetNewSessionCreationPenaltyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 64: + { + consecutiveSessionFailureThreshold_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 74: + { + input.readMessage( + internalGetLoadBalancingOptionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + 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 float headroom_; + + /** + * + * + *
    +       * Fraction of idle sessions to keep in order to manage an increase in
    +       * requests-in-flight. For example, a headroom of 0.5 will keep enough
    +       * sessions to deal with a 50% increase in QPS.
    +       * 
    + * + * float headroom = 1; + * + * @return The headroom. + */ + @java.lang.Override + public float getHeadroom() { + return headroom_; + } + + /** + * + * + *
    +       * Fraction of idle sessions to keep in order to manage an increase in
    +       * requests-in-flight. For example, a headroom of 0.5 will keep enough
    +       * sessions to deal with a 50% increase in QPS.
    +       * 
    + * + * float headroom = 1; + * + * @param value The headroom to set. + * @return This builder for chaining. + */ + public Builder setHeadroom(float value) { + + headroom_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Fraction of idle sessions to keep in order to manage an increase in
    +       * requests-in-flight. For example, a headroom of 0.5 will keep enough
    +       * sessions to deal with a 50% increase in QPS.
    +       * 
    + * + * float headroom = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeadroom() { + bitField0_ = (bitField0_ & ~0x00000001); + headroom_ = 0F; + onChanged(); + return this; + } + + private int minSessionCount_; + + /** + * + * + *
    +       * The minimum number of sessions for a given scope.
    +       * 
    + * + * int32 min_session_count = 2; + * + * @return The minSessionCount. + */ + @java.lang.Override + public int getMinSessionCount() { + return minSessionCount_; + } + + /** + * + * + *
    +       * The minimum number of sessions for a given scope.
    +       * 
    + * + * int32 min_session_count = 2; + * + * @param value The minSessionCount to set. + * @return This builder for chaining. + */ + public Builder setMinSessionCount(int value) { + + minSessionCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The minimum number of sessions for a given scope.
    +       * 
    + * + * int32 min_session_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearMinSessionCount() { + bitField0_ = (bitField0_ & ~0x00000002); + minSessionCount_ = 0; + onChanged(); + return this; + } + + private int maxSessionCount_; + + /** + * + * + *
    +       * The maximum number of sessions for a given scope.
    +       * 
    + * + * int32 max_session_count = 3; + * + * @return The maxSessionCount. + */ + @java.lang.Override + public int getMaxSessionCount() { + return maxSessionCount_; + } + + /** + * + * + *
    +       * The maximum number of sessions for a given scope.
    +       * 
    + * + * int32 max_session_count = 3; + * + * @param value The maxSessionCount to set. + * @return This builder for chaining. + */ + public Builder setMaxSessionCount(int value) { + + maxSessionCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The maximum number of sessions for a given scope.
    +       * 
    + * + * int32 max_session_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearMaxSessionCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxSessionCount_ = 0; + onChanged(); + return this; + } + + private int newSessionQueueLength_; + + /** + * + * + *
    +       * Number of vRPCs that can be queued per starting session.
    +       * 
    + * + * int32 new_session_queue_length = 4; + * + * @return The newSessionQueueLength. + */ + @java.lang.Override + public int getNewSessionQueueLength() { + return newSessionQueueLength_; + } + + /** + * + * + *
    +       * Number of vRPCs that can be queued per starting session.
    +       * 
    + * + * int32 new_session_queue_length = 4; + * + * @param value The newSessionQueueLength to set. + * @return This builder for chaining. + */ + public Builder setNewSessionQueueLength(int value) { + + newSessionQueueLength_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Number of vRPCs that can be queued per starting session.
    +       * 
    + * + * int32 new_session_queue_length = 4; + * + * @return This builder for chaining. + */ + public Builder clearNewSessionQueueLength() { + bitField0_ = (bitField0_ & ~0x00000008); + newSessionQueueLength_ = 0; + onChanged(); + return this; + } + + private int newSessionCreationBudget_; + + /** + * + * + *
    +       * How many concurrent session establishments are allowed. The client will
    +       * hold onto a count against this budget whenever it is establishing a new
    +       * session, and release that count once the session is successfully
    +       * established or failed to establish.
    +       * 
    + * + * int32 new_session_creation_budget = 5; + * + * @return The newSessionCreationBudget. + */ + @java.lang.Override + public int getNewSessionCreationBudget() { + return newSessionCreationBudget_; + } + + /** + * + * + *
    +       * How many concurrent session establishments are allowed. The client will
    +       * hold onto a count against this budget whenever it is establishing a new
    +       * session, and release that count once the session is successfully
    +       * established or failed to establish.
    +       * 
    + * + * int32 new_session_creation_budget = 5; + * + * @param value The newSessionCreationBudget to set. + * @return This builder for chaining. + */ + public Builder setNewSessionCreationBudget(int value) { + + newSessionCreationBudget_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How many concurrent session establishments are allowed. The client will
    +       * hold onto a count against this budget whenever it is establishing a new
    +       * session, and release that count once the session is successfully
    +       * established or failed to establish.
    +       * 
    + * + * int32 new_session_creation_budget = 5; + * + * @return This builder for chaining. + */ + public Builder clearNewSessionCreationBudget() { + bitField0_ = (bitField0_ & ~0x00000010); + newSessionCreationBudget_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration newSessionCreationPenalty_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + newSessionCreationPenaltyBuilder_; + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return Whether the newSessionCreationPenalty field is set. + */ + public boolean hasNewSessionCreationPenalty() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + * + * @return The newSessionCreationPenalty. + */ + public com.google.protobuf.Duration getNewSessionCreationPenalty() { + if (newSessionCreationPenaltyBuilder_ == null) { + return newSessionCreationPenalty_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : newSessionCreationPenalty_; + } else { + return newSessionCreationPenaltyBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public Builder setNewSessionCreationPenalty(com.google.protobuf.Duration value) { + if (newSessionCreationPenaltyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newSessionCreationPenalty_ = value; + } else { + newSessionCreationPenaltyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public Builder setNewSessionCreationPenalty( + com.google.protobuf.Duration.Builder builderForValue) { + if (newSessionCreationPenaltyBuilder_ == null) { + newSessionCreationPenalty_ = builderForValue.build(); + } else { + newSessionCreationPenaltyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public Builder mergeNewSessionCreationPenalty(com.google.protobuf.Duration value) { + if (newSessionCreationPenaltyBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && newSessionCreationPenalty_ != null + && newSessionCreationPenalty_ != com.google.protobuf.Duration.getDefaultInstance()) { + getNewSessionCreationPenaltyBuilder().mergeFrom(value); + } else { + newSessionCreationPenalty_ = value; + } + } else { + newSessionCreationPenaltyBuilder_.mergeFrom(value); + } + if (newSessionCreationPenalty_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public Builder clearNewSessionCreationPenalty() { + bitField0_ = (bitField0_ & ~0x00000020); + newSessionCreationPenalty_ = null; + if (newSessionCreationPenaltyBuilder_ != null) { + newSessionCreationPenaltyBuilder_.dispose(); + newSessionCreationPenaltyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public com.google.protobuf.Duration.Builder getNewSessionCreationPenaltyBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetNewSessionCreationPenaltyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + public com.google.protobuf.DurationOrBuilder getNewSessionCreationPenaltyOrBuilder() { + if (newSessionCreationPenaltyBuilder_ != null) { + return newSessionCreationPenaltyBuilder_.getMessageOrBuilder(); + } else { + return newSessionCreationPenalty_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : newSessionCreationPenalty_; + } + } + + /** + * + * + *
    +       * How long to penalize the creation budget for a failed session creation
    +       * attempt.
    +       * 
    + * + * .google.protobuf.Duration new_session_creation_penalty = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetNewSessionCreationPenaltyFieldBuilder() { + if (newSessionCreationPenaltyBuilder_ == null) { + newSessionCreationPenaltyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getNewSessionCreationPenalty(), getParentForChildren(), isClean()); + newSessionCreationPenalty_ = null; + } + return newSessionCreationPenaltyBuilder_; + } + + private int consecutiveSessionFailureThreshold_; + + /** + * + * + *
    +       * A threshold for cancelling all pending vRPCs based on how many
    +       * consecutive session establishment errors have been observed. The client
    +       * will eagerly cancel queued vRPCs after this threshold is met to avoid
    +       * them waiting their entire deadlines before terminating (while waiting for
    +       * any session to establish to actually send the vRPC).
    +       * 
    + * + * int32 consecutive_session_failure_threshold = 8; + * + * @return The consecutiveSessionFailureThreshold. + */ + @java.lang.Override + public int getConsecutiveSessionFailureThreshold() { + return consecutiveSessionFailureThreshold_; + } + + /** + * + * + *
    +       * A threshold for cancelling all pending vRPCs based on how many
    +       * consecutive session establishment errors have been observed. The client
    +       * will eagerly cancel queued vRPCs after this threshold is met to avoid
    +       * them waiting their entire deadlines before terminating (while waiting for
    +       * any session to establish to actually send the vRPC).
    +       * 
    + * + * int32 consecutive_session_failure_threshold = 8; + * + * @param value The consecutiveSessionFailureThreshold to set. + * @return This builder for chaining. + */ + public Builder setConsecutiveSessionFailureThreshold(int value) { + + consecutiveSessionFailureThreshold_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
    +       * A threshold for cancelling all pending vRPCs based on how many
    +       * consecutive session establishment errors have been observed. The client
    +       * will eagerly cancel queued vRPCs after this threshold is met to avoid
    +       * them waiting their entire deadlines before terminating (while waiting for
    +       * any session to establish to actually send the vRPC).
    +       * 
    + * + * int32 consecutive_session_failure_threshold = 8; + * + * @return This builder for chaining. + */ + public Builder clearConsecutiveSessionFailureThreshold() { + bitField0_ = (bitField0_ & ~0x00000040); + consecutiveSessionFailureThreshold_ = 0; + onChanged(); + return this; + } + + private com.google.bigtable.v2.LoadBalancingOptions loadBalancingOptions_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder> + loadBalancingOptionsBuilder_; + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return Whether the loadBalancingOptions field is set. + */ + public boolean hasLoadBalancingOptions() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + * + * @return The loadBalancingOptions. + */ + public com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions() { + if (loadBalancingOptionsBuilder_ == null) { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } else { + return loadBalancingOptionsBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public Builder setLoadBalancingOptions(com.google.bigtable.v2.LoadBalancingOptions value) { + if (loadBalancingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadBalancingOptions_ = value; + } else { + loadBalancingOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public Builder setLoadBalancingOptions( + com.google.bigtable.v2.LoadBalancingOptions.Builder builderForValue) { + if (loadBalancingOptionsBuilder_ == null) { + loadBalancingOptions_ = builderForValue.build(); + } else { + loadBalancingOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public Builder mergeLoadBalancingOptions(com.google.bigtable.v2.LoadBalancingOptions value) { + if (loadBalancingOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && loadBalancingOptions_ != null + && loadBalancingOptions_ + != com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance()) { + getLoadBalancingOptionsBuilder().mergeFrom(value); + } else { + loadBalancingOptions_ = value; + } + } else { + loadBalancingOptionsBuilder_.mergeFrom(value); + } + if (loadBalancingOptions_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public Builder clearLoadBalancingOptions() { + bitField0_ = (bitField0_ & ~0x00000080); + loadBalancingOptions_ = null; + if (loadBalancingOptionsBuilder_ != null) { + loadBalancingOptionsBuilder_.dispose(); + loadBalancingOptionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public com.google.bigtable.v2.LoadBalancingOptions.Builder getLoadBalancingOptionsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetLoadBalancingOptionsFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + public com.google.bigtable.v2.LoadBalancingOptionsOrBuilder + getLoadBalancingOptionsOrBuilder() { + if (loadBalancingOptionsBuilder_ != null) { + return loadBalancingOptionsBuilder_.getMessageOrBuilder(); + } else { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + } + + /** + * + * + *
    +       * How to balance vRPC load over connections to AFEs.
    +       * Set only if session_load > 0.
    +       * 
    + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder> + internalGetLoadBalancingOptionsFieldBuilder() { + if (loadBalancingOptionsBuilder_ == null) { + loadBalancingOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder>( + getLoadBalancingOptions(), getParentForChildren(), isClean()); + loadBalancingOptions_ = null; + } + return loadBalancingOptionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration) + private static final com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionPoolConfiguration 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.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SESSION_LOAD_FIELD_NUMBER = 1; + private float sessionLoad_ = 0F; + + /** + * + * + *
    +   * What share of requests should operate on a session, [0, 1]. The rest
    +   * should operate on the old-style API.
    +   * 
    + * + * float session_load = 1; + * + * @return The sessionLoad. + */ + @java.lang.Override + public float getSessionLoad() { + return sessionLoad_; + } + + public static final int LOAD_BALANCING_OPTIONS_FIELD_NUMBER = 2; + private com.google.bigtable.v2.LoadBalancingOptions loadBalancingOptions_; + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is deprecated. + * See google/bigtable/v2/session.proto;l=220 + * @return Whether the loadBalancingOptions field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasLoadBalancingOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is deprecated. + * See google/bigtable/v2/session.proto;l=220 + * @return The loadBalancingOptions. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions() { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.bigtable.v2.LoadBalancingOptionsOrBuilder getLoadBalancingOptionsOrBuilder() { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + + public static final int CHANNEL_CONFIGURATION_FIELD_NUMBER = 3; + private com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + channelConfiguration_; + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return Whether the channelConfiguration field is set. + */ + @java.lang.Override + public boolean hasChannelConfiguration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return The channelConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getChannelConfiguration() { + return channelConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance() + : channelConfiguration_; + } + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder + getChannelConfigurationOrBuilder() { + return channelConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance() + : channelConfiguration_; + } + + public static final int SESSION_POOL_CONFIGURATION_FIELD_NUMBER = 4; + private com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + sessionPoolConfiguration_; + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return Whether the sessionPoolConfiguration field is set. + */ + @java.lang.Override + public boolean hasSessionPoolConfiguration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return The sessionPoolConfiguration. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getSessionPoolConfiguration() { + return sessionPoolConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance() + : sessionPoolConfiguration_; + } + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder + getSessionPoolConfigurationOrBuilder() { + return sessionPoolConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance() + : sessionPoolConfiguration_; + } + + 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 (java.lang.Float.floatToRawIntBits(sessionLoad_) != 0) { + output.writeFloat(1, sessionLoad_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLoadBalancingOptions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getChannelConfiguration()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getSessionPoolConfiguration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(sessionLoad_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, sessionLoad_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLoadBalancingOptions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getChannelConfiguration()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getSessionPoolConfiguration()); + } + 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.bigtable.v2.SessionClientConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionClientConfiguration other = + (com.google.bigtable.v2.SessionClientConfiguration) obj; + + if (java.lang.Float.floatToIntBits(getSessionLoad()) + != java.lang.Float.floatToIntBits(other.getSessionLoad())) return false; + if (hasLoadBalancingOptions() != other.hasLoadBalancingOptions()) return false; + if (hasLoadBalancingOptions()) { + if (!getLoadBalancingOptions().equals(other.getLoadBalancingOptions())) return false; + } + if (hasChannelConfiguration() != other.hasChannelConfiguration()) return false; + if (hasChannelConfiguration()) { + if (!getChannelConfiguration().equals(other.getChannelConfiguration())) return false; + } + if (hasSessionPoolConfiguration() != other.hasSessionPoolConfiguration()) return false; + if (hasSessionPoolConfiguration()) { + if (!getSessionPoolConfiguration().equals(other.getSessionPoolConfiguration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SESSION_LOAD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSessionLoad()); + if (hasLoadBalancingOptions()) { + hash = (37 * hash) + LOAD_BALANCING_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getLoadBalancingOptions().hashCode(); + } + if (hasChannelConfiguration()) { + hash = (37 * hash) + CHANNEL_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getChannelConfiguration().hashCode(); + } + if (hasSessionPoolConfiguration()) { + hash = (37 * hash) + SESSION_POOL_CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getSessionPoolConfiguration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionClientConfiguration parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration 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.bigtable.v2.SessionClientConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionClientConfiguration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionClientConfiguration parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration 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.bigtable.v2.SessionClientConfiguration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration 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.bigtable.v2.SessionClientConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionClientConfiguration 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.bigtable.v2.SessionClientConfiguration 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; + } + + /** + * + * + *
    +   * Configuration for the Session API. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionClientConfiguration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionClientConfiguration) + com.google.bigtable.v2.SessionClientConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionClientConfiguration.class, + com.google.bigtable.v2.SessionClientConfiguration.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionClientConfiguration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLoadBalancingOptionsFieldBuilder(); + internalGetChannelConfigurationFieldBuilder(); + internalGetSessionPoolConfigurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sessionLoad_ = 0F; + loadBalancingOptions_ = null; + if (loadBalancingOptionsBuilder_ != null) { + loadBalancingOptionsBuilder_.dispose(); + loadBalancingOptionsBuilder_ = null; + } + channelConfiguration_ = null; + if (channelConfigurationBuilder_ != null) { + channelConfigurationBuilder_.dispose(); + channelConfigurationBuilder_ = null; + } + sessionPoolConfiguration_ = null; + if (sessionPoolConfigurationBuilder_ != null) { + sessionPoolConfigurationBuilder_.dispose(); + sessionPoolConfigurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration build() { + com.google.bigtable.v2.SessionClientConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionClientConfiguration buildPartial() { + com.google.bigtable.v2.SessionClientConfiguration result = + new com.google.bigtable.v2.SessionClientConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionClientConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sessionLoad_ = sessionLoad_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.loadBalancingOptions_ = + loadBalancingOptionsBuilder_ == null + ? loadBalancingOptions_ + : loadBalancingOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.channelConfiguration_ = + channelConfigurationBuilder_ == null + ? channelConfiguration_ + : channelConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sessionPoolConfiguration_ = + sessionPoolConfigurationBuilder_ == null + ? sessionPoolConfiguration_ + : sessionPoolConfigurationBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionClientConfiguration) { + return mergeFrom((com.google.bigtable.v2.SessionClientConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionClientConfiguration other) { + if (other == com.google.bigtable.v2.SessionClientConfiguration.getDefaultInstance()) + return this; + if (java.lang.Float.floatToRawIntBits(other.getSessionLoad()) != 0) { + setSessionLoad(other.getSessionLoad()); + } + if (other.hasLoadBalancingOptions()) { + mergeLoadBalancingOptions(other.getLoadBalancingOptions()); + } + if (other.hasChannelConfiguration()) { + mergeChannelConfiguration(other.getChannelConfiguration()); + } + if (other.hasSessionPoolConfiguration()) { + mergeSessionPoolConfiguration(other.getSessionPoolConfiguration()); + } + 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 13: + { + sessionLoad_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 18: + { + input.readMessage( + internalGetLoadBalancingOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetChannelConfigurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetSessionPoolConfigurationFieldBuilder().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 float sessionLoad_; + + /** + * + * + *
    +     * What share of requests should operate on a session, [0, 1]. The rest
    +     * should operate on the old-style API.
    +     * 
    + * + * float session_load = 1; + * + * @return The sessionLoad. + */ + @java.lang.Override + public float getSessionLoad() { + return sessionLoad_; + } + + /** + * + * + *
    +     * What share of requests should operate on a session, [0, 1]. The rest
    +     * should operate on the old-style API.
    +     * 
    + * + * float session_load = 1; + * + * @param value The sessionLoad to set. + * @return This builder for chaining. + */ + public Builder setSessionLoad(float value) { + + sessionLoad_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * What share of requests should operate on a session, [0, 1]. The rest
    +     * should operate on the old-style API.
    +     * 
    + * + * float session_load = 1; + * + * @return This builder for chaining. + */ + public Builder clearSessionLoad() { + bitField0_ = (bitField0_ & ~0x00000001); + sessionLoad_ = 0F; + onChanged(); + return this; + } + + private com.google.bigtable.v2.LoadBalancingOptions loadBalancingOptions_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder> + loadBalancingOptionsBuilder_; + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is + * deprecated. See google/bigtable/v2/session.proto;l=220 + * @return Whether the loadBalancingOptions field is set. + */ + @java.lang.Deprecated + public boolean hasLoadBalancingOptions() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is + * deprecated. See google/bigtable/v2/session.proto;l=220 + * @return The loadBalancingOptions. + */ + @java.lang.Deprecated + public com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions() { + if (loadBalancingOptionsBuilder_ == null) { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } else { + return loadBalancingOptionsBuilder_.getMessage(); + } + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setLoadBalancingOptions(com.google.bigtable.v2.LoadBalancingOptions value) { + if (loadBalancingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + loadBalancingOptions_ = value; + } else { + loadBalancingOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setLoadBalancingOptions( + com.google.bigtable.v2.LoadBalancingOptions.Builder builderForValue) { + if (loadBalancingOptionsBuilder_ == null) { + loadBalancingOptions_ = builderForValue.build(); + } else { + loadBalancingOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeLoadBalancingOptions(com.google.bigtable.v2.LoadBalancingOptions value) { + if (loadBalancingOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && loadBalancingOptions_ != null + && loadBalancingOptions_ + != com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance()) { + getLoadBalancingOptionsBuilder().mergeFrom(value); + } else { + loadBalancingOptions_ = value; + } + } else { + loadBalancingOptionsBuilder_.mergeFrom(value); + } + if (loadBalancingOptions_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearLoadBalancingOptions() { + bitField0_ = (bitField0_ & ~0x00000002); + loadBalancingOptions_ = null; + if (loadBalancingOptionsBuilder_ != null) { + loadBalancingOptionsBuilder_.dispose(); + loadBalancingOptionsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.bigtable.v2.LoadBalancingOptions.Builder getLoadBalancingOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLoadBalancingOptionsFieldBuilder().getBuilder(); + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.bigtable.v2.LoadBalancingOptionsOrBuilder getLoadBalancingOptionsOrBuilder() { + if (loadBalancingOptionsBuilder_ != null) { + return loadBalancingOptionsBuilder_.getMessageOrBuilder(); + } else { + return loadBalancingOptions_ == null + ? com.google.bigtable.v2.LoadBalancingOptions.getDefaultInstance() + : loadBalancingOptions_; + } + } + + /** + * + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder> + internalGetLoadBalancingOptionsFieldBuilder() { + if (loadBalancingOptionsBuilder_ == null) { + loadBalancingOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.LoadBalancingOptions, + com.google.bigtable.v2.LoadBalancingOptions.Builder, + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder>( + getLoadBalancingOptions(), getParentForChildren(), isClean()); + loadBalancingOptions_ = null; + } + return loadBalancingOptionsBuilder_; + } + + private com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + channelConfiguration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder> + channelConfigurationBuilder_; + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return Whether the channelConfiguration field is set. + */ + public boolean hasChannelConfiguration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return The channelConfiguration. + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getChannelConfiguration() { + if (channelConfigurationBuilder_ == null) { + return channelConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance() + : channelConfiguration_; + } else { + return channelConfigurationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public Builder setChannelConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration value) { + if (channelConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + channelConfiguration_ = value; + } else { + channelConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public Builder setChannelConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder + builderForValue) { + if (channelConfigurationBuilder_ == null) { + channelConfiguration_ = builderForValue.build(); + } else { + channelConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public Builder mergeChannelConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration value) { + if (channelConfigurationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && channelConfiguration_ != null + && channelConfiguration_ + != com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance()) { + getChannelConfigurationBuilder().mergeFrom(value); + } else { + channelConfiguration_ = value; + } + } else { + channelConfigurationBuilder_.mergeFrom(value); + } + if (channelConfiguration_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public Builder clearChannelConfiguration() { + bitField0_ = (bitField0_ & ~0x00000004); + channelConfiguration_ = null; + if (channelConfigurationBuilder_ != null) { + channelConfigurationBuilder_.dispose(); + channelConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder + getChannelConfigurationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetChannelConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder + getChannelConfigurationOrBuilder() { + if (channelConfigurationBuilder_ != null) { + return channelConfigurationBuilder_.getMessageOrBuilder(); + } else { + return channelConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + .getDefaultInstance() + : channelConfiguration_; + } + } + + /** + * + * + *
    +     * Configuration for the channel pool.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder> + internalGetChannelConfigurationFieldBuilder() { + if (channelConfigurationBuilder_ == null) { + channelConfigurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration + .ChannelPoolConfigurationOrBuilder>( + getChannelConfiguration(), getParentForChildren(), isClean()); + channelConfiguration_ = null; + } + return channelConfigurationBuilder_; + } + + private com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + sessionPoolConfiguration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder> + sessionPoolConfigurationBuilder_; + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return Whether the sessionPoolConfiguration field is set. + */ + public boolean hasSessionPoolConfiguration() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return The sessionPoolConfiguration. + */ + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getSessionPoolConfiguration() { + if (sessionPoolConfigurationBuilder_ == null) { + return sessionPoolConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance() + : sessionPoolConfiguration_; + } else { + return sessionPoolConfigurationBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public Builder setSessionPoolConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration value) { + if (sessionPoolConfigurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionPoolConfiguration_ = value; + } else { + sessionPoolConfigurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public Builder setSessionPoolConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder + builderForValue) { + if (sessionPoolConfigurationBuilder_ == null) { + sessionPoolConfiguration_ = builderForValue.build(); + } else { + sessionPoolConfigurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public Builder mergeSessionPoolConfiguration( + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration value) { + if (sessionPoolConfigurationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && sessionPoolConfiguration_ != null + && sessionPoolConfiguration_ + != com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance()) { + getSessionPoolConfigurationBuilder().mergeFrom(value); + } else { + sessionPoolConfiguration_ = value; + } + } else { + sessionPoolConfigurationBuilder_.mergeFrom(value); + } + if (sessionPoolConfiguration_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public Builder clearSessionPoolConfiguration() { + bitField0_ = (bitField0_ & ~0x00000008); + sessionPoolConfiguration_ = null; + if (sessionPoolConfigurationBuilder_ != null) { + sessionPoolConfigurationBuilder_.dispose(); + sessionPoolConfigurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder + getSessionPoolConfigurationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetSessionPoolConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + public com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder + getSessionPoolConfigurationOrBuilder() { + if (sessionPoolConfigurationBuilder_ != null) { + return sessionPoolConfigurationBuilder_.getMessageOrBuilder(); + } else { + return sessionPoolConfiguration_ == null + ? com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + .getDefaultInstance() + : sessionPoolConfiguration_; + } + } + + /** + * + * + *
    +     * Configuration for the session pools.
    +     * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder> + internalGetSessionPoolConfigurationFieldBuilder() { + if (sessionPoolConfigurationBuilder_ == null) { + sessionPoolConfigurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration, + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration.Builder, + com.google.bigtable.v2.SessionClientConfiguration + .SessionPoolConfigurationOrBuilder>( + getSessionPoolConfiguration(), getParentForChildren(), isClean()); + sessionPoolConfiguration_ = null; + } + return sessionPoolConfigurationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionClientConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionClientConfiguration) + private static final com.google.bigtable.v2.SessionClientConfiguration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionClientConfiguration(); + } + + public static com.google.bigtable.v2.SessionClientConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionClientConfiguration 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.bigtable.v2.SessionClientConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfigurationOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfigurationOrBuilder.java new file mode 100644 index 0000000000..aca5739fdf --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionClientConfigurationOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionClientConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionClientConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * What share of requests should operate on a session, [0, 1]. The rest
    +   * should operate on the old-style API.
    +   * 
    + * + * float session_load = 1; + * + * @return The sessionLoad. + */ + float getSessionLoad(); + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is deprecated. + * See google/bigtable/v2/session.proto;l=220 + * @return Whether the loadBalancingOptions field is set. + */ + @java.lang.Deprecated + boolean hasLoadBalancingOptions(); + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + * + * @deprecated google.bigtable.v2.SessionClientConfiguration.load_balancing_options is deprecated. + * See google/bigtable/v2/session.proto;l=220 + * @return The loadBalancingOptions. + */ + @java.lang.Deprecated + com.google.bigtable.v2.LoadBalancingOptions getLoadBalancingOptions(); + + /** + * .google.bigtable.v2.LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.bigtable.v2.LoadBalancingOptionsOrBuilder getLoadBalancingOptionsOrBuilder(); + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return Whether the channelConfiguration field is set. + */ + boolean hasChannelConfiguration(); + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + * + * @return The channelConfiguration. + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration + getChannelConfiguration(); + + /** + * + * + *
    +   * Configuration for the channel pool.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfiguration channel_configuration = 3; + * + */ + com.google.bigtable.v2.SessionClientConfiguration.ChannelPoolConfigurationOrBuilder + getChannelConfigurationOrBuilder(); + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return Whether the sessionPoolConfiguration field is set. + */ + boolean hasSessionPoolConfiguration(); + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + * + * @return The sessionPoolConfiguration. + */ + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration + getSessionPoolConfiguration(); + + /** + * + * + *
    +   * Configuration for the session pools.
    +   * 
    + * + * + * .google.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration session_pool_configuration = 4; + * + */ + com.google.bigtable.v2.SessionClientConfiguration.SessionPoolConfigurationOrBuilder + getSessionPoolConfigurationOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequest.java new file mode 100644 index 0000000000..5dffbcbfa9 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequest.java @@ -0,0 +1,810 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionMutateRowRequest} + */ +@com.google.protobuf.Generated +public final class SessionMutateRowRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionMutateRowRequest) + SessionMutateRowRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionMutateRowRequest"); + } + + // Use SessionMutateRowRequest.newBuilder() to construct. + private SessionMutateRowRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionMutateRowRequest() { + key_ = com.google.protobuf.ByteString.EMPTY; + mutations_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionMutateRowRequest.class, + com.google.bigtable.v2.SessionMutateRowRequest.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * bytes key = 1; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + public static final int MUTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List mutations_; + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + @java.lang.Override + public java.util.List getMutationsList() { + return mutations_; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + @java.lang.Override + public java.util.List + getMutationsOrBuilderList() { + return mutations_; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + @java.lang.Override + public int getMutationsCount() { + return mutations_.size(); + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + @java.lang.Override + public com.google.bigtable.v2.Mutation getMutations(int index) { + return mutations_.get(index); + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + @java.lang.Override + public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) { + return mutations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!key_.isEmpty()) { + output.writeBytes(1, key_); + } + for (int i = 0; i < mutations_.size(); i++) { + output.writeMessage(2, mutations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, key_); + } + for (int i = 0; i < mutations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, mutations_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.SessionMutateRowRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionMutateRowRequest other = + (com.google.bigtable.v2.SessionMutateRowRequest) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getMutationsList().equals(other.getMutationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getMutationsCount() > 0) { + hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getMutationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionMutateRowRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest 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.bigtable.v2.SessionMutateRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest 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.bigtable.v2.SessionMutateRowRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest 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.bigtable.v2.SessionMutateRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest 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.bigtable.v2.SessionMutateRowRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionMutateRowRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionMutateRowRequest) + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionMutateRowRequest.class, + com.google.bigtable.v2.SessionMutateRowRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionMutateRowRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = com.google.protobuf.ByteString.EMPTY; + if (mutationsBuilder_ == null) { + mutations_ = java.util.Collections.emptyList(); + } else { + mutations_ = null; + mutationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest build() { + com.google.bigtable.v2.SessionMutateRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest buildPartial() { + com.google.bigtable.v2.SessionMutateRowRequest result = + new com.google.bigtable.v2.SessionMutateRowRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.SessionMutateRowRequest result) { + if (mutationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + mutations_ = java.util.Collections.unmodifiableList(mutations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.mutations_ = mutations_; + } else { + result.mutations_ = mutationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.v2.SessionMutateRowRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionMutateRowRequest) { + return mergeFrom((com.google.bigtable.v2.SessionMutateRowRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionMutateRowRequest other) { + if (other == com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + setKey(other.getKey()); + } + if (mutationsBuilder_ == null) { + if (!other.mutations_.isEmpty()) { + if (mutations_.isEmpty()) { + mutations_ = other.mutations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMutationsIsMutable(); + mutations_.addAll(other.mutations_); + } + onChanged(); + } + } else { + if (!other.mutations_.isEmpty()) { + if (mutationsBuilder_.isEmpty()) { + mutationsBuilder_.dispose(); + mutationsBuilder_ = null; + mutations_ = other.mutations_; + bitField0_ = (bitField0_ & ~0x00000002); + mutationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMutationsFieldBuilder() + : null; + } else { + mutationsBuilder_.addAllMessages(other.mutations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.Mutation m = + input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry); + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(m); + } else { + mutationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * bytes key = 1; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + /** + * bytes key = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * bytes key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + + private java.util.List mutations_ = + java.util.Collections.emptyList(); + + private void ensureMutationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + mutations_ = new java.util.ArrayList(mutations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder> + mutationsBuilder_; + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public java.util.List getMutationsList() { + if (mutationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(mutations_); + } else { + return mutationsBuilder_.getMessageList(); + } + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public int getMutationsCount() { + if (mutationsBuilder_ == null) { + return mutations_.size(); + } else { + return mutationsBuilder_.getCount(); + } + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public com.google.bigtable.v2.Mutation getMutations(int index) { + if (mutationsBuilder_ == null) { + return mutations_.get(index); + } else { + return mutationsBuilder_.getMessage(index); + } + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder setMutations(int index, com.google.bigtable.v2.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.set(index, value); + onChanged(); + } else { + mutationsBuilder_.setMessage(index, value); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder setMutations( + int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.set(index, builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder addMutations(com.google.bigtable.v2.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.add(value); + onChanged(); + } else { + mutationsBuilder_.addMessage(value); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder addMutations(int index, com.google.bigtable.v2.Mutation value) { + if (mutationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMutationsIsMutable(); + mutations_.add(index, value); + onChanged(); + } else { + mutationsBuilder_.addMessage(index, value); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder addMutations(com.google.bigtable.v2.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder addMutations( + int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(index, builderForValue.build()); + onChanged(); + } else { + mutationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder addAllMutations( + java.lang.Iterable values) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mutations_); + onChanged(); + } else { + mutationsBuilder_.addAllMessages(values); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder clearMutations() { + if (mutationsBuilder_ == null) { + mutations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + mutationsBuilder_.clear(); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public Builder removeMutations(int index) { + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.remove(index); + onChanged(); + } else { + mutationsBuilder_.remove(index); + } + return this; + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public com.google.bigtable.v2.Mutation.Builder getMutationsBuilder(int index) { + return internalGetMutationsFieldBuilder().getBuilder(index); + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index) { + if (mutationsBuilder_ == null) { + return mutations_.get(index); + } else { + return mutationsBuilder_.getMessageOrBuilder(index); + } + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public java.util.List + getMutationsOrBuilderList() { + if (mutationsBuilder_ != null) { + return mutationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mutations_); + } + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder() { + return internalGetMutationsFieldBuilder() + .addBuilder(com.google.bigtable.v2.Mutation.getDefaultInstance()); + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public com.google.bigtable.v2.Mutation.Builder addMutationsBuilder(int index) { + return internalGetMutationsFieldBuilder() + .addBuilder(index, com.google.bigtable.v2.Mutation.getDefaultInstance()); + } + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + public java.util.List getMutationsBuilderList() { + return internalGetMutationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder> + internalGetMutationsFieldBuilder() { + if (mutationsBuilder_ == null) { + mutationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder>( + mutations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + mutations_ = null; + } + return mutationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionMutateRowRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionMutateRowRequest) + private static final com.google.bigtable.v2.SessionMutateRowRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionMutateRowRequest(); + } + + public static com.google.bigtable.v2.SessionMutateRowRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionMutateRowRequest 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.bigtable.v2.SessionMutateRowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequestOrBuilder.java new file mode 100644 index 0000000000..c7f81edb47 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionMutateRowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionMutateRowRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes key = 1; + * + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + java.util.List getMutationsList(); + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + com.google.bigtable.v2.Mutation getMutations(int index); + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + int getMutationsCount(); + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + java.util.List getMutationsOrBuilderList(); + + /** repeated .google.bigtable.v2.Mutation mutations = 2; */ + com.google.bigtable.v2.MutationOrBuilder getMutationsOrBuilder(int index); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponse.java new file mode 100644 index 0000000000..24953a9d98 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponse.java @@ -0,0 +1,396 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionMutateRowResponse} + */ +@com.google.protobuf.Generated +public final class SessionMutateRowResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionMutateRowResponse) + SessionMutateRowResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionMutateRowResponse"); + } + + // Use SessionMutateRowResponse.newBuilder() to construct. + private SessionMutateRowResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionMutateRowResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionMutateRowResponse.class, + com.google.bigtable.v2.SessionMutateRowResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.SessionMutateRowResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionMutateRowResponse other = + (com.google.bigtable.v2.SessionMutateRowResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionMutateRowResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse 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.bigtable.v2.SessionMutateRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse 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.bigtable.v2.SessionMutateRowResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse 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.bigtable.v2.SessionMutateRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse 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.bigtable.v2.SessionMutateRowResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionMutateRowResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionMutateRowResponse) + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionMutateRowResponse.class, + com.google.bigtable.v2.SessionMutateRowResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionMutateRowResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse build() { + com.google.bigtable.v2.SessionMutateRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse buildPartial() { + com.google.bigtable.v2.SessionMutateRowResponse result = + new com.google.bigtable.v2.SessionMutateRowResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionMutateRowResponse) { + return mergeFrom((com.google.bigtable.v2.SessionMutateRowResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionMutateRowResponse other) { + if (other == com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionMutateRowResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionMutateRowResponse) + private static final com.google.bigtable.v2.SessionMutateRowResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionMutateRowResponse(); + } + + public static com.google.bigtable.v2.SessionMutateRowResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionMutateRowResponse 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.bigtable.v2.SessionMutateRowResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponseOrBuilder.java new file mode 100644 index 0000000000..398282c8fa --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionMutateRowResponseOrBuilder.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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionMutateRowResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionMutateRowResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponse.java new file mode 100644 index 0000000000..885a9c69bd --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponse.java @@ -0,0 +1,750 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionParametersResponse} + */ +@com.google.protobuf.Generated +public final class SessionParametersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionParametersResponse) + SessionParametersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionParametersResponse"); + } + + // Use SessionParametersResponse.newBuilder() to construct. + private SessionParametersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionParametersResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionParametersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionParametersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionParametersResponse.class, + com.google.bigtable.v2.SessionParametersResponse.Builder.class); + } + + private int bitField0_; + public static final int KEEP_ALIVE_FIELD_NUMBER = 1; + private com.google.protobuf.Duration keepAlive_; + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return Whether the keepAlive field is set. + */ + @java.lang.Override + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return The keepAlive. + */ + @java.lang.Override + public com.google.protobuf.Duration getKeepAlive() { + return keepAlive_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepAlive_; + } + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getKeepAliveOrBuilder() { + return keepAlive_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepAlive_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getKeepAlive()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKeepAlive()); + } + 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.bigtable.v2.SessionParametersResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionParametersResponse other = + (com.google.bigtable.v2.SessionParametersResponse) obj; + + if (hasKeepAlive() != other.hasKeepAlive()) return false; + if (hasKeepAlive()) { + if (!getKeepAlive().equals(other.getKeepAlive())) 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 (hasKeepAlive()) { + hash = (37 * hash) + KEEP_ALIVE_FIELD_NUMBER; + hash = (53 * hash) + getKeepAlive().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionParametersResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionParametersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionParametersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionParametersResponse 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.bigtable.v2.SessionParametersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionParametersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionParametersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionParametersResponse 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.bigtable.v2.SessionParametersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionParametersResponse 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.bigtable.v2.SessionParametersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionParametersResponse 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.bigtable.v2.SessionParametersResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionParametersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionParametersResponse) + com.google.bigtable.v2.SessionParametersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionParametersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionParametersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionParametersResponse.class, + com.google.bigtable.v2.SessionParametersResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionParametersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeepAliveFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keepAlive_ = null; + if (keepAliveBuilder_ != null) { + keepAliveBuilder_.dispose(); + keepAliveBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionParametersResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponse build() { + com.google.bigtable.v2.SessionParametersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponse buildPartial() { + com.google.bigtable.v2.SessionParametersResponse result = + new com.google.bigtable.v2.SessionParametersResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionParametersResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keepAlive_ = keepAliveBuilder_ == null ? keepAlive_ : keepAliveBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionParametersResponse) { + return mergeFrom((com.google.bigtable.v2.SessionParametersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionParametersResponse other) { + if (other == com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance()) + return this; + if (other.hasKeepAlive()) { + mergeKeepAlive(other.getKeepAlive()); + } + 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( + internalGetKeepAliveFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration keepAlive_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + keepAliveBuilder_; + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return Whether the keepAlive field is set. + */ + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return The keepAlive. + */ + public com.google.protobuf.Duration getKeepAlive() { + if (keepAliveBuilder_ == null) { + return keepAlive_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepAlive_; + } else { + return keepAliveBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public Builder setKeepAlive(com.google.protobuf.Duration value) { + if (keepAliveBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keepAlive_ = value; + } else { + keepAliveBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public Builder setKeepAlive(com.google.protobuf.Duration.Builder builderForValue) { + if (keepAliveBuilder_ == null) { + keepAlive_ = builderForValue.build(); + } else { + keepAliveBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public Builder mergeKeepAlive(com.google.protobuf.Duration value) { + if (keepAliveBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && keepAlive_ != null + && keepAlive_ != com.google.protobuf.Duration.getDefaultInstance()) { + getKeepAliveBuilder().mergeFrom(value); + } else { + keepAlive_ = value; + } + } else { + keepAliveBuilder_.mergeFrom(value); + } + if (keepAlive_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public Builder clearKeepAlive() { + bitField0_ = (bitField0_ & ~0x00000001); + keepAlive_ = null; + if (keepAliveBuilder_ != null) { + keepAliveBuilder_.dispose(); + keepAliveBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public com.google.protobuf.Duration.Builder getKeepAliveBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetKeepAliveFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + public com.google.protobuf.DurationOrBuilder getKeepAliveOrBuilder() { + if (keepAliveBuilder_ != null) { + return keepAliveBuilder_.getMessageOrBuilder(); + } else { + return keepAlive_ == null ? com.google.protobuf.Duration.getDefaultInstance() : keepAlive_; + } + } + + /** + * + * + *
    +     * Maximum time between messages that the AFE will send to the client. The
    +     * client may use this information to determine its control-flow in relation
    +     * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +     * and positive.
    +     *
    +     * See also Heartbeats.
    +     * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetKeepAliveFieldBuilder() { + if (keepAliveBuilder_ == null) { + keepAliveBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getKeepAlive(), getParentForChildren(), isClean()); + keepAlive_ = null; + } + return keepAliveBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionParametersResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionParametersResponse) + private static final com.google.bigtable.v2.SessionParametersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionParametersResponse(); + } + + public static com.google.bigtable.v2.SessionParametersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionParametersResponse 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.bigtable.v2.SessionParametersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponseOrBuilder.java new file mode 100644 index 0000000000..9dae3f5fd2 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionParametersResponseOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionParametersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionParametersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return Whether the keepAlive field is set. + */ + boolean hasKeepAlive(); + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + * + * @return The keepAlive. + */ + com.google.protobuf.Duration getKeepAlive(); + + /** + * + * + *
    +   * Maximum time between messages that the AFE will send to the client. The
    +   * client may use this information to determine its control-flow in relation
    +   * to pruning black-holed or otherwise non-responsive sessions. Must be set
    +   * and positive.
    +   *
    +   * See also Heartbeats.
    +   * 
    + * + * .google.protobuf.Duration keep_alive = 1; + */ + com.google.protobuf.DurationOrBuilder getKeepAliveOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionProto.java new file mode 100644 index 0000000000..c059d690e5 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionProto.java @@ -0,0 +1,997 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public final class SessionProto extends com.google.protobuf.GeneratedFile { + private SessionProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.google.bigtable.v2.SessionProto.openSessionType); + registry.add(com.google.bigtable.v2.SessionProto.vrpcSessionType); + registry.add(com.google.bigtable.v2.SessionProto.rpcSessionType); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static final int OPEN_SESSION_TYPE_FIELD_NUMBER = 138898474; + + /** + * + * + *
    +   * Only OpenSessionRequest.payload's with a type matching rpc_session_type are
    +   * accepted by the server, and only OpenSessionResponse.payload's with a type
    +   * matching rpc_session_type are accepted by the client.
    +   * 
    + * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, com.google.bigtable.v2.SessionType> + openSessionType = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.bigtable.v2.SessionType.class, null); + + public static final int VRPC_SESSION_TYPE_FIELD_NUMBER = 138899157; + + /** + * + * + *
    +   * Only VirtualRpcRequest.payload's with a type matching rpc_session_type are
    +   * accepted by the server, and only VirtualRpcResponse.payload's with a type
    +   * matching rpc_session_type are accepted by the client.
    +   * 
    + * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.util.List> + vrpcSessionType = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.bigtable.v2.SessionType.class, null); + + public static final int RPC_SESSION_TYPE_FIELD_NUMBER = 137964804; + + /** + * + * + *
    +   * All session service methods must set this option to indicate which
    +   * messages are permissible within the generic envelope.
    +   * 
    + * + * extend .google.protobuf.MethodOptions { ... } + */ + public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MethodOptions, com.google.bigtable.v2.SessionType> + rpcSessionType = + com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension( + com.google.bigtable.v2.SessionType.class, null); + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_GetClientConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_LoadBalancingOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_LoadBalancingOptions_Random_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_TelemetryConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ClientConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_ClientConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenSessionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenSessionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_BackendIdentifier_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_BackendIdentifier_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenSessionResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenSessionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_CloseSessionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_CloseSessionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenTableRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenTableResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenTableResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenMaterializedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_OpenMaterializedViewResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_VirtualRpcRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ClusterInformation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_ClusterInformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionRequestStats_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionRequestStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_VirtualRpcResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ErrorResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_ErrorResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_TableRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_TableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_TableResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_TableResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_AuthorizedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_AuthorizedViewResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_MaterializedViewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_MaterializedViewResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionReadRowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionReadRowResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionMutateRowRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionMutateRowResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionParametersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionParametersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_HeartbeatResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_HeartbeatResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_GoAwayResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_GoAwayResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionRefreshConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_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/bigtable/v2/session.proto\022\022goog" + + "le.bigtable.v2\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032\035goog" + + "le/bigtable/v2/data.proto\032&google/bigtab" + + "le/v2/feature_flags.proto\032&google/bigtable/v2/request_stats.proto\032 google/protob" + + "uf/descriptor.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\032\036google/rpc/error_details.proto\032\027google/rpc/status.proto\"\202\001\n" + + "\035GetClientConfigurationRequest\022D\n\r" + + "instance_name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%bigtableadmin.googleapis.com/Instance\022\033\n" + + "\016app_profile_id\030\002 \001(\tB\003\340A\001\"\356\002\n" + + "\024LoadBalancingOptions\022Q\n" + + "\017least_in_flight\030\001" + + " \001(\01326.google.bigtable.v2.LoadBalancingOptions.LeastInFlightH\000\022F\n" + + "\tpeak_ewma\030\002 \001(" + + "\01321.google.bigtable.v2.LoadBalancingOptions.PeakEwmaH\000\022A\n" + + "\006random\030\004 \001(\0132/.google." + + "bigtable.v2.LoadBalancingOptions.RandomH\000\032+\n\r" + + "LeastInFlight\022\032\n" + + "\022random_subset_size\030\001 \001(\003\032&\n" + + "\010PeakEwma\022\032\n" + + "\022random_subset_size\030\001 \001(\003\032\010\n" + + "\006RandomB\031\n" + + "\027load_balancing_strategy\"\274\n\n" + + "\032SessionClientConfiguration\022\024\n" + + "\014session_load\030\001 \001(\002\022L\n" + + "\026load_balancing_options\030\002" + + " \001(\0132(.google.bigtable.v2.LoadBalancingOptionsB\002\030\001\022f\n" + + "\025channel_configuration\030\003 \001(\0132G.google.bigtable.v2.SessionClient" + + "Configuration.ChannelPoolConfiguration\022k\n" + + "\032session_pool_configuration\030\004 \001(\0132G.goo" + + "gle.bigtable.v2.SessionClientConfiguration.SessionPoolConfiguration\032\376\004\n" + + "\030ChannelPoolConfiguration\022\030\n" + + "\020min_server_count\030\001 \001(\005\022\030\n" + + "\020max_server_count\030\002 \001(\005\022 \n" + + "\030per_server_session_count\030\003 \001(\005\022\207\001\n" + + "\033direct_access_with_fallback\030\004 \001(\0132`.google.bigtable.v" + + "2.SessionClientConfiguration.ChannelPool" + + "Configuration.DirectAccessWithFallbackH\000\022v\n" + + "\022direct_access_only\030\005 \001(\0132X.google.bi" + + "gtable.v2.SessionClientConfiguration.Cha" + + "nnelPoolConfiguration.DirectAccessOnlyH\000\022p\n" + + "\017cloud_path_only\030\006 \001(\0132U.google.bigta" + + "ble.v2.SessionClientConfiguration.ChannelPoolConfiguration.CloudPathOnlyH\000\032k\n" + + "\030DirectAccessWithFallback\022\034\n" + + "\024error_rate_threshold\030\001 \001(\002\0221\n" + + "\016check_interval\030\002 \001(\0132\031.google.protobuf.Duration\032\022\n" + + "\020DirectAccessOnly\032\017\n\r" + + "CloudPathOnlyB\006\n" + + "\004mode\032\343\002\n" + + "\030SessionPoolConfiguration\022\020\n" + + "\010headroom\030\001 \001(\002\022\031\n" + + "\021min_session_count\030\002 \001(\005\022\031\n" + + "\021max_session_count\030\003 \001(\005\022 \n" + + "\030new_session_queue_length\030\004 \001(\005\022#\n" + + "\033new_session_creation_budget\030\005 \001(\005\022?\n" + + "\034new_session_creation_penalty\030\006" + + " \001(\0132\031.google.protobuf.Duration\022-\n" + + "%consecutive_session_failure_threshold\030\010 \001(\005\022H\n" + + "\026load_balancing_options\030\t" + + " \001(\0132(.google.bigtable.v2.LoadBalancingOptions\"\255\001\n" + + "\026TelemetryConfiguration\022I\n" + + "\017debug_tag_level\030\001 \001(\01620" + + ".google.bigtable.v2.TelemetryConfiguration.Level\"H\n" + + "\005Level\022\025\n" + + "\021LEVEL_UNSPECIFIED\020\000\022\t\n" + + "\005DEBUG\020\001\022\010\n" + + "\004INFO\020\002\022\010\n" + + "\004WARN\020\003\022\t\n" + + "\005ERROR\020\004\"\217\004\n" + + "\023ClientConfiguration\022M\n" + + "\025session_configuration\030\002" + + " \001(\0132..google.bigtable.v2.SessionClientConfiguration\022\026\n" + + "\014stop_polling\030\003 \001(\010H\000\0229\n" + + "\020polling_interval\030\004" + + " \001(\0132\031.google.protobuf.DurationB\002\030\001H\000\022]\n" + + "\025polling_configuration\030\005 \001(\0132<.google.bigtable.v2" + + ".ClientConfiguration.PollingConfigurationH\000\022K\n" + + "\027telemetry_configuration\030\006 \001(\0132*.g" + + "oogle.bigtable.v2.TelemetryConfiguration\032\236\001\n" + + "\024PollingConfiguration\0223\n" + + "\020polling_interval\030\001 \001(\0132\031.google.protobuf.Duration\0224\n" + + "\021validity_duration\030\002 \001(\0132\031.google.protobuf.Duration\022\033\n" + + "\023max_rpc_retry_count\030\006 \001(\005B\t\n" + + "\007polling\"\333\001\n" + + "\016SessionRequest\022>\n" + + "\014open_session\030\001" + + " \001(\0132&.google.bigtable.v2.OpenSessionRequestH\000\022@\n\r" + + "close_session\030\002 \001(\0132\'.google.bigtable.v2.CloseSessionRequestH\000\022<\n" + + "\013virtual_rpc\030\003 \001(\0132%.google.bigtable.v2.VirtualRpcRequestH\000B\t\n" + + "\007payload\"\334\003\n" + + "\017SessionResponse\022?\n" + + "\014open_session\030\001 \001(\0132\'.g" + + "oogle.bigtable.v2.OpenSessionResponseH\000\022=\n" + + "\013virtual_rpc\030\002 \001(\0132&.google.bigtable.v2.VirtualRpcResponseH\000\0222\n" + + "\005error\030\003 \001(\0132!.google.bigtable.v2.ErrorResponseH\000\022K\n" + + "\022session_parameters\030\004" + + " \001(\0132-.google.bigtable.v2.SessionParametersResponseH\000\022:\n" + + "\theartbeat\030\005 \001(\0132%.google.bigtable.v2.HeartbeatResponseH\000\0225\n" + + "\007go_away\030\006 \001(\0132\".google.bigtable.v2.GoAwayResponseH\000\022J\n" + + "\026session_refresh_config\030\007" + + " \001(\0132(.google.bigtable.v2.SessionRefreshConfigH\000B\t\n" + + "\007payload\"\270\001\n" + + "\022OpenSessionRequest\022\030\n" + + "\020protocol_version\030\001 \001(\003\022/\n" + + "\005flags\030\002 \001(\0132 .google.bigtable.v2.FeatureFlags\022.\n" + + "&consecutive_failed_connection_attempts\030\003 \001(\003\022\026\n" + + "\016routing_cookie\030\004 \001(\014\022\017\n" + + "\007payload\030\005 \001(\014\"s\n" + + "\021BackendIdentifier\022\032\n" + + "\022google_frontend_id\030\001 \001(\003\022\037\n" + + "\027application_frontend_id\030\002 \001(\003\022!\n" + + "\031application_frontend_zone\030\003 \001(\t\"^\n" + + "\023OpenSessionResponse\0226\n" + + "\007backend\030\002 \001(\0132%.google.bigtable.v2.BackendIdentifier\022\017\n" + + "\007payload\030\001 \001(\014\"\333\002\n" + + "\023CloseSessionRequest\022J\n" + + "\006reason\030\001 \001(\0162:.goog" + + "le.bigtable.v2.CloseSessionRequest.CloseSessionReason\022\023\n" + + "\013description\030\002 \001(\t\"\342\001\n" + + "\022CloseSessionReason\022\036\n" + + "\032CLOSE_SESSION_REASON_UNSET\020\000\022\037\n" + + "\033CLOSE_SESSION_REASON_GOAWAY\020\001\022\036\n" + + "\032CLOSE_SESSION_REASON_ERROR\020\002\022\035\n" + + "\031CLOSE_SESSION_REASON_USER\020\003\022!\n" + + "\035CLOSE_SESSION_REASON_DOWNSIZE\020\004\022)\n" + + "%CLOSE_SESSION_REASON_MISSED_HEARTBEAT\020\005\"\365\001\n" + + "\020OpenTableRequest\022\022\n\n" + + "table_name\030\001 \001(\t\022\026\n" + + "\016app_profile_id\030\002 \001(\t\022C\n\n" + + "permission\030\003 \001(\0162/.google.bigtable.v2.OpenTableRequest.Permission\"h\n" + + "\n" + + "Permission\022\024\n" + + "\020PERMISSION_UNSET\020\000\022\023\n" + + "\017PERMISSION_READ\020\001\022\024\n" + + "\020PERMISSION_WRITE\020\002\022\031\n" + + "\025PERMISSION_READ_WRITE\020\003:\006\320\302\355\221\004\001\"\033\n" + + "\021OpenTableResponse:\006\320\302\355\221\004\001\"\221\002\n" + + "\031OpenAuthorizedViewRequest\022\034\n" + + "\024authorized_view_name\030\001 \001(\t\022\026\n" + + "\016app_profile_id\030\002 \001(\t\022L\n\n" + + "permission\030\003" + + " \001(\01628.google.bigtable.v2.OpenAuthorizedViewRequest.Permission\"h\n\n" + + "Permission\022\024\n" + + "\020PERMISSION_UNSET\020\000\022\023\n" + + "\017PERMISSION_READ\020\001\022\024\n" + + "\020PERMISSION_WRITE\020\002\022\031\n" + + "\025PERMISSION_READ_WRITE\020\003:\006\320\302\355\221\004\002\"$\n" + + "\032OpenAuthorizedViewResponse:\006\320\302\355\221\004\002\"\346\001\n" + + "\033OpenMaterializedViewRequest\022\036\n" + + "\026materialized_view_name\030\001 \001(\t\022\026\n" + + "\016app_profile_id\030\002 \001(\t\022N\n\n" + + "permission\030\003 \001" + + "(\0162:.google.bigtable.v2.OpenMaterializedViewRequest.Permission\"7\n\n" + + "Permission\022\024\n" + + "\020PERMISSION_UNSET\020\000\022\023\n" + + "\017PERMISSION_READ\020\001:\006\320\302\355\221\004\003\"&\n" + + "\034OpenMaterializedViewResponse:\006\320\302\355\221\004\003\"\217\002\n" + + "\021VirtualRpcRequest\022\016\n" + + "\006rpc_id\030\001 \001(\003\022+\n" + + "\010deadline\030\002 \001(\0132\031.google.protobuf.Duration\022@\n" + + "\010metadata\030\003" + + " \001(\0132..google.bigtable.v2.VirtualRpcRequest.Metadata\022\017\n" + + "\007payload\030\004 \001(\014\032j\n" + + "\010Metadata\022\026\n" + + "\016attempt_number\030\001 \001(\003\0221\n\r" + + "attempt_start\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023\n" + + "\013traceparent\030\003 \001(\t\"9\n" + + "\022ClusterInformation\022\022\n\n" + + "cluster_id\030\001 \001(\t\022\017\n" + + "\007zone_id\030\002 \001(\t\"I\n" + + "\023SessionRequestStats\0222\n" + + "\017backend_latency\030\001 \001(\0132\031.google.protobuf.Duration\"\253\001\n" + + "\022VirtualRpcResponse\022\016\n" + + "\006rpc_id\030\001 \001(\003\022<\n" + + "\014cluster_info\030\002 \001(\0132&.google.bigtable.v2.ClusterInformation\0226\n" + + "\005stats\030\004 \001(\0132\'.google.bigtable.v2.SessionRequestStats\022\017\n" + + "\007payload\030\003 \001(\014\"\254\001\n\r" + + "ErrorResponse\022\016\n" + + "\006rpc_id\030\001 \001(\003\022<\n" + + "\014cluster_info\030\002 \001(\0132&.google.bigtable.v2.ClusterInformation\022\"\n" + + "\006status\030\003 \001(\0132\022.google.rpc.Status\022)\n\n" + + "retry_info\030\004 \001(\0132\025.google.rpc.RetryInfo\"\244\001\n" + + "\014TableRequest\022=\n" + + "\010read_row\030\001 \001(\0132" + + ").google.bigtable.v2.SessionReadRowRequestH\000\022A\n\n" + + "mutate_row\030\002 \001(\0132+.google.bigtab" + + "le.v2.SessionMutateRowRequestH\000:\007\252\355\355\221\004\001\001B\t\n" + + "\007payload\"\247\001\n\r" + + "TableResponse\022>\n" + + "\010read_row\030\001" + + " \001(\0132*.google.bigtable.v2.SessionReadRowResponseH\000\022B\n\n" + + "mutate_row\030\002 \001(\0132,.goog" + + "le.bigtable.v2.SessionMutateRowResponseH\000:\007\252\355\355\221\004\001\001B\t\n" + + "\007payload\"\255\001\n" + + "\025AuthorizedViewRequest\022=\n" + + "\010read_row\030\001" + + " \001(\0132).google.bigtable.v2.SessionReadRowRequestH\000\022A\n\n" + + "mutate_row\030\002" + + " \001(\0132+.google.bigtable.v2.SessionMutateRowRequestH\000:\007\252\355\355\221\004\001\002B" + + "\t\n" + + "\007payload\"\260\001\n" + + "\026AuthorizedViewResponse\022>\n" + + "\010read_row\030\001 \001" + + "(\0132*.google.bigtable.v2.SessionReadRowResponseH\000\022B\n\n" + + "mutate_row\030\002 \001(\0132,.google.bi" + + "gtable.v2.SessionMutateRowResponseH\000:\007\252\355\355\221\004\001\002B\t\n" + + "\007payload\"l\n" + + "\027MaterializedViewRequest\022=\n" + + "\010read_row\030\001" + + " \001(\0132).google.bigtable.v2.SessionReadRowRequestH\000:\007\252\355\355\221\004\001\003B" + + "\t\n" + + "\007payload\"n\n" + + "\030MaterializedViewResponse\022>\n" + + "\010read_row\030\001" + + " \001(\0132*.google.bigtable.v2.SessionReadRowResponseH\000:\007\252\355\355\221\004\001\003B" + + "\t\n" + + "\007payload\"S\n" + + "\025SessionReadRowRequest\022\013\n" + + "\003key\030\001 \001(\014\022-\n" + + "\006filter\030\002 \001(\0132\035.google.bigtable.v2.RowFilter\"o\n" + + "\026SessionReadRowResponse\022$\n" + + "\003row\030\001 \001(\0132\027.google.bigtable.v2.Row\022/\n" + + "\005stats\030\002 \001(\0132 .google.bigtable.v2.RequestStats\"W\n" + + "\027SessionMutateRowRequest\022\013\n" + + "\003key\030\001 \001(\014\022/\n" + + "\tmutations\030\002 \003(\0132\034.google.bigtable.v2.Mutation\"\032\n" + + "\030SessionMutateRowResponse\"J\n" + + "\031SessionParametersResponse\022-\n\n" + + "keep_alive\030\001 \001(\0132\031.google.protobuf.Duration\"\023\n" + + "\021HeartbeatResponse\"S\n" + + "\016GoAwayResponse\022\016\n" + + "\006reason\030\001 \001(\t\022\023\n" + + "\013description\030\002 \001(\t\022\034\n" + + "\024last_rpc_id_admitted\030\003 \001(\003\"\332\001\n" + + "\024SessionRefreshConfig\022F\n" + + "\026optimized_open_request\030\001" + + " \001(\0132&.google.bigtable.v2.OpenSessionRequest\022H\n" + + "\010metadata\030\002" + + " \003(\01321.google.bigtable.v2.SessionRefreshConfig.MetadataB\003\340A\003\0320\n" + + "\010Metadata\022\020\n" + + "\003key\030\001 \001(\tB\003\340A\003\022\022\n" + + "\005value\030\002 \001(\014B\003\340A\003*\243\001\n" + + "\013SessionType\022\026\n" + + "\022SESSION_TYPE_UNSET\020\000\022\026\n" + + "\022SESSION_TYPE_TABLE\020\001\022 \n" + + "\034SESSION_TYPE_AUTHORIZED_VIEW\020\002\022\"\n" + + "\036SESSION_TYPE_MATERIALIZED_VIEW\020\003\022\036\n" + + "\021SESSION_TYPE_TEST\020\377\377\377\377\377\377\377\377\377\001:^\n" + + "\021open_session_type\022\037.google.protobuf.MessageOptions\030\252\330\235B" + + " \001(\0162\037.google.bigtable.v2.SessionType:^\n" + + "\021vrpc_session_type\022\037.google.protobuf.MessageOptions\030\325\335\235B" + + " \003(\0162\037.google.bigtable.v2.SessionType:\\\n" + + "\020rpc_session_type\022\036.google.protobuf.MethodOptions\030\204\332\344A" + + " \001(\0162\037.google.bigtable.v2.SessionTypeB\266\001\n" + + "\026com.google.bigtable.v2B\014SessionProtoP\001Z8cloud.google.com/go/bigtabl" + + "e/apiv2/bigtablepb;bigtablepb\252\002\030Google.C" + + "loud.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable" + + "\\V2\352\002\033Google::Cloud::Bigtable::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.bigtable.v2.DataProto.getDescriptor(), + com.google.bigtable.v2.FeatureFlagsProto.getDescriptor(), + com.google.bigtable.v2.RequestStatsProto.getDescriptor(), + com.google.protobuf.DescriptorProtos.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.ErrorDetailsProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_bigtable_v2_GetClientConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_GetClientConfigurationRequest_descriptor, + new java.lang.String[] { + "InstanceName", "AppProfileId", + }); + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_bigtable_v2_LoadBalancingOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor, + new java.lang.String[] { + "LeastInFlight", "PeakEwma", "Random", "LoadBalancingStrategy", + }); + internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor = + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_LoadBalancingOptions_LeastInFlight_descriptor, + new java.lang.String[] { + "RandomSubsetSize", + }); + internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor = + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor.getNestedType(1); + internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_LoadBalancingOptions_PeakEwma_descriptor, + new java.lang.String[] { + "RandomSubsetSize", + }); + internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor = + internal_static_google_bigtable_v2_LoadBalancingOptions_descriptor.getNestedType(2); + internal_static_google_bigtable_v2_LoadBalancingOptions_Random_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_LoadBalancingOptions_Random_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_bigtable_v2_SessionClientConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor, + new java.lang.String[] { + "SessionLoad", + "LoadBalancingOptions", + "ChannelConfiguration", + "SessionPoolConfiguration", + }); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor = + internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor, + new java.lang.String[] { + "MinServerCount", + "MaxServerCount", + "PerServerSessionCount", + "DirectAccessWithFallback", + "DirectAccessOnly", + "CloudPathOnly", + "Mode", + }); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor = + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor + .getNestedType(0); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessWithFallback_descriptor, + new java.lang.String[] { + "ErrorRateThreshold", "CheckInterval", + }); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor = + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor + .getNestedType(1); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_DirectAccessOnly_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor = + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_descriptor + .getNestedType(2); + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_ChannelPoolConfiguration_CloudPathOnly_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor = + internal_static_google_bigtable_v2_SessionClientConfiguration_descriptor.getNestedType(1); + internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionClientConfiguration_SessionPoolConfiguration_descriptor, + new java.lang.String[] { + "Headroom", + "MinSessionCount", + "MaxSessionCount", + "NewSessionQueueLength", + "NewSessionCreationBudget", + "NewSessionCreationPenalty", + "ConsecutiveSessionFailureThreshold", + "LoadBalancingOptions", + }); + internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_bigtable_v2_TelemetryConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor, + new java.lang.String[] { + "DebugTagLevel", + }); + internal_static_google_bigtable_v2_ClientConfiguration_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_bigtable_v2_ClientConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_ClientConfiguration_descriptor, + new java.lang.String[] { + "SessionConfiguration", + "StopPolling", + "PollingInterval", + "PollingConfiguration", + "TelemetryConfiguration", + "Polling", + }); + internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor = + internal_static_google_bigtable_v2_ClientConfiguration_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_ClientConfiguration_PollingConfiguration_descriptor, + new java.lang.String[] { + "PollingInterval", "ValidityDuration", "MaxRpcRetryCount", + }); + internal_static_google_bigtable_v2_SessionRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_bigtable_v2_SessionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionRequest_descriptor, + new java.lang.String[] { + "OpenSession", "CloseSession", "VirtualRpc", "Payload", + }); + internal_static_google_bigtable_v2_SessionResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_bigtable_v2_SessionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionResponse_descriptor, + new java.lang.String[] { + "OpenSession", + "VirtualRpc", + "Error", + "SessionParameters", + "Heartbeat", + "GoAway", + "SessionRefreshConfig", + "Payload", + }); + internal_static_google_bigtable_v2_OpenSessionRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_bigtable_v2_OpenSessionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenSessionRequest_descriptor, + new java.lang.String[] { + "ProtocolVersion", + "Flags", + "ConsecutiveFailedConnectionAttempts", + "RoutingCookie", + "Payload", + }); + internal_static_google_bigtable_v2_BackendIdentifier_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_bigtable_v2_BackendIdentifier_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_BackendIdentifier_descriptor, + new java.lang.String[] { + "GoogleFrontendId", "ApplicationFrontendId", "ApplicationFrontendZone", + }); + internal_static_google_bigtable_v2_OpenSessionResponse_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_bigtable_v2_OpenSessionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenSessionResponse_descriptor, + new java.lang.String[] { + "Backend", "Payload", + }); + internal_static_google_bigtable_v2_CloseSessionRequest_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_bigtable_v2_CloseSessionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_CloseSessionRequest_descriptor, + new java.lang.String[] { + "Reason", "Description", + }); + internal_static_google_bigtable_v2_OpenTableRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_bigtable_v2_OpenTableRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenTableRequest_descriptor, + new java.lang.String[] { + "TableName", "AppProfileId", "Permission", + }); + internal_static_google_bigtable_v2_OpenTableResponse_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_bigtable_v2_OpenTableResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenTableResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenAuthorizedViewRequest_descriptor, + new java.lang.String[] { + "AuthorizedViewName", "AppProfileId", "Permission", + }); + internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenAuthorizedViewResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_bigtable_v2_OpenMaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenMaterializedViewRequest_descriptor, + new java.lang.String[] { + "MaterializedViewName", "AppProfileId", "Permission", + }); + internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_bigtable_v2_OpenMaterializedViewResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_OpenMaterializedViewResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_bigtable_v2_VirtualRpcRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor, + new java.lang.String[] { + "RpcId", "Deadline", "Metadata", "Payload", + }); + internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor = + internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor, + new java.lang.String[] { + "AttemptNumber", "AttemptStart", "Traceparent", + }); + internal_static_google_bigtable_v2_ClusterInformation_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_bigtable_v2_ClusterInformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_ClusterInformation_descriptor, + new java.lang.String[] { + "ClusterId", "ZoneId", + }); + internal_static_google_bigtable_v2_SessionRequestStats_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_bigtable_v2_SessionRequestStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionRequestStats_descriptor, + new java.lang.String[] { + "BackendLatency", + }); + internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_bigtable_v2_VirtualRpcResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor, + new java.lang.String[] { + "RpcId", "ClusterInfo", "Stats", "Payload", + }); + internal_static_google_bigtable_v2_ErrorResponse_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_bigtable_v2_ErrorResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_ErrorResponse_descriptor, + new java.lang.String[] { + "RpcId", "ClusterInfo", "Status", "RetryInfo", + }); + internal_static_google_bigtable_v2_TableRequest_descriptor = getDescriptor().getMessageType(22); + internal_static_google_bigtable_v2_TableRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_TableRequest_descriptor, + new java.lang.String[] { + "ReadRow", "MutateRow", "Payload", + }); + internal_static_google_bigtable_v2_TableResponse_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_bigtable_v2_TableResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_TableResponse_descriptor, + new java.lang.String[] { + "ReadRow", "MutateRow", "Payload", + }); + internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_bigtable_v2_AuthorizedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_AuthorizedViewRequest_descriptor, + new java.lang.String[] { + "ReadRow", "MutateRow", "Payload", + }); + internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_bigtable_v2_AuthorizedViewResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_AuthorizedViewResponse_descriptor, + new java.lang.String[] { + "ReadRow", "MutateRow", "Payload", + }); + internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_bigtable_v2_MaterializedViewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_MaterializedViewRequest_descriptor, + new java.lang.String[] { + "ReadRow", "Payload", + }); + internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_bigtable_v2_MaterializedViewResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_MaterializedViewResponse_descriptor, + new java.lang.String[] { + "ReadRow", "Payload", + }); + internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_bigtable_v2_SessionReadRowRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor, + new java.lang.String[] { + "Key", "Filter", + }); + internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_bigtable_v2_SessionReadRowResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor, + new java.lang.String[] { + "Row", "Stats", + }); + internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_bigtable_v2_SessionMutateRowRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionMutateRowRequest_descriptor, + new java.lang.String[] { + "Key", "Mutations", + }); + internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_bigtable_v2_SessionMutateRowResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionMutateRowResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_SessionParametersResponse_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_bigtable_v2_SessionParametersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionParametersResponse_descriptor, + new java.lang.String[] { + "KeepAlive", + }); + internal_static_google_bigtable_v2_HeartbeatResponse_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_bigtable_v2_HeartbeatResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_HeartbeatResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_GoAwayResponse_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_bigtable_v2_GoAwayResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_GoAwayResponse_descriptor, + new java.lang.String[] { + "Reason", "Description", "LastRpcIdAdmitted", + }); + internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor = + getDescriptor().getMessageType(35); + internal_static_google_bigtable_v2_SessionRefreshConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor, + new java.lang.String[] { + "OptimizedOpenRequest", "Metadata", + }); + internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor = + internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + openSessionType.internalInit(descriptor.getExtension(0)); + vrpcSessionType.internalInit(descriptor.getExtension(1)); + rpcSessionType.internalInit(descriptor.getExtension(2)); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.bigtable.v2.DataProto.getDescriptor(); + com.google.bigtable.v2.FeatureFlagsProto.getDescriptor(); + com.google.bigtable.v2.RequestStatsProto.getDescriptor(); + com.google.protobuf.DescriptorProtos.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.ErrorDetailsProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.bigtable.v2.SessionProto.openSessionType); + registry.add(com.google.bigtable.v2.SessionProto.vrpcSessionType); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequest.java new file mode 100644 index 0000000000..1d9d877fc8 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequest.java @@ -0,0 +1,677 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionReadRowRequest} + */ +@com.google.protobuf.Generated +public final class SessionReadRowRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionReadRowRequest) + SessionReadRowRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionReadRowRequest"); + } + + // Use SessionReadRowRequest.newBuilder() to construct. + private SessionReadRowRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionReadRowRequest() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionReadRowRequest.class, + com.google.bigtable.v2.SessionReadRowRequest.Builder.class); + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * bytes key = 1; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + public static final int FILTER_FIELD_NUMBER = 2; + private com.google.bigtable.v2.RowFilter filter_; + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public com.google.bigtable.v2.RowFilter getFilter() { + return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + @java.lang.Override + public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { + return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; + } + + 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 (!key_.isEmpty()) { + output.writeBytes(1, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getFilter()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFilter()); + } + 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.bigtable.v2.SessionReadRowRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionReadRowRequest other = + (com.google.bigtable.v2.SessionReadRowRequest) obj; + + if (!getKey().equals(other.getKey())) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionReadRowRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionReadRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowRequest 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.bigtable.v2.SessionReadRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionReadRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowRequest 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.bigtable.v2.SessionReadRowRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowRequest 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.bigtable.v2.SessionReadRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowRequest 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.bigtable.v2.SessionReadRowRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionReadRowRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionReadRowRequest) + com.google.bigtable.v2.SessionReadRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionReadRowRequest.class, + com.google.bigtable.v2.SessionReadRowRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionReadRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFilterFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = com.google.protobuf.ByteString.EMPTY; + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest build() { + com.google.bigtable.v2.SessionReadRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest buildPartial() { + com.google.bigtable.v2.SessionReadRowRequest result = + new com.google.bigtable.v2.SessionReadRowRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionReadRowRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionReadRowRequest) { + return mergeFrom((com.google.bigtable.v2.SessionReadRowRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionReadRowRequest other) { + if (other == com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + setKey(other.getKey()); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + 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: + { + key_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + + /** + * bytes key = 1; + * + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + /** + * bytes key = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * bytes key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + + private com.google.bigtable.v2.RowFilter filter_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RowFilter, + com.google.bigtable.v2.RowFilter.Builder, + com.google.bigtable.v2.RowFilterOrBuilder> + filterBuilder_; + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return The filter. + */ + public com.google.bigtable.v2.RowFilter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public Builder setFilter(com.google.bigtable.v2.RowFilter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public Builder setFilter(com.google.bigtable.v2.RowFilter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public Builder mergeFilter(com.google.bigtable.v2.RowFilter value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && filter_ != null + && filter_ != com.google.bigtable.v2.RowFilter.getDefaultInstance()) { + getFilterBuilder().mergeFrom(value); + } else { + filter_ = value; + } + } else { + filterBuilder_.mergeFrom(value); + } + if (filter_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000002); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public com.google.bigtable.v2.RowFilter.Builder getFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetFilterFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + public com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null ? com.google.bigtable.v2.RowFilter.getDefaultInstance() : filter_; + } + } + + /** .google.bigtable.v2.RowFilter filter = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RowFilter, + com.google.bigtable.v2.RowFilter.Builder, + com.google.bigtable.v2.RowFilterOrBuilder> + internalGetFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RowFilter, + com.google.bigtable.v2.RowFilter.Builder, + com.google.bigtable.v2.RowFilterOrBuilder>( + getFilter(), getParentForChildren(), isClean()); + filter_ = null; + } + return filterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionReadRowRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionReadRowRequest) + private static final com.google.bigtable.v2.SessionReadRowRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionReadRowRequest(); + } + + public static com.google.bigtable.v2.SessionReadRowRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionReadRowRequest 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.bigtable.v2.SessionReadRowRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequestOrBuilder.java new file mode 100644 index 0000000000..a540f77d71 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionReadRowRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionReadRowRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes key = 1; + * + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + + /** + * .google.bigtable.v2.RowFilter filter = 2; + * + * @return The filter. + */ + com.google.bigtable.v2.RowFilter getFilter(); + + /** .google.bigtable.v2.RowFilter filter = 2; */ + com.google.bigtable.v2.RowFilterOrBuilder getFilterOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponse.java new file mode 100644 index 0000000000..3c2570fec4 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponse.java @@ -0,0 +1,783 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionReadRowResponse} + */ +@com.google.protobuf.Generated +public final class SessionReadRowResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionReadRowResponse) + SessionReadRowResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionReadRowResponse"); + } + + // Use SessionReadRowResponse.newBuilder() to construct. + private SessionReadRowResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionReadRowResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionReadRowResponse.class, + com.google.bigtable.v2.SessionReadRowResponse.Builder.class); + } + + private int bitField0_; + public static final int ROW_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Row row_; + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return Whether the row field is set. + */ + @java.lang.Override + public boolean hasRow() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return The row. + */ + @java.lang.Override + public com.google.bigtable.v2.Row getRow() { + return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; + } + + /** .google.bigtable.v2.Row row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { + return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; + } + + public static final int STATS_FIELD_NUMBER = 2; + private com.google.bigtable.v2.RequestStats stats_; + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return The stats. + */ + @java.lang.Override + public com.google.bigtable.v2.RequestStats getStats() { + return stats_ == null ? com.google.bigtable.v2.RequestStats.getDefaultInstance() : stats_; + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + @java.lang.Override + public com.google.bigtable.v2.RequestStatsOrBuilder getStatsOrBuilder() { + return stats_ == null ? com.google.bigtable.v2.RequestStats.getDefaultInstance() : stats_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getRow()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRow()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStats()); + } + 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.bigtable.v2.SessionReadRowResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionReadRowResponse other = + (com.google.bigtable.v2.SessionReadRowResponse) obj; + + if (hasRow() != other.hasRow()) return false; + if (hasRow()) { + if (!getRow().equals(other.getRow())) return false; + } + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats().equals(other.getStats())) 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 (hasRow()) { + hash = (37 * hash) + ROW_FIELD_NUMBER; + hash = (53 * hash) + getRow().hashCode(); + } + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionReadRowResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionReadRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowResponse 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.bigtable.v2.SessionReadRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionReadRowResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionReadRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowResponse 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.bigtable.v2.SessionReadRowResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowResponse 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.bigtable.v2.SessionReadRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionReadRowResponse 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.bigtable.v2.SessionReadRowResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionReadRowResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionReadRowResponse) + com.google.bigtable.v2.SessionReadRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionReadRowResponse.class, + com.google.bigtable.v2.SessionReadRowResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionReadRowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowFieldBuilder(); + internalGetStatsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + row_ = null; + if (rowBuilder_ != null) { + rowBuilder_.dispose(); + rowBuilder_ = null; + } + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionReadRowResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse build() { + com.google.bigtable.v2.SessionReadRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse buildPartial() { + com.google.bigtable.v2.SessionReadRowResponse result = + new com.google.bigtable.v2.SessionReadRowResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionReadRowResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.row_ = rowBuilder_ == null ? row_ : rowBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionReadRowResponse) { + return mergeFrom((com.google.bigtable.v2.SessionReadRowResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionReadRowResponse other) { + if (other == com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance()) return this; + if (other.hasRow()) { + mergeRow(other.getRow()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + 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(internalGetRowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.Row row_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Row, + com.google.bigtable.v2.Row.Builder, + com.google.bigtable.v2.RowOrBuilder> + rowBuilder_; + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return Whether the row field is set. + */ + public boolean hasRow() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return The row. + */ + public com.google.bigtable.v2.Row getRow() { + if (rowBuilder_ == null) { + return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; + } else { + return rowBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.Row row = 1; */ + public Builder setRow(com.google.bigtable.v2.Row value) { + if (rowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + row_ = value; + } else { + rowBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** .google.bigtable.v2.Row row = 1; */ + public Builder setRow(com.google.bigtable.v2.Row.Builder builderForValue) { + if (rowBuilder_ == null) { + row_ = builderForValue.build(); + } else { + rowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** .google.bigtable.v2.Row row = 1; */ + public Builder mergeRow(com.google.bigtable.v2.Row value) { + if (rowBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && row_ != null + && row_ != com.google.bigtable.v2.Row.getDefaultInstance()) { + getRowBuilder().mergeFrom(value); + } else { + row_ = value; + } + } else { + rowBuilder_.mergeFrom(value); + } + if (row_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.Row row = 1; */ + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000001); + row_ = null; + if (rowBuilder_ != null) { + rowBuilder_.dispose(); + rowBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.Row row = 1; */ + public com.google.bigtable.v2.Row.Builder getRowBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.Row row = 1; */ + public com.google.bigtable.v2.RowOrBuilder getRowOrBuilder() { + if (rowBuilder_ != null) { + return rowBuilder_.getMessageOrBuilder(); + } else { + return row_ == null ? com.google.bigtable.v2.Row.getDefaultInstance() : row_; + } + } + + /** .google.bigtable.v2.Row row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Row, + com.google.bigtable.v2.Row.Builder, + com.google.bigtable.v2.RowOrBuilder> + internalGetRowFieldBuilder() { + if (rowBuilder_ == null) { + rowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Row, + com.google.bigtable.v2.Row.Builder, + com.google.bigtable.v2.RowOrBuilder>(getRow(), getParentForChildren(), isClean()); + row_ = null; + } + return rowBuilder_; + } + + private com.google.bigtable.v2.RequestStats stats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder> + statsBuilder_; + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return The stats. + */ + public com.google.bigtable.v2.RequestStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? com.google.bigtable.v2.RequestStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public Builder setStats(com.google.bigtable.v2.RequestStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + } else { + statsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public Builder setStats(com.google.bigtable.v2.RequestStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public Builder mergeStats(com.google.bigtable.v2.RequestStats value) { + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && stats_ != null + && stats_ != com.google.bigtable.v2.RequestStats.getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); + } else { + stats_ = value; + } + } else { + statsBuilder_.mergeFrom(value); + } + if (stats_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public Builder clearStats() { + bitField0_ = (bitField0_ & ~0x00000002); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public com.google.bigtable.v2.RequestStats.Builder getStatsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStatsFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + public com.google.bigtable.v2.RequestStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? com.google.bigtable.v2.RequestStats.getDefaultInstance() : stats_; + } + } + + /** .google.bigtable.v2.RequestStats stats = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder> + internalGetStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder>( + getStats(), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionReadRowResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionReadRowResponse) + private static final com.google.bigtable.v2.SessionReadRowResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionReadRowResponse(); + } + + public static com.google.bigtable.v2.SessionReadRowResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionReadRowResponse 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.bigtable.v2.SessionReadRowResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponseOrBuilder.java new file mode 100644 index 0000000000..b0ca2bf894 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionReadRowResponseOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionReadRowResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionReadRowResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return Whether the row field is set. + */ + boolean hasRow(); + + /** + * .google.bigtable.v2.Row row = 1; + * + * @return The row. + */ + com.google.bigtable.v2.Row getRow(); + + /** .google.bigtable.v2.Row row = 1; */ + com.google.bigtable.v2.RowOrBuilder getRowOrBuilder(); + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return Whether the stats field is set. + */ + boolean hasStats(); + + /** + * .google.bigtable.v2.RequestStats stats = 2; + * + * @return The stats. + */ + com.google.bigtable.v2.RequestStats getStats(); + + /** .google.bigtable.v2.RequestStats stats = 2; */ + com.google.bigtable.v2.RequestStatsOrBuilder getStatsOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfig.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfig.java new file mode 100644 index 0000000000..1cf129d259 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfig.java @@ -0,0 +1,2023 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRefreshConfig} + */ +@com.google.protobuf.Generated +public final class SessionRefreshConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionRefreshConfig) + SessionRefreshConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionRefreshConfig"); + } + + // Use SessionRefreshConfig.newBuilder() to construct. + private SessionRefreshConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionRefreshConfig() { + metadata_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRefreshConfig.class, + com.google.bigtable.v2.SessionRefreshConfig.Builder.class); + } + + public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionRefreshConfig.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Output only. The key for the metadata entry.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
    +     * Output only. The key for the metadata entry.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
    +     * Output only. The value for the metadata entry.
    +     * 
    + * + * bytes value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + } + + /** + * + * + *
    +   * Any additional metadata to include when reconnecting. Not a `map<>` type as
    +   * this can be a multimap.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRefreshConfig.Metadata} + */ + public static final class Metadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionRefreshConfig.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Metadata"); + } + + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Metadata() { + key_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRefreshConfig.Metadata.class, + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
    +     * Output only. The key for the metadata entry.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
    +     * Output only. The key for the metadata entry.
    +     * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Output only. The value for the metadata entry.
    +     * 
    + * + * bytes value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (!value_.isEmpty()) { + output.writeBytes(2, value_); + } + 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(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (!value_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, value_); + } + 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.bigtable.v2.SessionRefreshConfig.Metadata)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionRefreshConfig.Metadata other = + (com.google.bigtable.v2.SessionRefreshConfig.Metadata) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata 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.bigtable.v2.SessionRefreshConfig.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata 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.bigtable.v2.SessionRefreshConfig.Metadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata 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.bigtable.v2.SessionRefreshConfig.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata 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.bigtable.v2.SessionRefreshConfig.Metadata 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; + } + + /** + * + * + *
    +     * Any additional metadata to include when reconnecting. Not a `map<>` type as
    +     * this can be a multimap.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRefreshConfig.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionRefreshConfig.Metadata) + com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRefreshConfig.Metadata.class, + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionRefreshConfig.Metadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_Metadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig.Metadata getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionRefreshConfig.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig.Metadata build() { + com.google.bigtable.v2.SessionRefreshConfig.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig.Metadata buildPartial() { + com.google.bigtable.v2.SessionRefreshConfig.Metadata result = + new com.google.bigtable.v2.SessionRefreshConfig.Metadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionRefreshConfig.Metadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionRefreshConfig.Metadata) { + return mergeFrom((com.google.bigtable.v2.SessionRefreshConfig.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionRefreshConfig.Metadata other) { + if (other == com.google.bigtable.v2.SessionRefreshConfig.Metadata.getDefaultInstance()) + return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValue().isEmpty()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = 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 java.lang.Object key_ = ""; + + /** + * + * + *
    +       * Output only. The key for the metadata entry.
    +       * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Output only. The key for the metadata entry.
    +       * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Output only. The key for the metadata entry.
    +       * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. The key for the metadata entry.
    +       * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. The key for the metadata entry.
    +       * 
    + * + * string key = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +       * Output only. The value for the metadata entry.
    +       * 
    + * + * bytes value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + + /** + * + * + *
    +       * Output only. The value for the metadata entry.
    +       * 
    + * + * bytes value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Output only. The value for the metadata entry.
    +       * 
    + * + * bytes value = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionRefreshConfig.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionRefreshConfig.Metadata) + private static final com.google.bigtable.v2.SessionRefreshConfig.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionRefreshConfig.Metadata(); + } + + public static com.google.bigtable.v2.SessionRefreshConfig.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata 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.bigtable.v2.SessionRefreshConfig.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int OPTIMIZED_OPEN_REQUEST_FIELD_NUMBER = 1; + private com.google.bigtable.v2.OpenSessionRequest optimizedOpenRequest_; + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return Whether the optimizedOpenRequest field is set. + */ + @java.lang.Override + public boolean hasOptimizedOpenRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return The optimizedOpenRequest. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest getOptimizedOpenRequest() { + return optimizedOpenRequest_ == null + ? com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance() + : optimizedOpenRequest_; + } + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequestOrBuilder getOptimizedOpenRequestOrBuilder() { + return optimizedOpenRequest_ == null + ? com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance() + : optimizedOpenRequest_; + } + + public static final int METADATA_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List metadata_; + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getMetadataList() { + return metadata_; + } + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getMetadataOrBuilderList() { + return metadata_; + } + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getMetadataCount() { + return metadata_.size(); + } + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig.Metadata getMetadata(int index) { + return metadata_.get(index); + } + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder getMetadataOrBuilder( + int index) { + return metadata_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOptimizedOpenRequest()); + } + for (int i = 0; i < metadata_.size(); i++) { + output.writeMessage(2, metadata_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOptimizedOpenRequest()); + } + for (int i = 0; i < metadata_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata_.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.bigtable.v2.SessionRefreshConfig)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionRefreshConfig other = + (com.google.bigtable.v2.SessionRefreshConfig) obj; + + if (hasOptimizedOpenRequest() != other.hasOptimizedOpenRequest()) return false; + if (hasOptimizedOpenRequest()) { + if (!getOptimizedOpenRequest().equals(other.getOptimizedOpenRequest())) return false; + } + if (!getMetadataList().equals(other.getMetadataList())) 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 (hasOptimizedOpenRequest()) { + hash = (37 * hash) + OPTIMIZED_OPEN_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getOptimizedOpenRequest().hashCode(); + } + if (getMetadataCount() > 0) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionRefreshConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRefreshConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig 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.bigtable.v2.SessionRefreshConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRefreshConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRefreshConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig 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.bigtable.v2.SessionRefreshConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig 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.bigtable.v2.SessionRefreshConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRefreshConfig 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.bigtable.v2.SessionRefreshConfig 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRefreshConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionRefreshConfig) + com.google.bigtable.v2.SessionRefreshConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRefreshConfig.class, + com.google.bigtable.v2.SessionRefreshConfig.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionRefreshConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOptimizedOpenRequestFieldBuilder(); + internalGetMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + optimizedOpenRequest_ = null; + if (optimizedOpenRequestBuilder_ != null) { + optimizedOpenRequestBuilder_.dispose(); + optimizedOpenRequestBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = java.util.Collections.emptyList(); + } else { + metadata_ = null; + metadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRefreshConfig_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig build() { + com.google.bigtable.v2.SessionRefreshConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig buildPartial() { + com.google.bigtable.v2.SessionRefreshConfig result = + new com.google.bigtable.v2.SessionRefreshConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.SessionRefreshConfig result) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metadata_ = java.util.Collections.unmodifiableList(metadata_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.v2.SessionRefreshConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.optimizedOpenRequest_ = + optimizedOpenRequestBuilder_ == null + ? optimizedOpenRequest_ + : optimizedOpenRequestBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionRefreshConfig) { + return mergeFrom((com.google.bigtable.v2.SessionRefreshConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionRefreshConfig other) { + if (other == com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance()) return this; + if (other.hasOptimizedOpenRequest()) { + mergeOptimizedOpenRequest(other.getOptimizedOpenRequest()); + } + if (metadataBuilder_ == null) { + if (!other.metadata_.isEmpty()) { + if (metadata_.isEmpty()) { + metadata_ = other.metadata_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetadataIsMutable(); + metadata_.addAll(other.metadata_); + } + onChanged(); + } + } else { + if (!other.metadata_.isEmpty()) { + if (metadataBuilder_.isEmpty()) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + metadata_ = other.metadata_; + bitField0_ = (bitField0_ & ~0x00000002); + metadataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMetadataFieldBuilder() + : null; + } else { + metadataBuilder_.addAllMessages(other.metadata_); + } + } + } + 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( + internalGetOptimizedOpenRequestFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.SessionRefreshConfig.Metadata m = + input.readMessage( + com.google.bigtable.v2.SessionRefreshConfig.Metadata.parser(), + extensionRegistry); + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + metadata_.add(m); + } else { + metadataBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.OpenSessionRequest optimizedOpenRequest_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder> + optimizedOpenRequestBuilder_; + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return Whether the optimizedOpenRequest field is set. + */ + public boolean hasOptimizedOpenRequest() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return The optimizedOpenRequest. + */ + public com.google.bigtable.v2.OpenSessionRequest getOptimizedOpenRequest() { + if (optimizedOpenRequestBuilder_ == null) { + return optimizedOpenRequest_ == null + ? com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance() + : optimizedOpenRequest_; + } else { + return optimizedOpenRequestBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public Builder setOptimizedOpenRequest(com.google.bigtable.v2.OpenSessionRequest value) { + if (optimizedOpenRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optimizedOpenRequest_ = value; + } else { + optimizedOpenRequestBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public Builder setOptimizedOpenRequest( + com.google.bigtable.v2.OpenSessionRequest.Builder builderForValue) { + if (optimizedOpenRequestBuilder_ == null) { + optimizedOpenRequest_ = builderForValue.build(); + } else { + optimizedOpenRequestBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public Builder mergeOptimizedOpenRequest(com.google.bigtable.v2.OpenSessionRequest value) { + if (optimizedOpenRequestBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && optimizedOpenRequest_ != null + && optimizedOpenRequest_ + != com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance()) { + getOptimizedOpenRequestBuilder().mergeFrom(value); + } else { + optimizedOpenRequest_ = value; + } + } else { + optimizedOpenRequestBuilder_.mergeFrom(value); + } + if (optimizedOpenRequest_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public Builder clearOptimizedOpenRequest() { + bitField0_ = (bitField0_ & ~0x00000001); + optimizedOpenRequest_ = null; + if (optimizedOpenRequestBuilder_ != null) { + optimizedOpenRequestBuilder_.dispose(); + optimizedOpenRequestBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public com.google.bigtable.v2.OpenSessionRequest.Builder getOptimizedOpenRequestBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetOptimizedOpenRequestFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + public com.google.bigtable.v2.OpenSessionRequestOrBuilder getOptimizedOpenRequestOrBuilder() { + if (optimizedOpenRequestBuilder_ != null) { + return optimizedOpenRequestBuilder_.getMessageOrBuilder(); + } else { + return optimizedOpenRequest_ == null + ? com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance() + : optimizedOpenRequest_; + } + } + + /** + * + * + *
    +     * An optimized Open request that the session may use on a retry when
    +     * establishing this session again. This can be sent from the AFE to
    +     * avoid certain work e.g. encoding a query plan for BTQL.
    +     * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder> + internalGetOptimizedOpenRequestFieldBuilder() { + if (optimizedOpenRequestBuilder_ == null) { + optimizedOpenRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder>( + getOptimizedOpenRequest(), getParentForChildren(), isClean()); + optimizedOpenRequest_ = null; + } + return optimizedOpenRequestBuilder_; + } + + private java.util.List metadata_ = + java.util.Collections.emptyList(); + + private void ensureMetadataIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metadata_ = + new java.util.ArrayList( + metadata_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig.Metadata, + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder, + com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getMetadataList() { + if (metadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(metadata_); + } else { + return metadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getMetadataCount() { + if (metadataBuilder_ == null) { + return metadata_.size(); + } else { + return metadataBuilder_.getCount(); + } + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.SessionRefreshConfig.Metadata getMetadata(int index) { + if (metadataBuilder_ == null) { + return metadata_.get(index); + } else { + return metadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata( + int index, com.google.bigtable.v2.SessionRefreshConfig.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataIsMutable(); + metadata_.set(index, value); + onChanged(); + } else { + metadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata( + int index, com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + metadata_.set(index, builderForValue.build()); + onChanged(); + } else { + metadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetadata(com.google.bigtable.v2.SessionRefreshConfig.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataIsMutable(); + metadata_.add(value); + onChanged(); + } else { + metadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetadata( + int index, com.google.bigtable.v2.SessionRefreshConfig.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetadataIsMutable(); + metadata_.add(index, value); + onChanged(); + } else { + metadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetadata( + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + metadata_.add(builderForValue.build()); + onChanged(); + } else { + metadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addMetadata( + int index, com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + metadata_.add(index, builderForValue.build()); + onChanged(); + } else { + metadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllMetadata( + java.lang.Iterable values) { + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadata_); + onChanged(); + } else { + metadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeMetadata(int index) { + if (metadataBuilder_ == null) { + ensureMetadataIsMutable(); + metadata_.remove(index); + onChanged(); + } else { + metadataBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder getMetadataBuilder( + int index) { + return internalGetMetadataFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder getMetadataOrBuilder( + int index) { + if (metadataBuilder_ == null) { + return metadata_.get(index); + } else { + return metadataBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getMetadataOrBuilderList() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metadata_); + } + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder addMetadataBuilder() { + return internalGetMetadataFieldBuilder() + .addBuilder(com.google.bigtable.v2.SessionRefreshConfig.Metadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder addMetadataBuilder( + int index) { + return internalGetMetadataFieldBuilder() + .addBuilder( + index, com.google.bigtable.v2.SessionRefreshConfig.Metadata.getDefaultInstance()); + } + + /** + * + * + *
    +     * Output only. Any additional metadata to include when reconnecting.
    +     * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getMetadataBuilderList() { + return internalGetMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig.Metadata, + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder, + com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig.Metadata, + com.google.bigtable.v2.SessionRefreshConfig.Metadata.Builder, + com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder>( + metadata_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionRefreshConfig) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionRefreshConfig) + private static final com.google.bigtable.v2.SessionRefreshConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionRefreshConfig(); + } + + public static com.google.bigtable.v2.SessionRefreshConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionRefreshConfig 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.bigtable.v2.SessionRefreshConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfigOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfigOrBuilder.java new file mode 100644 index 0000000000..52d3a5f803 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRefreshConfigOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionRefreshConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionRefreshConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return Whether the optimizedOpenRequest field is set. + */ + boolean hasOptimizedOpenRequest(); + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + * + * @return The optimizedOpenRequest. + */ + com.google.bigtable.v2.OpenSessionRequest getOptimizedOpenRequest(); + + /** + * + * + *
    +   * An optimized Open request that the session may use on a retry when
    +   * establishing this session again. This can be sent from the AFE to
    +   * avoid certain work e.g. encoding a query plan for BTQL.
    +   * 
    + * + * .google.bigtable.v2.OpenSessionRequest optimized_open_request = 1; + */ + com.google.bigtable.v2.OpenSessionRequestOrBuilder getOptimizedOpenRequestOrBuilder(); + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getMetadataList(); + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.bigtable.v2.SessionRefreshConfig.Metadata getMetadata(int index); + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getMetadataCount(); + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getMetadataOrBuilderList(); + + /** + * + * + *
    +   * Output only. Any additional metadata to include when reconnecting.
    +   * 
    + * + * + * repeated .google.bigtable.v2.SessionRefreshConfig.Metadata metadata = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.bigtable.v2.SessionRefreshConfig.MetadataOrBuilder getMetadataOrBuilder(int index); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequest.java new file mode 100644 index 0000000000..1c625a325c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequest.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRequest} + */ +@com.google.protobuf.Generated +public final class SessionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionRequest) + SessionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionRequest"); + } + + // Use SessionRequest.newBuilder() to construct. + private SessionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRequest.class, + com.google.bigtable.v2.SessionRequest.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPEN_SESSION(1), + CLOSE_SESSION(2), + VIRTUAL_RPC(3), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return OPEN_SESSION; + case 2: + return CLOSE_SESSION; + case 3: + return VIRTUAL_RPC; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int OPEN_SESSION_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return Whether the openSession field is set. + */ + @java.lang.Override + public boolean hasOpenSession() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return The openSession. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest getOpenSession() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionRequest) payload_; + } + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequestOrBuilder getOpenSessionOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionRequest) payload_; + } + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + + public static final int CLOSE_SESSION_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return Whether the closeSession field is set. + */ + @java.lang.Override + public boolean hasCloseSession() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return The closeSession. + */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest getCloseSession() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.CloseSessionRequest) payload_; + } + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequestOrBuilder getCloseSessionOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.CloseSessionRequest) payload_; + } + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + + public static final int VIRTUAL_RPC_FIELD_NUMBER = 3; + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return Whether the virtualRpc field is set. + */ + @java.lang.Override + public boolean hasVirtualRpc() { + return payloadCase_ == 3; + } + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return The virtualRpc. + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest getVirtualRpc() { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.VirtualRpcRequest) payload_; + } + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequestOrBuilder getVirtualRpcOrBuilder() { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.VirtualRpcRequest) payload_; + } + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.OpenSessionRequest) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.CloseSessionRequest) payload_); + } + if (payloadCase_ == 3) { + output.writeMessage(3, (com.google.bigtable.v2.VirtualRpcRequest) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.OpenSessionRequest) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.CloseSessionRequest) payload_); + } + if (payloadCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.VirtualRpcRequest) payload_); + } + 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.bigtable.v2.SessionRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionRequest other = (com.google.bigtable.v2.SessionRequest) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getOpenSession().equals(other.getOpenSession())) return false; + break; + case 2: + if (!getCloseSession().equals(other.getCloseSession())) return false; + break; + case 3: + if (!getVirtualRpc().equals(other.getVirtualRpc())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + OPEN_SESSION_FIELD_NUMBER; + hash = (53 * hash) + getOpenSession().hashCode(); + break; + case 2: + hash = (37 * hash) + CLOSE_SESSION_FIELD_NUMBER; + hash = (53 * hash) + getCloseSession().hashCode(); + break; + case 3: + hash = (37 * hash) + VIRTUAL_RPC_FIELD_NUMBER; + hash = (53 * hash) + getVirtualRpc().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequest 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.bigtable.v2.SessionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequest 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.bigtable.v2.SessionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequest 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.bigtable.v2.SessionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequest 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.bigtable.v2.SessionRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionRequest) + com.google.bigtable.v2.SessionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRequest.class, + com.google.bigtable.v2.SessionRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (openSessionBuilder_ != null) { + openSessionBuilder_.clear(); + } + if (closeSessionBuilder_ != null) { + closeSessionBuilder_.clear(); + } + if (virtualRpcBuilder_ != null) { + virtualRpcBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequest build() { + com.google.bigtable.v2.SessionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequest buildPartial() { + com.google.bigtable.v2.SessionRequest result = + new com.google.bigtable.v2.SessionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.SessionRequest result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && openSessionBuilder_ != null) { + result.payload_ = openSessionBuilder_.build(); + } + if (payloadCase_ == 2 && closeSessionBuilder_ != null) { + result.payload_ = closeSessionBuilder_.build(); + } + if (payloadCase_ == 3 && virtualRpcBuilder_ != null) { + result.payload_ = virtualRpcBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionRequest) { + return mergeFrom((com.google.bigtable.v2.SessionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionRequest other) { + if (other == com.google.bigtable.v2.SessionRequest.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case OPEN_SESSION: + { + mergeOpenSession(other.getOpenSession()); + break; + } + case CLOSE_SESSION: + { + mergeCloseSession(other.getCloseSession()); + break; + } + case VIRTUAL_RPC: + { + mergeVirtualRpc(other.getVirtualRpc()); + break; + } + case PAYLOAD_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( + internalGetOpenSessionFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCloseSessionFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetVirtualRpcFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder> + openSessionBuilder_; + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return Whether the openSession field is set. + */ + @java.lang.Override + public boolean hasOpenSession() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return The openSession. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequest getOpenSession() { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionRequest) payload_; + } + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return openSessionBuilder_.getMessage(); + } + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + public Builder setOpenSession(com.google.bigtable.v2.OpenSessionRequest value) { + if (openSessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + openSessionBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + public Builder setOpenSession( + com.google.bigtable.v2.OpenSessionRequest.Builder builderForValue) { + if (openSessionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + openSessionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + public Builder mergeOpenSession(com.google.bigtable.v2.OpenSessionRequest value) { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.OpenSessionRequest.newBuilder( + (com.google.bigtable.v2.OpenSessionRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + openSessionBuilder_.mergeFrom(value); + } else { + openSessionBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + public Builder clearOpenSession() { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + openSessionBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + public com.google.bigtable.v2.OpenSessionRequest.Builder getOpenSessionBuilder() { + return internalGetOpenSessionFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionRequestOrBuilder getOpenSessionOrBuilder() { + if ((payloadCase_ == 1) && (openSessionBuilder_ != null)) { + return openSessionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionRequest) payload_; + } + return com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder> + internalGetOpenSessionFieldBuilder() { + if (openSessionBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.OpenSessionRequest.getDefaultInstance(); + } + openSessionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionRequest, + com.google.bigtable.v2.OpenSessionRequest.Builder, + com.google.bigtable.v2.OpenSessionRequestOrBuilder>( + (com.google.bigtable.v2.OpenSessionRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return openSessionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.CloseSessionRequest, + com.google.bigtable.v2.CloseSessionRequest.Builder, + com.google.bigtable.v2.CloseSessionRequestOrBuilder> + closeSessionBuilder_; + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return Whether the closeSession field is set. + */ + @java.lang.Override + public boolean hasCloseSession() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return The closeSession. + */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequest getCloseSession() { + if (closeSessionBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.CloseSessionRequest) payload_; + } + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return closeSessionBuilder_.getMessage(); + } + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + public Builder setCloseSession(com.google.bigtable.v2.CloseSessionRequest value) { + if (closeSessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + closeSessionBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + public Builder setCloseSession( + com.google.bigtable.v2.CloseSessionRequest.Builder builderForValue) { + if (closeSessionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + closeSessionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + public Builder mergeCloseSession(com.google.bigtable.v2.CloseSessionRequest value) { + if (closeSessionBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.CloseSessionRequest.newBuilder( + (com.google.bigtable.v2.CloseSessionRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + closeSessionBuilder_.mergeFrom(value); + } else { + closeSessionBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + public Builder clearCloseSession() { + if (closeSessionBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + closeSessionBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + public com.google.bigtable.v2.CloseSessionRequest.Builder getCloseSessionBuilder() { + return internalGetCloseSessionFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + @java.lang.Override + public com.google.bigtable.v2.CloseSessionRequestOrBuilder getCloseSessionOrBuilder() { + if ((payloadCase_ == 2) && (closeSessionBuilder_ != null)) { + return closeSessionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.CloseSessionRequest) payload_; + } + return com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.CloseSessionRequest, + com.google.bigtable.v2.CloseSessionRequest.Builder, + com.google.bigtable.v2.CloseSessionRequestOrBuilder> + internalGetCloseSessionFieldBuilder() { + if (closeSessionBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.CloseSessionRequest.getDefaultInstance(); + } + closeSessionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.CloseSessionRequest, + com.google.bigtable.v2.CloseSessionRequest.Builder, + com.google.bigtable.v2.CloseSessionRequestOrBuilder>( + (com.google.bigtable.v2.CloseSessionRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return closeSessionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest, + com.google.bigtable.v2.VirtualRpcRequest.Builder, + com.google.bigtable.v2.VirtualRpcRequestOrBuilder> + virtualRpcBuilder_; + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return Whether the virtualRpc field is set. + */ + @java.lang.Override + public boolean hasVirtualRpc() { + return payloadCase_ == 3; + } + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return The virtualRpc. + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest getVirtualRpc() { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.VirtualRpcRequest) payload_; + } + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 3) { + return virtualRpcBuilder_.getMessage(); + } + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + public Builder setVirtualRpc(com.google.bigtable.v2.VirtualRpcRequest value) { + if (virtualRpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + virtualRpcBuilder_.setMessage(value); + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + public Builder setVirtualRpc(com.google.bigtable.v2.VirtualRpcRequest.Builder builderForValue) { + if (virtualRpcBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + virtualRpcBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + public Builder mergeVirtualRpc(com.google.bigtable.v2.VirtualRpcRequest value) { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 3 + && payload_ != com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.VirtualRpcRequest.newBuilder( + (com.google.bigtable.v2.VirtualRpcRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 3) { + virtualRpcBuilder_.mergeFrom(value); + } else { + virtualRpcBuilder_.setMessage(value); + } + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + public Builder clearVirtualRpc() { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + } + virtualRpcBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + public com.google.bigtable.v2.VirtualRpcRequest.Builder getVirtualRpcBuilder() { + return internalGetVirtualRpcFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequestOrBuilder getVirtualRpcOrBuilder() { + if ((payloadCase_ == 3) && (virtualRpcBuilder_ != null)) { + return virtualRpcBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.VirtualRpcRequest) payload_; + } + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest, + com.google.bigtable.v2.VirtualRpcRequest.Builder, + com.google.bigtable.v2.VirtualRpcRequestOrBuilder> + internalGetVirtualRpcFieldBuilder() { + if (virtualRpcBuilder_ == null) { + if (!(payloadCase_ == 3)) { + payload_ = com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + virtualRpcBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest, + com.google.bigtable.v2.VirtualRpcRequest.Builder, + com.google.bigtable.v2.VirtualRpcRequestOrBuilder>( + (com.google.bigtable.v2.VirtualRpcRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 3; + onChanged(); + return virtualRpcBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionRequest) + private static final com.google.bigtable.v2.SessionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionRequest(); + } + + public static com.google.bigtable.v2.SessionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionRequest 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.bigtable.v2.SessionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestOrBuilder.java new file mode 100644 index 0000000000..ed05d333fb --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return Whether the openSession field is set. + */ + boolean hasOpenSession(); + + /** + * .google.bigtable.v2.OpenSessionRequest open_session = 1; + * + * @return The openSession. + */ + com.google.bigtable.v2.OpenSessionRequest getOpenSession(); + + /** .google.bigtable.v2.OpenSessionRequest open_session = 1; */ + com.google.bigtable.v2.OpenSessionRequestOrBuilder getOpenSessionOrBuilder(); + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return Whether the closeSession field is set. + */ + boolean hasCloseSession(); + + /** + * .google.bigtable.v2.CloseSessionRequest close_session = 2; + * + * @return The closeSession. + */ + com.google.bigtable.v2.CloseSessionRequest getCloseSession(); + + /** .google.bigtable.v2.CloseSessionRequest close_session = 2; */ + com.google.bigtable.v2.CloseSessionRequestOrBuilder getCloseSessionOrBuilder(); + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return Whether the virtualRpc field is set. + */ + boolean hasVirtualRpc(); + + /** + * .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; + * + * @return The virtualRpc. + */ + com.google.bigtable.v2.VirtualRpcRequest getVirtualRpc(); + + /** .google.bigtable.v2.VirtualRpcRequest virtual_rpc = 3; */ + com.google.bigtable.v2.VirtualRpcRequestOrBuilder getVirtualRpcOrBuilder(); + + com.google.bigtable.v2.SessionRequest.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStats.java new file mode 100644 index 0000000000..7c0c962d5e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStats.java @@ -0,0 +1,698 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRequestStats} + */ +@com.google.protobuf.Generated +public final class SessionRequestStats extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionRequestStats) + SessionRequestStatsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionRequestStats"); + } + + // Use SessionRequestStats.newBuilder() to construct. + private SessionRequestStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionRequestStats() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequestStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequestStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRequestStats.class, + com.google.bigtable.v2.SessionRequestStats.Builder.class); + } + + private int bitField0_; + public static final int BACKEND_LATENCY_FIELD_NUMBER = 1; + private com.google.protobuf.Duration backendLatency_; + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return Whether the backendLatency field is set. + */ + @java.lang.Override + public boolean hasBackendLatency() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return The backendLatency. + */ + @java.lang.Override + public com.google.protobuf.Duration getBackendLatency() { + return backendLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backendLatency_; + } + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getBackendLatencyOrBuilder() { + return backendLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backendLatency_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBackendLatency()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBackendLatency()); + } + 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.bigtable.v2.SessionRequestStats)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionRequestStats other = + (com.google.bigtable.v2.SessionRequestStats) obj; + + if (hasBackendLatency() != other.hasBackendLatency()) return false; + if (hasBackendLatency()) { + if (!getBackendLatency().equals(other.getBackendLatency())) 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 (hasBackendLatency()) { + hash = (37 * hash) + BACKEND_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getBackendLatency().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionRequestStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequestStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRequestStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequestStats 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.bigtable.v2.SessionRequestStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionRequestStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionRequestStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequestStats 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.bigtable.v2.SessionRequestStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequestStats 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.bigtable.v2.SessionRequestStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionRequestStats 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.bigtable.v2.SessionRequestStats 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionRequestStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionRequestStats) + com.google.bigtable.v2.SessionRequestStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequestStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequestStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionRequestStats.class, + com.google.bigtable.v2.SessionRequestStats.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionRequestStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackendLatencyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backendLatency_ = null; + if (backendLatencyBuilder_ != null) { + backendLatencyBuilder_.dispose(); + backendLatencyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionRequestStats_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequestStats getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionRequestStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequestStats build() { + com.google.bigtable.v2.SessionRequestStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionRequestStats buildPartial() { + com.google.bigtable.v2.SessionRequestStats result = + new com.google.bigtable.v2.SessionRequestStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionRequestStats result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backendLatency_ = + backendLatencyBuilder_ == null ? backendLatency_ : backendLatencyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionRequestStats) { + return mergeFrom((com.google.bigtable.v2.SessionRequestStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionRequestStats other) { + if (other == com.google.bigtable.v2.SessionRequestStats.getDefaultInstance()) return this; + if (other.hasBackendLatency()) { + mergeBackendLatency(other.getBackendLatency()); + } + 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( + internalGetBackendLatencyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration backendLatency_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + backendLatencyBuilder_; + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return Whether the backendLatency field is set. + */ + public boolean hasBackendLatency() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return The backendLatency. + */ + public com.google.protobuf.Duration getBackendLatency() { + if (backendLatencyBuilder_ == null) { + return backendLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backendLatency_; + } else { + return backendLatencyBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public Builder setBackendLatency(com.google.protobuf.Duration value) { + if (backendLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backendLatency_ = value; + } else { + backendLatencyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public Builder setBackendLatency(com.google.protobuf.Duration.Builder builderForValue) { + if (backendLatencyBuilder_ == null) { + backendLatency_ = builderForValue.build(); + } else { + backendLatencyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public Builder mergeBackendLatency(com.google.protobuf.Duration value) { + if (backendLatencyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && backendLatency_ != null + && backendLatency_ != com.google.protobuf.Duration.getDefaultInstance()) { + getBackendLatencyBuilder().mergeFrom(value); + } else { + backendLatency_ = value; + } + } else { + backendLatencyBuilder_.mergeFrom(value); + } + if (backendLatency_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public Builder clearBackendLatency() { + bitField0_ = (bitField0_ & ~0x00000001); + backendLatency_ = null; + if (backendLatencyBuilder_ != null) { + backendLatencyBuilder_.dispose(); + backendLatencyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public com.google.protobuf.Duration.Builder getBackendLatencyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBackendLatencyFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + public com.google.protobuf.DurationOrBuilder getBackendLatencyOrBuilder() { + if (backendLatencyBuilder_ != null) { + return backendLatencyBuilder_.getMessageOrBuilder(); + } else { + return backendLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backendLatency_; + } + } + + /** + * + * + *
    +     * Backend (critical section) latency for the request.
    +     * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetBackendLatencyFieldBuilder() { + if (backendLatencyBuilder_ == null) { + backendLatencyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getBackendLatency(), getParentForChildren(), isClean()); + backendLatency_ = null; + } + return backendLatencyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionRequestStats) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionRequestStats) + private static final com.google.bigtable.v2.SessionRequestStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionRequestStats(); + } + + public static com.google.bigtable.v2.SessionRequestStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionRequestStats 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.bigtable.v2.SessionRequestStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStatsOrBuilder.java new file mode 100644 index 0000000000..728993cf71 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionRequestStatsOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionRequestStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionRequestStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return Whether the backendLatency field is set. + */ + boolean hasBackendLatency(); + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + * + * @return The backendLatency. + */ + com.google.protobuf.Duration getBackendLatency(); + + /** + * + * + *
    +   * Backend (critical section) latency for the request.
    +   * 
    + * + * .google.protobuf.Duration backend_latency = 1; + */ + com.google.protobuf.DurationOrBuilder getBackendLatencyOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponse.java new file mode 100644 index 0000000000..9c4dfe078f --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponse.java @@ -0,0 +1,2131 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionResponse} + */ +@com.google.protobuf.Generated +public final class SessionResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.SessionResponse) + SessionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionResponse"); + } + + // Use SessionResponse.newBuilder() to construct. + private SessionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionResponse.class, + com.google.bigtable.v2.SessionResponse.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPEN_SESSION(1), + VIRTUAL_RPC(2), + ERROR(3), + SESSION_PARAMETERS(4), + HEARTBEAT(5), + GO_AWAY(6), + SESSION_REFRESH_CONFIG(7), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return OPEN_SESSION; + case 2: + return VIRTUAL_RPC; + case 3: + return ERROR; + case 4: + return SESSION_PARAMETERS; + case 5: + return HEARTBEAT; + case 6: + return GO_AWAY; + case 7: + return SESSION_REFRESH_CONFIG; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int OPEN_SESSION_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return Whether the openSession field is set. + */ + @java.lang.Override + public boolean hasOpenSession() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return The openSession. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponse getOpenSession() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionResponse) payload_; + } + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponseOrBuilder getOpenSessionOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionResponse) payload_; + } + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + + public static final int VIRTUAL_RPC_FIELD_NUMBER = 2; + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return Whether the virtualRpc field is set. + */ + @java.lang.Override + public boolean hasVirtualRpc() { + return payloadCase_ == 2; + } + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return The virtualRpc. + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponse getVirtualRpc() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.VirtualRpcResponse) payload_; + } + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponseOrBuilder getVirtualRpcOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.VirtualRpcResponse) payload_; + } + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return payloadCase_ == 3; + } + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.bigtable.v2.ErrorResponse getError() { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.ErrorResponse) payload_; + } + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + @java.lang.Override + public com.google.bigtable.v2.ErrorResponseOrBuilder getErrorOrBuilder() { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.ErrorResponse) payload_; + } + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + + public static final int SESSION_PARAMETERS_FIELD_NUMBER = 4; + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + @java.lang.Override + public boolean hasSessionParameters() { + return payloadCase_ == 4; + } + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return The sessionParameters. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponse getSessionParameters() { + if (payloadCase_ == 4) { + return (com.google.bigtable.v2.SessionParametersResponse) payload_; + } + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponseOrBuilder getSessionParametersOrBuilder() { + if (payloadCase_ == 4) { + return (com.google.bigtable.v2.SessionParametersResponse) payload_; + } + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + + public static final int HEARTBEAT_FIELD_NUMBER = 5; + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return payloadCase_ == 5; + } + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return The heartbeat. + */ + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponse getHeartbeat() { + if (payloadCase_ == 5) { + return (com.google.bigtable.v2.HeartbeatResponse) payload_; + } + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponseOrBuilder getHeartbeatOrBuilder() { + if (payloadCase_ == 5) { + return (com.google.bigtable.v2.HeartbeatResponse) payload_; + } + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + + public static final int GO_AWAY_FIELD_NUMBER = 6; + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return Whether the goAway field is set. + */ + @java.lang.Override + public boolean hasGoAway() { + return payloadCase_ == 6; + } + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return The goAway. + */ + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponse getGoAway() { + if (payloadCase_ == 6) { + return (com.google.bigtable.v2.GoAwayResponse) payload_; + } + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponseOrBuilder getGoAwayOrBuilder() { + if (payloadCase_ == 6) { + return (com.google.bigtable.v2.GoAwayResponse) payload_; + } + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + + public static final int SESSION_REFRESH_CONFIG_FIELD_NUMBER = 7; + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return Whether the sessionRefreshConfig field is set. + */ + @java.lang.Override + public boolean hasSessionRefreshConfig() { + return payloadCase_ == 7; + } + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return The sessionRefreshConfig. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig getSessionRefreshConfig() { + if (payloadCase_ == 7) { + return (com.google.bigtable.v2.SessionRefreshConfig) payload_; + } + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfigOrBuilder getSessionRefreshConfigOrBuilder() { + if (payloadCase_ == 7) { + return (com.google.bigtable.v2.SessionRefreshConfig) payload_; + } + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.OpenSessionResponse) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.VirtualRpcResponse) payload_); + } + if (payloadCase_ == 3) { + output.writeMessage(3, (com.google.bigtable.v2.ErrorResponse) payload_); + } + if (payloadCase_ == 4) { + output.writeMessage(4, (com.google.bigtable.v2.SessionParametersResponse) payload_); + } + if (payloadCase_ == 5) { + output.writeMessage(5, (com.google.bigtable.v2.HeartbeatResponse) payload_); + } + if (payloadCase_ == 6) { + output.writeMessage(6, (com.google.bigtable.v2.GoAwayResponse) payload_); + } + if (payloadCase_ == 7) { + output.writeMessage(7, (com.google.bigtable.v2.SessionRefreshConfig) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.OpenSessionResponse) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.VirtualRpcResponse) payload_); + } + if (payloadCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.ErrorResponse) payload_); + } + if (payloadCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.bigtable.v2.SessionParametersResponse) payload_); + } + if (payloadCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.bigtable.v2.HeartbeatResponse) payload_); + } + if (payloadCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.bigtable.v2.GoAwayResponse) payload_); + } + if (payloadCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.bigtable.v2.SessionRefreshConfig) payload_); + } + 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.bigtable.v2.SessionResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.SessionResponse other = (com.google.bigtable.v2.SessionResponse) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getOpenSession().equals(other.getOpenSession())) return false; + break; + case 2: + if (!getVirtualRpc().equals(other.getVirtualRpc())) return false; + break; + case 3: + if (!getError().equals(other.getError())) return false; + break; + case 4: + if (!getSessionParameters().equals(other.getSessionParameters())) return false; + break; + case 5: + if (!getHeartbeat().equals(other.getHeartbeat())) return false; + break; + case 6: + if (!getGoAway().equals(other.getGoAway())) return false; + break; + case 7: + if (!getSessionRefreshConfig().equals(other.getSessionRefreshConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + OPEN_SESSION_FIELD_NUMBER; + hash = (53 * hash) + getOpenSession().hashCode(); + break; + case 2: + hash = (37 * hash) + VIRTUAL_RPC_FIELD_NUMBER; + hash = (53 * hash) + getVirtualRpc().hashCode(); + break; + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 4: + hash = (37 * hash) + SESSION_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getSessionParameters().hashCode(); + break; + case 5: + hash = (37 * hash) + HEARTBEAT_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeat().hashCode(); + break; + case 6: + hash = (37 * hash) + GO_AWAY_FIELD_NUMBER; + hash = (53 * hash) + getGoAway().hashCode(); + break; + case 7: + hash = (37 * hash) + SESSION_REFRESH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSessionRefreshConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.SessionResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionResponse 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.bigtable.v2.SessionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.SessionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.SessionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionResponse 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.bigtable.v2.SessionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionResponse 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.bigtable.v2.SessionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.SessionResponse 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.bigtable.v2.SessionResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.SessionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.SessionResponse) + com.google.bigtable.v2.SessionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.SessionResponse.class, + com.google.bigtable.v2.SessionResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.SessionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (openSessionBuilder_ != null) { + openSessionBuilder_.clear(); + } + if (virtualRpcBuilder_ != null) { + virtualRpcBuilder_.clear(); + } + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (sessionParametersBuilder_ != null) { + sessionParametersBuilder_.clear(); + } + if (heartbeatBuilder_ != null) { + heartbeatBuilder_.clear(); + } + if (goAwayBuilder_ != null) { + goAwayBuilder_.clear(); + } + if (sessionRefreshConfigBuilder_ != null) { + sessionRefreshConfigBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_SessionResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.SessionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.SessionResponse build() { + com.google.bigtable.v2.SessionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.SessionResponse buildPartial() { + com.google.bigtable.v2.SessionResponse result = + new com.google.bigtable.v2.SessionResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.SessionResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.SessionResponse result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && openSessionBuilder_ != null) { + result.payload_ = openSessionBuilder_.build(); + } + if (payloadCase_ == 2 && virtualRpcBuilder_ != null) { + result.payload_ = virtualRpcBuilder_.build(); + } + if (payloadCase_ == 3 && errorBuilder_ != null) { + result.payload_ = errorBuilder_.build(); + } + if (payloadCase_ == 4 && sessionParametersBuilder_ != null) { + result.payload_ = sessionParametersBuilder_.build(); + } + if (payloadCase_ == 5 && heartbeatBuilder_ != null) { + result.payload_ = heartbeatBuilder_.build(); + } + if (payloadCase_ == 6 && goAwayBuilder_ != null) { + result.payload_ = goAwayBuilder_.build(); + } + if (payloadCase_ == 7 && sessionRefreshConfigBuilder_ != null) { + result.payload_ = sessionRefreshConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.SessionResponse) { + return mergeFrom((com.google.bigtable.v2.SessionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.SessionResponse other) { + if (other == com.google.bigtable.v2.SessionResponse.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case OPEN_SESSION: + { + mergeOpenSession(other.getOpenSession()); + break; + } + case VIRTUAL_RPC: + { + mergeVirtualRpc(other.getVirtualRpc()); + break; + } + case ERROR: + { + mergeError(other.getError()); + break; + } + case SESSION_PARAMETERS: + { + mergeSessionParameters(other.getSessionParameters()); + break; + } + case HEARTBEAT: + { + mergeHeartbeat(other.getHeartbeat()); + break; + } + case GO_AWAY: + { + mergeGoAway(other.getGoAway()); + break; + } + case SESSION_REFRESH_CONFIG: + { + mergeSessionRefreshConfig(other.getSessionRefreshConfig()); + break; + } + case PAYLOAD_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( + internalGetOpenSessionFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetVirtualRpcFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetSessionParametersFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetHeartbeatFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetGoAwayFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetSessionRefreshConfigFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 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; + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionResponse, + com.google.bigtable.v2.OpenSessionResponse.Builder, + com.google.bigtable.v2.OpenSessionResponseOrBuilder> + openSessionBuilder_; + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return Whether the openSession field is set. + */ + @java.lang.Override + public boolean hasOpenSession() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return The openSession. + */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponse getOpenSession() { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionResponse) payload_; + } + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return openSessionBuilder_.getMessage(); + } + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + public Builder setOpenSession(com.google.bigtable.v2.OpenSessionResponse value) { + if (openSessionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + openSessionBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + public Builder setOpenSession( + com.google.bigtable.v2.OpenSessionResponse.Builder builderForValue) { + if (openSessionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + openSessionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + public Builder mergeOpenSession(com.google.bigtable.v2.OpenSessionResponse value) { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.OpenSessionResponse.newBuilder( + (com.google.bigtable.v2.OpenSessionResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + openSessionBuilder_.mergeFrom(value); + } else { + openSessionBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + public Builder clearOpenSession() { + if (openSessionBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + openSessionBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + public com.google.bigtable.v2.OpenSessionResponse.Builder getOpenSessionBuilder() { + return internalGetOpenSessionFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + @java.lang.Override + public com.google.bigtable.v2.OpenSessionResponseOrBuilder getOpenSessionOrBuilder() { + if ((payloadCase_ == 1) && (openSessionBuilder_ != null)) { + return openSessionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.OpenSessionResponse) payload_; + } + return com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionResponse, + com.google.bigtable.v2.OpenSessionResponse.Builder, + com.google.bigtable.v2.OpenSessionResponseOrBuilder> + internalGetOpenSessionFieldBuilder() { + if (openSessionBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.OpenSessionResponse.getDefaultInstance(); + } + openSessionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.OpenSessionResponse, + com.google.bigtable.v2.OpenSessionResponse.Builder, + com.google.bigtable.v2.OpenSessionResponseOrBuilder>( + (com.google.bigtable.v2.OpenSessionResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return openSessionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcResponse, + com.google.bigtable.v2.VirtualRpcResponse.Builder, + com.google.bigtable.v2.VirtualRpcResponseOrBuilder> + virtualRpcBuilder_; + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return Whether the virtualRpc field is set. + */ + @java.lang.Override + public boolean hasVirtualRpc() { + return payloadCase_ == 2; + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return The virtualRpc. + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponse getVirtualRpc() { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.VirtualRpcResponse) payload_; + } + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return virtualRpcBuilder_.getMessage(); + } + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + public Builder setVirtualRpc(com.google.bigtable.v2.VirtualRpcResponse value) { + if (virtualRpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + virtualRpcBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + public Builder setVirtualRpc( + com.google.bigtable.v2.VirtualRpcResponse.Builder builderForValue) { + if (virtualRpcBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + virtualRpcBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + public Builder mergeVirtualRpc(com.google.bigtable.v2.VirtualRpcResponse value) { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.VirtualRpcResponse.newBuilder( + (com.google.bigtable.v2.VirtualRpcResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + virtualRpcBuilder_.mergeFrom(value); + } else { + virtualRpcBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + public Builder clearVirtualRpc() { + if (virtualRpcBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + virtualRpcBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + public com.google.bigtable.v2.VirtualRpcResponse.Builder getVirtualRpcBuilder() { + return internalGetVirtualRpcFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponseOrBuilder getVirtualRpcOrBuilder() { + if ((payloadCase_ == 2) && (virtualRpcBuilder_ != null)) { + return virtualRpcBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.VirtualRpcResponse) payload_; + } + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + } + + /** + * + * + *
    +     * A vRPC can result in either a successful result or an error.
    +     * Error results are separate to allow for multiple vRPC responses,
    +     * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcResponse, + com.google.bigtable.v2.VirtualRpcResponse.Builder, + com.google.bigtable.v2.VirtualRpcResponseOrBuilder> + internalGetVirtualRpcFieldBuilder() { + if (virtualRpcBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + virtualRpcBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcResponse, + com.google.bigtable.v2.VirtualRpcResponse.Builder, + com.google.bigtable.v2.VirtualRpcResponseOrBuilder>( + (com.google.bigtable.v2.VirtualRpcResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return virtualRpcBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ErrorResponse, + com.google.bigtable.v2.ErrorResponse.Builder, + com.google.bigtable.v2.ErrorResponseOrBuilder> + errorBuilder_; + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return payloadCase_ == 3; + } + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.bigtable.v2.ErrorResponse getError() { + if (errorBuilder_ == null) { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.ErrorResponse) payload_; + } + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + public Builder setError(com.google.bigtable.v2.ErrorResponse value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + public Builder setError(com.google.bigtable.v2.ErrorResponse.Builder builderForValue) { + if (errorBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + public Builder mergeError(com.google.bigtable.v2.ErrorResponse value) { + if (errorBuilder_ == null) { + if (payloadCase_ == 3 + && payload_ != com.google.bigtable.v2.ErrorResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.ErrorResponse.newBuilder( + (com.google.bigtable.v2.ErrorResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + payloadCase_ = 3; + return this; + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + } + errorBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + public com.google.bigtable.v2.ErrorResponse.Builder getErrorBuilder() { + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + @java.lang.Override + public com.google.bigtable.v2.ErrorResponseOrBuilder getErrorOrBuilder() { + if ((payloadCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 3) { + return (com.google.bigtable.v2.ErrorResponse) payload_; + } + return com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ErrorResponse, + com.google.bigtable.v2.ErrorResponse.Builder, + com.google.bigtable.v2.ErrorResponseOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(payloadCase_ == 3)) { + payload_ = com.google.bigtable.v2.ErrorResponse.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ErrorResponse, + com.google.bigtable.v2.ErrorResponse.Builder, + com.google.bigtable.v2.ErrorResponseOrBuilder>( + (com.google.bigtable.v2.ErrorResponse) payload_, getParentForChildren(), isClean()); + payload_ = null; + } + payloadCase_ = 3; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionParametersResponse, + com.google.bigtable.v2.SessionParametersResponse.Builder, + com.google.bigtable.v2.SessionParametersResponseOrBuilder> + sessionParametersBuilder_; + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + @java.lang.Override + public boolean hasSessionParameters() { + return payloadCase_ == 4; + } + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return The sessionParameters. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponse getSessionParameters() { + if (sessionParametersBuilder_ == null) { + if (payloadCase_ == 4) { + return (com.google.bigtable.v2.SessionParametersResponse) payload_; + } + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 4) { + return sessionParametersBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + public Builder setSessionParameters(com.google.bigtable.v2.SessionParametersResponse value) { + if (sessionParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + sessionParametersBuilder_.setMessage(value); + } + payloadCase_ = 4; + return this; + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + public Builder setSessionParameters( + com.google.bigtable.v2.SessionParametersResponse.Builder builderForValue) { + if (sessionParametersBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + sessionParametersBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 4; + return this; + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + public Builder mergeSessionParameters(com.google.bigtable.v2.SessionParametersResponse value) { + if (sessionParametersBuilder_ == null) { + if (payloadCase_ == 4 + && payload_ != com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionParametersResponse.newBuilder( + (com.google.bigtable.v2.SessionParametersResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 4) { + sessionParametersBuilder_.mergeFrom(value); + } else { + sessionParametersBuilder_.setMessage(value); + } + } + payloadCase_ = 4; + return this; + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + public Builder clearSessionParameters() { + if (sessionParametersBuilder_ == null) { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + } + sessionParametersBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + public com.google.bigtable.v2.SessionParametersResponse.Builder getSessionParametersBuilder() { + return internalGetSessionParametersFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + @java.lang.Override + public com.google.bigtable.v2.SessionParametersResponseOrBuilder + getSessionParametersOrBuilder() { + if ((payloadCase_ == 4) && (sessionParametersBuilder_ != null)) { + return sessionParametersBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 4) { + return (com.google.bigtable.v2.SessionParametersResponse) payload_; + } + return com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionParametersResponse, + com.google.bigtable.v2.SessionParametersResponse.Builder, + com.google.bigtable.v2.SessionParametersResponseOrBuilder> + internalGetSessionParametersFieldBuilder() { + if (sessionParametersBuilder_ == null) { + if (!(payloadCase_ == 4)) { + payload_ = com.google.bigtable.v2.SessionParametersResponse.getDefaultInstance(); + } + sessionParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionParametersResponse, + com.google.bigtable.v2.SessionParametersResponse.Builder, + com.google.bigtable.v2.SessionParametersResponseOrBuilder>( + (com.google.bigtable.v2.SessionParametersResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 4; + onChanged(); + return sessionParametersBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.HeartbeatResponse, + com.google.bigtable.v2.HeartbeatResponse.Builder, + com.google.bigtable.v2.HeartbeatResponseOrBuilder> + heartbeatBuilder_; + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return payloadCase_ == 5; + } + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return The heartbeat. + */ + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponse getHeartbeat() { + if (heartbeatBuilder_ == null) { + if (payloadCase_ == 5) { + return (com.google.bigtable.v2.HeartbeatResponse) payload_; + } + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 5) { + return heartbeatBuilder_.getMessage(); + } + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + public Builder setHeartbeat(com.google.bigtable.v2.HeartbeatResponse value) { + if (heartbeatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + heartbeatBuilder_.setMessage(value); + } + payloadCase_ = 5; + return this; + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + public Builder setHeartbeat(com.google.bigtable.v2.HeartbeatResponse.Builder builderForValue) { + if (heartbeatBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + heartbeatBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 5; + return this; + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + public Builder mergeHeartbeat(com.google.bigtable.v2.HeartbeatResponse value) { + if (heartbeatBuilder_ == null) { + if (payloadCase_ == 5 + && payload_ != com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.HeartbeatResponse.newBuilder( + (com.google.bigtable.v2.HeartbeatResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 5) { + heartbeatBuilder_.mergeFrom(value); + } else { + heartbeatBuilder_.setMessage(value); + } + } + payloadCase_ = 5; + return this; + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + public Builder clearHeartbeat() { + if (heartbeatBuilder_ == null) { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + } + heartbeatBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + public com.google.bigtable.v2.HeartbeatResponse.Builder getHeartbeatBuilder() { + return internalGetHeartbeatFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + @java.lang.Override + public com.google.bigtable.v2.HeartbeatResponseOrBuilder getHeartbeatOrBuilder() { + if ((payloadCase_ == 5) && (heartbeatBuilder_ != null)) { + return heartbeatBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 5) { + return (com.google.bigtable.v2.HeartbeatResponse) payload_; + } + return com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.HeartbeatResponse, + com.google.bigtable.v2.HeartbeatResponse.Builder, + com.google.bigtable.v2.HeartbeatResponseOrBuilder> + internalGetHeartbeatFieldBuilder() { + if (heartbeatBuilder_ == null) { + if (!(payloadCase_ == 5)) { + payload_ = com.google.bigtable.v2.HeartbeatResponse.getDefaultInstance(); + } + heartbeatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.HeartbeatResponse, + com.google.bigtable.v2.HeartbeatResponse.Builder, + com.google.bigtable.v2.HeartbeatResponseOrBuilder>( + (com.google.bigtable.v2.HeartbeatResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 5; + onChanged(); + return heartbeatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.GoAwayResponse, + com.google.bigtable.v2.GoAwayResponse.Builder, + com.google.bigtable.v2.GoAwayResponseOrBuilder> + goAwayBuilder_; + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return Whether the goAway field is set. + */ + @java.lang.Override + public boolean hasGoAway() { + return payloadCase_ == 6; + } + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return The goAway. + */ + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponse getGoAway() { + if (goAwayBuilder_ == null) { + if (payloadCase_ == 6) { + return (com.google.bigtable.v2.GoAwayResponse) payload_; + } + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 6) { + return goAwayBuilder_.getMessage(); + } + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + public Builder setGoAway(com.google.bigtable.v2.GoAwayResponse value) { + if (goAwayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + goAwayBuilder_.setMessage(value); + } + payloadCase_ = 6; + return this; + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + public Builder setGoAway(com.google.bigtable.v2.GoAwayResponse.Builder builderForValue) { + if (goAwayBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + goAwayBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 6; + return this; + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + public Builder mergeGoAway(com.google.bigtable.v2.GoAwayResponse value) { + if (goAwayBuilder_ == null) { + if (payloadCase_ == 6 + && payload_ != com.google.bigtable.v2.GoAwayResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.GoAwayResponse.newBuilder( + (com.google.bigtable.v2.GoAwayResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 6) { + goAwayBuilder_.mergeFrom(value); + } else { + goAwayBuilder_.setMessage(value); + } + } + payloadCase_ = 6; + return this; + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + public Builder clearGoAway() { + if (goAwayBuilder_ == null) { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + } + goAwayBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + public com.google.bigtable.v2.GoAwayResponse.Builder getGoAwayBuilder() { + return internalGetGoAwayFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + @java.lang.Override + public com.google.bigtable.v2.GoAwayResponseOrBuilder getGoAwayOrBuilder() { + if ((payloadCase_ == 6) && (goAwayBuilder_ != null)) { + return goAwayBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 6) { + return (com.google.bigtable.v2.GoAwayResponse) payload_; + } + return com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.GoAwayResponse, + com.google.bigtable.v2.GoAwayResponse.Builder, + com.google.bigtable.v2.GoAwayResponseOrBuilder> + internalGetGoAwayFieldBuilder() { + if (goAwayBuilder_ == null) { + if (!(payloadCase_ == 6)) { + payload_ = com.google.bigtable.v2.GoAwayResponse.getDefaultInstance(); + } + goAwayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.GoAwayResponse, + com.google.bigtable.v2.GoAwayResponse.Builder, + com.google.bigtable.v2.GoAwayResponseOrBuilder>( + (com.google.bigtable.v2.GoAwayResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 6; + onChanged(); + return goAwayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig, + com.google.bigtable.v2.SessionRefreshConfig.Builder, + com.google.bigtable.v2.SessionRefreshConfigOrBuilder> + sessionRefreshConfigBuilder_; + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return Whether the sessionRefreshConfig field is set. + */ + @java.lang.Override + public boolean hasSessionRefreshConfig() { + return payloadCase_ == 7; + } + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return The sessionRefreshConfig. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfig getSessionRefreshConfig() { + if (sessionRefreshConfigBuilder_ == null) { + if (payloadCase_ == 7) { + return (com.google.bigtable.v2.SessionRefreshConfig) payload_; + } + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } else { + if (payloadCase_ == 7) { + return sessionRefreshConfigBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + public Builder setSessionRefreshConfig(com.google.bigtable.v2.SessionRefreshConfig value) { + if (sessionRefreshConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + sessionRefreshConfigBuilder_.setMessage(value); + } + payloadCase_ = 7; + return this; + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + public Builder setSessionRefreshConfig( + com.google.bigtable.v2.SessionRefreshConfig.Builder builderForValue) { + if (sessionRefreshConfigBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + sessionRefreshConfigBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 7; + return this; + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + public Builder mergeSessionRefreshConfig(com.google.bigtable.v2.SessionRefreshConfig value) { + if (sessionRefreshConfigBuilder_ == null) { + if (payloadCase_ == 7 + && payload_ != com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionRefreshConfig.newBuilder( + (com.google.bigtable.v2.SessionRefreshConfig) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 7) { + sessionRefreshConfigBuilder_.mergeFrom(value); + } else { + sessionRefreshConfigBuilder_.setMessage(value); + } + } + payloadCase_ = 7; + return this; + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + public Builder clearSessionRefreshConfig() { + if (sessionRefreshConfigBuilder_ == null) { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + } + sessionRefreshConfigBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + public com.google.bigtable.v2.SessionRefreshConfig.Builder getSessionRefreshConfigBuilder() { + return internalGetSessionRefreshConfigFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + @java.lang.Override + public com.google.bigtable.v2.SessionRefreshConfigOrBuilder getSessionRefreshConfigOrBuilder() { + if ((payloadCase_ == 7) && (sessionRefreshConfigBuilder_ != null)) { + return sessionRefreshConfigBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 7) { + return (com.google.bigtable.v2.SessionRefreshConfig) payload_; + } + return com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig, + com.google.bigtable.v2.SessionRefreshConfig.Builder, + com.google.bigtable.v2.SessionRefreshConfigOrBuilder> + internalGetSessionRefreshConfigFieldBuilder() { + if (sessionRefreshConfigBuilder_ == null) { + if (!(payloadCase_ == 7)) { + payload_ = com.google.bigtable.v2.SessionRefreshConfig.getDefaultInstance(); + } + sessionRefreshConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRefreshConfig, + com.google.bigtable.v2.SessionRefreshConfig.Builder, + com.google.bigtable.v2.SessionRefreshConfigOrBuilder>( + (com.google.bigtable.v2.SessionRefreshConfig) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 7; + onChanged(); + return sessionRefreshConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.SessionResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.SessionResponse) + private static final com.google.bigtable.v2.SessionResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.SessionResponse(); + } + + public static com.google.bigtable.v2.SessionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionResponse 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.bigtable.v2.SessionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponseOrBuilder.java new file mode 100644 index 0000000000..492e52d893 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionResponseOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface SessionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.SessionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return Whether the openSession field is set. + */ + boolean hasOpenSession(); + + /** + * .google.bigtable.v2.OpenSessionResponse open_session = 1; + * + * @return The openSession. + */ + com.google.bigtable.v2.OpenSessionResponse getOpenSession(); + + /** .google.bigtable.v2.OpenSessionResponse open_session = 1; */ + com.google.bigtable.v2.OpenSessionResponseOrBuilder getOpenSessionOrBuilder(); + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return Whether the virtualRpc field is set. + */ + boolean hasVirtualRpc(); + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + * + * @return The virtualRpc. + */ + com.google.bigtable.v2.VirtualRpcResponse getVirtualRpc(); + + /** + * + * + *
    +   * A vRPC can result in either a successful result or an error.
    +   * Error results are separate to allow for multiple vRPC responses,
    +   * e.g. for streaming calls like scans (post-V1). See Flow Control.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcResponse virtual_rpc = 2; + */ + com.google.bigtable.v2.VirtualRpcResponseOrBuilder getVirtualRpcOrBuilder(); + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * .google.bigtable.v2.ErrorResponse error = 3; + * + * @return The error. + */ + com.google.bigtable.v2.ErrorResponse getError(); + + /** .google.bigtable.v2.ErrorResponse error = 3; */ + com.google.bigtable.v2.ErrorResponseOrBuilder getErrorOrBuilder(); + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return Whether the sessionParameters field is set. + */ + boolean hasSessionParameters(); + + /** + * .google.bigtable.v2.SessionParametersResponse session_parameters = 4; + * + * @return The sessionParameters. + */ + com.google.bigtable.v2.SessionParametersResponse getSessionParameters(); + + /** .google.bigtable.v2.SessionParametersResponse session_parameters = 4; */ + com.google.bigtable.v2.SessionParametersResponseOrBuilder getSessionParametersOrBuilder(); + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return Whether the heartbeat field is set. + */ + boolean hasHeartbeat(); + + /** + * .google.bigtable.v2.HeartbeatResponse heartbeat = 5; + * + * @return The heartbeat. + */ + com.google.bigtable.v2.HeartbeatResponse getHeartbeat(); + + /** .google.bigtable.v2.HeartbeatResponse heartbeat = 5; */ + com.google.bigtable.v2.HeartbeatResponseOrBuilder getHeartbeatOrBuilder(); + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return Whether the goAway field is set. + */ + boolean hasGoAway(); + + /** + * .google.bigtable.v2.GoAwayResponse go_away = 6; + * + * @return The goAway. + */ + com.google.bigtable.v2.GoAwayResponse getGoAway(); + + /** .google.bigtable.v2.GoAwayResponse go_away = 6; */ + com.google.bigtable.v2.GoAwayResponseOrBuilder getGoAwayOrBuilder(); + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return Whether the sessionRefreshConfig field is set. + */ + boolean hasSessionRefreshConfig(); + + /** + * .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; + * + * @return The sessionRefreshConfig. + */ + com.google.bigtable.v2.SessionRefreshConfig getSessionRefreshConfig(); + + /** .google.bigtable.v2.SessionRefreshConfig session_refresh_config = 7; */ + com.google.bigtable.v2.SessionRefreshConfigOrBuilder getSessionRefreshConfigOrBuilder(); + + com.google.bigtable.v2.SessionResponse.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionType.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionType.java new file mode 100644 index 0000000000..83bcbae51a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SessionType.java @@ -0,0 +1,173 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Supported session types.
    + * 
    + * + * Protobuf enum {@code google.bigtable.v2.SessionType} + */ +@com.google.protobuf.Generated +public enum SessionType implements com.google.protobuf.ProtocolMessageEnum { + /** SESSION_TYPE_UNSET = 0; */ + SESSION_TYPE_UNSET(0), + /** SESSION_TYPE_TABLE = 1; */ + SESSION_TYPE_TABLE(1), + /** SESSION_TYPE_AUTHORIZED_VIEW = 2; */ + SESSION_TYPE_AUTHORIZED_VIEW(2), + /** SESSION_TYPE_MATERIALIZED_VIEW = 3; */ + SESSION_TYPE_MATERIALIZED_VIEW(3), + /** + * + * + *
    +   * For internal protocol testing only.
    +   * 
    + * + * SESSION_TYPE_TEST = -1; + */ + SESSION_TYPE_TEST(-1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionType"); + } + + /** SESSION_TYPE_UNSET = 0; */ + public static final int SESSION_TYPE_UNSET_VALUE = 0; + + /** SESSION_TYPE_TABLE = 1; */ + public static final int SESSION_TYPE_TABLE_VALUE = 1; + + /** SESSION_TYPE_AUTHORIZED_VIEW = 2; */ + public static final int SESSION_TYPE_AUTHORIZED_VIEW_VALUE = 2; + + /** SESSION_TYPE_MATERIALIZED_VIEW = 3; */ + public static final int SESSION_TYPE_MATERIALIZED_VIEW_VALUE = 3; + + /** + * + * + *
    +   * For internal protocol testing only.
    +   * 
    + * + * SESSION_TYPE_TEST = -1; + */ + public static final int SESSION_TYPE_TEST_VALUE = -1; + + 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 SessionType 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 SessionType forNumber(int value) { + switch (value) { + case 0: + return SESSION_TYPE_UNSET; + case 1: + return SESSION_TYPE_TABLE; + case 2: + return SESSION_TYPE_AUTHORIZED_VIEW; + case 3: + return SESSION_TYPE_MATERIALIZED_VIEW; + case -1: + return SESSION_TYPE_TEST; + 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 SessionType findValueByNumber(int number) { + return SessionType.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.bigtable.v2.SessionProto.getDescriptor().getEnumTypes().get(0); + } + + private static final SessionType[] VALUES = values(); + + public static SessionType 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 SessionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.SessionType) +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java index f851c366f3..3d9abfac89 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -30,13 +31,25 @@ * * Protobuf type {@code google.bigtable.v2.StreamContinuationToken} */ -public final class StreamContinuationToken extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StreamContinuationToken extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationToken) StreamContinuationTokenOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamContinuationToken"); + } + // Use StreamContinuationToken.newBuilder() to construct. - private StreamContinuationToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StreamContinuationToken(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private StreamContinuationToken() { token_ = ""; } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StreamContinuationToken(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable @@ -68,6 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int PARTITION_FIELD_NUMBER = 1; private com.google.bigtable.v2.StreamPartition partition_; + /** * * @@ -83,6 +91,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -100,6 +109,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() : partition_; } + /** * * @@ -120,6 +130,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { @SuppressWarnings("serial") private volatile java.lang.Object token_ = ""; + /** * * @@ -143,6 +154,7 @@ public java.lang.String getToken() { return s; } } + /** * * @@ -184,8 +196,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getPartition()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, token_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, token_); } getUnknownFields().writeTo(output); } @@ -199,8 +211,8 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPartition()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, token_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, token_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,38 +294,38 @@ public static com.google.bigtable.v2.StreamContinuationToken parseFrom( public static com.google.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken 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,10 +348,11 @@ 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 +364,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.StreamContinuationToken} */ - 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.bigtable.v2.StreamContinuationToken) com.google.bigtable.v2.StreamContinuationTokenOrBuilder { @@ -361,7 +374,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable @@ -375,14 +388,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(); } } @@ -443,39 +456,6 @@ private void buildPartial0(com.google.bigtable.v2.StreamContinuationToken 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.bigtable.v2.StreamContinuationToken) { @@ -524,7 +504,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getPartitionFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetPartitionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -554,11 +535,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.StreamPartition partition_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; + /** * * @@ -573,6 +555,7 @@ public Builder mergeFrom( public boolean hasPartition() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -593,6 +576,7 @@ public com.google.bigtable.v2.StreamPartition getPartition() { return partitionBuilder_.getMessage(); } } + /** * * @@ -615,6 +599,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { onChanged(); return this; } + /** * * @@ -634,6 +619,7 @@ public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder build onChanged(); return this; } + /** * * @@ -661,6 +647,7 @@ public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { } return this; } + /** * * @@ -680,6 +667,7 @@ public Builder clearPartition() { onChanged(); return this; } + /** * * @@ -692,8 +680,9 @@ public Builder clearPartition() { public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getPartitionFieldBuilder().getBuilder(); + return internalGetPartitionFieldBuilder().getBuilder(); } + /** * * @@ -712,6 +701,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { : partition_; } } + /** * * @@ -721,14 +711,14 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { * * .google.bigtable.v2.StreamPartition partition = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder> - getPartitionFieldBuilder() { + internalGetPartitionFieldBuilder() { if (partitionBuilder_ == null) { partitionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.StreamPartition, com.google.bigtable.v2.StreamPartition.Builder, com.google.bigtable.v2.StreamPartitionOrBuilder>( @@ -739,6 +729,7 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { } private java.lang.Object token_ = ""; + /** * * @@ -761,6 +752,7 @@ public java.lang.String getToken() { return (java.lang.String) ref; } } + /** * * @@ -783,6 +775,7 @@ public com.google.protobuf.ByteString getTokenBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -804,6 +797,7 @@ public Builder setToken(java.lang.String value) { onChanged(); return this; } + /** * * @@ -821,6 +815,7 @@ public Builder clearToken() { onChanged(); return this; } + /** * * @@ -844,17 +839,6 @@ public Builder setTokenBytes(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.bigtable.v2.StreamContinuationToken) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java index dc6191f8d3..ef484a692e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface StreamContinuationTokenOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamContinuationToken) @@ -36,6 +38,7 @@ public interface StreamContinuationTokenOrBuilder * @return Whether the partition field is set. */ boolean hasPartition(); + /** * * @@ -48,6 +51,7 @@ public interface StreamContinuationTokenOrBuilder * @return The partition. */ com.google.bigtable.v2.StreamPartition getPartition(); + /** * * @@ -71,6 +75,7 @@ public interface StreamContinuationTokenOrBuilder * @return The token. */ java.lang.String getToken(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java index 59b78d74ba..f1c15adfe7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -30,13 +31,25 @@ * * Protobuf type {@code google.bigtable.v2.StreamContinuationTokens} */ -public final class StreamContinuationTokens extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StreamContinuationTokens extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationTokens) StreamContinuationTokensOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamContinuationTokens"); + } + // Use StreamContinuationTokens.newBuilder() to construct. - private StreamContinuationTokens(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StreamContinuationTokens(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } @@ -44,19 +57,13 @@ private StreamContinuationTokens() { tokens_ = java.util.Collections.emptyList(); } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StreamContinuationTokens(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable @@ -69,6 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings("serial") private java.util.List tokens_; + /** * * @@ -82,6 +90,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public java.util.List getTokensList() { return tokens_; } + /** * * @@ -96,6 +105,7 @@ public java.util.List getTokensL getTokensOrBuilderList() { return tokens_; } + /** * * @@ -109,6 +119,7 @@ public java.util.List getTokensL public int getTokensCount() { return tokens_.size(); } + /** * * @@ -122,6 +133,7 @@ public int getTokensCount() { public com.google.bigtable.v2.StreamContinuationToken getTokens(int index) { return tokens_.get(index); } + /** * * @@ -239,38 +251,38 @@ public static com.google.bigtable.v2.StreamContinuationTokens parseFrom( public static com.google.bigtable.v2.StreamContinuationTokens 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.bigtable.v2.StreamContinuationTokens 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.bigtable.v2.StreamContinuationTokens 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.bigtable.v2.StreamContinuationTokens 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.bigtable.v2.StreamContinuationTokens 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.bigtable.v2.StreamContinuationTokens 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); } @@ -293,10 +305,11 @@ 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; } + /** * * @@ -308,7 +321,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.StreamContinuationTokens} */ - 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.bigtable.v2.StreamContinuationTokens) com.google.bigtable.v2.StreamContinuationTokensOrBuilder { @@ -318,7 +331,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable @@ -330,7 +343,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.StreamContinuationTokens.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -397,39 +410,6 @@ private void buildPartial0(com.google.bigtable.v2.StreamContinuationTokens resul 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.bigtable.v2.StreamContinuationTokens) { @@ -462,8 +442,8 @@ public Builder mergeFrom(com.google.bigtable.v2.StreamContinuationTokens other) tokens_ = other.tokens_; bitField0_ = (bitField0_ & ~0x00000001); tokensBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTokensFieldBuilder() + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTokensFieldBuilder() : null; } else { tokensBuilder_.addAllMessages(other.tokens_); @@ -538,7 +518,7 @@ private void ensureTokensIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> @@ -560,6 +540,7 @@ public java.util.List getTokensL return tokensBuilder_.getMessageList(); } } + /** * * @@ -576,6 +557,7 @@ public int getTokensCount() { return tokensBuilder_.getCount(); } } + /** * * @@ -592,6 +574,7 @@ public com.google.bigtable.v2.StreamContinuationToken getTokens(int index) { return tokensBuilder_.getMessage(index); } } + /** * * @@ -614,6 +597,7 @@ public Builder setTokens(int index, com.google.bigtable.v2.StreamContinuationTok } return this; } + /** * * @@ -634,6 +618,7 @@ public Builder setTokens( } return this; } + /** * * @@ -656,6 +641,7 @@ public Builder addTokens(com.google.bigtable.v2.StreamContinuationToken value) { } return this; } + /** * * @@ -678,6 +664,7 @@ public Builder addTokens(int index, com.google.bigtable.v2.StreamContinuationTok } return this; } + /** * * @@ -698,6 +685,7 @@ public Builder addTokens( } return this; } + /** * * @@ -718,6 +706,7 @@ public Builder addTokens( } return this; } + /** * * @@ -738,6 +727,7 @@ public Builder addAllTokens( } return this; } + /** * * @@ -757,6 +747,7 @@ public Builder clearTokens() { } return this; } + /** * * @@ -776,6 +767,7 @@ public Builder removeTokens(int index) { } return this; } + /** * * @@ -786,8 +778,9 @@ public Builder removeTokens(int index) { * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ public com.google.bigtable.v2.StreamContinuationToken.Builder getTokensBuilder(int index) { - return getTokensFieldBuilder().getBuilder(index); + return internalGetTokensFieldBuilder().getBuilder(index); } + /** * * @@ -804,6 +797,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getTokensOrBuilde return tokensBuilder_.getMessageOrBuilder(index); } } + /** * * @@ -821,6 +815,7 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getTokensOrBuilde return java.util.Collections.unmodifiableList(tokens_); } } + /** * * @@ -831,9 +826,10 @@ public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getTokensOrBuilde * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder() { - return getTokensFieldBuilder() + return internalGetTokensFieldBuilder() .addBuilder(com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -844,9 +840,10 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder() * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder(int index) { - return getTokensFieldBuilder() + return internalGetTokensFieldBuilder() .addBuilder(index, com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } + /** * * @@ -858,17 +855,17 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder(i */ public java.util.List getTokensBuilderList() { - return getTokensFieldBuilder().getBuilderList(); + return internalGetTokensFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder> - getTokensFieldBuilder() { + internalGetTokensFieldBuilder() { if (tokensBuilder_ == null) { tokensBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< + new com.google.protobuf.RepeatedFieldBuilder< com.google.bigtable.v2.StreamContinuationToken, com.google.bigtable.v2.StreamContinuationToken.Builder, com.google.bigtable.v2.StreamContinuationTokenOrBuilder>( @@ -878,17 +875,6 @@ public com.google.bigtable.v2.StreamContinuationToken.Builder addTokensBuilder(i return tokensBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.StreamContinuationTokens) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java index d66f790f55..06af7a3e32 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface StreamContinuationTokensOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamContinuationTokens) @@ -34,6 +36,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ java.util.List getTokensList(); + /** * * @@ -44,6 +47,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ com.google.bigtable.v2.StreamContinuationToken getTokens(int index); + /** * * @@ -54,6 +58,7 @@ public interface StreamContinuationTokensOrBuilder * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; */ int getTokensCount(); + /** * * @@ -65,6 +70,7 @@ public interface StreamContinuationTokensOrBuilder */ java.util.List getTokensOrBuilderList(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java index 3c08dce32e..7422e1f6e0 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -29,31 +30,37 @@ * * Protobuf type {@code google.bigtable.v2.StreamPartition} */ -public final class StreamPartition extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class StreamPartition extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamPartition) StreamPartitionOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamPartition"); + } + // Use StreamPartition.newBuilder() to construct. - private StreamPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private StreamPartition(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private StreamPartition() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StreamPartition(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamPartition_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable @@ -65,6 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ROW_RANGE_FIELD_NUMBER = 1; private com.google.bigtable.v2.RowRange rowRange_; + /** * * @@ -81,6 +89,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasRowRange() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -97,6 +106,7 @@ public boolean hasRowRange() { public com.google.bigtable.v2.RowRange getRowRange() { return rowRange_ == null ? com.google.bigtable.v2.RowRange.getDefaultInstance() : rowRange_; } + /** * * @@ -217,38 +227,38 @@ public static com.google.bigtable.v2.StreamPartition parseFrom( public static com.google.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition 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); } @@ -271,10 +281,11 @@ 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; } + /** * * @@ -285,7 +296,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.StreamPartition} */ - 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.bigtable.v2.StreamPartition) com.google.bigtable.v2.StreamPartitionOrBuilder { @@ -295,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable @@ -309,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) { - getRowRangeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRowRangeFieldBuilder(); } } @@ -373,39 +384,6 @@ private void buildPartial0(com.google.bigtable.v2.StreamPartition 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.bigtable.v2.StreamPartition) { @@ -449,7 +427,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRowRangeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetRowRangeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -473,11 +452,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.RowRange rowRange_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder> rowRangeBuilder_; + /** * * @@ -493,6 +473,7 @@ public Builder mergeFrom( public boolean hasRowRange() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -512,6 +493,7 @@ public com.google.bigtable.v2.RowRange getRowRange() { return rowRangeBuilder_.getMessage(); } } + /** * * @@ -535,6 +517,7 @@ public Builder setRowRange(com.google.bigtable.v2.RowRange value) { onChanged(); return this; } + /** * * @@ -555,6 +538,7 @@ public Builder setRowRange(com.google.bigtable.v2.RowRange.Builder builderForVal onChanged(); return this; } + /** * * @@ -583,6 +567,7 @@ public Builder mergeRowRange(com.google.bigtable.v2.RowRange value) { } return this; } + /** * * @@ -603,6 +588,7 @@ public Builder clearRowRange() { onChanged(); return this; } + /** * * @@ -616,8 +602,9 @@ public Builder clearRowRange() { public com.google.bigtable.v2.RowRange.Builder getRowRangeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getRowRangeFieldBuilder().getBuilder(); + return internalGetRowRangeFieldBuilder().getBuilder(); } + /** * * @@ -635,6 +622,7 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangeOrBuilder() { return rowRange_ == null ? com.google.bigtable.v2.RowRange.getDefaultInstance() : rowRange_; } } + /** * * @@ -645,14 +633,14 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangeOrBuilder() { * * .google.bigtable.v2.RowRange row_range = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder> - getRowRangeFieldBuilder() { + internalGetRowRangeFieldBuilder() { if (rowRangeBuilder_ == null) { rowRangeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.RowRange, com.google.bigtable.v2.RowRange.Builder, com.google.bigtable.v2.RowRangeOrBuilder>( @@ -662,17 +650,6 @@ public com.google.bigtable.v2.RowRangeOrBuilder getRowRangeOrBuilder() { return rowRangeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.StreamPartition) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java index 4926b43036..9b63bfee1b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface StreamPartitionOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamPartition) @@ -37,6 +39,7 @@ public interface StreamPartitionOrBuilder * @return Whether the rowRange field is set. */ boolean hasRowRange(); + /** * * @@ -50,6 +53,7 @@ public interface StreamPartitionOrBuilder * @return The rowRange. */ com.google.bigtable.v2.RowRange getRowRange(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableName.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableName.java index 98f1912341..b616cb8488 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableName.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableName.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 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-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequest.java new file mode 100644 index 0000000000..a79a31a443 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequest.java @@ -0,0 +1,922 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.TableRequest} + */ +@com.google.protobuf.Generated +public final class TableRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.TableRequest) + TableRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TableRequest"); + } + + // Use TableRequest.newBuilder() to construct. + private TableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TableRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TableRequest.class, + com.google.bigtable.v2.TableRequest.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + MUTATE_ROW(2), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 2: + return MUTATE_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + + public static final int MUTATE_ROW_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest getMutateRow() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.SessionMutateRowRequest) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowRequest) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.SessionMutateRowRequest) payload_); + } + 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.bigtable.v2.TableRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.TableRequest other = (com.google.bigtable.v2.TableRequest) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 2: + if (!getMutateRow().equals(other.getMutateRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 2: + hash = (37 * hash) + MUTATE_ROW_FIELD_NUMBER; + hash = (53 * hash) + getMutateRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.TableRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TableRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableRequest 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.bigtable.v2.TableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableRequest 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.bigtable.v2.TableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableRequest 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.bigtable.v2.TableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableRequest 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.bigtable.v2.TableRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.TableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.TableRequest) + com.google.bigtable.v2.TableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TableRequest.class, + com.google.bigtable.v2.TableRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.TableRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + if (mutateRowBuilder_ != null) { + mutateRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.TableRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.TableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.TableRequest build() { + com.google.bigtable.v2.TableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.TableRequest buildPartial() { + com.google.bigtable.v2.TableRequest result = new com.google.bigtable.v2.TableRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.TableRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.TableRequest result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + if (payloadCase_ == 2 && mutateRowBuilder_ != null) { + result.payload_ = mutateRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.TableRequest) { + return mergeFrom((com.google.bigtable.v2.TableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.TableRequest other) { + if (other == com.google.bigtable.v2.TableRequest.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case MUTATE_ROW: + { + mergeMutateRow(other.getMutateRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMutateRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequest getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowRequest.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowRequest value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowRequest.newBuilder( + (com.google.bigtable.v2.SessionReadRowRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowRequest.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowRequest) payload_; + } + return com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowRequest.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowRequest, + com.google.bigtable.v2.SessionReadRowRequest.Builder, + com.google.bigtable.v2.SessionReadRowRequestOrBuilder>( + (com.google.bigtable.v2.SessionReadRowRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder> + mutateRowBuilder_; + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequest getMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return mutateRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder setMutateRow(com.google.bigtable.v2.SessionMutateRowRequest value) { + if (mutateRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + mutateRowBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder setMutateRow( + com.google.bigtable.v2.SessionMutateRowRequest.Builder builderForValue) { + if (mutateRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + mutateRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder mergeMutateRow(com.google.bigtable.v2.SessionMutateRowRequest value) { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionMutateRowRequest.newBuilder( + (com.google.bigtable.v2.SessionMutateRowRequest) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + mutateRowBuilder_.mergeFrom(value); + } else { + mutateRowBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public Builder clearMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + mutateRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + public com.google.bigtable.v2.SessionMutateRowRequest.Builder getMutateRowBuilder() { + return internalGetMutateRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder() { + if ((payloadCase_ == 2) && (mutateRowBuilder_ != null)) { + return mutateRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowRequest) payload_; + } + return com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder> + internalGetMutateRowFieldBuilder() { + if (mutateRowBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.SessionMutateRowRequest.getDefaultInstance(); + } + mutateRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowRequest, + com.google.bigtable.v2.SessionMutateRowRequest.Builder, + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder>( + (com.google.bigtable.v2.SessionMutateRowRequest) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return mutateRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.TableRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.TableRequest) + private static final com.google.bigtable.v2.TableRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.TableRequest(); + } + + public static com.google.bigtable.v2.TableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableRequest 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.bigtable.v2.TableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequestOrBuilder.java new file mode 100644 index 0000000000..46dd37288e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface TableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.TableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowRequest read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowRequest getReadRow(); + + /** .google.bigtable.v2.SessionReadRowRequest read_row = 1; */ + com.google.bigtable.v2.SessionReadRowRequestOrBuilder getReadRowOrBuilder(); + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + boolean hasMutateRow(); + + /** + * .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; + * + * @return The mutateRow. + */ + com.google.bigtable.v2.SessionMutateRowRequest getMutateRow(); + + /** .google.bigtable.v2.SessionMutateRowRequest mutate_row = 2; */ + com.google.bigtable.v2.SessionMutateRowRequestOrBuilder getMutateRowOrBuilder(); + + com.google.bigtable.v2.TableRequest.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponse.java new file mode 100644 index 0000000000..376919490e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponse.java @@ -0,0 +1,922 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.TableResponse} + */ +@com.google.protobuf.Generated +public final class TableResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.TableResponse) + TableResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TableResponse"); + } + + // Use TableResponse.newBuilder() to construct. + private TableResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TableResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TableResponse.class, + com.google.bigtable.v2.TableResponse.Builder.class); + } + + private int payloadCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object payload_; + + public enum PayloadCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_ROW(1), + MUTATE_ROW(2), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(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 PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 1: + return READ_ROW; + case 2: + return MUTATE_ROW; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int READ_ROW_FIELD_NUMBER = 1; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + + public static final int MUTATE_ROW_FIELD_NUMBER = 2; + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse getMutateRow() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (payloadCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.bigtable.v2.SessionMutateRowResponse) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.SessionReadRowResponse) payload_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.SessionMutateRowResponse) payload_); + } + 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.bigtable.v2.TableResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.TableResponse other = (com.google.bigtable.v2.TableResponse) obj; + + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 1: + if (!getReadRow().equals(other.getReadRow())) return false; + break; + case 2: + if (!getMutateRow().equals(other.getMutateRow())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (payloadCase_) { + case 1: + hash = (37 * hash) + READ_ROW_FIELD_NUMBER; + hash = (53 * hash) + getReadRow().hashCode(); + break; + case 2: + hash = (37 * hash) + MUTATE_ROW_FIELD_NUMBER; + hash = (53 * hash) + getMutateRow().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.TableResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TableResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableResponse 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.bigtable.v2.TableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TableResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableResponse 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.bigtable.v2.TableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableResponse 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.bigtable.v2.TableResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TableResponse 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.bigtable.v2.TableResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.TableResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.TableResponse) + com.google.bigtable.v2.TableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TableResponse.class, + com.google.bigtable.v2.TableResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.TableResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readRowBuilder_ != null) { + readRowBuilder_.clear(); + } + if (mutateRowBuilder_ != null) { + mutateRowBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TableResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.TableResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.TableResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.TableResponse build() { + com.google.bigtable.v2.TableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.TableResponse buildPartial() { + com.google.bigtable.v2.TableResponse result = new com.google.bigtable.v2.TableResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.TableResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.TableResponse result) { + result.payloadCase_ = payloadCase_; + result.payload_ = this.payload_; + if (payloadCase_ == 1 && readRowBuilder_ != null) { + result.payload_ = readRowBuilder_.build(); + } + if (payloadCase_ == 2 && mutateRowBuilder_ != null) { + result.payload_ = mutateRowBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.TableResponse) { + return mergeFrom((com.google.bigtable.v2.TableResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.TableResponse other) { + if (other == com.google.bigtable.v2.TableResponse.getDefaultInstance()) return this; + switch (other.getPayloadCase()) { + case READ_ROW: + { + mergeReadRow(other.getReadRow()); + break; + } + case MUTATE_ROW: + { + mergeMutateRow(other.getMutateRow()); + break; + } + case PAYLOAD_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(internalGetReadRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMutateRowFieldBuilder().getBuilder(), extensionRegistry); + payloadCase_ = 2; + 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 payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + readRowBuilder_; + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + @java.lang.Override + public boolean hasReadRow() { + return payloadCase_ == 1; + } + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponse getReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 1) { + return readRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + readRowBuilder_.setMessage(value); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder setReadRow( + com.google.bigtable.v2.SessionReadRowResponse.Builder builderForValue) { + if (readRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + readRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder mergeReadRow(com.google.bigtable.v2.SessionReadRowResponse value) { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1 + && payload_ != com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionReadRowResponse.newBuilder( + (com.google.bigtable.v2.SessionReadRowResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 1) { + readRowBuilder_.mergeFrom(value); + } else { + readRowBuilder_.setMessage(value); + } + } + payloadCase_ = 1; + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public Builder clearReadRow() { + if (readRowBuilder_ == null) { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 1) { + payloadCase_ = 0; + payload_ = null; + } + readRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + public com.google.bigtable.v2.SessionReadRowResponse.Builder getReadRowBuilder() { + return internalGetReadRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + @java.lang.Override + public com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder() { + if ((payloadCase_ == 1) && (readRowBuilder_ != null)) { + return readRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 1) { + return (com.google.bigtable.v2.SessionReadRowResponse) payload_; + } + return com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder> + internalGetReadRowFieldBuilder() { + if (readRowBuilder_ == null) { + if (!(payloadCase_ == 1)) { + payload_ = com.google.bigtable.v2.SessionReadRowResponse.getDefaultInstance(); + } + readRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionReadRowResponse, + com.google.bigtable.v2.SessionReadRowResponse.Builder, + com.google.bigtable.v2.SessionReadRowResponseOrBuilder>( + (com.google.bigtable.v2.SessionReadRowResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 1; + onChanged(); + return readRowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder> + mutateRowBuilder_; + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + @java.lang.Override + public boolean hasMutateRow() { + return payloadCase_ == 2; + } + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponse getMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return mutateRowBuilder_.getMessage(); + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder setMutateRow(com.google.bigtable.v2.SessionMutateRowResponse value) { + if (mutateRowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + mutateRowBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder setMutateRow( + com.google.bigtable.v2.SessionMutateRowResponse.Builder builderForValue) { + if (mutateRowBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + mutateRowBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder mergeMutateRow(com.google.bigtable.v2.SessionMutateRowResponse value) { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ != com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance()) { + payload_ = + com.google.bigtable.v2.SessionMutateRowResponse.newBuilder( + (com.google.bigtable.v2.SessionMutateRowResponse) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + mutateRowBuilder_.mergeFrom(value); + } else { + mutateRowBuilder_.setMessage(value); + } + } + payloadCase_ = 2; + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public Builder clearMutateRow() { + if (mutateRowBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + mutateRowBuilder_.clear(); + } + return this; + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + public com.google.bigtable.v2.SessionMutateRowResponse.Builder getMutateRowBuilder() { + return internalGetMutateRowFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + @java.lang.Override + public com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder() { + if ((payloadCase_ == 2) && (mutateRowBuilder_ != null)) { + return mutateRowBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.bigtable.v2.SessionMutateRowResponse) payload_; + } + return com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + } + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder> + internalGetMutateRowFieldBuilder() { + if (mutateRowBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.bigtable.v2.SessionMutateRowResponse.getDefaultInstance(); + } + mutateRowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionMutateRowResponse, + com.google.bigtable.v2.SessionMutateRowResponse.Builder, + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder>( + (com.google.bigtable.v2.SessionMutateRowResponse) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + return mutateRowBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.TableResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.TableResponse) + private static final com.google.bigtable.v2.TableResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.TableResponse(); + } + + public static com.google.bigtable.v2.TableResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableResponse 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.bigtable.v2.TableResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponseOrBuilder.java new file mode 100644 index 0000000000..e1b61b9d71 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableResponseOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface TableResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.TableResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return Whether the readRow field is set. + */ + boolean hasReadRow(); + + /** + * .google.bigtable.v2.SessionReadRowResponse read_row = 1; + * + * @return The readRow. + */ + com.google.bigtable.v2.SessionReadRowResponse getReadRow(); + + /** .google.bigtable.v2.SessionReadRowResponse read_row = 1; */ + com.google.bigtable.v2.SessionReadRowResponseOrBuilder getReadRowOrBuilder(); + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return Whether the mutateRow field is set. + */ + boolean hasMutateRow(); + + /** + * .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; + * + * @return The mutateRow. + */ + com.google.bigtable.v2.SessionMutateRowResponse getMutateRow(); + + /** .google.bigtable.v2.SessionMutateRowResponse mutate_row = 2; */ + com.google.bigtable.v2.SessionMutateRowResponseOrBuilder getMutateRowOrBuilder(); + + com.google.bigtable.v2.TableResponse.PayloadCase getPayloadCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfiguration.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfiguration.java new file mode 100644 index 0000000000..43fe07eeb1 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfiguration.java @@ -0,0 +1,784 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Server provided instructions for enabling finer grained observability on
    + * the client to help diagnose customer issues. Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.TelemetryConfiguration} + */ +@com.google.protobuf.Generated +public final class TelemetryConfiguration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.TelemetryConfiguration) + TelemetryConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TelemetryConfiguration"); + } + + // Use TelemetryConfiguration.newBuilder() to construct. + private TelemetryConfiguration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TelemetryConfiguration() { + debugTagLevel_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TelemetryConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TelemetryConfiguration.class, + com.google.bigtable.v2.TelemetryConfiguration.Builder.class); + } + + /** + * + * + *
    +   * The level of detail of telemetry to be sent from the client.
    +   * 
    + * + * Protobuf enum {@code google.bigtable.v2.TelemetryConfiguration.Level} + */ + public enum Level implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * Server did not specify a level. Should disable all debug tag counters.
    +     * 
    + * + * LEVEL_UNSPECIFIED = 0; + */ + LEVEL_UNSPECIFIED(0), + /** + * + * + *
    +     * Enables all debug tag counter levels.
    +     * 
    + * + * DEBUG = 1; + */ + DEBUG(1), + /** + * + * + *
    +     * Eables all debug tag counters except for DEBUG.
    +     * 
    + * + * INFO = 2; + */ + INFO(2), + /** + * + * + *
    +     * Enables all debug tag counters except for DEBUG and INFO.
    +     * 
    + * + * WARN = 3; + */ + WARN(3), + /** + * + * + *
    +     * Enables only error debug tag counters.
    +     * 
    + * + * ERROR = 4; + */ + ERROR(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Level"); + } + + /** + * + * + *
    +     * Server did not specify a level. Should disable all debug tag counters.
    +     * 
    + * + * LEVEL_UNSPECIFIED = 0; + */ + public static final int LEVEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
    +     * Enables all debug tag counter levels.
    +     * 
    + * + * DEBUG = 1; + */ + public static final int DEBUG_VALUE = 1; + + /** + * + * + *
    +     * Eables all debug tag counters except for DEBUG.
    +     * 
    + * + * INFO = 2; + */ + public static final int INFO_VALUE = 2; + + /** + * + * + *
    +     * Enables all debug tag counters except for DEBUG and INFO.
    +     * 
    + * + * WARN = 3; + */ + public static final int WARN_VALUE = 3; + + /** + * + * + *
    +     * Enables only error debug tag counters.
    +     * 
    + * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Level 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 Level forNumber(int value) { + switch (value) { + case 0: + return LEVEL_UNSPECIFIED; + case 1: + return DEBUG; + case 2: + return INFO; + case 3: + return WARN; + case 4: + return ERROR; + 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 Level findValueByNumber(int number) { + return Level.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.bigtable.v2.TelemetryConfiguration.getDescriptor().getEnumTypes().get(0); + } + + private static final Level[] VALUES = values(); + + public static Level 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 Level(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.TelemetryConfiguration.Level) + } + + public static final int DEBUG_TAG_LEVEL_FIELD_NUMBER = 1; + private int debugTagLevel_ = 0; + + /** + * + * + *
    +   * Selector for the debug counters that should be uploaded.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The enum numeric value on the wire for debugTagLevel. + */ + @java.lang.Override + public int getDebugTagLevelValue() { + return debugTagLevel_; + } + + /** + * + * + *
    +   * Selector for the debug counters that should be uploaded.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The debugTagLevel. + */ + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration.Level getDebugTagLevel() { + com.google.bigtable.v2.TelemetryConfiguration.Level result = + com.google.bigtable.v2.TelemetryConfiguration.Level.forNumber(debugTagLevel_); + return result == null + ? com.google.bigtable.v2.TelemetryConfiguration.Level.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (debugTagLevel_ + != com.google.bigtable.v2.TelemetryConfiguration.Level.LEVEL_UNSPECIFIED.getNumber()) { + output.writeEnum(1, debugTagLevel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (debugTagLevel_ + != com.google.bigtable.v2.TelemetryConfiguration.Level.LEVEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, debugTagLevel_); + } + 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.bigtable.v2.TelemetryConfiguration)) { + return super.equals(obj); + } + com.google.bigtable.v2.TelemetryConfiguration other = + (com.google.bigtable.v2.TelemetryConfiguration) obj; + + if (debugTagLevel_ != other.debugTagLevel_) 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) + DEBUG_TAG_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + debugTagLevel_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.TelemetryConfiguration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TelemetryConfiguration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TelemetryConfiguration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TelemetryConfiguration 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.bigtable.v2.TelemetryConfiguration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.TelemetryConfiguration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.TelemetryConfiguration parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TelemetryConfiguration 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.bigtable.v2.TelemetryConfiguration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TelemetryConfiguration 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.bigtable.v2.TelemetryConfiguration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.TelemetryConfiguration 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.bigtable.v2.TelemetryConfiguration 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; + } + + /** + * + * + *
    +   * Server provided instructions for enabling finer grained observability on
    +   * the client to help diagnose customer issues. Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.TelemetryConfiguration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.TelemetryConfiguration) + com.google.bigtable.v2.TelemetryConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TelemetryConfiguration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.TelemetryConfiguration.class, + com.google.bigtable.v2.TelemetryConfiguration.Builder.class); + } + + // Construct using com.google.bigtable.v2.TelemetryConfiguration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + debugTagLevel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_TelemetryConfiguration_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration getDefaultInstanceForType() { + return com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration build() { + com.google.bigtable.v2.TelemetryConfiguration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration buildPartial() { + com.google.bigtable.v2.TelemetryConfiguration result = + new com.google.bigtable.v2.TelemetryConfiguration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.TelemetryConfiguration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.debugTagLevel_ = debugTagLevel_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.TelemetryConfiguration) { + return mergeFrom((com.google.bigtable.v2.TelemetryConfiguration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.TelemetryConfiguration other) { + if (other == com.google.bigtable.v2.TelemetryConfiguration.getDefaultInstance()) return this; + if (other.debugTagLevel_ != 0) { + setDebugTagLevelValue(other.getDebugTagLevelValue()); + } + 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: + { + debugTagLevel_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int debugTagLevel_ = 0; + + /** + * + * + *
    +     * Selector for the debug counters that should be uploaded.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The enum numeric value on the wire for debugTagLevel. + */ + @java.lang.Override + public int getDebugTagLevelValue() { + return debugTagLevel_; + } + + /** + * + * + *
    +     * Selector for the debug counters that should be uploaded.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @param value The enum numeric value on the wire for debugTagLevel to set. + * @return This builder for chaining. + */ + public Builder setDebugTagLevelValue(int value) { + debugTagLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Selector for the debug counters that should be uploaded.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The debugTagLevel. + */ + @java.lang.Override + public com.google.bigtable.v2.TelemetryConfiguration.Level getDebugTagLevel() { + com.google.bigtable.v2.TelemetryConfiguration.Level result = + com.google.bigtable.v2.TelemetryConfiguration.Level.forNumber(debugTagLevel_); + return result == null + ? com.google.bigtable.v2.TelemetryConfiguration.Level.UNRECOGNIZED + : result; + } + + /** + * + * + *
    +     * Selector for the debug counters that should be uploaded.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @param value The debugTagLevel to set. + * @return This builder for chaining. + */ + public Builder setDebugTagLevel(com.google.bigtable.v2.TelemetryConfiguration.Level value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + debugTagLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
    +     * Selector for the debug counters that should be uploaded.
    +     * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return This builder for chaining. + */ + public Builder clearDebugTagLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + debugTagLevel_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.TelemetryConfiguration) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.TelemetryConfiguration) + private static final com.google.bigtable.v2.TelemetryConfiguration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.TelemetryConfiguration(); + } + + public static com.google.bigtable.v2.TelemetryConfiguration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TelemetryConfiguration 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.bigtable.v2.TelemetryConfiguration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfigurationOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfigurationOrBuilder.java new file mode 100644 index 0000000000..457c8e594c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TelemetryConfigurationOrBuilder.java @@ -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 + * + * 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface TelemetryConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.TelemetryConfiguration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Selector for the debug counters that should be uploaded.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The enum numeric value on the wire for debugTagLevel. + */ + int getDebugTagLevelValue(); + + /** + * + * + *
    +   * Selector for the debug counters that should be uploaded.
    +   * 
    + * + * .google.bigtable.v2.TelemetryConfiguration.Level debug_tag_level = 1; + * + * @return The debugTagLevel. + */ + com.google.bigtable.v2.TelemetryConfiguration.Level getDebugTagLevel(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java index 743117f2eb..126781fa71 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.TimestampRange} */ -public final class TimestampRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class TimestampRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.TimestampRange) TimestampRangeOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimestampRange"); + } + // Use TimestampRange.newBuilder() to construct. - private TimestampRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TimestampRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private TimestampRange() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TimestampRange(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_TimestampRange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_TimestampRange_fieldAccessorTable @@ -63,6 +70,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int START_TIMESTAMP_MICROS_FIELD_NUMBER = 1; private long startTimestampMicros_ = 0L; + /** * * @@ -81,6 +89,7 @@ public long getStartTimestampMicros() { public static final int END_TIMESTAMP_MICROS_FIELD_NUMBER = 2; private long endTimestampMicros_ = 0L; + /** * * @@ -205,38 +214,38 @@ public static com.google.bigtable.v2.TimestampRange parseFrom( public static com.google.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange 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); } @@ -259,10 +268,11 @@ 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; } + /** * * @@ -272,7 +282,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.TimestampRange} */ - 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.bigtable.v2.TimestampRange) com.google.bigtable.v2.TimestampRangeOrBuilder { @@ -282,7 +292,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_TimestampRange_fieldAccessorTable @@ -294,7 +304,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.TimestampRange.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -348,39 +358,6 @@ private void buildPartial0(com.google.bigtable.v2.TimestampRange 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.bigtable.v2.TimestampRange) { @@ -457,6 +434,7 @@ public Builder mergeFrom( private int bitField0_; private long startTimestampMicros_; + /** * * @@ -472,6 +450,7 @@ public Builder mergeFrom( public long getStartTimestampMicros() { return startTimestampMicros_; } + /** * * @@ -491,6 +470,7 @@ public Builder setStartTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -510,6 +490,7 @@ public Builder clearStartTimestampMicros() { } private long endTimestampMicros_; + /** * * @@ -525,6 +506,7 @@ public Builder clearStartTimestampMicros() { public long getEndTimestampMicros() { return endTimestampMicros_; } + /** * * @@ -544,6 +526,7 @@ public Builder setEndTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -562,17 +545,6 @@ public Builder clearEndTimestampMicros() { 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.bigtable.v2.TimestampRange) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRangeOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRangeOrBuilder.java index 99ba9a45b0..9cf7860643 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRangeOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface TimestampRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.TimestampRange) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Type.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Type.java index 00e1cb3ab7..74f0dda1dc 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Type.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Type.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,53 +29,57 @@ * familiarity and consistency across products and features. * * For compatibility with Bigtable's existing untyped APIs, each `Type` includes - * an `Encoding` which describes how to convert to/from the underlying data. + * an `Encoding` which describes how to convert to or from the underlying data. * - * Each encoding also defines the following properties: + * Each encoding can operate in one of two modes: * - * * Order-preserving: Does the encoded value sort consistently with the - * original typed value? Note that Bigtable will always sort data based on - * the raw encoded value, *not* the decoded type. - * - Example: BYTES values sort in the same order as their raw encodings. - * - Counterexample: Encoding INT64 as a fixed-width decimal string does - * *not* preserve sort order when dealing with negative numbers. - * `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. - * * Self-delimiting: If we concatenate two encoded values, can we always tell - * where the first one ends and the second one begins? - * - Example: If we encode INT64s to fixed-width STRINGs, the first value - * will always contain exactly N digits, possibly preceded by a sign. - * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have - * no way to tell where the first one ends. - * * Compatibility: Which other systems have matching encoding schemes? For - * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` + * if and only if `X <= Y`. This is useful anywhere sort order is important, + * for example when encoding keys. + * - Distinct: In this mode, Bigtable guarantees that if `X != Y` then + * `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For + * example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}` + * are valid encodings of the same JSON value. + * + * The API clearly documents which mode is used wherever an encoding can be + * configured. Each encoding also documents which values are supported in which + * modes. For example, when encoding INT64 as a numeric STRING, negative numbers + * cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but + * `STRING("-00001") > STRING("00001")`. * * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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); } private Type() {} - @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.bigtable.v2.TypesProto.internal_static_google_bigtable_v2_Type_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_fieldAccessorTable @@ -91,7 +96,7 @@ public interface BytesOrBuilder * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -99,11 +104,12 @@ public interface BytesOrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -111,17 +117,19 @@ public interface BytesOrBuilder * @return The encoding. */ com.google.bigtable.v2.Type.Bytes.Encoding getEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; */ com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -132,31 +140,36 @@ public interface BytesOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Bytes} */ - public static final class Bytes extends com.google.protobuf.GeneratedMessageV3 + public static final class Bytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes) BytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bytes"); + } + // Use Bytes.newBuilder() to construct. - private Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Bytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Bytes() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Bytes(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable @@ -182,6 +195,7 @@ public interface EncodingOrBuilder * @return Whether the raw field is set. */ boolean hasRaw(); + /** * * @@ -194,6 +208,7 @@ public interface EncodingOrBuilder * @return The raw. */ com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw(); + /** * * @@ -207,40 +222,46 @@ public interface EncodingOrBuilder com.google.bigtable.v2.Type.Bytes.Encoding.EncodingCase getEncodingCase(); } + /** * * *
    -     * Rules used to convert to/from lower level types.
    +     * Rules used to convert to or from lower level types.
          * 
    * * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable @@ -252,44 +273,68 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public interface RawOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bytes.Encoding.Raw) - com.google.protobuf.MessageOrBuilder {} + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value which only contains the
    +         * null byte `0x00`, has one more null byte appended.
    +         * 
    + * + * bool escape_nulls = 1; + * + * @return The escapeNulls. + */ + boolean getEscapeNulls(); + } + /** * * *
    -       * Leaves the value "as-is"
    -       * * Order-preserving? Yes
    -       * * Self-delimiting? No
    -       * * Compatibility? N/A
    +       * Leaves the value as-is.
    +       *
    +       * Sorted mode: all values are supported.
    +       *
    +       * Distinct mode: all values are supported.
            * 
    * * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding.Raw} */ - public static final class Raw extends com.google.protobuf.GeneratedMessageV3 + public static final class Raw extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bytes.Encoding.Raw) RawOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Raw"); + } + // Use Raw.newBuilder() to construct. - private Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Raw(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Raw() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Raw(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable @@ -298,6 +343,28 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder.class); } + public static final int ESCAPE_NULLS_FIELD_NUMBER = 1; + private boolean escapeNulls_ = false; + + /** + * + * + *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value which only contains the
    +         * null byte `0x00`, has one more null byte appended.
    +         * 
    + * + * bool escape_nulls = 1; + * + * @return The escapeNulls. + */ + @java.lang.Override + public boolean getEscapeNulls() { + return escapeNulls_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -313,6 +380,9 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (escapeNulls_ != false) { + output.writeBool(1, escapeNulls_); + } getUnknownFields().writeTo(output); } @@ -322,6 +392,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (escapeNulls_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, escapeNulls_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -338,6 +411,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.v2.Type.Bytes.Encoding.Raw other = (com.google.bigtable.v2.Type.Bytes.Encoding.Raw) obj; + if (getEscapeNulls() != other.getEscapeNulls()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -349,6 +423,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ESCAPE_NULLS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEscapeNulls()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -391,39 +467,38 @@ public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw parseFrom( public static com.google.bigtable.v2.Type.Bytes.Encoding.Raw 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.bigtable.v2.Type.Bytes.Encoding.Raw 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.bigtable.v2.Type.Bytes.Encoding.Raw 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.bigtable.v2.Type.Bytes.Encoding.Raw 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.bigtable.v2.Type.Bytes.Encoding.Raw 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.bigtable.v2.Type.Bytes.Encoding.Raw 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); } @@ -447,24 +522,26 @@ 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; } + /** * * *
    -         * Leaves the value "as-is"
    -         * * Order-preserving? Yes
    -         * * Self-delimiting? No
    -         * * Compatibility? N/A
    +         * Leaves the value as-is.
    +         *
    +         * Sorted mode: all values are supported.
    +         *
    +         * Distinct mode: all values are supported.
              * 
    * * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding.Raw} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bytes.Encoding.Raw) com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder { @@ -474,7 +551,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable @@ -486,13 +563,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.Bytes.Encoding.Raw.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + escapeNulls_ = false; return this; } @@ -520,43 +599,18 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.Raw build() { public com.google.bigtable.v2.Type.Bytes.Encoding.Raw buildPartial() { com.google.bigtable.v2.Type.Bytes.Encoding.Raw result = new com.google.bigtable.v2.Type.Bytes.Encoding.Raw(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(com.google.bigtable.v2.Type.Bytes.Encoding.Raw result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.escapeNulls_ = escapeNulls_; + } } @java.lang.Override @@ -572,6 +626,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Type.Bytes.Encoding.Raw other) { if (other == com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance()) return this; + if (other.getEscapeNulls() != false) { + setEscapeNulls(other.getEscapeNulls()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -598,6 +655,12 @@ public Builder mergeFrom( case 0: done = true; break; + case 8: + { + escapeNulls_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -615,16 +678,71 @@ public Builder mergeFrom( return this; } + private int bitField0_; + + private boolean escapeNulls_; + + /** + * + * + *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value which only contains the
    +           * null byte `0x00`, has one more null byte appended.
    +           * 
    + * + * bool escape_nulls = 1; + * + * @return The escapeNulls. + */ @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public boolean getEscapeNulls() { + return escapeNulls_; } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value which only contains the
    +           * null byte `0x00`, has one more null byte appended.
    +           * 
    + * + * bool escape_nulls = 1; + * + * @param value The escapeNulls to set. + * @return This builder for chaining. + */ + public Builder setEscapeNulls(boolean value) { + + escapeNulls_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value which only contains the
    +           * null byte `0x00`, has one more null byte appended.
    +           * 
    + * + * bool escape_nulls = 1; + * + * @return This builder for chaining. + */ + public Builder clearEscapeNulls() { + bitField0_ = (bitField0_ & ~0x00000001); + escapeNulls_ = false; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Bytes.Encoding.Raw) @@ -695,6 +813,7 @@ public enum EncodingCase private EncodingCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -726,6 +845,7 @@ public EncodingCase getEncodingCase() { } public static final int RAW_FIELD_NUMBER = 1; + /** * * @@ -741,6 +861,7 @@ public EncodingCase getEncodingCase() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -759,6 +880,7 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw() { } return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } + /** * * @@ -892,38 +1014,38 @@ public static com.google.bigtable.v2.Type.Bytes.Encoding parseFrom( public static com.google.bigtable.v2.Type.Bytes.Encoding 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.bigtable.v2.Type.Bytes.Encoding 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.bigtable.v2.Type.Bytes.Encoding 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.bigtable.v2.Type.Bytes.Encoding 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.bigtable.v2.Type.Bytes.Encoding 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.bigtable.v2.Type.Bytes.Encoding 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); } @@ -947,21 +1069,22 @@ 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; } + /** * * *
    -       * Rules used to convert to/from lower level types.
    +       * Rules used to convert to or from lower level types.
            * 
    * * Protobuf type {@code google.bigtable.v2.Type.Bytes.Encoding} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bytes.Encoding) com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder { @@ -971,7 +1094,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable @@ -983,7 +1106,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.Bytes.Encoding.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -1043,41 +1166,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.Type.Bytes.Encoding resul } } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.Type.Bytes.Encoding) { @@ -1129,7 +1217,7 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getRawFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetRawFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 1; break; } // case 10 @@ -1166,11 +1254,12 @@ public Builder clearEncoding() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder> rawBuilder_; + /** * * @@ -1186,6 +1275,7 @@ public Builder clearEncoding() { public boolean hasRaw() { return encodingCase_ == 1; } + /** * * @@ -1211,6 +1301,7 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.Raw getRaw() { return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1233,6 +1324,7 @@ public Builder setRaw(com.google.bigtable.v2.Type.Bytes.Encoding.Raw value) { encodingCase_ = 1; return this; } + /** * * @@ -1253,6 +1345,7 @@ public Builder setRaw( encodingCase_ = 1; return this; } + /** * * @@ -1286,6 +1379,7 @@ public Builder mergeRaw(com.google.bigtable.v2.Type.Bytes.Encoding.Raw value) { encodingCase_ = 1; return this; } + /** * * @@ -1311,6 +1405,7 @@ public Builder clearRaw() { } return this; } + /** * * @@ -1321,8 +1416,9 @@ public Builder clearRaw() { * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; */ public com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder getRawBuilder() { - return getRawFieldBuilder().getBuilder(); + return internalGetRawFieldBuilder().getBuilder(); } + /** * * @@ -1343,6 +1439,7 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder() return com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } } + /** * * @@ -1352,17 +1449,17 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder() * * .google.bigtable.v2.Type.Bytes.Encoding.Raw raw = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder> - getRawFieldBuilder() { + internalGetRawFieldBuilder() { if (rawBuilder_ == null) { if (!(encodingCase_ == 1)) { encoding_ = com.google.bigtable.v2.Type.Bytes.Encoding.Raw.getDefaultInstance(); } rawBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding.Raw, com.google.bigtable.v2.Type.Bytes.Encoding.Raw.Builder, com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder>( @@ -1376,18 +1473,6 @@ public com.google.bigtable.v2.Type.Bytes.Encoding.RawOrBuilder getRawOrBuilder() return rawBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Bytes.Encoding) } @@ -1443,11 +1528,12 @@ public com.google.bigtable.v2.Type.Bytes.Encoding getDefaultInstanceForType() { private int bitField0_; public static final int ENCODING_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type.Bytes.Encoding encoding_; + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1458,11 +1544,12 @@ public com.google.bigtable.v2.Type.Bytes.Encoding getDefaultInstanceForType() { public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1475,11 +1562,12 @@ public com.google.bigtable.v2.Type.Bytes.Encoding getEncoding() { ? com.google.bigtable.v2.Type.Bytes.Encoding.getDefaultInstance() : encoding_; } + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1595,38 +1683,38 @@ public static com.google.bigtable.v2.Type.Bytes parseFrom( public static com.google.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes 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); } @@ -1649,11 +1737,11 @@ 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; } + /** * * @@ -1664,8 +1752,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Type.Bytes} */ - 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.bigtable.v2.Type.Bytes) com.google.bigtable.v2.Type.BytesOrBuilder { @@ -1675,7 +1762,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable @@ -1689,14 +1776,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) { - getEncodingFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } } @@ -1752,41 +1839,6 @@ private void buildPartial0(com.google.bigtable.v2.Type.Bytes 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.bigtable.v2.Type.Bytes) { @@ -1830,7 +1882,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getEncodingFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -1854,16 +1907,17 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Type.Bytes.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding, com.google.bigtable.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder> encodingBuilder_; + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1873,11 +1927,12 @@ public Builder mergeFrom( public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1893,11 +1948,12 @@ public com.google.bigtable.v2.Type.Bytes.Encoding getEncoding() { return encodingBuilder_.getMessage(); } } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1915,11 +1971,12 @@ public Builder setEncoding(com.google.bigtable.v2.Type.Bytes.Encoding value) { onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1935,11 +1992,12 @@ public Builder setEncoding( onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1962,11 +2020,12 @@ public Builder mergeEncoding(com.google.bigtable.v2.Type.Bytes.Encoding value) { } return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1981,11 +2040,12 @@ public Builder clearEncoding() { onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -1993,13 +2053,14 @@ public Builder clearEncoding() { public com.google.bigtable.v2.Type.Bytes.Encoding.Builder getEncodingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getEncodingFieldBuilder().getBuilder(); + return internalGetEncodingFieldBuilder().getBuilder(); } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; @@ -2013,23 +2074,24 @@ public com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder( : encoding_; } } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.Bytes.Encoding encoding = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding, com.google.bigtable.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder> - getEncodingFieldBuilder() { + internalGetEncodingFieldBuilder() { if (encodingBuilder_ == null) { encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes.Encoding, com.google.bigtable.v2.Type.Bytes.Encoding.Builder, com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder>( @@ -2039,18 +2101,6 @@ public com.google.bigtable.v2.Type.Bytes.EncodingOrBuilder getEncodingOrBuilder( return encodingBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Bytes) } @@ -2112,7 +2162,7 @@ public interface StringOrBuilder * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -2120,11 +2170,12 @@ public interface StringOrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -2132,17 +2183,19 @@ public interface StringOrBuilder * @return The encoding. */ com.google.bigtable.v2.Type.String.Encoding getEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; */ com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -2153,31 +2206,36 @@ public interface StringOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.String} */ - public static final class String extends com.google.protobuf.GeneratedMessageV3 + public static final class String extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String) StringOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "String"); + } + // Use String.newBuilder() to construct. - private String(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private String(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private String() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new String(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_fieldAccessorTable @@ -2202,11 +2260,12 @@ public interface EncodingOrBuilder *
    * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return Whether the utf8Raw field is set. */ @java.lang.Deprecated boolean hasUtf8Raw(); + /** * * @@ -2218,11 +2277,12 @@ public interface EncodingOrBuilder *
    * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return The utf8Raw. */ @java.lang.Deprecated com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw(); + /** * * @@ -2248,6 +2308,7 @@ public interface EncodingOrBuilder * @return Whether the utf8Bytes field is set. */ boolean hasUtf8Bytes(); + /** * * @@ -2260,6 +2321,7 @@ public interface EncodingOrBuilder * @return The utf8Bytes. */ com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes(); + /** * * @@ -2273,40 +2335,46 @@ public interface EncodingOrBuilder com.google.bigtable.v2.Type.String.Encoding.EncodingCase getEncodingCase(); } + /** * * *
    -     * Rules used to convert to/from lower level types.
    +     * Rules used to convert to or from lower level types.
          * 
    * * Protobuf type {@code google.bigtable.v2.Type.String.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable @@ -2320,6 +2388,7 @@ public interface Utf8RawOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.String.Encoding.Utf8Raw) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -2330,31 +2399,36 @@ public interface Utf8RawOrBuilder * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Raw} */ @java.lang.Deprecated - public static final class Utf8Raw extends com.google.protobuf.GeneratedMessageV3 + public static final class Utf8Raw extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding.Utf8Raw) Utf8RawOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Utf8Raw"); + } + // Use Utf8Raw.newBuilder() to construct. - private Utf8Raw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Utf8Raw(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Utf8Raw() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Utf8Raw(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable @@ -2456,39 +2530,38 @@ public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw parseFrom( public static com.google.bigtable.v2.Type.String.Encoding.Utf8Raw 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.bigtable.v2.Type.String.Encoding.Utf8Raw 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.bigtable.v2.Type.String.Encoding.Utf8Raw 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.bigtable.v2.Type.String.Encoding.Utf8Raw 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.bigtable.v2.Type.String.Encoding.Utf8Raw 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.bigtable.v2.Type.String.Encoding.Utf8Raw 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); } @@ -2513,10 +2586,11 @@ 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; } + /** * * @@ -2527,7 +2601,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Raw} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding.Utf8Raw) com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder { @@ -2537,7 +2611,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable @@ -2549,7 +2623,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -2588,48 +2662,13 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw buildPartial() { } @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) { - return mergeFrom((com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) other); - } else { - super.mergeFrom(other); - return this; - } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) { + return mergeFrom((com.google.bigtable.v2.Type.String.Encoding.Utf8Raw) other); + } else { + super.mergeFrom(other); + return this; + } } public Builder mergeFrom(com.google.bigtable.v2.Type.String.Encoding.Utf8Raw other) { @@ -2678,18 +2717,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.bigtable.v2.Type.String.Encoding.Utf8Raw) } @@ -2745,38 +2772,99 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getDefaultInstanceFor public interface Utf8BytesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) - com.google.protobuf.MessageOrBuilder {} + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +         * Single-character escape sequence used to support NULL values.
    +         *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value where every character equals
    +         * `null_escape_char`, has one more `null_escape_char` appended.
    +         *
    +         * If `null_escape_char` is set and does not equal the ASCII null
    +         * character `0x00`, then the encoding will not support sorted mode.
    +         *
    +         * .
    +         * 
    + * + * string null_escape_char = 1; + * + * @return The nullEscapeChar. + */ + java.lang.String getNullEscapeChar(); + + /** + * + * + *
    +         * Single-character escape sequence used to support NULL values.
    +         *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value where every character equals
    +         * `null_escape_char`, has one more `null_escape_char` appended.
    +         *
    +         * If `null_escape_char` is set and does not equal the ASCII null
    +         * character `0x00`, then the encoding will not support sorted mode.
    +         *
    +         * .
    +         * 
    + * + * string null_escape_char = 1; + * + * @return The bytes for nullEscapeChar. + */ + com.google.protobuf.ByteString getNullEscapeCharBytes(); + } + /** * * *
    -       * UTF-8 encoding
    -       * * Order-preserving? Yes (code point order)
    -       * * Self-delimiting? No
    -       * * Compatibility?
    -       *    - BigQuery Federation `TEXT` encoding
    -       *    - HBase `Bytes.toBytes`
    -       *    - Java `String#getBytes(StandardCharsets.UTF_8)`
    +       * UTF-8 encoding.
    +       *
    +       * Sorted mode:
    +       * - All values are supported.
    +       * - Code point order is preserved.
    +       *
    +       * Distinct mode: all values are supported.
    +       *
    +       * Compatible with:
    +       *
    +       * - BigQuery `TEXT` encoding
    +       * - HBase `Bytes.toBytes`
    +       * - Java `String#getBytes(StandardCharsets.UTF_8)`
            * 
    * * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Bytes} */ - public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessageV3 + public static final class Utf8Bytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) Utf8BytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Utf8Bytes"); + } + // Use Utf8Bytes.newBuilder() to construct. - private Utf8Bytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Utf8Bytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private Utf8Bytes() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Utf8Bytes(); + private Utf8Bytes() { + nullEscapeChar_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -2785,7 +2873,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable @@ -2794,6 +2882,79 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder.class); } + public static final int NULL_ESCAPE_CHAR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object nullEscapeChar_ = ""; + + /** + * + * + *
    +         * Single-character escape sequence used to support NULL values.
    +         *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value where every character equals
    +         * `null_escape_char`, has one more `null_escape_char` appended.
    +         *
    +         * If `null_escape_char` is set and does not equal the ASCII null
    +         * character `0x00`, then the encoding will not support sorted mode.
    +         *
    +         * .
    +         * 
    + * + * string null_escape_char = 1; + * + * @return The nullEscapeChar. + */ + @java.lang.Override + public java.lang.String getNullEscapeChar() { + java.lang.Object ref = nullEscapeChar_; + 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(); + nullEscapeChar_ = s; + return s; + } + } + + /** + * + * + *
    +         * Single-character escape sequence used to support NULL values.
    +         *
    +         * If set, allows NULL values to be encoded as the empty string "".
    +         *
    +         * The actual empty string, or any value where every character equals
    +         * `null_escape_char`, has one more `null_escape_char` appended.
    +         *
    +         * If `null_escape_char` is set and does not equal the ASCII null
    +         * character `0x00`, then the encoding will not support sorted mode.
    +         *
    +         * .
    +         * 
    + * + * string null_escape_char = 1; + * + * @return The bytes for nullEscapeChar. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNullEscapeCharBytes() { + java.lang.Object ref = nullEscapeChar_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nullEscapeChar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2809,6 +2970,9 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nullEscapeChar_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, nullEscapeChar_); + } getUnknownFields().writeTo(output); } @@ -2818,6 +2982,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nullEscapeChar_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nullEscapeChar_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2834,6 +3001,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes other = (com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes) obj; + if (!getNullEscapeChar().equals(other.getNullEscapeChar())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2845,6 +3013,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NULL_ESCAPE_CHAR_FIELD_NUMBER; + hash = (53 * hash) + getNullEscapeChar().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2887,39 +3057,38 @@ public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes parseFrom( public static com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.v2.Type.String.Encoding.Utf8Bytes 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.bigtable.v2.Type.String.Encoding.Utf8Bytes 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); } @@ -2944,27 +3113,34 @@ 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; } + /** * * *
    -         * UTF-8 encoding
    -         * * Order-preserving? Yes (code point order)
    -         * * Self-delimiting? No
    -         * * Compatibility?
    -         *    - BigQuery Federation `TEXT` encoding
    -         *    - HBase `Bytes.toBytes`
    -         *    - Java `String#getBytes(StandardCharsets.UTF_8)`
    +         * UTF-8 encoding.
    +         *
    +         * Sorted mode:
    +         * - All values are supported.
    +         * - Code point order is preserved.
    +         *
    +         * Distinct mode: all values are supported.
    +         *
    +         * Compatible with:
    +         *
    +         * - BigQuery `TEXT` encoding
    +         * - HBase `Bytes.toBytes`
    +         * - Java `String#getBytes(StandardCharsets.UTF_8)`
              * 
    * * Protobuf type {@code google.bigtable.v2.Type.String.Encoding.Utf8Bytes} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder { @@ -2974,7 +3150,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable @@ -2986,13 +3162,15 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + nullEscapeChar_ = ""; return this; } @@ -3020,43 +3198,18 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes build() { public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes buildPartial() { com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes result = new com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.nullEscapeChar_ = nullEscapeChar_; + } } @java.lang.Override @@ -3072,6 +3225,11 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes other) { if (other == com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance()) return this; + if (!other.getNullEscapeChar().isEmpty()) { + nullEscapeChar_ = other.nullEscapeChar_; + bitField0_ |= 0x00000001; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3098,6 +3256,12 @@ public Builder mergeFrom( case 0: done = true; break; + case 10: + { + nullEscapeChar_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3115,16 +3279,167 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + private int bitField0_; + + private java.lang.Object nullEscapeChar_ = ""; + + /** + * + * + *
    +           * Single-character escape sequence used to support NULL values.
    +           *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value where every character equals
    +           * `null_escape_char`, has one more `null_escape_char` appended.
    +           *
    +           * If `null_escape_char` is set and does not equal the ASCII null
    +           * character `0x00`, then the encoding will not support sorted mode.
    +           *
    +           * .
    +           * 
    + * + * string null_escape_char = 1; + * + * @return The nullEscapeChar. + */ + public java.lang.String getNullEscapeChar() { + java.lang.Object ref = nullEscapeChar_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nullEscapeChar_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
    +           * Single-character escape sequence used to support NULL values.
    +           *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value where every character equals
    +           * `null_escape_char`, has one more `null_escape_char` appended.
    +           *
    +           * If `null_escape_char` is set and does not equal the ASCII null
    +           * character `0x00`, then the encoding will not support sorted mode.
    +           *
    +           * .
    +           * 
    + * + * string null_escape_char = 1; + * + * @return The bytes for nullEscapeChar. + */ + public com.google.protobuf.ByteString getNullEscapeCharBytes() { + java.lang.Object ref = nullEscapeChar_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nullEscapeChar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +           * Single-character escape sequence used to support NULL values.
    +           *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value where every character equals
    +           * `null_escape_char`, has one more `null_escape_char` appended.
    +           *
    +           * If `null_escape_char` is set and does not equal the ASCII null
    +           * character `0x00`, then the encoding will not support sorted mode.
    +           *
    +           * .
    +           * 
    + * + * string null_escape_char = 1; + * + * @param value The nullEscapeChar to set. + * @return This builder for chaining. + */ + public Builder setNullEscapeChar(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nullEscapeChar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +           * Single-character escape sequence used to support NULL values.
    +           *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value where every character equals
    +           * `null_escape_char`, has one more `null_escape_char` appended.
    +           *
    +           * If `null_escape_char` is set and does not equal the ASCII null
    +           * character `0x00`, then the encoding will not support sorted mode.
    +           *
    +           * .
    +           * 
    + * + * string null_escape_char = 1; + * + * @return This builder for chaining. + */ + public Builder clearNullEscapeChar() { + nullEscapeChar_ = getDefaultInstance().getNullEscapeChar(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +           * Single-character escape sequence used to support NULL values.
    +           *
    +           * If set, allows NULL values to be encoded as the empty string "".
    +           *
    +           * The actual empty string, or any value where every character equals
    +           * `null_escape_char`, has one more `null_escape_char` appended.
    +           *
    +           * If `null_escape_char` is set and does not equal the ASCII null
    +           * character `0x00`, then the encoding will not support sorted mode.
    +           *
    +           * .
    +           * 
    + * + * string null_escape_char = 1; + * + * @param value The bytes for nullEscapeChar to set. + * @return This builder for chaining. + */ + public Builder setNullEscapeCharBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nullEscapeChar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.String.Encoding.Utf8Bytes) @@ -3197,6 +3512,7 @@ public enum EncodingCase private EncodingCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -3230,6 +3546,7 @@ public EncodingCase getEncodingCase() { } public static final int UTF8_RAW_FIELD_NUMBER = 1; + /** * * @@ -3241,7 +3558,7 @@ public EncodingCase getEncodingCase() { * * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return Whether the utf8Raw field is set. */ @java.lang.Override @@ -3249,6 +3566,7 @@ public EncodingCase getEncodingCase() { public boolean hasUtf8Raw() { return encodingCase_ == 1; } + /** * * @@ -3260,7 +3578,7 @@ public boolean hasUtf8Raw() { * * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return The utf8Raw. */ @java.lang.Override @@ -3271,6 +3589,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { } return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } + /** * * @@ -3291,6 +3610,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr } public static final int UTF8_BYTES_FIELD_NUMBER = 2; + /** * * @@ -3306,6 +3626,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr public boolean hasUtf8Bytes() { return encodingCase_ == 2; } + /** * * @@ -3324,6 +3645,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { } return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } + /** * * @@ -3473,38 +3795,38 @@ public static com.google.bigtable.v2.Type.String.Encoding parseFrom( public static com.google.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding 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); } @@ -3528,21 +3850,22 @@ 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; } + /** * * *
    -       * Rules used to convert to/from lower level types.
    +       * Rules used to convert to or from lower level types.
            * 
    * * Protobuf type {@code google.bigtable.v2.Type.String.Encoding} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.String.Encoding) com.google.bigtable.v2.Type.String.EncodingOrBuilder { @@ -3552,7 +3875,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable @@ -3564,7 +3887,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.String.Encoding.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -3631,48 +3954,13 @@ private void buildPartialOneofs(com.google.bigtable.v2.Type.String.Encoding 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.bigtable.v2.Type.String.Encoding) { - return mergeFrom((com.google.bigtable.v2.Type.String.Encoding) other); - } else { - super.mergeFrom(other); - return this; - } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.String.Encoding) { + return mergeFrom((com.google.bigtable.v2.Type.String.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } } public Builder mergeFrom(com.google.bigtable.v2.Type.String.Encoding other) { @@ -3722,13 +4010,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getUtf8RawFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUtf8RawFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 1; break; } // case 10 case 18: { - input.readMessage(getUtf8BytesFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetUtf8BytesFieldBuilder().getBuilder(), extensionRegistry); encodingCase_ = 2; break; } // case 18 @@ -3765,11 +4055,12 @@ public Builder clearEncoding() { private int bitField0_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder> utf8RawBuilder_; + /** * * @@ -3781,7 +4072,7 @@ public Builder clearEncoding() { * * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return Whether the utf8Raw field is set. */ @java.lang.Override @@ -3789,6 +4080,7 @@ public Builder clearEncoding() { public boolean hasUtf8Raw() { return encodingCase_ == 1; } + /** * * @@ -3800,7 +4092,7 @@ public boolean hasUtf8Raw() { * * * @deprecated google.bigtable.v2.Type.String.Encoding.utf8_raw is deprecated. See - * google/bigtable/v2/types.proto;l=97 + * google/bigtable/v2/types.proto;l=121 * @return The utf8Raw. */ @java.lang.Override @@ -3818,6 +4110,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw getUtf8Raw() { return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } } + /** * * @@ -3842,6 +4135,7 @@ public Builder setUtf8Raw(com.google.bigtable.v2.Type.String.Encoding.Utf8Raw va encodingCase_ = 1; return this; } + /** * * @@ -3864,6 +4158,7 @@ public Builder setUtf8Raw( encodingCase_ = 1; return this; } + /** * * @@ -3899,6 +4194,7 @@ public Builder mergeUtf8Raw(com.google.bigtable.v2.Type.String.Encoding.Utf8Raw encodingCase_ = 1; return this; } + /** * * @@ -3926,6 +4222,7 @@ public Builder clearUtf8Raw() { } return this; } + /** * * @@ -3938,8 +4235,9 @@ public Builder clearUtf8Raw() { */ @java.lang.Deprecated public com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder getUtf8RawBuilder() { - return getUtf8RawFieldBuilder().getBuilder(); + return internalGetUtf8RawFieldBuilder().getBuilder(); } + /** * * @@ -3962,6 +4260,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr return com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } } + /** * * @@ -3972,17 +4271,17 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr * .google.bigtable.v2.Type.String.Encoding.Utf8Raw utf8_raw = 1 [deprecated = true]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder> - getUtf8RawFieldBuilder() { + internalGetUtf8RawFieldBuilder() { if (utf8RawBuilder_ == null) { if (!(encodingCase_ == 1)) { encoding_ = com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.getDefaultInstance(); } utf8RawBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Raw, com.google.bigtable.v2.Type.String.Encoding.Utf8Raw.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder>( @@ -3996,11 +4295,12 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr return utf8RawBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder> utf8BytesBuilder_; + /** * * @@ -4016,6 +4316,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8RawOrBuilder getUtf8RawOr public boolean hasUtf8Bytes() { return encodingCase_ == 2; } + /** * * @@ -4041,6 +4342,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes getUtf8Bytes() { return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } } + /** * * @@ -4063,6 +4365,7 @@ public Builder setUtf8Bytes(com.google.bigtable.v2.Type.String.Encoding.Utf8Byte encodingCase_ = 2; return this; } + /** * * @@ -4083,6 +4386,7 @@ public Builder setUtf8Bytes( encodingCase_ = 2; return this; } + /** * * @@ -4116,6 +4420,7 @@ public Builder mergeUtf8Bytes(com.google.bigtable.v2.Type.String.Encoding.Utf8By encodingCase_ = 2; return this; } + /** * * @@ -4141,6 +4446,7 @@ public Builder clearUtf8Bytes() { } return this; } + /** * * @@ -4151,8 +4457,9 @@ public Builder clearUtf8Bytes() { * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; */ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8BytesBuilder() { - return getUtf8BytesFieldBuilder().getBuilder(); + return internalGetUtf8BytesFieldBuilder().getBuilder(); } + /** * * @@ -4174,6 +4481,7 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8Byte return com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } } + /** * * @@ -4183,18 +4491,18 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8Byte * * .google.bigtable.v2.Type.String.Encoding.Utf8Bytes utf8_bytes = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder> - getUtf8BytesFieldBuilder() { + internalGetUtf8BytesFieldBuilder() { if (utf8BytesBuilder_ == null) { if (!(encodingCase_ == 2)) { encoding_ = com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.getDefaultInstance(); } utf8BytesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes, com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder, com.google.bigtable.v2.Type.String.Encoding.Utf8BytesOrBuilder>( @@ -4208,18 +4516,6 @@ public com.google.bigtable.v2.Type.String.Encoding.Utf8Bytes.Builder getUtf8Byte return utf8BytesBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.String.Encoding) } @@ -4275,11 +4571,12 @@ public com.google.bigtable.v2.Type.String.Encoding getDefaultInstanceForType() { private int bitField0_; public static final int ENCODING_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type.String.Encoding encoding_; + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4290,11 +4587,12 @@ public com.google.bigtable.v2.Type.String.Encoding getDefaultInstanceForType() { public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4307,11 +4605,12 @@ public com.google.bigtable.v2.Type.String.Encoding getEncoding() { ? com.google.bigtable.v2.Type.String.Encoding.getDefaultInstance() : encoding_; } + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4427,38 +4726,38 @@ public static com.google.bigtable.v2.Type.String parseFrom( public static com.google.bigtable.v2.Type.String 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.bigtable.v2.Type.String 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.bigtable.v2.Type.String 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.bigtable.v2.Type.String 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.bigtable.v2.Type.String 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.bigtable.v2.Type.String 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); } @@ -4481,11 +4780,11 @@ 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; } + /** * * @@ -4496,8 +4795,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Type.String} */ - 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.bigtable.v2.Type.String) com.google.bigtable.v2.Type.StringOrBuilder { @@ -4507,7 +4805,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_String_fieldAccessorTable @@ -4521,14 +4819,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) { - getEncodingFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } } @@ -4584,41 +4882,6 @@ private void buildPartial0(com.google.bigtable.v2.Type.String 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.bigtable.v2.Type.String) { @@ -4662,7 +4925,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getEncodingFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -4686,16 +4950,17 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Type.String.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding, com.google.bigtable.v2.Type.String.Encoding.Builder, com.google.bigtable.v2.Type.String.EncodingOrBuilder> encodingBuilder_; + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4705,11 +4970,12 @@ public Builder mergeFrom( public boolean hasEncoding() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4725,11 +4991,12 @@ public com.google.bigtable.v2.Type.String.Encoding getEncoding() { return encodingBuilder_.getMessage(); } } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4747,11 +5014,12 @@ public Builder setEncoding(com.google.bigtable.v2.Type.String.Encoding value) { onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4767,11 +5035,12 @@ public Builder setEncoding( onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4794,11 +5063,12 @@ public Builder mergeEncoding(com.google.bigtable.v2.Type.String.Encoding value) } return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4813,11 +5083,12 @@ public Builder clearEncoding() { onChanged(); return this; } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4825,13 +5096,14 @@ public Builder clearEncoding() { public com.google.bigtable.v2.Type.String.Encoding.Builder getEncodingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getEncodingFieldBuilder().getBuilder(); + return internalGetEncodingFieldBuilder().getBuilder(); } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; @@ -4845,23 +5117,24 @@ public com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder : encoding_; } } + /** * * *
    -       * The encoding to use when converting to/from lower level types.
    +       * The encoding to use when converting to or from lower level types.
            * 
    * * .google.bigtable.v2.Type.String.Encoding encoding = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding, com.google.bigtable.v2.Type.String.Encoding.Builder, com.google.bigtable.v2.Type.String.EncodingOrBuilder> - getEncodingFieldBuilder() { + internalGetEncodingFieldBuilder() { if (encodingBuilder_ == null) { encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.String.Encoding, com.google.bigtable.v2.Type.String.Encoding.Builder, com.google.bigtable.v2.Type.String.EncodingOrBuilder>( @@ -4871,18 +5144,6 @@ public com.google.bigtable.v2.Type.String.EncodingOrBuilder getEncodingOrBuilder return encodingBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.String) } @@ -4944,7 +5205,7 @@ public interface Int64OrBuilder * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; @@ -4952,11 +5213,12 @@ public interface Int64OrBuilder * @return Whether the encoding field is set. */ boolean hasEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; @@ -4964,17 +5226,19 @@ public interface Int64OrBuilder * @return The encoding. */ com.google.bigtable.v2.Type.Int64.Encoding getEncoding(); + /** * * *
    -     * The encoding to use when converting to/from lower level types.
    +     * The encoding to use when converting to or from lower level types.
          * 
    * * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; */ com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder(); } + /** * * @@ -4985,31 +5249,36 @@ public interface Int64OrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Int64} */ - public static final class Int64 extends com.google.protobuf.GeneratedMessageV3 + public static final class Int64 extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64) Int64OrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Int64"); + } + // Use Int64.newBuilder() to construct. - private Int64(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Int64(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Int64() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Int64(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable @@ -5035,6 +5304,7 @@ public interface EncodingOrBuilder * @return Whether the bigEndianBytes field is set. */ boolean hasBigEndianBytes(); + /** * * @@ -5047,6 +5317,7 @@ public interface EncodingOrBuilder * @return The bigEndianBytes. */ com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes(); + /** * * @@ -5059,42 +5330,89 @@ public interface EncodingOrBuilder com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder getBigEndianBytesOrBuilder(); + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + boolean hasOrderedCodeBytes(); + + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes getOrderedCodeBytes(); + + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder(); + com.google.bigtable.v2.Type.Int64.Encoding.EncodingCase getEncodingCase(); } + /** * * *
    -     * Rules used to convert to/from lower level types.
    +     * Rules used to convert to or from lower level types.
          * 
    * * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding} */ - public static final class Encoding extends com.google.protobuf.GeneratedMessageV3 + public static final class Encoding extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64.Encoding) EncodingOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + // Use Encoding.newBuilder() to construct. - private Encoding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Encoding() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Encoding(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_Encoding_fieldAccessorTable @@ -5115,11 +5433,15 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return Whether the bytesType field is set. */ + @java.lang.Deprecated boolean hasBytesType(); + /** * * @@ -5127,11 +5449,15 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return The bytesType. */ + @java.lang.Deprecated com.google.bigtable.v2.Type.Bytes getBytesType(); + /** * * @@ -5139,51 +5465,61 @@ public interface BigEndianBytesOrBuilder * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder(); } + /** * * *
    -       * Encodes the value as an 8-byte big endian twos complement `Bytes`
    -       * value.
    -       * * Order-preserving? No (positive values only)
    -       * * Self-delimiting? Yes
    -       * * Compatibility?
    -       *    - BigQuery Federation `BINARY` encoding
    -       *    - HBase `Bytes.toBytes`
    -       *    - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
    +       * Encodes the value as an 8-byte big-endian two's complement value.
    +       *
    +       * Sorted mode: non-negative values are supported.
    +       *
    +       * Distinct mode: all values are supported.
    +       *
    +       * Compatible with:
    +       *
    +       * - BigQuery `BINARY` encoding
    +       * - HBase `Bytes.toBytes`
    +       * - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
            * 
    * * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} */ - public static final class BigEndianBytes extends com.google.protobuf.GeneratedMessageV3 + public static final class BigEndianBytes extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) BigEndianBytesOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BigEndianBytes"); + } + // Use BigEndianBytes.newBuilder() to construct. - private BigEndianBytes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private BigEndianBytes(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private BigEndianBytes() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BigEndianBytes(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable @@ -5195,6 +5531,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int BYTES_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type.Bytes bytesType_; + /** * * @@ -5202,14 +5539,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return Whether the bytesType field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasBytesType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5217,16 +5558,20 @@ public boolean hasBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return The bytesType. */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.Type.Bytes getBytesType() { return bytesType_ == null ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() : bytesType_; } + /** * * @@ -5234,9 +5579,10 @@ public com.google.bigtable.v2.Type.Bytes getBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ @java.lang.Override + @java.lang.Deprecated public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { return bytesType_ == null ? com.google.bigtable.v2.Type.Bytes.getDefaultInstance() @@ -5350,39 +5696,38 @@ public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes parseFro public static com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes 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); } @@ -5407,28 +5752,32 @@ 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; } + /** * * *
    -         * Encodes the value as an 8-byte big endian twos complement `Bytes`
    -         * value.
    -         * * Order-preserving? No (positive values only)
    -         * * Self-delimiting? Yes
    -         * * Compatibility?
    -         *    - BigQuery Federation `BINARY` encoding
    -         *    - HBase `Bytes.toBytes`
    -         *    - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
    +         * Encodes the value as an 8-byte big-endian two's complement value.
    +         *
    +         * Sorted mode: non-negative values are supported.
    +         *
    +         * Distinct mode: all values are supported.
    +         *
    +         * Compatible with:
    +         *
    +         * - BigQuery `BINARY` encoding
    +         * - HBase `Bytes.toBytes`
    +         * - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
              * 
    * * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder { @@ -5438,7 +5787,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable @@ -5452,14 +5801,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) { - getBytesTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBytesTypeFieldBuilder(); } } @@ -5519,41 +5868,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.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) { @@ -5600,7 +5914,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getBytesTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetBytesTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -5624,11 +5939,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Type.Bytes bytesType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes, com.google.bigtable.v2.Type.Bytes.Builder, com.google.bigtable.v2.Type.BytesOrBuilder> bytesTypeBuilder_; + /** * * @@ -5636,13 +5952,17 @@ public Builder mergeFrom( * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return Whether the bytesType field is set. */ + @java.lang.Deprecated public boolean hasBytesType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -5650,10 +5970,13 @@ public boolean hasBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; * + * @deprecated google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.bytes_type is + * deprecated. See google/bigtable/v2/types.proto;l=150 * @return The bytesType. */ + @java.lang.Deprecated public com.google.bigtable.v2.Type.Bytes getBytesType() { if (bytesTypeBuilder_ == null) { return bytesType_ == null @@ -5663,6 +5986,7 @@ public com.google.bigtable.v2.Type.Bytes getBytesType() { return bytesTypeBuilder_.getMessage(); } } + /** * * @@ -5670,8 +5994,9 @@ public com.google.bigtable.v2.Type.Bytes getBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder setBytesType(com.google.bigtable.v2.Type.Bytes value) { if (bytesTypeBuilder_ == null) { if (value == null) { @@ -5685,6 +6010,7 @@ public Builder setBytesType(com.google.bigtable.v2.Type.Bytes value) { onChanged(); return this; } + /** * * @@ -5692,8 +6018,9 @@ public Builder setBytesType(com.google.bigtable.v2.Type.Bytes value) { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderForValue) { if (bytesTypeBuilder_ == null) { bytesType_ = builderForValue.build(); @@ -5704,6 +6031,7 @@ public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderFor onChanged(); return this; } + /** * * @@ -5711,8 +6039,9 @@ public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderFor * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { if (bytesTypeBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) @@ -5731,6 +6060,7 @@ public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { } return this; } + /** * * @@ -5738,8 +6068,9 @@ public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public Builder clearBytesType() { bitField0_ = (bitField0_ & ~0x00000001); bytesType_ = null; @@ -5750,6 +6081,7 @@ public Builder clearBytesType() { onChanged(); return this; } + /** * * @@ -5757,13 +6089,15 @@ public Builder clearBytesType() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getBytesTypeFieldBuilder().getBuilder(); + return internalGetBytesTypeFieldBuilder().getBuilder(); } + /** * * @@ -5771,8 +6105,9 @@ public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ + @java.lang.Deprecated public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { if (bytesTypeBuilder_ != null) { return bytesTypeBuilder_.getMessageOrBuilder(); @@ -5782,6 +6117,7 @@ public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { : bytesType_; } } + /** * * @@ -5789,16 +6125,16 @@ public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { * Deprecated: ignored if set. * * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Bytes bytes_type = 1 [deprecated = true]; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes, com.google.bigtable.v2.Type.Bytes.Builder, com.google.bigtable.v2.Type.BytesOrBuilder> - getBytesTypeFieldBuilder() { + internalGetBytesTypeFieldBuilder() { if (bytesTypeBuilder_ == null) { bytesTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Bytes, com.google.bigtable.v2.Type.Bytes.Builder, com.google.bigtable.v2.Type.BytesOrBuilder>( @@ -5808,18 +6144,6 @@ public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { return bytesTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) } @@ -5875,1484 +6199,1527 @@ public com.google.protobuf.Parser getParserForType() { } } - private int encodingCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object encoding_; + public interface OrderedCodeBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) + com.google.protobuf.MessageOrBuilder {} - public enum EncodingCase + /** + * + * + *
    +       * Encodes the value in a variable length binary format of up to 10 bytes.
    +       * Values that are closer to zero use fewer bytes.
    +       *
    +       * Sorted mode: all values are supported.
    +       *
    +       * Distinct mode: all values are supported.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} + */ + public static final class OrderedCodeBytes extends com.google.protobuf.GeneratedMessage implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - BIG_ENDIAN_BYTES(1), - ENCODING_NOT_SET(0); - private final int value; + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; - private EncodingCase(int value) { - this.value = value; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OrderedCodeBytes"); } - /** - * @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 EncodingCase valueOf(int value) { - return forNumber(value); + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - public static EncodingCase forNumber(int value) { - switch (value) { - case 1: - return BIG_ENDIAN_BYTES; - case 0: - return ENCODING_NOT_SET; - default: - return null; - } + private OrderedCodeBytes() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; } - public int getNumber() { - return this.value; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder.class); } - }; - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); - } + private byte memoizedIsInitialized = -1; - public static final int BIG_ENDIAN_BYTES_FIELD_NUMBER = 1; - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * @return Whether the bigEndianBytes field is set. - */ - @java.lang.Override - public boolean hasBigEndianBytes() { - return encodingCase_ == 1; - } - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * @return The bigEndianBytes. - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { - if (encodingCase_ == 1) { - return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } - /** - * - * - *
    -       * Use `BigEndianBytes` encoding.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder - getBigEndianBytesOrBuilder() { - if (encodingCase_ == 1) { - return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); } - return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes other = + (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) obj; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (encodingCase_ == 1) { - output.writeMessage( - 1, (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - size = 0; - if (encodingCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (!(obj instanceof com.google.bigtable.v2.Type.Int64.Encoding)) { - return super.equals(obj); + + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - com.google.bigtable.v2.Type.Int64.Encoding other = - (com.google.bigtable.v2.Type.Int64.Encoding) obj; - if (!getEncodingCase().equals(other.getEncodingCase())) return false; - switch (encodingCase_) { - case 1: - if (!getBigEndianBytes().equals(other.getBigEndianBytes())) return false; - break; - case 0: - default: + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (encodingCase_) { - case 1: - hash = (37 * hash) + BIG_ENDIAN_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getBigEndianBytes().hashCode(); - break; - case 0: - default: + + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes 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.bigtable.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static com.google.bigtable.v2.Type.Int64.Encoding 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.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + 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.bigtable.v2.Type.Int64.Encoding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public static Builder newBuilder( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
    +         * Encodes the value in a variable length binary format of up to 10 bytes.
    +         * Values that are closer to zero use fewer bytes.
    +         *
    +         * Sorted mode: all values are supported.
    +         *
    +         * Distinct mode: all values are supported.
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.class, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder.class); + } - public static Builder newBuilder(com.google.bigtable.v2.Type.Int64.Encoding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + // Construct using + // com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.newBuilder() + private Builder() {} - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -       * Rules used to convert to/from lower level types.
    -       * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64.Encoding) - com.google.bigtable.v2.Type.Int64.EncodingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; - } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_Encoding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Int64.Encoding.class, - com.google.bigtable.v2.Type.Int64.Encoding.Builder.class); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + } - // Construct using com.google.bigtable.v2.Type.Int64.Encoding.newBuilder() - private Builder() {} + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes build() { + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (bigEndianBytesBuilder_ != null) { - bigEndianBytesBuilder_.clear(); + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes buildPartial() { + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes result = + new com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes(this); + onBuilt(); + return result; } - encodingCase_ = 0; - encoding_ = null; - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) { + return mergeFrom((com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); - } + public Builder mergeFrom( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes other) { + if (other + == com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding build() { - com.google.bigtable.v2.Type.Int64.Encoding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public final boolean isInitialized() { + return true; } - return result; - } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding buildPartial() { - com.google.bigtable.v2.Type.Int64.Encoding result = - new com.google.bigtable.v2.Type.Int64.Encoding(this); - if (bitField0_ != 0) { - buildPartial0(result); + @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; + 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; } - buildPartialOneofs(result); - onBuilt(); - return result; - } - private void buildPartial0(com.google.bigtable.v2.Type.Int64.Encoding result) { - int from_bitField0_ = bitField0_; + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) } - private void buildPartialOneofs(com.google.bigtable.v2.Type.Int64.Encoding result) { - result.encodingCase_ = encodingCase_; - result.encoding_ = this.encoding_; - if (encodingCase_ == 1 && bigEndianBytesBuilder_ != null) { - result.encoding_ = bigEndianBytesBuilder_.build(); - } - } + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) + private static final com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + DEFAULT_INSTANCE; - @java.lang.Override - public Builder clone() { - return super.clone(); + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes(); } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public static com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderedCodeBytes 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 Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private int encodingCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object encoding_; + + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BIG_ENDIAN_BYTES(1), + ORDERED_CODE_BYTES(2), + ENCODING_NOT_SET(0); + private final int value; + + private EncodingCase(int value) { + this.value = value; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Int64.Encoding) { - return mergeFrom((com.google.bigtable.v2.Type.Int64.Encoding) other); - } else { - super.mergeFrom(other); - return this; - } + /** + * @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 EncodingCase valueOf(int value) { + return forNumber(value); } - public Builder mergeFrom(com.google.bigtable.v2.Type.Int64.Encoding other) { - if (other == com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance()) return this; - switch (other.getEncodingCase()) { - case BIG_ENDIAN_BYTES: - { - mergeBigEndianBytes(other.getBigEndianBytes()); - break; - } - case ENCODING_NOT_SET: - { - break; - } + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return BIG_ENDIAN_BYTES; + case 2: + return ORDERED_CODE_BYTES; + case 0: + return ENCODING_NOT_SET; + default: + return null; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + public int getNumber() { + return this.value; } + }; - @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( - getBigEndianBytesFieldBuilder().getBuilder(), extensionRegistry); - encodingCase_ = 1; - 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; - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - private int encodingCase_ = 0; - private java.lang.Object encoding_; + public static final int BIG_ENDIAN_BYTES_FIELD_NUMBER = 1; - public EncodingCase getEncodingCase() { - return EncodingCase.forNumber(encodingCase_); + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return Whether the bigEndianBytes field is set. + */ + @java.lang.Override + public boolean hasBigEndianBytes() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return The bigEndianBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } - public Builder clearEncoding() { - encodingCase_ = 0; - encoding_ = null; - onChanged(); - return this; + /** + * + * + *
    +       * Use `BigEndianBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder + getBigEndianBytesOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } - private int bitField0_; + public static final int ORDERED_CODE_BYTES_FIELD_NUMBER = 2; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> - bigEndianBytesBuilder_; - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * @return Whether the bigEndianBytes field is set. - */ - @java.lang.Override - public boolean hasBigEndianBytes() { - return encodingCase_ == 1; + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes getOrderedCodeBytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - * - * @return The bigEndianBytes. - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1) { - return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; - } - return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } else { - if (encodingCase_ == 1) { - return bigEndianBytesBuilder_.getMessage(); - } - return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + + /** + * + * + *
    +       * Use `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - public Builder setBigEndianBytes( - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes value) { - if (bigEndianBytesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - encoding_ = value; - onChanged(); - } else { - bigEndianBytesBuilder_.setMessage(value); - } - encodingCase_ = 1; - return this; + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage( + 1, (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - public Builder setBigEndianBytes( - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder builderForValue) { - if (bigEndianBytesBuilder_ == null) { - encoding_ = builderForValue.build(); - onChanged(); - } else { - bigEndianBytesBuilder_.setMessage(builderForValue.build()); - } - encodingCase_ = 1; - return this; - } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - public Builder mergeBigEndianBytes( - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes value) { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1 - && encoding_ - != com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes - .getDefaultInstance()) { - encoding_ = - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder( - (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_) - .mergeFrom(value) - .buildPartial(); - } else { - encoding_ = value; - } - onChanged(); - } else { - if (encodingCase_ == 1) { - bigEndianBytesBuilder_.mergeFrom(value); - } else { - bigEndianBytesBuilder_.setMessage(value); - } - } - encodingCase_ = 1; - return this; + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - public Builder clearBigEndianBytes() { - if (bigEndianBytesBuilder_ == null) { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; - onChanged(); - } - } else { - if (encodingCase_ == 1) { - encodingCase_ = 0; - encoding_ = null; - } - bigEndianBytesBuilder_.clear(); - } - return this; + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_); } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder - getBigEndianBytesBuilder() { - return getBigEndianBytesFieldBuilder().getBuilder(); + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_); } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder - getBigEndianBytesOrBuilder() { - if ((encodingCase_ == 1) && (bigEndianBytesBuilder_ != null)) { - return bigEndianBytesBuilder_.getMessageOrBuilder(); - } else { - if (encodingCase_ == 1) { - return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; - } - return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - /** - * - * - *
    -         * Use `BigEndianBytes` encoding.
    -         * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> - getBigEndianBytesFieldBuilder() { - if (bigEndianBytesBuilder_ == null) { - if (!(encodingCase_ == 1)) { - encoding_ = - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); - } - bigEndianBytesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, - com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder>( - (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_, - getParentForChildren(), - isClean()); - encoding_ = null; - } - encodingCase_ = 1; - onChanged(); - return bigEndianBytesBuilder_; + if (!(obj instanceof com.google.bigtable.v2.Type.Int64.Encoding)) { + return super.equals(obj); } + com.google.bigtable.v2.Type.Int64.Encoding other = + (com.google.bigtable.v2.Type.Int64.Encoding) obj; - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getBigEndianBytes().equals(other.getBigEndianBytes())) return false; + break; + case 2: + if (!getOrderedCodeBytes().equals(other.getOrderedCodeBytes())) return false; + break; + case 0: + default: } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + BIG_ENDIAN_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getBigEndianBytes().hashCode(); + break; + case 2: + hash = (37 * hash) + ORDERED_CODE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getOrderedCodeBytes().hashCode(); + break; + case 0: + default: } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64.Encoding) + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64.Encoding) - private static final com.google.bigtable.v2.Type.Int64.Encoding DEFAULT_INSTANCE; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64.Encoding(); + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstance() { - return DEFAULT_INSTANCE; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Encoding 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.bigtable.v2.Type.Int64.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.protobuf.Parser parser() { - return PARSER; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - } - - private int bitField0_; - public static final int ENCODING_FIELD_NUMBER = 1; - private com.google.bigtable.v2.Type.Int64.Encoding encoding_; - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * - * @return Whether the encoding field is set. - */ - @java.lang.Override - public boolean hasEncoding() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.Encoding getEncoding() { - return encoding_ == null - ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } - /** - * - * - *
    -     * The encoding to use when converting to/from lower level types.
    -     * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - @java.lang.Override - public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { - return encoding_ == null - ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } - - 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; - } + public static com.google.bigtable.v2.Type.Int64.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getEncoding()); + public static com.google.bigtable.v2.Type.Int64.Encoding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + public static com.google.bigtable.v2.Type.Int64.Encoding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (!(obj instanceof com.google.bigtable.v2.Type.Int64)) { - return super.equals(obj); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - com.google.bigtable.v2.Type.Int64 other = (com.google.bigtable.v2.Type.Int64) obj; - if (hasEncoding() != other.hasEncoding()) return false; - if (hasEncoding()) { - if (!getEncoding().equals(other.getEncoding())) return false; + public static Builder newBuilder(com.google.bigtable.v2.Type.Int64.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEncoding()) { - hash = (37 * hash) + ENCODING_FIELD_NUMBER; - hash = (53 * hash) + getEncoding().hashCode(); + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.v2.Type.Int64 parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
    +       * Rules used to convert to or from lower level types.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Int64.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64.Encoding) + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; + } - public static com.google.bigtable.v2.Type.Int64 parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Int64.Encoding.class, + com.google.bigtable.v2.Type.Int64.Encoding.Builder.class); + } - public static com.google.bigtable.v2.Type.Int64 parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + // Construct using com.google.bigtable.v2.Type.Int64.Encoding.newBuilder() + private Builder() {} - public static com.google.bigtable.v2.Type.Int64 parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.bigtable.v2.Type.Int64 parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bigEndianBytesBuilder_ != null) { + bigEndianBytesBuilder_.clear(); + } + if (orderedCodeBytesBuilder_ != null) { + orderedCodeBytesBuilder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } - public static com.google.bigtable.v2.Type.Int64 parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; + } - public static com.google.bigtable.v2.Type.Int64 parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } - public static com.google.bigtable.v2.Type.Int64 parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding build() { + com.google.bigtable.v2.Type.Int64.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.bigtable.v2.Type.Int64 parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding buildPartial() { + com.google.bigtable.v2.Type.Int64.Encoding result = + new com.google.bigtable.v2.Type.Int64.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - public static com.google.bigtable.v2.Type.Int64 parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private void buildPartial0(com.google.bigtable.v2.Type.Int64.Encoding result) { + int from_bitField0_ = bitField0_; + } - public static com.google.bigtable.v2.Type.Int64 parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.v2.Type.Int64 parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.bigtable.v2.Type.Int64 prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -     * Int64
    -     * Values of type `Int64` are stored in `Value.int_value`.
    -     * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Int64} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64) - com.google.bigtable.v2.Type.Int64OrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Int64.class, - com.google.bigtable.v2.Type.Int64.Builder.class); - } - - // Construct using com.google.bigtable.v2.Type.Int64.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncodingFieldBuilder(); + private void buildPartialOneofs(com.google.bigtable.v2.Type.Int64.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && bigEndianBytesBuilder_ != null) { + result.encoding_ = bigEndianBytesBuilder_.build(); + } + if (encodingCase_ == 2 && orderedCodeBytesBuilder_ != null) { + result.encoding_ = orderedCodeBytesBuilder_.build(); + } } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - encoding_ = null; - if (encodingBuilder_ != null) { - encodingBuilder_.dispose(); - encodingBuilder_ = null; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Int64.Encoding) { + return mergeFrom((com.google.bigtable.v2.Type.Int64.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } } - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Int64_descriptor; - } - - @java.lang.Override - public com.google.bigtable.v2.Type.Int64 getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); - } - - @java.lang.Override - public com.google.bigtable.v2.Type.Int64 build() { - com.google.bigtable.v2.Type.Int64 result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public Builder mergeFrom(com.google.bigtable.v2.Type.Int64.Encoding other) { + if (other == com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance()) return this; + switch (other.getEncodingCase()) { + case BIG_ENDIAN_BYTES: + { + mergeBigEndianBytes(other.getBigEndianBytes()); + break; + } + case ORDERED_CODE_BYTES: + { + mergeOrderedCodeBytes(other.getOrderedCodeBytes()); + break; + } + case ENCODING_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - return result; - } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64 buildPartial() { - com.google.bigtable.v2.Type.Int64 result = new com.google.bigtable.v2.Type.Int64(this); - if (bitField0_ != 0) { - buildPartial0(result); + @java.lang.Override + public final boolean isInitialized() { + return true; } - onBuilt(); - return result; - } - private void buildPartial0(com.google.bigtable.v2.Type.Int64 result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); - to_bitField0_ |= 0x00000001; + @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( + internalGetBigEndianBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetOrderedCodeBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 2; + 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; } - 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); - } + private int encodingCase_ = 0; + private java.lang.Object encoding_; - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Int64) { - return mergeFrom((com.google.bigtable.v2.Type.Int64) other); - } else { - super.mergeFrom(other); + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); return this; } - } - public Builder mergeFrom(com.google.bigtable.v2.Type.Int64 other) { - if (other == com.google.bigtable.v2.Type.Int64.getDefaultInstance()) return this; - if (other.hasEncoding()) { - mergeEncoding(other.getEncoding()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + private int bitField0_; - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> + bigEndianBytesBuilder_; - @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(getEncodingFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return Whether the bigEndianBytes field is set. + */ + @java.lang.Override + public boolean hasBigEndianBytes() { + return encodingCase_ == 1; + } - private int bitField0_; + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * + * @return The bigEndianBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes getBigEndianBytes() { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return bigEndianBytesBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } + } - private com.google.bigtable.v2.Type.Int64.Encoding encoding_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding, - com.google.bigtable.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> - encodingBuilder_; - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * - * @return Whether the encoding field is set. - */ - public boolean hasEncoding() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - * - * @return The encoding. - */ - public com.google.bigtable.v2.Type.Int64.Encoding getEncoding() { - if (encodingBuilder_ == null) { - return encoding_ == null - ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; - } else { - return encodingBuilder_.getMessage(); + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + public Builder setBigEndianBytes( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes value) { + if (bigEndianBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + bigEndianBytesBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; } - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder setEncoding(com.google.bigtable.v2.Type.Int64.Encoding value) { - if (encodingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + public Builder setBigEndianBytes( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder builderForValue) { + if (bigEndianBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + bigEndianBytesBuilder_.setMessage(builderForValue.build()); } - encoding_ = value; - } else { - encodingBuilder_.setMessage(value); + encodingCase_ = 1; + return this; } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder setEncoding( - com.google.bigtable.v2.Type.Int64.Encoding.Builder builderForValue) { - if (encodingBuilder_ == null) { - encoding_ = builderForValue.build(); - } else { - encodingBuilder_.setMessage(builderForValue.build()); + + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + public Builder mergeBigEndianBytes( + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes value) { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.newBuilder( + (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + bigEndianBytesBuilder_.mergeFrom(value); + } else { + bigEndianBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder mergeEncoding(com.google.bigtable.v2.Type.Int64.Encoding value) { - if (encodingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && encoding_ != null - && encoding_ != com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance()) { - getEncodingBuilder().mergeFrom(value); + + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + public Builder clearBigEndianBytes() { + if (bigEndianBytesBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } } else { - encoding_ = value; + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + bigEndianBytesBuilder_.clear(); } - } else { - encodingBuilder_.mergeFrom(value); + return this; } - if (encoding_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public Builder clearEncoding() { - bitField0_ = (bitField0_ & ~0x00000001); - encoding_ = null; - if (encodingBuilder_ != null) { - encodingBuilder_.dispose(); - encodingBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public com.google.bigtable.v2.Type.Int64.Encoding.Builder getEncodingBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getEncodingFieldBuilder().getBuilder(); - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { - if (encodingBuilder_ != null) { - return encodingBuilder_.getMessageOrBuilder(); - } else { - return encoding_ == null - ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() - : encoding_; + + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder + getBigEndianBytesBuilder() { + return internalGetBigEndianBytesFieldBuilder().getBuilder(); } - } - /** - * - * - *
    -       * The encoding to use when converting to/from lower level types.
    -       * 
    - * - * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding, - com.google.bigtable.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> - getEncodingFieldBuilder() { - if (encodingBuilder_ == null) { - encodingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64.Encoding, - com.google.bigtable.v2.Type.Int64.Encoding.Builder, - com.google.bigtable.v2.Type.Int64.EncodingOrBuilder>( - getEncoding(), getParentForChildren(), isClean()); - encoding_ = null; + + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder + getBigEndianBytesOrBuilder() { + if ((encodingCase_ == 1) && (bigEndianBytesBuilder_ != null)) { + return bigEndianBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } } - return encodingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + /** + * + * + *
    +         * Use `BigEndianBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder> + internalGetBigEndianBytesFieldBuilder() { + if (bigEndianBytesBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.getDefaultInstance(); + } + bigEndianBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesOrBuilder>( + (com.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return bigEndianBytesBuilder_; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder> + orderedCodeBytesBuilder_; - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64) - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 2; + } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64) - private static final com.google.bigtable.v2.Type.Int64 DEFAULT_INSTANCE; + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes getOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return orderedCodeBytesBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64(); - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + encodingCase_ = 2; + return this; + } - public static com.google.bigtable.v2.Type.Int64 getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder builderForValue) { + if (orderedCodeBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 2; + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Int64 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()); + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder mergeOrderedCodeBytes( + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.newBuilder( + (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + orderedCodeBytesBuilder_.mergeFrom(value); + } else { + orderedCodeBytesBuilder_.setMessage(value); } - return builder.buildPartial(); } - }; + encodingCase_ = 2; + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public Builder clearOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + orderedCodeBytesBuilder_.clear(); + } + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder + getOrderedCodeBytesBuilder() { + return internalGetOrderedCodeBytesFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.bigtable.v2.Type.Int64 getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if ((encodingCase_ == 2) && (orderedCodeBytesBuilder_ != null)) { + return orderedCodeBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + } - public interface BoolOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bool) - com.google.protobuf.MessageOrBuilder {} - /** - * - * - *
    -   * bool
    -   * Values of type `Bool` are stored in `Value.bool_value`.
    -   * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Bool} - */ - public static final class Bool extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bool) - BoolOrBuilder { - private static final long serialVersionUID = 0L; - // Use Bool.newBuilder() to construct. - private Bool(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); + /** + * + * + *
    +         * Use `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes ordered_code_bytes = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder> + internalGetOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesOrBuilder>( + (com.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 2; + onChanged(); + return orderedCodeBytesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64.Encoding) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64.Encoding) + private static final com.google.bigtable.v2.Type.Int64.Encoding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64.Encoding(); + } + + public static com.google.bigtable.v2.Type.Int64.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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.bigtable.v2.Type.Int64.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - private Bool() {} + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Type.Int64.Encoding encoding_; + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Bool(); + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Bool_descriptor; + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Bool.class, - com.google.bigtable.v2.Type.Bool.Builder.class); + public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; } private byte memoizedIsInitialized = -1; @@ -7369,6 +7736,9 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEncoding()); + } getUnknownFields().writeTo(output); } @@ -7378,6 +7748,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -7388,11 +7761,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.v2.Type.Bool)) { + if (!(obj instanceof com.google.bigtable.v2.Type.Int64)) { return super.equals(obj); } - com.google.bigtable.v2.Type.Bool other = (com.google.bigtable.v2.Type.Bool) obj; + com.google.bigtable.v2.Type.Int64 other = (com.google.bigtable.v2.Type.Int64) obj; + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7404,79 +7781,83 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.bigtable.v2.Type.Bool parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.Type.Int64 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Bool parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.Type.Int64 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseFrom(byte[] data) + public static com.google.bigtable.v2.Type.Int64 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Bool parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseDelimitedFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseDelimitedFrom( + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 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.bigtable.v2.Type.Bool parseFrom( + public static com.google.bigtable.v2.Type.Int64 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); } @@ -7489,7 +7870,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.v2.Type.Bool prototype) { + public static Builder newBuilder(com.google.bigtable.v2.Type.Int64 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7499,68 +7880,82 @@ 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; } + /** * * *
    -     * bool
    -     * Values of type `Bool` are stored in `Value.bool_value`.
    +     * Int64
    +     * Values of type `Int64` are stored in `Value.int_value`.
          * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Bool} + * Protobuf type {@code google.bigtable.v2.Type.Int64} */ - 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.bigtable.v2.Type.Bool) - com.google.bigtable.v2.Type.BoolOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Int64) + com.google.bigtable.v2.Type.Int64OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Bool_descriptor; + .internal_static_google_bigtable_v2_Type_Int64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Bool.class, - com.google.bigtable.v2.Type.Bool.Builder.class); + com.google.bigtable.v2.Type.Int64.class, + com.google.bigtable.v2.Type.Int64.Builder.class); } - // Construct using com.google.bigtable.v2.Type.Bool.newBuilder() - private Builder() {} + // Construct using com.google.bigtable.v2.Type.Int64.newBuilder() + 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) { + internalGetEncodingFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Bool_descriptor; + .internal_static_google_bigtable_v2_Type_Int64_descriptor; } @java.lang.Override - public com.google.bigtable.v2.Type.Bool getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + public com.google.bigtable.v2.Type.Int64 getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.v2.Type.Bool build() { - com.google.bigtable.v2.Type.Bool result = buildPartial(); + public com.google.bigtable.v2.Type.Int64 build() { + com.google.bigtable.v2.Type.Int64 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7568,59 +7963,40 @@ public com.google.bigtable.v2.Type.Bool build() { } @java.lang.Override - public com.google.bigtable.v2.Type.Bool buildPartial() { - com.google.bigtable.v2.Type.Bool result = new com.google.bigtable.v2.Type.Bool(this); + public com.google.bigtable.v2.Type.Int64 buildPartial() { + com.google.bigtable.v2.Type.Int64 result = new com.google.bigtable.v2.Type.Int64(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(com.google.bigtable.v2.Type.Int64 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Bool) { - return mergeFrom((com.google.bigtable.v2.Type.Bool) other); + if (other instanceof com.google.bigtable.v2.Type.Int64) { + return mergeFrom((com.google.bigtable.v2.Type.Int64) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.v2.Type.Bool other) { - if (other == com.google.bigtable.v2.Type.Bool.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.Type.Int64 other) { + if (other == com.google.bigtable.v2.Type.Int64.getDefaultInstance()) return this; + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7647,6 +8023,13 @@ public Builder mergeFrom( case 0: done = true; break; + case 10: + { + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7664,115 +8047,306 @@ public Builder mergeFrom( return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + private int bitField0_; - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } + private com.google.bigtable.v2.Type.Int64.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> + encodingBuilder_; - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Bool) - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Bool) - private static final com.google.bigtable.v2.Type.Bool DEFAULT_INSTANCE; + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.v2.Type.Int64.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Bool(); - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.v2.Type.Int64.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.bigtable.v2.Type.Bool getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.v2.Type.Int64.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Bool 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(); + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.v2.Type.Int64.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ != com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; } - }; + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Int64.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.bigtable.v2.Type.Bool getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Int64) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Int64) + private static final com.google.bigtable.v2.Type.Int64 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Int64(); + } + + public static com.google.bigtable.v2.Type.Int64 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Int64 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.bigtable.v2.Type.Int64 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } } - public interface Float32OrBuilder + public interface BoolOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float32) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Bool) com.google.protobuf.MessageOrBuilder {} + /** * * *
    -   * Float32
    -   * Values of type `Float32` are stored in `Value.float_value`.
    +   * bool
    +   * Values of type `Bool` are stored in `Value.bool_value`.
        * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Float32} + * Protobuf type {@code google.bigtable.v2.Type.Bool} */ - public static final class Float32 extends com.google.protobuf.GeneratedMessageV3 + public static final class Bool extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Float32) - Float32OrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Bool) + BoolOrBuilder { private static final long serialVersionUID = 0L; - // Use Float32.newBuilder() to construct. - private Float32(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Float32() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bool"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Float32(); + // Use Bool.newBuilder() to construct. + private Bool(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Bool() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_v2_Type_Bool_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Float32.class, - com.google.bigtable.v2.Type.Float32.Builder.class); + com.google.bigtable.v2.Type.Bool.class, + com.google.bigtable.v2.Type.Bool.Builder.class); } private byte memoizedIsInitialized = -1; @@ -7808,10 +8382,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.v2.Type.Float32)) { + if (!(obj instanceof com.google.bigtable.v2.Type.Bool)) { return super.equals(obj); } - com.google.bigtable.v2.Type.Float32 other = (com.google.bigtable.v2.Type.Float32) obj; + com.google.bigtable.v2.Type.Bool other = (com.google.bigtable.v2.Type.Bool) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -7829,74 +8403,74 @@ public int hashCode() { return hash; } - public static com.google.bigtable.v2.Type.Float32 parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.Type.Bool parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Float32 parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.Type.Bool parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseFrom(byte[] data) + public static com.google.bigtable.v2.Type.Bool parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Float32 parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseDelimitedFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseDelimitedFrom( + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool 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.bigtable.v2.Type.Float32 parseFrom( + public static com.google.bigtable.v2.Type.Bool 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); } @@ -7909,7 +8483,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.v2.Type.Float32 prototype) { + public static Builder newBuilder(com.google.bigtable.v2.Type.Bool prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7919,45 +8493,44 @@ 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; } + /** * * *
    -     * Float32
    -     * Values of type `Float32` are stored in `Value.float_value`.
    +     * bool
    +     * Values of type `Bool` are stored in `Value.bool_value`.
          * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Float32} + * Protobuf type {@code google.bigtable.v2.Type.Bool} */ - 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.bigtable.v2.Type.Float32) - com.google.bigtable.v2.Type.Float32OrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Bool) + com.google.bigtable.v2.Type.BoolOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_v2_Type_Bool_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Float32.class, - com.google.bigtable.v2.Type.Float32.Builder.class); + com.google.bigtable.v2.Type.Bool.class, + com.google.bigtable.v2.Type.Bool.Builder.class); } - // Construct using com.google.bigtable.v2.Type.Float32.newBuilder() + // Construct using com.google.bigtable.v2.Type.Bool.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -7970,17 +8543,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float32_descriptor; + .internal_static_google_bigtable_v2_Type_Bool_descriptor; } @java.lang.Override - public com.google.bigtable.v2.Type.Float32 getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + public com.google.bigtable.v2.Type.Bool getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.v2.Type.Float32 build() { - com.google.bigtable.v2.Type.Float32 result = buildPartial(); + public com.google.bigtable.v2.Type.Bool build() { + com.google.bigtable.v2.Type.Bool result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7988,59 +8561,24 @@ public com.google.bigtable.v2.Type.Float32 build() { } @java.lang.Override - public com.google.bigtable.v2.Type.Float32 buildPartial() { - com.google.bigtable.v2.Type.Float32 result = new com.google.bigtable.v2.Type.Float32(this); + public com.google.bigtable.v2.Type.Bool buildPartial() { + com.google.bigtable.v2.Type.Bool result = new com.google.bigtable.v2.Type.Bool(this); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Float32) { - return mergeFrom((com.google.bigtable.v2.Type.Float32) other); + if (other instanceof com.google.bigtable.v2.Type.Bool) { + return mergeFrom((com.google.bigtable.v2.Type.Bool) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.v2.Type.Float32 other) { - if (other == com.google.bigtable.v2.Type.Float32.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.Type.Bool other) { + if (other == com.google.bigtable.v2.Type.Bool.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8084,36 +8622,24 @@ 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.bigtable.v2.Type.Float32) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Bool) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Float32) - private static final com.google.bigtable.v2.Type.Float32 DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Bool) + private static final com.google.bigtable.v2.Type.Bool DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Float32(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Bool(); } - public static com.google.bigtable.v2.Type.Float32 getDefaultInstance() { + public static com.google.bigtable.v2.Type.Bool getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Float32 parsePartialFrom( + public Bool parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8133,66 +8659,72 @@ public Float32 parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.v2.Type.Float32 getDefaultInstanceForType() { + public com.google.bigtable.v2.Type.Bool getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Float64OrBuilder + public interface Float32OrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float64) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float32) com.google.protobuf.MessageOrBuilder {} + /** * * *
    -   * Float64
    -   * Values of type `Float64` are stored in `Value.float_value`.
    +   * Float32
    +   * Values of type `Float32` are stored in `Value.float_value`.
        * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Float64} + * Protobuf type {@code google.bigtable.v2.Type.Float32} */ - public static final class Float64 extends com.google.protobuf.GeneratedMessageV3 + public static final class Float32 extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Float64) - Float64OrBuilder { - private static final long serialVersionUID = 0L; - // Use Float64.newBuilder() to construct. - private Float64(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Float32) + Float32OrBuilder { + private static final long serialVersionUID = 0L; - private Float64() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Float32"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Float64(); + // Use Float32.newBuilder() to construct. + private Float32(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Float32() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_v2_Type_Float32_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Float64.class, - com.google.bigtable.v2.Type.Float64.Builder.class); + com.google.bigtable.v2.Type.Float32.class, + com.google.bigtable.v2.Type.Float32.Builder.class); } private byte memoizedIsInitialized = -1; @@ -8228,10 +8760,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.v2.Type.Float64)) { + if (!(obj instanceof com.google.bigtable.v2.Type.Float32)) { return super.equals(obj); } - com.google.bigtable.v2.Type.Float64 other = (com.google.bigtable.v2.Type.Float64) obj; + com.google.bigtable.v2.Type.Float32 other = (com.google.bigtable.v2.Type.Float32) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -8249,74 +8781,74 @@ public int hashCode() { return hash; } - public static com.google.bigtable.v2.Type.Float64 parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.Type.Float32 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Float64 parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.Type.Float32 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseFrom(byte[] data) + public static com.google.bigtable.v2.Type.Float32 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Float64 parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseDelimitedFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseDelimitedFrom( + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 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.bigtable.v2.Type.Float64 parseFrom( + public static com.google.bigtable.v2.Type.Float32 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); } @@ -8329,7 +8861,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.v2.Type.Float64 prototype) { + public static Builder newBuilder(com.google.bigtable.v2.Type.Float32 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8339,45 +8871,44 @@ 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; } + /** * * *
    -     * Float64
    -     * Values of type `Float64` are stored in `Value.float_value`.
    +     * Float32
    +     * Values of type `Float32` are stored in `Value.float_value`.
          * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Float64} + * Protobuf type {@code google.bigtable.v2.Type.Float32} */ - 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.bigtable.v2.Type.Float64) - com.google.bigtable.v2.Type.Float64OrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Float32) + com.google.bigtable.v2.Type.Float32OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_v2_Type_Float32_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Float64.class, - com.google.bigtable.v2.Type.Float64.Builder.class); + com.google.bigtable.v2.Type.Float32.class, + com.google.bigtable.v2.Type.Float32.Builder.class); } - // Construct using com.google.bigtable.v2.Type.Float64.newBuilder() + // Construct using com.google.bigtable.v2.Type.Float32.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8390,17 +8921,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Float64_descriptor; + .internal_static_google_bigtable_v2_Type_Float32_descriptor; } @java.lang.Override - public com.google.bigtable.v2.Type.Float64 getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + public com.google.bigtable.v2.Type.Float32 getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.v2.Type.Float64 build() { - com.google.bigtable.v2.Type.Float64 result = buildPartial(); + public com.google.bigtable.v2.Type.Float32 build() { + com.google.bigtable.v2.Type.Float32 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8408,59 +8939,24 @@ public com.google.bigtable.v2.Type.Float64 build() { } @java.lang.Override - public com.google.bigtable.v2.Type.Float64 buildPartial() { - com.google.bigtable.v2.Type.Float64 result = new com.google.bigtable.v2.Type.Float64(this); + public com.google.bigtable.v2.Type.Float32 buildPartial() { + com.google.bigtable.v2.Type.Float32 result = new com.google.bigtable.v2.Type.Float32(this); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Float64) { - return mergeFrom((com.google.bigtable.v2.Type.Float64) other); + if (other instanceof com.google.bigtable.v2.Type.Float32) { + return mergeFrom((com.google.bigtable.v2.Type.Float32) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.v2.Type.Float64 other) { - if (other == com.google.bigtable.v2.Type.Float64.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.Type.Float32 other) { + if (other == com.google.bigtable.v2.Type.Float32.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8504,36 +9000,24 @@ 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.bigtable.v2.Type.Float64) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Float32) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Float64) - private static final com.google.bigtable.v2.Type.Float64 DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Float32) + private static final com.google.bigtable.v2.Type.Float32 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Float64(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Float32(); } - public static com.google.bigtable.v2.Type.Float64 getDefaultInstance() { + public static com.google.bigtable.v2.Type.Float32 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Float64 parsePartialFrom( + public Float32 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8553,66 +9037,72 @@ public Float64 parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.v2.Type.Float64 getDefaultInstanceForType() { + public com.google.bigtable.v2.Type.Float32 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface TimestampOrBuilder + public interface Float64OrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Timestamp) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Float64) com.google.protobuf.MessageOrBuilder {} + /** * * *
    -   * Timestamp
    -   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
    +   * Float64
    +   * Values of type `Float64` are stored in `Value.float_value`.
        * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Timestamp} + * Protobuf type {@code google.bigtable.v2.Type.Float64} */ - public static final class Timestamp extends com.google.protobuf.GeneratedMessageV3 + public static final class Float64 extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Timestamp) - TimestampOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Float64) + Float64OrBuilder { private static final long serialVersionUID = 0L; - // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Timestamp() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Float64"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Timestamp(); + // Use Float64.newBuilder() to construct. + private Float64(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Float64() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_v2_Type_Float64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Timestamp.class, - com.google.bigtable.v2.Type.Timestamp.Builder.class); + com.google.bigtable.v2.Type.Float64.class, + com.google.bigtable.v2.Type.Float64.Builder.class); } private byte memoizedIsInitialized = -1; @@ -8648,10 +9138,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.v2.Type.Timestamp)) { + if (!(obj instanceof com.google.bigtable.v2.Type.Float64)) { return super.equals(obj); } - com.google.bigtable.v2.Type.Timestamp other = (com.google.bigtable.v2.Type.Timestamp) obj; + com.google.bigtable.v2.Type.Float64 other = (com.google.bigtable.v2.Type.Float64) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -8669,75 +9159,74 @@ public int hashCode() { return hash; } - public static com.google.bigtable.v2.Type.Timestamp parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.Type.Float64 parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Timestamp parseFrom( - com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.Type.Float64 parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 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.bigtable.v2.Type.Timestamp parseFrom(byte[] data) + public static com.google.bigtable.v2.Type.Float64 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Timestamp parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Float64 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.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 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.bigtable.v2.Type.Timestamp parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.bigtable.v2.Type.Float64 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.bigtable.v2.Type.Timestamp parseDelimitedFrom( + public static com.google.bigtable.v2.Type.Float64 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.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 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.bigtable.v2.Type.Timestamp parseFrom( + public static com.google.bigtable.v2.Type.Float64 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); } @@ -8750,7 +9239,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.v2.Type.Timestamp prototype) { + public static Builder newBuilder(com.google.bigtable.v2.Type.Float64 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8760,45 +9249,44 @@ 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; } + /** * * *
    -     * Timestamp
    -     * Values of type `Timestamp` are stored in `Value.timestamp_value`.
    +     * Float64
    +     * Values of type `Float64` are stored in `Value.float_value`.
          * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Timestamp} + * Protobuf type {@code google.bigtable.v2.Type.Float64} */ - 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.bigtable.v2.Type.Timestamp) - com.google.bigtable.v2.Type.TimestampOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Float64) + com.google.bigtable.v2.Type.Float64OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_v2_Type_Float64_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Timestamp.class, - com.google.bigtable.v2.Type.Timestamp.Builder.class); + com.google.bigtable.v2.Type.Float64.class, + com.google.bigtable.v2.Type.Float64.Builder.class); } - // Construct using com.google.bigtable.v2.Type.Timestamp.newBuilder() + // Construct using com.google.bigtable.v2.Type.Float64.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -8811,17 +9299,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; + .internal_static_google_bigtable_v2_Type_Float64_descriptor; } @java.lang.Override - public com.google.bigtable.v2.Type.Timestamp getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + public com.google.bigtable.v2.Type.Float64 getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.v2.Type.Timestamp build() { - com.google.bigtable.v2.Type.Timestamp result = buildPartial(); + public com.google.bigtable.v2.Type.Float64 build() { + com.google.bigtable.v2.Type.Float64 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8829,60 +9317,24 @@ public com.google.bigtable.v2.Type.Timestamp build() { } @java.lang.Override - public com.google.bigtable.v2.Type.Timestamp buildPartial() { - com.google.bigtable.v2.Type.Timestamp result = - new com.google.bigtable.v2.Type.Timestamp(this); + public com.google.bigtable.v2.Type.Float64 buildPartial() { + com.google.bigtable.v2.Type.Float64 result = new com.google.bigtable.v2.Type.Float64(this); onBuilt(); return result; } @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Float64) { + return mergeFrom((com.google.bigtable.v2.Type.Float64) other); + } else { + super.mergeFrom(other); + return this; + } } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Timestamp) { - return mergeFrom((com.google.bigtable.v2.Type.Timestamp) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.bigtable.v2.Type.Timestamp other) { - if (other == com.google.bigtable.v2.Type.Timestamp.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.Type.Float64 other) { + if (other == com.google.bigtable.v2.Type.Float64.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -8926,36 +9378,24 @@ 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.bigtable.v2.Type.Timestamp) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Float64) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Timestamp) - private static final com.google.bigtable.v2.Type.Timestamp DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Float64) + private static final com.google.bigtable.v2.Type.Float64 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Timestamp(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Float64(); } - public static com.google.bigtable.v2.Type.Timestamp getDefaultInstance() { + public static com.google.bigtable.v2.Type.Float64 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Timestamp parsePartialFrom( + public Float64 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8975,1569 +9415,8264 @@ public Timestamp parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.v2.Type.Timestamp getDefaultInstanceForType() { + public com.google.bigtable.v2.Type.Float64 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface DateOrBuilder + public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Date) - com.google.protobuf.MessageOrBuilder {} + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Timestamp) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + com.google.bigtable.v2.Type.Timestamp.Encoding getEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder(); + } + /** * * *
    -   * Date
    -   * Values of type `Date` are stored in `Value.date_value`.
    +   * Timestamp
    +   * Values of type `Timestamp` are stored in `Value.timestamp_value`.
        * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Date} + * Protobuf type {@code google.bigtable.v2.Type.Timestamp} */ - public static final class Date extends com.google.protobuf.GeneratedMessageV3 + public static final class Timestamp extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Date) - DateOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Timestamp) + TimestampOrBuilder { private static final long serialVersionUID = 0L; - // Use Date.newBuilder() to construct. - private Date(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Date() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Timestamp"); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Date(); + // Use Timestamp.newBuilder() to construct. + private Timestamp(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } + private Timestamp() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Date_descriptor; + .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Date.class, - com.google.bigtable.v2.Type.Date.Builder.class); + com.google.bigtable.v2.Type.Timestamp.class, + com.google.bigtable.v2.Type.Timestamp.Builder.class); } - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Timestamp.Encoding) + com.google.protobuf.MessageOrBuilder { - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ + boolean hasUnixMicrosInt64(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ + com.google.bigtable.v2.Type.Int64.Encoding getUnixMicrosInt64(); - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getUnixMicrosInt64OrBuilder(); - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + com.google.bigtable.v2.Type.Timestamp.Encoding.EncodingCase getEncodingCase(); } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * + * + *
    +     * Rules used to convert to or from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Timestamp.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Timestamp.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); } - if (!(obj instanceof com.google.bigtable.v2.Type.Date)) { - return super.equals(obj); + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - com.google.bigtable.v2.Type.Date other = (com.google.bigtable.v2.Type.Date) obj; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private Encoding() {} - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.bigtable.v2.Type.Date parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.bigtable.v2.Type.Date parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Timestamp.Encoding.class, + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder.class); + } - public static com.google.bigtable.v2.Type.Date parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private int encodingCase_ = 0; - public static com.google.bigtable.v2.Type.Date parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @SuppressWarnings("serial") + private java.lang.Object encoding_; - public static com.google.bigtable.v2.Type.Date parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UNIX_MICROS_INT64(1), + ENCODING_NOT_SET(0); + private final int value; - public static com.google.bigtable.v2.Type.Date parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private EncodingCase(int value) { + this.value = value; + } - public static com.google.bigtable.v2.Type.Date parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.v2.Type.Date parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.v2.Type.Date parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.bigtable.v2.Type.Date parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.bigtable.v2.Type.Date parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.bigtable.v2.Type.Date parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * @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 EncodingCase valueOf(int value) { + return forNumber(value); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return UNIX_MICROS_INT64; + case 0: + return ENCODING_NOT_SET; + default: + return null; + } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public int getNumber() { + return this.value; + } + }; - public static Builder newBuilder(com.google.bigtable.v2.Type.Date prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static final int UNIX_MICROS_INT64_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -     * Date
    -     * Values of type `Date` are stored in `Value.date_value`.
    -     * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Date} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Date) - com.google.bigtable.v2.Type.DateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Date_descriptor; + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ + @java.lang.Override + public boolean hasUnixMicrosInt64() { + return encodingCase_ == 1; } + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Date.class, - com.google.bigtable.v2.Type.Date.Builder.class); + public com.google.bigtable.v2.Type.Int64.Encoding getUnixMicrosInt64() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); } - // Construct using com.google.bigtable.v2.Type.Date.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
    +       * Encodes the number of microseconds since the Unix epoch using the
    +       * given `Int64` encoding. Values must be microsecond-aligned.
    +       *
    +       * Compatible with:
    +       *
    +       * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +       * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getUnixMicrosInt64OrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); } + private byte memoizedIsInitialized = -1; + @java.lang.Override - public Builder clear() { - super.clear(); - return this; + 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 com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Date_descriptor; + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.Type.Int64.Encoding) encoding_); + } + getUnknownFields().writeTo(output); } @java.lang.Override - public com.google.bigtable.v2.Type.Date getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.Type.Int64.Encoding) encoding_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public com.google.bigtable.v2.Type.Date build() { - com.google.bigtable.v2.Type.Date result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - return result; + if (!(obj instanceof com.google.bigtable.v2.Type.Timestamp.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Timestamp.Encoding other = + (com.google.bigtable.v2.Type.Timestamp.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getUnixMicrosInt64().equals(other.getUnixMicrosInt64())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override - public com.google.bigtable.v2.Type.Date buildPartial() { - com.google.bigtable.v2.Type.Date result = new com.google.bigtable.v2.Type.Date(this); - onBuilt(); - return result; + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + UNIX_MICROS_INT64_FIELD_NUMBER; + hash = (53 * hash) + getUnixMicrosInt64().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - @java.lang.Override - public Builder clone() { - return super.clone(); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Date) { - return mergeFrom((com.google.bigtable.v2.Type.Date) other); - } else { - super.mergeFrom(other); - return this; - } + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public Builder mergeFrom(com.google.bigtable.v2.Type.Date other) { - if (other == com.google.bigtable.v2.Type.Date.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - @java.lang.Override - public final boolean isInitialized() { - return true; + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseDelimitedFrom( + java.io.InputStream 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; - 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; + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + public static com.google.bigtable.v2.Type.Timestamp.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Timestamp.Encoding 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 final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + public Builder newBuilderForType() { + return newBuilder(); } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Date) - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Date) - private static final com.google.bigtable.v2.Type.Date DEFAULT_INSTANCE; + public static Builder newBuilder(com.google.bigtable.v2.Type.Timestamp.Encoding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Date(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static com.google.bigtable.v2.Type.Date getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Date 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(); - } - }; + /** + * + * + *
    +       * Rules used to convert to or from lower level types.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Timestamp.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Timestamp.Encoding) + com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Timestamp.Encoding.class, + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder.class); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // Construct using com.google.bigtable.v2.Type.Timestamp.Encoding.newBuilder() + private Builder() {} - @java.lang.Override - public com.google.bigtable.v2.Type.Date getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public interface StructOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (unixMicrosInt64Builder_ != null) { + unixMicrosInt64Builder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } - /** - * - * - *
    -     * The names and types of the fields in this struct.
    -     * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - java.util.List getFieldsList(); - /** - * - * - *
    -     * The names and types of the fields in this struct.
    -     * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - com.google.bigtable.v2.Type.Struct.Field getFields(int index); - /** - * - * - *
    -     * The names and types of the fields in this struct.
    -     * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - int getFieldsCount(); - /** - * - * - *
    -     * The names and types of the fields in this struct.
    -     * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - java.util.List - getFieldsOrBuilderList(); - /** - * - * - *
    -     * The names and types of the fields in this struct.
    -     * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index); - } - /** - * - * - *
    -   * A structured data value, consisting of fields which map to dynamically
    -   * typed values.
    -   * Values of type `Struct` are stored in `Value.array_value` where entries are
    -   * in the same order and number as `field_types`.
    -   * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Struct} - */ - public static final class Struct extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct) - StructOrBuilder { - private static final long serialVersionUID = 0L; - // Use Struct.newBuilder() to construct. - private Struct(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor; + } - private Struct() { - fields_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance(); + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Struct(); - } + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.Encoding build() { + com.google.bigtable.v2.Type.Timestamp.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_descriptor; - } + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.Encoding buildPartial() { + com.google.bigtable.v2.Type.Timestamp.Encoding result = + new com.google.bigtable.v2.Type.Timestamp.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Struct.class, - com.google.bigtable.v2.Type.Struct.Builder.class); - } + private void buildPartial0(com.google.bigtable.v2.Type.Timestamp.Encoding result) { + int from_bitField0_ = bitField0_; + } - public interface FieldOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Field) - com.google.protobuf.MessageOrBuilder { + private void buildPartialOneofs(com.google.bigtable.v2.Type.Timestamp.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && unixMicrosInt64Builder_ != null) { + result.encoding_ = unixMicrosInt64Builder_.build(); + } + } - /** - * - * - *
    -       * The field name (optional). Fields without a `field_name` are considered
    -       * anonymous and cannot be referenced by name.
    -       * 
    - * - * string field_name = 1; - * - * @return The fieldName. - */ - java.lang.String getFieldName(); - /** - * - * - *
    -       * The field name (optional). Fields without a `field_name` are considered
    -       * anonymous and cannot be referenced by name.
    -       * 
    - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - com.google.protobuf.ByteString getFieldNameBytes(); - - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - boolean hasType(); - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return The type. - */ - com.google.bigtable.v2.Type getType(); - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder(); - } - /** - * - * - *
    -     * A struct field and its type.
    -     * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Struct.Field} - */ - public static final class Field extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.Field) - FieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use Field.newBuilder() to construct. - private Field(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Field() { - fieldName_ = ""; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Timestamp.Encoding) { + return mergeFrom((com.google.bigtable.v2.Type.Timestamp.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Field(); - } + public Builder mergeFrom(com.google.bigtable.v2.Type.Timestamp.Encoding other) { + if (other == com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case UNIX_MICROS_INT64: + { + mergeUnixMicrosInt64(other.getUnixMicrosInt64()); + break; + } + case ENCODING_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Struct.Field.class, - com.google.bigtable.v2.Type.Struct.Field.Builder.class); - } + @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( + internalGetUnixMicrosInt64FieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + 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_; - public static final int FIELD_NAME_FIELD_NUMBER = 1; + private int encodingCase_ = 0; + private java.lang.Object encoding_; - @SuppressWarnings("serial") - private volatile java.lang.Object fieldName_ = ""; - /** - * - * - *
    -       * The field name (optional). Fields without a `field_name` are considered
    -       * anonymous and cannot be referenced by name.
    -       * 
    - * - * string field_name = 1; - * - * @return The fieldName. - */ - @java.lang.Override - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - 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(); - fieldName_ = s; - return s; + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); } - } - /** - * - * - *
    -       * The field name (optional). Fields without a `field_name` are considered
    -       * anonymous and cannot be referenced by name.
    -       * 
    - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; } - } - public static final int TYPE_FIELD_NUMBER = 2; - private com.google.bigtable.v2.Type type_; - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - @java.lang.Override - public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return The type. - */ - @java.lang.Override - public com.google.bigtable.v2.Type getType() { - return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; - } - /** - * - * - *
    -       * The type of values in this field.
    -       * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - @java.lang.Override - public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { - return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; - } + private int bitField0_; - private byte memoizedIsInitialized = -1; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> + unixMicrosInt64Builder_; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getType()); + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return Whether the unixMicrosInt64 field is set. + */ + @java.lang.Override + public boolean hasUnixMicrosInt64() { + return encodingCase_ == 1; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + * + * @return The unixMicrosInt64. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.Encoding getUnixMicrosInt64() { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return unixMicrosInt64Builder_.getMessage(); + } + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } + } - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder setUnixMicrosInt64(com.google.bigtable.v2.Type.Int64.Encoding value) { + if (unixMicrosInt64Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + unixMicrosInt64Builder_.setMessage(value); + } + encodingCase_ = 1; + return this; } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder setUnixMicrosInt64( + com.google.bigtable.v2.Type.Int64.Encoding.Builder builderForValue) { + if (unixMicrosInt64Builder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + unixMicrosInt64Builder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder mergeUnixMicrosInt64(com.google.bigtable.v2.Type.Int64.Encoding value) { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1 + && encoding_ != com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Int64.Encoding.newBuilder( + (com.google.bigtable.v2.Type.Int64.Encoding) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + unixMicrosInt64Builder_.mergeFrom(value); + } else { + unixMicrosInt64Builder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; } - if (!(obj instanceof com.google.bigtable.v2.Type.Struct.Field)) { - return super.equals(obj); + + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public Builder clearUnixMicrosInt64() { + if (unixMicrosInt64Builder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + unixMicrosInt64Builder_.clear(); + } + return this; } - com.google.bigtable.v2.Type.Struct.Field other = - (com.google.bigtable.v2.Type.Struct.Field) obj; - if (!getFieldName().equals(other.getFieldName())) return false; - if (hasType() != other.hasType()) return false; - if (hasType()) { - if (!getType().equals(other.getType())) return false; + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + public com.google.bigtable.v2.Type.Int64.Encoding.Builder getUnixMicrosInt64Builder() { + return internalGetUnixMicrosInt64FieldBuilder().getBuilder(); } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Int64.EncodingOrBuilder getUnixMicrosInt64OrBuilder() { + if ((encodingCase_ == 1) && (unixMicrosInt64Builder_ != null)) { + return unixMicrosInt64Builder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Int64.Encoding) encoding_; + } + return com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFieldName().hashCode(); - if (hasType()) { - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); + + /** + * + * + *
    +         * Encodes the number of microseconds since the Unix epoch using the
    +         * given `Int64` encoding. Values must be microsecond-aligned.
    +         *
    +         * Compatible with:
    +         *
    +         * - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
    +         * 
    + * + * .google.bigtable.v2.Type.Int64.Encoding unix_micros_int64 = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder> + internalGetUnixMicrosInt64FieldBuilder() { + if (unixMicrosInt64Builder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = com.google.bigtable.v2.Type.Int64.Encoding.getDefaultInstance(); + } + unixMicrosInt64Builder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64.Encoding, + com.google.bigtable.v2.Type.Int64.Encoding.Builder, + com.google.bigtable.v2.Type.Int64.EncodingOrBuilder>( + (com.google.bigtable.v2.Type.Int64.Encoding) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return unixMicrosInt64Builder_; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Timestamp.Encoding) } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Timestamp.Encoding) + private static final com.google.bigtable.v2.Type.Timestamp.Encoding DEFAULT_INSTANCE; - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Timestamp.Encoding(); } - public static com.google.bigtable.v2.Type.Struct.Field 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.bigtable.v2.Type.Timestamp.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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; } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int bitField0_; + public static final int ENCODING_FIELD_NUMBER = 1; + private com.google.bigtable.v2.Type.Timestamp.Encoding encoding_; - public static com.google.bigtable.v2.Type.Struct.Field parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + @java.lang.Override + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } - public static com.google.bigtable.v2.Type.Struct.Field parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } - public static com.google.bigtable.v2.Type.Struct.Field parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEncoding()); } + getUnknownFields().writeTo(output); + } - public static Builder newBuilder(com.google.bigtable.v2.Type.Struct.Field prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEncoding()); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } + if (!(obj instanceof com.google.bigtable.v2.Type.Timestamp)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Timestamp other = (com.google.bigtable.v2.Type.Timestamp) obj; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) return false; } - /** - * - * - *
    -       * A struct field and its type.
    -       * 
    - * - * Protobuf type {@code google.bigtable.v2.Type.Struct.Field} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Field) - com.google.bigtable.v2.Type.Struct.FieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; - } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Struct.Field.class, - com.google.bigtable.v2.Type.Struct.Field.Builder.class); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // Construct using com.google.bigtable.v2.Type.Struct.Field.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); - } - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fieldName_ = ""; - type_ = null; - if (typeBuilder_ != null) { - typeBuilder_.dispose(); - typeBuilder_ = null; - } - return this; - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.bigtable.v2.Type.Struct.Field getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance(); - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.bigtable.v2.Type.Struct.Field build() { - com.google.bigtable.v2.Type.Struct.Field result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.bigtable.v2.Type.Struct.Field buildPartial() { - com.google.bigtable.v2.Type.Struct.Field result = - new com.google.bigtable.v2.Type.Struct.Field(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private void buildPartial0(com.google.bigtable.v2.Type.Struct.Field result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fieldName_ = fieldName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + public static com.google.bigtable.v2.Type.Timestamp parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public Builder clone() { - return super.clone(); - } + public static com.google.bigtable.v2.Type.Timestamp parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } + public static com.google.bigtable.v2.Type.Timestamp parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } + public static com.google.bigtable.v2.Type.Timestamp 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 clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.Type.Timestamp 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; + } + + /** + * + * + *
    +     * Timestamp
    +     * Values of type `Timestamp` are stored in `Value.timestamp_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Timestamp} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Timestamp) + com.google.bigtable.v2.Type.TimestampOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Timestamp.class, + com.google.bigtable.v2.Type.Timestamp.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Timestamp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEncodingFieldBuilder(); } + } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; } + return this; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Struct.Field) { - return mergeFrom((com.google.bigtable.v2.Type.Struct.Field) other); - } else { - super.mergeFrom(other); - return this; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Timestamp_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp build() { + com.google.bigtable.v2.Type.Timestamp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - public Builder mergeFrom(com.google.bigtable.v2.Type.Struct.Field other) { - if (other == com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()) return this; - if (!other.getFieldName().isEmpty()) { - fieldName_ = other.fieldName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasType()) { - mergeType(other.getType()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + @java.lang.Override + public com.google.bigtable.v2.Type.Timestamp buildPartial() { + com.google.bigtable.v2.Type.Timestamp result = + new com.google.bigtable.v2.Type.Timestamp(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - @java.lang.Override - public final boolean isInitialized() { - return true; + private void buildPartial0(com.google.bigtable.v2.Type.Timestamp result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; + } - @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: - { - fieldName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Timestamp) { + return mergeFrom((com.google.bigtable.v2.Type.Timestamp) other); + } else { + super.mergeFrom(other); return this; } + } - private int bitField0_; - - private java.lang.Object fieldName_ = ""; - /** - * - * - *
    -         * The field name (optional). Fields without a `field_name` are considered
    -         * anonymous and cannot be referenced by name.
    -         * 
    - * - * string field_name = 1; - * - * @return The fieldName. - */ - public java.lang.String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder mergeFrom(com.google.bigtable.v2.Type.Timestamp other) { + if (other == com.google.bigtable.v2.Type.Timestamp.getDefaultInstance()) return this; + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); } - /** - * - * - *
    -         * The field name (optional). Fields without a `field_name` are considered
    -         * anonymous and cannot be referenced by name.
    -         * 
    - * - * string field_name = 1; - * - * @return The bytes for fieldName. - */ - public com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + 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(); } - /** - * - * - *
    -         * The field name (optional). Fields without a `field_name` are considered
    -         * anonymous and cannot be referenced by name.
    -         * 
    - * - * string field_name = 1; - * - * @param value The fieldName to set. - * @return This builder for chaining. - */ - public Builder setFieldName(java.lang.String value) { + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.bigtable.v2.Type.Timestamp.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp.Encoding, + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder> + encodingBuilder_; + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + * + * @return The encoding. + */ + public com.google.bigtable.v2.Type.Timestamp.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder setEncoding(com.google.bigtable.v2.Type.Timestamp.Encoding value) { + if (encodingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - fieldName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); } - /** - * - * - *
    -         * The field name (optional). Fields without a `field_name` are considered
    -         * anonymous and cannot be referenced by name.
    -         * 
    - * - * string field_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearFieldName() { - fieldName_ = getDefaultInstance().getFieldName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder setEncoding( + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); } - /** - * - * - *
    -         * The field name (optional). Fields without a `field_name` are considered
    -         * anonymous and cannot be referenced by name.
    -         * 
    - * - * string field_name = 1; - * - * @param value The bytes for fieldName to set. - * @return This builder for chaining. - */ - public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder mergeEncoding(com.google.bigtable.v2.Type.Timestamp.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && encoding_ != null + && encoding_ != com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; } - checkByteStringIsUtf8(value); - fieldName_ = value; + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { bitField0_ |= 0x00000001; onChanged(); - return this; } + return this; + } - private com.google.bigtable.v2.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type, - com.google.bigtable.v2.Type.Builder, - com.google.bigtable.v2.TypeOrBuilder> - typeBuilder_; - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return Whether the type field is set. - */ - public boolean hasType() { - return ((bitField0_ & 0x00000002) != 0); + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - * - * @return The type. - */ - public com.google.bigtable.v2.Type getType() { - if (typeBuilder_ == null) { - return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; - } else { - return typeBuilder_.getMessage(); - } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Timestamp.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + public com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.v2.Type.Timestamp.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Timestamp.Encoding encoding = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp.Encoding, + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp.Encoding, + com.google.bigtable.v2.Type.Timestamp.Encoding.Builder, + com.google.bigtable.v2.Type.Timestamp.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Timestamp) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Timestamp) + private static final com.google.bigtable.v2.Type.Timestamp DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Timestamp(); + } + + public static com.google.bigtable.v2.Type.Timestamp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Timestamp 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.bigtable.v2.Type.Timestamp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Date) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +   * Date
    +   * Values of type `Date` are stored in `Value.date_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Date} + */ + public static final class Date extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Date) + DateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Date"); + } + + // Use Date.newBuilder() to construct. + private Date(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Date() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Date_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Date.class, + com.google.bigtable.v2.Type.Date.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.Type.Date)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Date other = (com.google.bigtable.v2.Type.Date) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Date parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Date parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Date parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Date 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.bigtable.v2.Type.Date parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Date parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Date parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Date 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.bigtable.v2.Type.Date parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Date 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.bigtable.v2.Type.Date parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Date 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.bigtable.v2.Type.Date 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; + } + + /** + * + * + *
    +     * Date
    +     * Values of type `Date` are stored in `Value.date_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Date} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Date) + com.google.bigtable.v2.Type.DateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Date_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Date.class, + com.google.bigtable.v2.Type.Date.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Date.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Date_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Date getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Date build() { + com.google.bigtable.v2.Type.Date result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Date buildPartial() { + com.google.bigtable.v2.Type.Date result = new com.google.bigtable.v2.Type.Date(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Date) { + return mergeFrom((com.google.bigtable.v2.Type.Date) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Date other) { + if (other == com.google.bigtable.v2.Type.Date.getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Date) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Date) + private static final com.google.bigtable.v2.Type.Date DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Date(); + } + + public static com.google.bigtable.v2.Type.Date getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Date 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.bigtable.v2.Type.Date getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StructOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + java.util.List getFieldsList(); + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + com.google.bigtable.v2.Type.Struct.Field getFields(int index); + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + int getFieldsCount(); + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + java.util.List + getFieldsOrBuilderList(); + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index); + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + boolean hasEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + com.google.bigtable.v2.Type.Struct.Encoding getEncoding(); + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + com.google.bigtable.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder(); + } + + /** + * + * + *
    +   * A structured data value, consisting of fields which map to dynamically
    +   * typed values.
    +   * Values of type `Struct` are stored in `Value.array_value` where entries are
    +   * in the same order and number as `field_types`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct} + */ + public static final class Struct extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct) + StructOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Struct"); + } + + // Use Struct.newBuilder() to construct. + private Struct(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Struct() { + fields_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.class, + com.google.bigtable.v2.Type.Struct.Builder.class); + } + + public interface FieldOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Field) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * The field name (optional). Fields without a `field_name` are considered
    +       * anonymous and cannot be referenced by name.
    +       * 
    + * + * string field_name = 1; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + + /** + * + * + *
    +       * The field name (optional). Fields without a `field_name` are considered
    +       * anonymous and cannot be referenced by name.
    +       * 
    + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return The type. + */ + com.google.bigtable.v2.Type getType(); + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder(); + } + + /** + * + * + *
    +     * A struct field and its type.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Field} + */ + public static final class Field extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.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.GeneratedMessage.Builder builder) { + super(builder); + } + + private Field() { + fieldName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Field.class, + com.google.bigtable.v2.Type.Struct.Field.Builder.class); + } + + private int bitField0_; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + + /** + * + * + *
    +       * The field name (optional). Fields without a `field_name` are considered
    +       * anonymous and cannot be referenced by name.
    +       * 
    + * + * string field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + + /** + * + * + *
    +       * The field name (optional). Fields without a `field_name` are considered
    +       * anonymous and cannot be referenced by name.
    +       * 
    + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.bigtable.v2.Type type_; + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.bigtable.v2.Type getType() { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } + + /** + * + * + *
    +       * The type of values in this field.
    +       * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getType()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.bigtable.v2.Type.Struct.Field)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct.Field other = + (com.google.bigtable.v2.Type.Struct.Field) obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct.Field parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Field parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Field parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Field 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.bigtable.v2.Type.Struct.Field parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Field parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Field parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Field 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.bigtable.v2.Type.Struct.Field parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Field 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.bigtable.v2.Type.Struct.Field parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Field 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.bigtable.v2.Type.Struct.Field 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 struct field and its type.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Field} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Field) + com.google.bigtable.v2.Type.Struct.FieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Field.class, + com.google.bigtable.v2.Type.Struct.Field.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Struct.Field.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; + fieldName_ = ""; + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Field getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Field build() { + com.google.bigtable.v2.Type.Struct.Field result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Field buildPartial() { + com.google.bigtable.v2.Type.Struct.Field result = + new com.google.bigtable.v2.Type.Struct.Field(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Struct.Field result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct.Field) { + return mergeFrom((com.google.bigtable.v2.Type.Struct.Field) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Struct.Field other) { + if (other == com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()) return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasType()) { + mergeType(other.getType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldName_ = ""; + + /** + * + * + *
    +         * The field name (optional). Fields without a `field_name` are considered
    +         * anonymous and cannot be referenced by name.
    +         * 
    + * + * string field_name = 1; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +         * The field name (optional). Fields without a `field_name` are considered
    +         * anonymous and cannot be referenced by name.
    +         * 
    + * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +         * The field name (optional). Fields without a `field_name` are considered
    +         * anonymous and cannot be referenced by name.
    +         * 
    + * + * string field_name = 1; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The field name (optional). Fields without a `field_name` are considered
    +         * anonymous and cannot be referenced by name.
    +         * 
    + * + * string field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +         * The field name (optional). Fields without a `field_name` are considered
    +         * anonymous and cannot be referenced by name.
    +         * 
    + * + * string field_name = 1; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.bigtable.v2.Type type_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + typeBuilder_; + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + * + * @return The type. + */ + public com.google.bigtable.v2.Type getType() { + if (typeBuilder_ == null) { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } else { + return typeBuilder_.getMessage(); + } + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public Builder setType(com.google.bigtable.v2.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + } else { + typeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public Builder setType(com.google.bigtable.v2.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public Builder mergeType(com.google.bigtable.v2.Type value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && type_ != null + && type_ != com.google.bigtable.v2.Type.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + if (type_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public com.google.bigtable.v2.Type.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTypeFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; + } + } + + /** + * + * + *
    +         * The type of values in this field.
    +         * 
    + * + * .google.bigtable.v2.Type type = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder> + internalGetTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type, + com.google.bigtable.v2.Type.Builder, + com.google.bigtable.v2.TypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Field) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Field) + private static final com.google.bigtable.v2.Type.Struct.Field DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Field(); + } + + public static com.google.bigtable.v2.Type.Struct.Field getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Field 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.bigtable.v2.Type.Struct.Field getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EncodingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Encoding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + boolean hasSingleton(); + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + com.google.bigtable.v2.Type.Struct.Encoding.Singleton getSingleton(); + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder getSingletonOrBuilder(); + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return Whether the delimitedBytes field is set. + */ + boolean hasDelimitedBytes(); + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return The delimitedBytes. + */ + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes getDelimitedBytes(); + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder(); + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + boolean hasOrderedCodeBytes(); + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes getOrderedCodeBytes(); + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder(); + + com.google.bigtable.v2.Type.Struct.Encoding.EncodingCase getEncodingCase(); + } + + /** + * + * + *
    +     * Rules used to convert to or from lower level types.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding} + */ + public static final class Encoding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.Encoding) + EncodingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Encoding"); + } + + // Use Encoding.newBuilder() to construct. + private Encoding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Encoding() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.class, + com.google.bigtable.v2.Type.Struct.Encoding.Builder.class); + } + + public interface SingletonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Encoding.Singleton) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +       * Uses the encoding of `fields[0].type` as-is.
    +       * Only valid if `fields.size == 1`.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.Singleton} + */ + public static final class Singleton extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.Encoding.Singleton) + SingletonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Singleton"); + } + + // Use Singleton.newBuilder() to construct. + private Singleton(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Singleton() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.class, + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.Type.Struct.Encoding.Singleton)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct.Encoding.Singleton other = + (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton 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.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton 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.bigtable.v2.Type.Struct.Encoding.Singleton parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton 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.bigtable.v2.Type.Struct.Encoding.Singleton parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton 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.bigtable.v2.Type.Struct.Encoding.Singleton 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; + } + + /** + * + * + *
    +         * Uses the encoding of `fields[0].type` as-is.
    +         * Only valid if `fields.size == 1`.
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.Singleton} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Encoding.Singleton) + com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.class, + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Struct.Encoding.Singleton.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton build() { + com.google.bigtable.v2.Type.Struct.Encoding.Singleton result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton buildPartial() { + com.google.bigtable.v2.Type.Struct.Encoding.Singleton result = + new com.google.bigtable.v2.Type.Struct.Encoding.Singleton(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct.Encoding.Singleton) { + return mergeFrom((com.google.bigtable.v2.Type.Struct.Encoding.Singleton) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Struct.Encoding.Singleton other) { + if (other == com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance()) + return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Encoding.Singleton) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Encoding.Singleton) + private static final com.google.bigtable.v2.Type.Struct.Encoding.Singleton DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Encoding.Singleton(); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.Singleton getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Singleton 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.bigtable.v2.Type.Struct.Encoding.Singleton getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DelimitedBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +         * Byte sequence used to delimit concatenated fields. The delimiter must
    +         * contain at least 1 character and at most 50 characters.
    +         * 
    + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + com.google.protobuf.ByteString getDelimiter(); + } + + /** + * + * + *
    +       * Fields are encoded independently and concatenated with a configurable
    +       * `delimiter` in between.
    +       *
    +       * A struct with no fields defined is encoded as a single `delimiter`.
    +       *
    +       * Sorted mode:
    +       *
    +       * - Fields are encoded in sorted mode.
    +       * - Encoded field values must not contain any bytes <= `delimiter[0]`
    +       * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
    +       * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
    +       *
    +       * Distinct mode:
    +       *
    +       * - Fields are encoded in distinct mode.
    +       * - Encoded field values must not contain `delimiter[0]`.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} + */ + public static final class DelimitedBytes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + DelimitedBytesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DelimitedBytes"); + } + + // Use DelimitedBytes.newBuilder() to construct. + private DelimitedBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DelimitedBytes() { + delimiter_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.class, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder.class); + } + + public static final int DELIMITER_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString delimiter_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +         * Byte sequence used to delimit concatenated fields. The delimiter must
    +         * contain at least 1 character and at most 50 characters.
    +         * 
    + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelimiter() { + return delimiter_; + } + + 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 (!delimiter_.isEmpty()) { + output.writeBytes(1, delimiter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!delimiter_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, delimiter_); + } + 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes other = + (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) obj; + + if (!getDelimiter().equals(other.getDelimiter())) 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) + DELIMITER_FIELD_NUMBER; + hash = (53 * hash) + getDelimiter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes 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; + } + + /** + * + * + *
    +         * Fields are encoded independently and concatenated with a configurable
    +         * `delimiter` in between.
    +         *
    +         * A struct with no fields defined is encoded as a single `delimiter`.
    +         *
    +         * Sorted mode:
    +         *
    +         * - Fields are encoded in sorted mode.
    +         * - Encoded field values must not contain any bytes <= `delimiter[0]`
    +         * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
    +         * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
    +         *
    +         * Distinct mode:
    +         *
    +         * - Fields are encoded in distinct mode.
    +         * - Encoded field values must not contain `delimiter[0]`.
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.class, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + delimiter_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes build() { + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes buildPartial() { + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes result = + new com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.delimiter_ = delimiter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) { + return mergeFrom((com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes other) { + if (other + == com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance()) + return this; + if (!other.getDelimiter().isEmpty()) { + setDelimiter(other.getDelimiter()); + } + 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: + { + delimiter_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString delimiter_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +           * Byte sequence used to delimit concatenated fields. The delimiter must
    +           * contain at least 1 character and at most 50 characters.
    +           * 
    + * + * bytes delimiter = 1; + * + * @return The delimiter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelimiter() { + return delimiter_; + } + + /** + * + * + *
    +           * Byte sequence used to delimit concatenated fields. The delimiter must
    +           * contain at least 1 character and at most 50 characters.
    +           * 
    + * + * bytes delimiter = 1; + * + * @param value The delimiter to set. + * @return This builder for chaining. + */ + public Builder setDelimiter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + delimiter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +           * Byte sequence used to delimit concatenated fields. The delimiter must
    +           * contain at least 1 character and at most 50 characters.
    +           * 
    + * + * bytes delimiter = 1; + * + * @return This builder for chaining. + */ + public Builder clearDelimiter() { + bitField0_ = (bitField0_ & ~0x00000001); + delimiter_ = getDefaultInstance().getDelimiter(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) + private static final com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes(); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DelimitedBytes 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.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OrderedCodeBytesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
    +       * Fields are encoded independently and concatenated with the fixed byte
    +       * pair `{0x00, 0x01}` in between.
    +       *
    +       * Any null `(0x00)` byte in an encoded field is replaced by the fixed
    +       * byte pair `{0x00, 0xFF}`.
    +       *
    +       * Fields that encode to the empty string "" have special handling:
    +       *
    +       * - If *every* field encodes to "", or if the STRUCT has no fields
    +       * defined, then the STRUCT is encoded as the fixed byte pair
    +       * `{0x00, 0x00}`.
    +       * - Otherwise, the STRUCT only encodes until the last non-empty field,
    +       * omitting any trailing empty fields. Any empty fields that aren't
    +       * omitted are replaced with the fixed byte pair `{0x00, 0x00}`.
    +       *
    +       * Examples:
    +       *
    +       * ```
    +       * - STRUCT()             -> "\00\00"
    +       * - STRUCT("")           -> "\00\00"
    +       * - STRUCT("", "")       -> "\00\00"
    +       * - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
    +       * - STRUCT("A", "")      -> "A"
    +       * - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
    +       * - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
    +       * ```
    +       *
    +       *
    +       * Since null bytes are always escaped, this encoding can cause size
    +       * blowup for encodings like `Int64.BigEndianBytes` that are likely to
    +       * produce many such bytes.
    +       *
    +       * Sorted mode:
    +       *
    +       * - Fields are encoded in sorted mode.
    +       * - All values supported by the field encodings are allowed
    +       * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
    +       * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
    +       *
    +       * Distinct mode:
    +       *
    +       * - Fields are encoded in distinct mode.
    +       * - All values supported by the field encodings are allowed.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} + */ + public static final class OrderedCodeBytes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + OrderedCodeBytesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OrderedCodeBytes"); + } + + // Use OrderedCodeBytes.newBuilder() to construct. + private OrderedCodeBytes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OrderedCodeBytes() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.class, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes other = + (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes 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; + } + + /** + * + * + *
    +         * Fields are encoded independently and concatenated with the fixed byte
    +         * pair `{0x00, 0x01}` in between.
    +         *
    +         * Any null `(0x00)` byte in an encoded field is replaced by the fixed
    +         * byte pair `{0x00, 0xFF}`.
    +         *
    +         * Fields that encode to the empty string "" have special handling:
    +         *
    +         * - If *every* field encodes to "", or if the STRUCT has no fields
    +         * defined, then the STRUCT is encoded as the fixed byte pair
    +         * `{0x00, 0x00}`.
    +         * - Otherwise, the STRUCT only encodes until the last non-empty field,
    +         * omitting any trailing empty fields. Any empty fields that aren't
    +         * omitted are replaced with the fixed byte pair `{0x00, 0x00}`.
    +         *
    +         * Examples:
    +         *
    +         * ```
    +         * - STRUCT()             -> "\00\00"
    +         * - STRUCT("")           -> "\00\00"
    +         * - STRUCT("", "")       -> "\00\00"
    +         * - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
    +         * - STRUCT("A", "")      -> "A"
    +         * - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
    +         * - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
    +         * ```
    +         *
    +         *
    +         * Since null bytes are always escaped, this encoding can cause size
    +         * blowup for encodings like `Int64.BigEndianBytes` that are likely to
    +         * produce many such bytes.
    +         *
    +         * Sorted mode:
    +         *
    +         * - Fields are encoded in sorted mode.
    +         * - All values supported by the field encodings are allowed
    +         * - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
    +         * `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
    +         *
    +         * Distinct mode:
    +         *
    +         * - Fields are encoded in distinct mode.
    +         * - All values supported by the field encodings are allowed.
    +         * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.class, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder.class); + } + + // Construct using + // com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes build() { + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes buildPartial() { + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes result = + new com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) { + return mergeFrom( + (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes other) { + if (other + == com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance()) return this; + 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; + 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; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) + private static final com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes(); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderedCodeBytes 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.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int encodingCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object encoding_; + + public enum EncodingCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SINGLETON(1), + DELIMITED_BYTES(2), + ORDERED_CODE_BYTES(3), + ENCODING_NOT_SET(0); + private final int value; + + private EncodingCase(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 EncodingCase valueOf(int value) { + return forNumber(value); + } + + public static EncodingCase forNumber(int value) { + switch (value) { + case 1: + return SINGLETON; + case 2: + return DELIMITED_BYTES; + case 3: + return ORDERED_CODE_BYTES; + case 0: + return ENCODING_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public static final int SINGLETON_FIELD_NUMBER = 1; + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + @java.lang.Override + public boolean hasSingleton() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton getSingleton() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + /** + * + * + *
    +       * Use `Singleton` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder + getSingletonOrBuilder() { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + + public static final int DELIMITED_BYTES_FIELD_NUMBER = 2; + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return Whether the delimitedBytes field is set. + */ + @java.lang.Override + public boolean hasDelimitedBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return The delimitedBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes getDelimitedBytes() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + + /** + * + * + *
    +       * Use `DelimitedBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder() { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + + public static final int ORDERED_CODE_BYTES_FIELD_NUMBER = 3; + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 3; + } + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes getOrderedCodeBytes() { + if (encodingCase_ == 3) { + return (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + + /** + * + * + *
    +       * User `OrderedCodeBytes` encoding.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if (encodingCase_ == 3) { + return (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (encodingCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_); + } + if (encodingCase_ == 2) { + output.writeMessage( + 2, (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_); + } + if (encodingCase_ == 3) { + output.writeMessage( + 3, (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encodingCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_); + } + if (encodingCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_); + } + if (encodingCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_); + } + 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.bigtable.v2.Type.Struct.Encoding)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct.Encoding other = + (com.google.bigtable.v2.Type.Struct.Encoding) obj; + + if (!getEncodingCase().equals(other.getEncodingCase())) return false; + switch (encodingCase_) { + case 1: + if (!getSingleton().equals(other.getSingleton())) return false; + break; + case 2: + if (!getDelimitedBytes().equals(other.getDelimitedBytes())) return false; + break; + case 3: + if (!getOrderedCodeBytes().equals(other.getOrderedCodeBytes())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (encodingCase_) { + case 1: + hash = (37 * hash) + SINGLETON_FIELD_NUMBER; + hash = (53 * hash) + getSingleton().hashCode(); + break; + case 2: + hash = (37 * hash) + DELIMITED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getDelimitedBytes().hashCode(); + break; + case 3: + hash = (37 * hash) + ORDERED_CODE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getOrderedCodeBytes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct.Encoding parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding 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.bigtable.v2.Type.Struct.Encoding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding 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.bigtable.v2.Type.Struct.Encoding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding 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.bigtable.v2.Type.Struct.Encoding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding 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.bigtable.v2.Type.Struct.Encoding 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; + } + + /** + * + * + *
    +       * Rules used to convert to or from lower level types.
    +       * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct.Encoding} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct.Encoding) + com.google.bigtable.v2.Type.Struct.EncodingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.Encoding.class, + com.google.bigtable.v2.Type.Struct.Encoding.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Struct.Encoding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (singletonBuilder_ != null) { + singletonBuilder_.clear(); + } + if (delimitedBytesBuilder_ != null) { + delimitedBytesBuilder_.clear(); + } + if (orderedCodeBytesBuilder_ != null) { + orderedCodeBytesBuilder_.clear(); + } + encodingCase_ = 0; + encoding_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding build() { + com.google.bigtable.v2.Type.Struct.Encoding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding buildPartial() { + com.google.bigtable.v2.Type.Struct.Encoding result = + new com.google.bigtable.v2.Type.Struct.Encoding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Struct.Encoding result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.bigtable.v2.Type.Struct.Encoding result) { + result.encodingCase_ = encodingCase_; + result.encoding_ = this.encoding_; + if (encodingCase_ == 1 && singletonBuilder_ != null) { + result.encoding_ = singletonBuilder_.build(); + } + if (encodingCase_ == 2 && delimitedBytesBuilder_ != null) { + result.encoding_ = delimitedBytesBuilder_.build(); + } + if (encodingCase_ == 3 && orderedCodeBytesBuilder_ != null) { + result.encoding_ = orderedCodeBytesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct.Encoding) { + return mergeFrom((com.google.bigtable.v2.Type.Struct.Encoding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Struct.Encoding other) { + if (other == com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance()) + return this; + switch (other.getEncodingCase()) { + case SINGLETON: + { + mergeSingleton(other.getSingleton()); + break; + } + case DELIMITED_BYTES: + { + mergeDelimitedBytes(other.getDelimitedBytes()); + break; + } + case ORDERED_CODE_BYTES: + { + mergeOrderedCodeBytes(other.getOrderedCodeBytes()); + break; + } + case ENCODING_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( + internalGetSingletonFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDelimitedBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetOrderedCodeBytesFieldBuilder().getBuilder(), extensionRegistry); + encodingCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int encodingCase_ = 0; + private java.lang.Object encoding_; + + public EncodingCase getEncodingCase() { + return EncodingCase.forNumber(encodingCase_); + } + + public Builder clearEncoding() { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder> + singletonBuilder_; + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return Whether the singleton field is set. + */ + @java.lang.Override + public boolean hasSingleton() { + return encodingCase_ == 1; + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + * + * @return The singleton. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton getSingleton() { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } else { + if (encodingCase_ == 1) { + return singletonBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder setSingleton(com.google.bigtable.v2.Type.Struct.Encoding.Singleton value) { + if (singletonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + singletonBuilder_.setMessage(value); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder setSingleton( + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder builderForValue) { + if (singletonBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + singletonBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder mergeSingleton(com.google.bigtable.v2.Type.Struct.Encoding.Singleton value) { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1 + && encoding_ + != com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.newBuilder( + (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 1) { + singletonBuilder_.mergeFrom(value); + } else { + singletonBuilder_.setMessage(value); + } + } + encodingCase_ = 1; + return this; + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public Builder clearSingleton() { + if (singletonBuilder_ == null) { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 1) { + encodingCase_ = 0; + encoding_ = null; + } + singletonBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + public com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder getSingletonBuilder() { + return internalGetSingletonFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder + getSingletonOrBuilder() { + if ((encodingCase_ == 1) && (singletonBuilder_ != null)) { + return singletonBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 1) { + return (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `Singleton` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.Singleton singleton = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder> + internalGetSingletonFieldBuilder() { + if (singletonBuilder_ == null) { + if (!(encodingCase_ == 1)) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.getDefaultInstance(); + } + singletonBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.Singleton, + com.google.bigtable.v2.Type.Struct.Encoding.Singleton.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.SingletonOrBuilder>( + (com.google.bigtable.v2.Type.Struct.Encoding.Singleton) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 1; + onChanged(); + return singletonBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder> + delimitedBytesBuilder_; + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return Whether the delimitedBytes field is set. + */ + @java.lang.Override + public boolean hasDelimitedBytes() { + return encodingCase_ == 2; + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + * + * @return The delimitedBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes getDelimitedBytes() { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } else { + if (encodingCase_ == 2) { + return delimitedBytesBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + public Builder setDelimitedBytes( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes value) { + if (delimitedBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + delimitedBytesBuilder_.setMessage(value); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + public Builder setDelimitedBytes( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder builderForValue) { + if (delimitedBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + delimitedBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + public Builder mergeDelimitedBytes( + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes value) { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2 + && encoding_ + != com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.newBuilder( + (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 2) { + delimitedBytesBuilder_.mergeFrom(value); + } else { + delimitedBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 2; + return this; + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + public Builder clearDelimitedBytes() { + if (delimitedBytesBuilder_ == null) { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 2) { + encodingCase_ = 0; + encoding_ = null; + } + delimitedBytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder + getDelimitedBytesBuilder() { + return internalGetDelimitedBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder + getDelimitedBytesOrBuilder() { + if ((encodingCase_ == 2) && (delimitedBytesBuilder_ != null)) { + return delimitedBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 2) { + return (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + } + + /** + * + * + *
    +         * Use `DelimitedBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes delimited_bytes = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder> + internalGetDelimitedBytesFieldBuilder() { + if (delimitedBytesBuilder_ == null) { + if (!(encodingCase_ == 2)) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.getDefaultInstance(); + } + delimitedBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesOrBuilder>( + (com.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 2; + onChanged(); + return delimitedBytesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder> + orderedCodeBytesBuilder_; + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return Whether the orderedCodeBytes field is set. + */ + @java.lang.Override + public boolean hasOrderedCodeBytes() { + return encodingCase_ == 3; + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + * + * @return The orderedCodeBytes. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes getOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3) { + return (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } else { + if (encodingCase_ == 3) { + return orderedCodeBytesBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder setOrderedCodeBytes( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder builderForValue) { + if (orderedCodeBytesBuilder_ == null) { + encoding_ = builderForValue.build(); + onChanged(); + } else { + orderedCodeBytesBuilder_.setMessage(builderForValue.build()); + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder mergeOrderedCodeBytes( + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes value) { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3 + && encoding_ + != com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance()) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.newBuilder( + (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_) + .mergeFrom(value) + .buildPartial(); + } else { + encoding_ = value; + } + onChanged(); + } else { + if (encodingCase_ == 3) { + orderedCodeBytesBuilder_.mergeFrom(value); + } else { + orderedCodeBytesBuilder_.setMessage(value); + } + } + encodingCase_ = 3; + return this; + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public Builder clearOrderedCodeBytes() { + if (orderedCodeBytesBuilder_ == null) { + if (encodingCase_ == 3) { + encodingCase_ = 0; + encoding_ = null; + onChanged(); + } + } else { + if (encodingCase_ == 3) { + encodingCase_ = 0; + encoding_ = null; + } + orderedCodeBytesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder + getOrderedCodeBytesBuilder() { + return internalGetOrderedCodeBytesFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder + getOrderedCodeBytesOrBuilder() { + if ((encodingCase_ == 3) && (orderedCodeBytesBuilder_ != null)) { + return orderedCodeBytesBuilder_.getMessageOrBuilder(); + } else { + if (encodingCase_ == 3) { + return (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_; + } + return com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes + .getDefaultInstance(); + } + } + + /** + * + * + *
    +         * User `OrderedCodeBytes` encoding.
    +         * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes ordered_code_bytes = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder> + internalGetOrderedCodeBytesFieldBuilder() { + if (orderedCodeBytesBuilder_ == null) { + if (!(encodingCase_ == 3)) { + encoding_ = + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.getDefaultInstance(); + } + orderedCodeBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes.Builder, + com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesOrBuilder>( + (com.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes) encoding_, + getParentForChildren(), + isClean()); + encoding_ = null; + } + encodingCase_ = 3; + onChanged(); + return orderedCodeBytesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Encoding) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Encoding) + private static final com.google.bigtable.v2.Type.Struct.Encoding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Encoding(); + } + + public static com.google.bigtable.v2.Type.Struct.Encoding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Encoding 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.bigtable.v2.Type.Struct.Encoding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FIELDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List fields_; + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Field getFields(int index) { + return fields_.get(index); + } + + /** + * + * + *
    +     * The names and types of the fields in this struct.
    +     * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + public static final int ENCODING_FIELD_NUMBER = 2; + private com.google.bigtable.v2.Type.Struct.Encoding encoding_; + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + @java.lang.Override + public boolean hasEncoding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.Encoding getEncoding() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + + /** + * + * + *
    +     * The encoding to use when converting to or from lower level types.
    +     * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder() { + return encoding_ == null + ? com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + + 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 < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getEncoding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEncoding()); + } + 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.bigtable.v2.Type.Struct)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Struct other = (com.google.bigtable.v2.Type.Struct) obj; + + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (hasEncoding() != other.hasEncoding()) return false; + if (hasEncoding()) { + if (!getEncoding().equals(other.getEncoding())) 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 (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + if (hasEncoding()) { + hash = (37 * hash) + ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getEncoding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Struct parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct 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.bigtable.v2.Type.Struct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Struct parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Struct parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct 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.bigtable.v2.Type.Struct parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct 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.bigtable.v2.Type.Struct parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Struct 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.bigtable.v2.Type.Struct 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 structured data value, consisting of fields which map to dynamically
    +     * typed values.
    +     * Values of type `Struct` are stored in `Value.array_value` where entries are
    +     * in the same order and number as `field_types`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Struct} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Struct) + com.google.bigtable.v2.Type.StructOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Struct.class, + com.google.bigtable.v2.Type.Struct.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Struct.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFieldsFieldBuilder(); + internalGetEncodingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + } else { + fields_ = null; + fieldsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Struct_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct build() { + com.google.bigtable.v2.Type.Struct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Struct buildPartial() { + com.google.bigtable.v2.Type.Struct result = new com.google.bigtable.v2.Type.Struct(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.bigtable.v2.Type.Struct result) { + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + } + + private void buildPartial0(com.google.bigtable.v2.Type.Struct result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.encoding_ = encodingBuilder_ == null ? encoding_ : encodingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Struct) { + return mergeFrom((com.google.bigtable.v2.Type.Struct) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Struct other) { + if (other == com.google.bigtable.v2.Type.Struct.getDefaultInstance()) return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (other.hasEncoding()) { + mergeEncoding(other.getEncoding()); + } + 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.bigtable.v2.Type.Struct.Field m = + input.readMessage( + com.google.bigtable.v2.Type.Struct.Field.parser(), extensionRegistry); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(m); + } else { + fieldsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetEncodingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Type.Struct.Field, + com.google.bigtable.v2.Type.Struct.Field.Builder, + com.google.bigtable.v2.Type.Struct.FieldOrBuilder> + fieldsBuilder_; + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.v2.Type.Struct.Field getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder setFields(int index, com.google.bigtable.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder setFields( + int index, com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields(com.google.bigtable.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields(int index, com.google.bigtable.v2.Type.Struct.Field value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields(com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder addFields( + int index, com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.v2.Type.Struct.Field.Builder getFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.v2.Type.Struct.Field.Builder addFieldsBuilder() { + return internalGetFieldsFieldBuilder() + .addBuilder(com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()); + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public com.google.bigtable.v2.Type.Struct.Field.Builder addFieldsBuilder(int index) { + return internalGetFieldsFieldBuilder() + .addBuilder(index, com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()); + } + + /** + * + * + *
    +       * The names and types of the fields in this struct.
    +       * 
    + * + * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + */ + public java.util.List + getFieldsBuilderList() { + return internalGetFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Type.Struct.Field, + com.google.bigtable.v2.Type.Struct.Field.Builder, + com.google.bigtable.v2.Type.Struct.FieldOrBuilder> + internalGetFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.bigtable.v2.Type.Struct.Field, + com.google.bigtable.v2.Type.Struct.Field.Builder, + com.google.bigtable.v2.Type.Struct.FieldOrBuilder>( + fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private com.google.bigtable.v2.Type.Struct.Encoding encoding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding, + com.google.bigtable.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.v2.Type.Struct.EncodingOrBuilder> + encodingBuilder_; + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return Whether the encoding field is set. + */ + public boolean hasEncoding() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + * + * @return The encoding. + */ + public com.google.bigtable.v2.Type.Struct.Encoding getEncoding() { + if (encodingBuilder_ == null) { + return encoding_ == null + ? com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } else { + return encodingBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder setEncoding(com.google.bigtable.v2.Type.Struct.Encoding value) { + if (encodingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encoding_ = value; + } else { + encodingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder setEncoding( + com.google.bigtable.v2.Type.Struct.Encoding.Builder builderForValue) { + if (encodingBuilder_ == null) { + encoding_ = builderForValue.build(); + } else { + encodingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder mergeEncoding(com.google.bigtable.v2.Type.Struct.Encoding value) { + if (encodingBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && encoding_ != null + && encoding_ != com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance()) { + getEncodingBuilder().mergeFrom(value); + } else { + encoding_ = value; + } + } else { + encodingBuilder_.mergeFrom(value); + } + if (encoding_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public Builder clearEncoding() { + bitField0_ = (bitField0_ & ~0x00000002); + encoding_ = null; + if (encodingBuilder_ != null) { + encodingBuilder_.dispose(); + encodingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public com.google.bigtable.v2.Type.Struct.Encoding.Builder getEncodingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEncodingFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + public com.google.bigtable.v2.Type.Struct.EncodingOrBuilder getEncodingOrBuilder() { + if (encodingBuilder_ != null) { + return encodingBuilder_.getMessageOrBuilder(); + } else { + return encoding_ == null + ? com.google.bigtable.v2.Type.Struct.Encoding.getDefaultInstance() + : encoding_; + } + } + + /** + * + * + *
    +       * The encoding to use when converting to or from lower level types.
    +       * 
    + * + * .google.bigtable.v2.Type.Struct.Encoding encoding = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding, + com.google.bigtable.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.v2.Type.Struct.EncodingOrBuilder> + internalGetEncodingFieldBuilder() { + if (encodingBuilder_ == null) { + encodingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct.Encoding, + com.google.bigtable.v2.Type.Struct.Encoding.Builder, + com.google.bigtable.v2.Type.Struct.EncodingOrBuilder>( + getEncoding(), getParentForChildren(), isClean()); + encoding_ = null; + } + return encodingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct) + private static final com.google.bigtable.v2.Type.Struct DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct(); + } + + public static com.google.bigtable.v2.Type.Struct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Struct 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.bigtable.v2.Type.Struct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ProtoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Proto) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * The ID of the schema bundle that this proto is defined in.
    +     * 
    + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + java.lang.String getSchemaBundleId(); + + /** + * + * + *
    +     * The ID of the schema bundle that this proto is defined in.
    +     * 
    + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + com.google.protobuf.ByteString getSchemaBundleIdBytes(); + + /** + * + * + *
    +     * The fully qualified name of the protobuf message, including package. In
    +     * the format of "foo.bar.Message".
    +     * 
    + * + * string message_name = 2; + * + * @return The messageName. + */ + java.lang.String getMessageName(); + + /** + * + * + *
    +     * The fully qualified name of the protobuf message, including package. In
    +     * the format of "foo.bar.Message".
    +     * 
    + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + com.google.protobuf.ByteString getMessageNameBytes(); + } + + /** + * + * + *
    +   * A protobuf message type.
    +   * Values of type `Proto` are stored in `Value.bytes_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Proto} + */ + public static final class Proto extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Proto) + ProtoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Proto"); + } + + // Use Proto.newBuilder() to construct. + private Proto(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Proto() { + schemaBundleId_ = ""; + messageName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Proto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Proto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Proto.class, + com.google.bigtable.v2.Type.Proto.Builder.class); + } + + public static final int SCHEMA_BUNDLE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
    +     * The ID of the schema bundle that this proto is defined in.
    +     * 
    + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + @java.lang.Override + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + 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(); + schemaBundleId_ = s; + return s; + } + } + + /** + * + * + *
    +     * The ID of the schema bundle that this proto is defined in.
    +     * 
    + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object messageName_ = ""; + + /** + * + * + *
    +     * The fully qualified name of the protobuf message, including package. In
    +     * the format of "foo.bar.Message".
    +     * 
    + * + * string message_name = 2; + * + * @return The messageName. + */ + @java.lang.Override + public java.lang.String getMessageName() { + java.lang.Object ref = messageName_; + 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(); + messageName_ = s; + return s; + } + } + + /** + * + * + *
    +     * The fully qualified name of the protobuf message, including package. In
    +     * the format of "foo.bar.Message".
    +     * 
    + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageNameBytes() { + java.lang.Object ref = messageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, messageName_); + } + 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(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(messageName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, messageName_); + } + 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.bigtable.v2.Type.Proto)) { + return super.equals(obj); + } + com.google.bigtable.v2.Type.Proto other = (com.google.bigtable.v2.Type.Proto) obj; + + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getMessageName().equals(other.getMessageName())) 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_BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundleId().hashCode(); + hash = (37 * hash) + MESSAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMessageName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type.Proto parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Proto parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Proto parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Proto 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.bigtable.v2.Type.Proto parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type.Proto parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type.Proto parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Proto 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.bigtable.v2.Type.Proto parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Proto 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.bigtable.v2.Type.Proto parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type.Proto 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.bigtable.v2.Type.Proto 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 protobuf message type.
    +     * Values of type `Proto` are stored in `Value.bytes_value`.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Proto} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Proto) + com.google.bigtable.v2.Type.ProtoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Proto_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Proto_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Proto.class, + com.google.bigtable.v2.Type.Proto.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.Proto.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + schemaBundleId_ = ""; + messageName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Proto_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Proto getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Proto build() { + com.google.bigtable.v2.Type.Proto result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public Builder setType(com.google.bigtable.v2.Type value) { - if (typeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - } else { - typeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.Type.Proto buildPartial() { + com.google.bigtable.v2.Type.Proto result = new com.google.bigtable.v2.Type.Proto(this); + if (bitField0_ != 0) { + buildPartial0(result); } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public Builder setType(com.google.bigtable.v2.Type.Builder builderForValue) { - if (typeBuilder_ == null) { - type_ = builderForValue.build(); - } else { - typeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.Type.Proto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public Builder mergeType(com.google.bigtable.v2.Type value) { - if (typeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && type_ != null - && type_ != com.google.bigtable.v2.Type.getDefaultInstance()) { - getTypeBuilder().mergeFrom(value); - } else { - type_ = value; - } - } else { - typeBuilder_.mergeFrom(value); - } - if (type_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.messageName_ = messageName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type.Proto) { + return mergeFrom((com.google.bigtable.v2.Type.Proto) other); + } else { + super.mergeFrom(other); return this; } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000002); - type_ = null; - if (typeBuilder_ != null) { - typeBuilder_.dispose(); - typeBuilder_ = null; - } + } + + public Builder mergeFrom(com.google.bigtable.v2.Type.Proto other) { + if (other == com.google.bigtable.v2.Type.Proto.getDefaultInstance()) return this; + if (!other.getSchemaBundleId().isEmpty()) { + schemaBundleId_ = other.schemaBundleId_; + bitField0_ |= 0x00000001; onChanged(); - return this; } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public com.google.bigtable.v2.Type.Builder getTypeBuilder() { + if (!other.getMessageName().isEmpty()) { + messageName_ = other.messageName_; bitField0_ |= 0x00000002; onChanged(); - return getTypeFieldBuilder().getBuilder(); } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { - if (typeBuilder_ != null) { - return typeBuilder_.getMessageOrBuilder(); - } else { - return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; - } + 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(); } - /** - * - * - *
    -         * The type of values in this field.
    -         * 
    - * - * .google.bigtable.v2.Type type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type, - com.google.bigtable.v2.Type.Builder, - com.google.bigtable.v2.TypeOrBuilder> - getTypeFieldBuilder() { - if (typeBuilder_ == null) { - typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type, - com.google.bigtable.v2.Type.Builder, - com.google.bigtable.v2.TypeOrBuilder>( - getType(), getParentForChildren(), isClean()); - type_ = null; - } - return typeBuilder_; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + schemaBundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + messageName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object schemaBundleId_ = ""; + + /** + * + * + *
    +       * The ID of the schema bundle that this proto is defined in.
    +       * 
    + * + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaBundleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * The ID of the schema bundle that this proto is defined in.
    +       * 
    + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * The ID of the schema bundle that this proto is defined in.
    +       * 
    + * + * string schema_bundle_id = 1; + * + * @param value The schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + /** + * + * + *
    +       * The ID of the schema bundle that this proto is defined in.
    +       * 
    + * + * string schema_bundle_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearSchemaBundleId() { + schemaBundleId_ = getDefaultInstance().getSchemaBundleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
    +       * The ID of the schema bundle that this proto is defined in.
    +       * 
    + * + * string schema_bundle_id = 1; + * + * @param value The bytes for schemaBundleId to set. + * @return This builder for chaining. + */ + public Builder setSchemaBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + private java.lang.Object messageName_ = ""; + + /** + * + * + *
    +       * The fully qualified name of the protobuf message, including package. In
    +       * the format of "foo.bar.Message".
    +       * 
    + * + * string message_name = 2; + * + * @return The messageName. + */ + public java.lang.String getMessageName() { + java.lang.Object ref = messageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageName_ = s; + return s; + } else { + return (java.lang.String) ref; } + } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct.Field) + /** + * + * + *
    +       * The fully qualified name of the protobuf message, including package. In
    +       * the format of "foo.bar.Message".
    +       * 
    + * + * string message_name = 2; + * + * @return The bytes for messageName. + */ + public com.google.protobuf.ByteString getMessageNameBytes() { + java.lang.Object ref = messageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + messageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct.Field) - private static final com.google.bigtable.v2.Type.Struct.Field DEFAULT_INSTANCE; + /** + * + * + *
    +       * The fully qualified name of the protobuf message, including package. In
    +       * the format of "foo.bar.Message".
    +       * 
    + * + * string message_name = 2; + * + * @param value The messageName to set. + * @return This builder for chaining. + */ + public Builder setMessageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + messageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct.Field(); + /** + * + * + *
    +       * The fully qualified name of the protobuf message, including package. In
    +       * the format of "foo.bar.Message".
    +       * 
    + * + * string message_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessageName() { + messageName_ = getDefaultInstance().getMessageName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - public static com.google.bigtable.v2.Type.Struct.Field getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
    +       * The fully qualified name of the protobuf message, including package. In
    +       * the format of "foo.bar.Message".
    +       * 
    + * + * string message_name = 2; + * + * @param value The bytes for messageName to set. + * @return This builder for chaining. + */ + public Builder setMessageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + messageName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Field 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(); + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Proto) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Proto) + private static final com.google.bigtable.v2.Type.Proto DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Proto(); + } + + public static com.google.bigtable.v2.Type.Proto getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Proto 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; - } + 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.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.bigtable.v2.Type.Struct.Field getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.bigtable.v2.Type.Proto getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int FIELDS_FIELD_NUMBER = 1; + public interface EnumOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Enum) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.util.List fields_; /** * * *
    -     * The names and types of the fields in this struct.
    +     * The ID of the schema bundle that this enum is defined in.
          * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. + */ + java.lang.String getSchemaBundleId(); + + /** + * + * + *
    +     * The ID of the schema bundle that this enum is defined in.
    +     * 
    + * + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. + */ + com.google.protobuf.ByteString getSchemaBundleIdBytes(); + + /** + * + * + *
    +     * The fully qualified name of the protobuf enum message, including package.
    +     * In the format of "foo.bar.EnumMessage".
    +     * 
    + * + * string enum_name = 2; + * + * @return The enumName. + */ + java.lang.String getEnumName(); + + /** + * + * + *
    +     * The fully qualified name of the protobuf enum message, including package.
    +     * In the format of "foo.bar.EnumMessage".
    +     * 
    + * + * string enum_name = 2; + * + * @return The bytes for enumName. */ + com.google.protobuf.ByteString getEnumNameBytes(); + } + + /** + * + * + *
    +   * A protobuf enum type.
    +   * Values of type `Enum` are stored in `Value.int_value`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type.Enum} + */ + public static final class Enum extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Enum) + EnumOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Enum"); + } + + // Use Enum.newBuilder() to construct. + private Enum(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Enum() { + schemaBundleId_ = ""; + enumName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Enum_descriptor; + } + @java.lang.Override - public java.util.List getFieldsList() { - return fields_; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_Enum_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.Enum.class, + com.google.bigtable.v2.Type.Enum.Builder.class); } + + public static final int SCHEMA_BUNDLE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object schemaBundleId_ = ""; + /** * * *
    -     * The names and types of the fields in this struct.
    +     * The ID of the schema bundle that this enum is defined in.
          * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The schemaBundleId. */ @java.lang.Override - public java.util.List - getFieldsOrBuilderList() { - return fields_; + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + 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(); + schemaBundleId_ = s; + return s; + } } + /** * * *
    -     * The names and types of the fields in this struct.
    +     * The ID of the schema bundle that this enum is defined in.
          * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return The bytes for schemaBundleId. */ @java.lang.Override - public int getFieldsCount() { - return fields_.size(); + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int ENUM_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object enumName_ = ""; + /** * * *
    -     * The names and types of the fields in this struct.
    +     * The fully qualified name of the protobuf enum message, including package.
    +     * In the format of "foo.bar.EnumMessage".
          * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The enumName. */ @java.lang.Override - public com.google.bigtable.v2.Type.Struct.Field getFields(int index) { - return fields_.get(index); + public java.lang.String getEnumName() { + java.lang.Object ref = enumName_; + 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(); + enumName_ = s; + return s; + } } + /** * * *
    -     * The names and types of the fields in this struct.
    +     * The fully qualified name of the protobuf enum message, including package.
    +     * In the format of "foo.bar.EnumMessage".
          * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The bytes for enumName. */ @java.lang.Override - public com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { - return fields_.get(index); + public com.google.protobuf.ByteString getEnumNameBytes() { + java.lang.Object ref = enumName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enumName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -10554,8 +17689,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(1, fields_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enumName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, enumName_); } getUnknownFields().writeTo(output); } @@ -10566,8 +17704,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaBundleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, schemaBundleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(enumName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, enumName_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -10579,12 +17720,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.bigtable.v2.Type.Struct)) { + if (!(obj instanceof com.google.bigtable.v2.Type.Enum)) { return super.equals(obj); } - com.google.bigtable.v2.Type.Struct other = (com.google.bigtable.v2.Type.Struct) obj; + com.google.bigtable.v2.Type.Enum other = (com.google.bigtable.v2.Type.Enum) obj; - if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!getSchemaBundleId().equals(other.getSchemaBundleId())) return false; + if (!getEnumName().equals(other.getEnumName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10596,83 +17738,83 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } + hash = (37 * hash) + SCHEMA_BUNDLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSchemaBundleId().hashCode(); + hash = (37 * hash) + ENUM_NAME_FIELD_NUMBER; + hash = (53 * hash) + getEnumName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.bigtable.v2.Type.Struct parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.Type.Enum parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Struct parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.Type.Enum parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseFrom(byte[] data) + public static com.google.bigtable.v2.Type.Enum parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bigtable.v2.Type.Struct parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseDelimitedFrom(java.io.InputStream input) + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseDelimitedFrom( + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum 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.bigtable.v2.Type.Struct parseFrom( + public static com.google.bigtable.v2.Type.Enum 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); } @@ -10685,7 +17827,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.bigtable.v2.Type.Struct prototype) { + public static Builder newBuilder(com.google.bigtable.v2.Type.Enum prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -10695,47 +17837,44 @@ 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; } + /** * * *
    -     * A structured data value, consisting of fields which map to dynamically
    -     * typed values.
    -     * Values of type `Struct` are stored in `Value.array_value` where entries are
    -     * in the same order and number as `field_types`.
    +     * A protobuf enum type.
    +     * Values of type `Enum` are stored in `Value.int_value`.
          * 
    * - * Protobuf type {@code google.bigtable.v2.Type.Struct} + * Protobuf type {@code google.bigtable.v2.Type.Enum} */ - 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.bigtable.v2.Type.Struct) - com.google.bigtable.v2.Type.StructOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Enum) + com.google.bigtable.v2.Type.EnumOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_descriptor; + .internal_static_google_bigtable_v2_Type_Enum_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable + .internal_static_google_bigtable_v2_Type_Enum_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.Struct.class, - com.google.bigtable.v2.Type.Struct.Builder.class); + com.google.bigtable.v2.Type.Enum.class, + com.google.bigtable.v2.Type.Enum.Builder.class); } - // Construct using com.google.bigtable.v2.Type.Struct.newBuilder() + // Construct using com.google.bigtable.v2.Type.Enum.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -10743,30 +17882,25 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - } else { - fields_ = null; - fieldsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); + schemaBundleId_ = ""; + enumName_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_Struct_descriptor; + .internal_static_google_bigtable_v2_Type_Enum_descriptor; } @java.lang.Override - public com.google.bigtable.v2.Type.Struct getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + public com.google.bigtable.v2.Type.Enum getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } @java.lang.Override - public com.google.bigtable.v2.Type.Struct build() { - com.google.bigtable.v2.Type.Struct result = buildPartial(); + public com.google.bigtable.v2.Type.Enum build() { + com.google.bigtable.v2.Type.Enum result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -10774,9 +17908,8 @@ public com.google.bigtable.v2.Type.Struct build() { } @java.lang.Override - public com.google.bigtable.v2.Type.Struct buildPartial() { - com.google.bigtable.v2.Type.Struct result = new com.google.bigtable.v2.Type.Struct(this); - buildPartialRepeatedFields(result); + public com.google.bigtable.v2.Type.Enum buildPartial() { + com.google.bigtable.v2.Type.Enum result = new com.google.bigtable.v2.Type.Enum(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -10784,95 +17917,37 @@ public com.google.bigtable.v2.Type.Struct buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.bigtable.v2.Type.Struct result) { - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - } - - private void buildPartial0(com.google.bigtable.v2.Type.Struct result) { + private void buildPartial0(com.google.bigtable.v2.Type.Enum 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); + if (((from_bitField0_ & 0x00000001) != 0)) { + result.schemaBundleId_ = schemaBundleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enumName_ = enumName_; + } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type.Struct) { - return mergeFrom((com.google.bigtable.v2.Type.Struct) other); + if (other instanceof com.google.bigtable.v2.Type.Enum) { + return mergeFrom((com.google.bigtable.v2.Type.Enum) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bigtable.v2.Type.Struct other) { - if (other == com.google.bigtable.v2.Type.Struct.getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFieldsFieldBuilder() - : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } + public Builder mergeFrom(com.google.bigtable.v2.Type.Enum other) { + if (other == com.google.bigtable.v2.Type.Enum.getDefaultInstance()) return this; + if (!other.getSchemaBundleId().isEmpty()) { + schemaBundleId_ = other.schemaBundleId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEnumName().isEmpty()) { + enumName_ = other.enumName_; + bitField0_ |= 0x00000002; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -10902,415 +17977,280 @@ public Builder mergeFrom( break; case 10: { - com.google.bigtable.v2.Type.Struct.Field m = - input.readMessage( - com.google.bigtable.v2.Type.Struct.Field.parser(), extensionRegistry); - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(m); - } else { - fieldsBuilder_.addMessage(m); - } + schemaBundleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + enumName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); - - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.v2.Type.Struct.Field, - com.google.bigtable.v2.Type.Struct.Field.Builder, - com.google.bigtable.v2.Type.Struct.FieldOrBuilder> - fieldsBuilder_; - - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public java.util.List getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.v2.Type.Struct.Field getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    - * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public Builder setFields(int index, com.google.bigtable.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } + } // finally return this; } + + private int bitField0_; + + private java.lang.Object schemaBundleId_ = ""; + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The ID of the schema bundle that this enum is defined in.
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public Builder setFields( - int index, com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    + * string schema_bundle_id = 1; * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @return The schemaBundleId. */ - public Builder addFields(com.google.bigtable.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); + public java.lang.String getSchemaBundleId() { + java.lang.Object ref = schemaBundleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemaBundleId_ = s; + return s; } else { - fieldsBuilder_.addMessage(value); + return (java.lang.String) ref; } - return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The ID of the schema bundle that this enum is defined in.
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public Builder addFields(int index, com.google.bigtable.v2.Type.Struct.Field value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    + * string schema_bundle_id = 1; * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @return The bytes for schemaBundleId. */ - public Builder addFields(com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); + public com.google.protobuf.ByteString getSchemaBundleIdBytes() { + java.lang.Object ref = schemaBundleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + schemaBundleId_ = b; + return b; } else { - fieldsBuilder_.addMessage(builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The ID of the schema bundle that this enum is defined in.
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @param value The schemaBundleId to set. + * @return This builder for chaining. */ - public Builder addFields( - int index, com.google.bigtable.v2.Type.Struct.Field.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); + public Builder setSchemaBundleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The ID of the schema bundle that this enum is defined in.
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @return This builder for chaining. */ - public Builder addAllFields( - java.lang.Iterable values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } + public Builder clearSchemaBundleId() { + schemaBundleId_ = getDefaultInstance().getSchemaBundleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The ID of the schema bundle that this enum is defined in.
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string schema_bundle_id = 1; + * + * @param value The bytes for schemaBundleId to set. + * @return This builder for chaining. */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); + public Builder setSchemaBundleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemaBundleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } + + private java.lang.Object enumName_ = ""; + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @return The enumName. */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); + public java.lang.String getEnumName() { + java.lang.Object ref = enumName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + enumName_ = s; + return s; } else { - fieldsBuilder_.remove(index); + return (java.lang.String) ref; } - return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.v2.Type.Struct.Field.Builder getFieldsBuilder(int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    + * string enum_name = 2; * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @return The bytes for enumName. */ - public com.google.bigtable.v2.Type.Struct.FieldOrBuilder getFieldsOrBuilder(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); + public com.google.protobuf.ByteString getEnumNameBytes() { + java.lang.Object ref = enumName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + enumName_ = b; + return b; } else { - return fieldsBuilder_.getMessageOrBuilder(index); + return (com.google.protobuf.ByteString) ref; } } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @param value The enumName to set. + * @return This builder for chaining. */ - public java.util.List - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); + public Builder setEnumName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; - */ - public com.google.bigtable.v2.Type.Struct.Field.Builder addFieldsBuilder() { - return getFieldsFieldBuilder() - .addBuilder(com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()); - } - /** - * - * - *
    -       * The names and types of the fields in this struct.
    -       * 
    + * string enum_name = 2; * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * @return This builder for chaining. */ - public com.google.bigtable.v2.Type.Struct.Field.Builder addFieldsBuilder(int index) { - return getFieldsFieldBuilder() - .addBuilder(index, com.google.bigtable.v2.Type.Struct.Field.getDefaultInstance()); + public Builder clearEnumName() { + enumName_ = getDefaultInstance().getEnumName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } + /** * * *
    -       * The names and types of the fields in this struct.
    +       * The fully qualified name of the protobuf enum message, including package.
    +       * In the format of "foo.bar.EnumMessage".
            * 
    * - * repeated .google.bigtable.v2.Type.Struct.Field fields = 1; + * string enum_name = 2; + * + * @param value The bytes for enumName to set. + * @return This builder for chaining. */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.v2.Type.Struct.Field, - com.google.bigtable.v2.Type.Struct.Field.Builder, - com.google.bigtable.v2.Type.Struct.FieldOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.bigtable.v2.Type.Struct.Field, - com.google.bigtable.v2.Type.Struct.Field.Builder, - com.google.bigtable.v2.Type.Struct.FieldOrBuilder>( - fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fields_ = null; + public Builder setEnumNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - 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); + checkByteStringIsUtf8(value); + enumName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Struct) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Enum) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Struct) - private static final com.google.bigtable.v2.Type.Struct DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.Type.Enum) + private static final com.google.bigtable.v2.Type.Enum DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Struct(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.Type.Enum(); } - public static com.google.bigtable.v2.Type.Struct getDefaultInstance() { + public static com.google.bigtable.v2.Type.Enum getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Struct parsePartialFrom( + public Enum parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11330,17 +18270,17 @@ public Struct parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.bigtable.v2.Type.Struct getDefaultInstanceForType() { + public com.google.bigtable.v2.Type.Enum getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -11362,6 +18302,7 @@ public interface ArrayOrBuilder * @return Whether the elementType field is set. */ boolean hasElementType(); + /** * * @@ -11374,6 +18315,7 @@ public interface ArrayOrBuilder * @return The elementType. */ com.google.bigtable.v2.Type getElementType(); + /** * * @@ -11385,6 +18327,7 @@ public interface ArrayOrBuilder */ com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder(); } + /** * * @@ -11395,31 +18338,36 @@ public interface ArrayOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Array} */ - public static final class Array extends com.google.protobuf.GeneratedMessageV3 + public static final class Array extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Array) ArrayOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Array"); + } + // Use Array.newBuilder() to construct. - private Array(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Array(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Array() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Array(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Array_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable @@ -11431,6 +18379,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int ELEMENT_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type elementType_; + /** * * @@ -11446,6 +18395,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasElementType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -11461,6 +18411,7 @@ public boolean hasElementType() { public com.google.bigtable.v2.Type getElementType() { return elementType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : elementType_; } + /** * * @@ -11579,38 +18530,38 @@ public static com.google.bigtable.v2.Type.Array parseFrom( public static com.google.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array 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); } @@ -11633,11 +18584,11 @@ 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; } + /** * * @@ -11648,8 +18599,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Type.Array} */ - 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.bigtable.v2.Type.Array) com.google.bigtable.v2.Type.ArrayOrBuilder { @@ -11659,7 +18609,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable @@ -11673,14 +18623,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) { - getElementTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetElementTypeFieldBuilder(); } } @@ -11737,41 +18687,6 @@ private void buildPartial0(com.google.bigtable.v2.Type.Array 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.bigtable.v2.Type.Array) { @@ -11815,7 +18730,8 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getElementTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetElementTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -11839,11 +18755,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Type elementType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> elementTypeBuilder_; + /** * * @@ -11858,6 +18775,7 @@ public Builder mergeFrom( public boolean hasElementType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -11878,6 +18796,7 @@ public com.google.bigtable.v2.Type getElementType() { return elementTypeBuilder_.getMessage(); } } + /** * * @@ -11900,6 +18819,7 @@ public Builder setElementType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * @@ -11919,6 +18839,7 @@ public Builder setElementType(com.google.bigtable.v2.Type.Builder builderForValu onChanged(); return this; } + /** * * @@ -11946,6 +18867,7 @@ public Builder mergeElementType(com.google.bigtable.v2.Type value) { } return this; } + /** * * @@ -11965,6 +18887,7 @@ public Builder clearElementType() { onChanged(); return this; } + /** * * @@ -11977,8 +18900,9 @@ public Builder clearElementType() { public com.google.bigtable.v2.Type.Builder getElementTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getElementTypeFieldBuilder().getBuilder(); + return internalGetElementTypeFieldBuilder().getBuilder(); } + /** * * @@ -11997,6 +18921,7 @@ public com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder() { : elementType_; } } + /** * * @@ -12006,14 +18931,14 @@ public com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder() { * * .google.bigtable.v2.Type element_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getElementTypeFieldBuilder() { + internalGetElementTypeFieldBuilder() { if (elementTypeBuilder_ == null) { elementTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>( @@ -12023,18 +18948,6 @@ public com.google.bigtable.v2.TypeOrBuilder getElementTypeOrBuilder() { return elementTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Array) } @@ -12105,6 +19018,7 @@ public interface MapOrBuilder * @return Whether the keyType field is set. */ boolean hasKeyType(); + /** * * @@ -12118,6 +19032,7 @@ public interface MapOrBuilder * @return The keyType. */ com.google.bigtable.v2.Type getKeyType(); + /** * * @@ -12142,6 +19057,7 @@ public interface MapOrBuilder * @return Whether the valueType field is set. */ boolean hasValueType(); + /** * * @@ -12154,6 +19070,7 @@ public interface MapOrBuilder * @return The valueType. */ com.google.bigtable.v2.Type getValueType(); + /** * * @@ -12165,6 +19082,7 @@ public interface MapOrBuilder */ com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder(); } + /** * * @@ -12180,31 +19098,36 @@ public interface MapOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Map} */ - public static final class Map extends com.google.protobuf.GeneratedMessageV3 + public static final class Map extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Map) MapOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Map"); + } + // Use Map.newBuilder() to construct. - private Map(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Map(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Map() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Map(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Map_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable @@ -12215,6 +19138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { private int bitField0_; public static final int KEY_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type keyType_; + /** * * @@ -12231,6 +19155,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public boolean hasKeyType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -12247,6 +19172,7 @@ public boolean hasKeyType() { public com.google.bigtable.v2.Type getKeyType() { return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; } + /** * * @@ -12264,6 +19190,7 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { public static final int VALUE_TYPE_FIELD_NUMBER = 2; private com.google.bigtable.v2.Type valueType_; + /** * * @@ -12279,6 +19206,7 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -12294,6 +19222,7 @@ public boolean hasValueType() { public com.google.bigtable.v2.Type getValueType() { return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; } + /** * * @@ -12426,38 +19355,38 @@ public static com.google.bigtable.v2.Type.Map parseFrom( public static com.google.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map 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); } @@ -12480,11 +19409,11 @@ 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; } + /** * * @@ -12500,8 +19429,7 @@ protected Builder newBuilderForType( * * Protobuf type {@code google.bigtable.v2.Type.Map} */ - 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.bigtable.v2.Type.Map) com.google.bigtable.v2.Type.MapOrBuilder { @@ -12511,7 +19439,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable @@ -12525,15 +19453,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) { - getKeyTypeFieldBuilder(); - getValueTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeyTypeFieldBuilder(); + internalGetValueTypeFieldBuilder(); } } @@ -12598,41 +19526,6 @@ private void buildPartial0(com.google.bigtable.v2.Type.Map 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.bigtable.v2.Type.Map) { @@ -12679,13 +19572,15 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getKeyTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetKeyTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getValueTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetValueTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 @@ -12709,11 +19604,12 @@ public Builder mergeFrom( private int bitField0_; private com.google.bigtable.v2.Type keyType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> keyTypeBuilder_; + /** * * @@ -12729,6 +19625,7 @@ public Builder mergeFrom( public boolean hasKeyType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -12748,6 +19645,7 @@ public com.google.bigtable.v2.Type getKeyType() { return keyTypeBuilder_.getMessage(); } } + /** * * @@ -12771,6 +19669,7 @@ public Builder setKeyType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * @@ -12791,6 +19690,7 @@ public Builder setKeyType(com.google.bigtable.v2.Type.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -12819,6 +19719,7 @@ public Builder mergeKeyType(com.google.bigtable.v2.Type value) { } return this; } + /** * * @@ -12839,6 +19740,7 @@ public Builder clearKeyType() { onChanged(); return this; } + /** * * @@ -12852,8 +19754,9 @@ public Builder clearKeyType() { public com.google.bigtable.v2.Type.Builder getKeyTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getKeyTypeFieldBuilder().getBuilder(); + return internalGetKeyTypeFieldBuilder().getBuilder(); } + /** * * @@ -12871,6 +19774,7 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { return keyType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : keyType_; } } + /** * * @@ -12881,14 +19785,14 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { * * .google.bigtable.v2.Type key_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getKeyTypeFieldBuilder() { + internalGetKeyTypeFieldBuilder() { if (keyTypeBuilder_ == null) { keyTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>( @@ -12899,11 +19803,12 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { } private com.google.bigtable.v2.Type valueType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> valueTypeBuilder_; + /** * * @@ -12918,6 +19823,7 @@ public com.google.bigtable.v2.TypeOrBuilder getKeyTypeOrBuilder() { public boolean hasValueType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * @@ -12936,6 +19842,7 @@ public com.google.bigtable.v2.Type getValueType() { return valueTypeBuilder_.getMessage(); } } + /** * * @@ -12958,6 +19865,7 @@ public Builder setValueType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * @@ -12977,6 +19885,7 @@ public Builder setValueType(com.google.bigtable.v2.Type.Builder builderForValue) onChanged(); return this; } + /** * * @@ -13004,6 +19913,7 @@ public Builder mergeValueType(com.google.bigtable.v2.Type value) { } return this; } + /** * * @@ -13023,6 +19933,7 @@ public Builder clearValueType() { onChanged(); return this; } + /** * * @@ -13035,8 +19946,9 @@ public Builder clearValueType() { public com.google.bigtable.v2.Type.Builder getValueTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getValueTypeFieldBuilder().getBuilder(); + return internalGetValueTypeFieldBuilder().getBuilder(); } + /** * * @@ -13053,6 +19965,7 @@ public com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder() { return valueType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : valueType_; } } + /** * * @@ -13062,14 +19975,14 @@ public com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder() { * * .google.bigtable.v2.Type value_type = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getValueTypeFieldBuilder() { + internalGetValueTypeFieldBuilder() { if (valueTypeBuilder_ == null) { valueTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>( @@ -13079,18 +19992,6 @@ public com.google.bigtable.v2.TypeOrBuilder getValueTypeOrBuilder() { return valueTypeBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Map) } @@ -13152,8 +20053,7 @@ public interface AggregateOrBuilder * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -13162,12 +20062,12 @@ public interface AggregateOrBuilder * @return Whether the inputType field is set. */ boolean hasInputType(); + /** * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -13176,12 +20076,12 @@ public interface AggregateOrBuilder * @return The inputType. */ com.google.bigtable.v2.Type getInputType(); + /** * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -13195,7 +20095,7 @@ public interface AggregateOrBuilder *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -13204,13 +20104,14 @@ public interface AggregateOrBuilder * @return Whether the stateType field is set. */ boolean hasStateType(); + /** * * *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -13219,13 +20120,14 @@ public interface AggregateOrBuilder * @return The stateType. */ com.google.bigtable.v2.Type getStateType(); + /** * * *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -13245,6 +20147,7 @@ public interface AggregateOrBuilder * @return Whether the sum field is set. */ boolean hasSum(); + /** * * @@ -13257,6 +20160,7 @@ public interface AggregateOrBuilder * @return The sum. */ com.google.bigtable.v2.Type.Aggregate.Sum getSum(); + /** * * @@ -13282,6 +20186,7 @@ public interface AggregateOrBuilder * @return Whether the hllppUniqueCount field is set. */ boolean hasHllppUniqueCount(); + /** * * @@ -13296,6 +20201,7 @@ public interface AggregateOrBuilder * @return The hllppUniqueCount. */ com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount getHllppUniqueCount(); + /** * * @@ -13322,6 +20228,7 @@ public interface AggregateOrBuilder * @return Whether the max field is set. */ boolean hasMax(); + /** * * @@ -13334,6 +20241,7 @@ public interface AggregateOrBuilder * @return The max. */ com.google.bigtable.v2.Type.Aggregate.Max getMax(); + /** * * @@ -13357,6 +20265,7 @@ public interface AggregateOrBuilder * @return Whether the min field is set. */ boolean hasMin(); + /** * * @@ -13369,6 +20278,7 @@ public interface AggregateOrBuilder * @return The min. */ com.google.bigtable.v2.Type.Aggregate.Min getMin(); + /** * * @@ -13382,44 +20292,50 @@ public interface AggregateOrBuilder com.google.bigtable.v2.Type.Aggregate.AggregatorCase getAggregatorCase(); } + /** * * *
        * A value that combines incremental updates into a summarized value.
        *
    -   * Data is never directly written or read using type `Aggregate`. Writes will
    -   * provide either the `input_type` or `state_type`, and reads will always
    -   * return the `state_type` .
    +   * Data is never directly written or read using type `Aggregate`. Writes
    +   * provide either the `input_type` or `state_type`, and reads always return
    +   * the `state_type` .
        * 
    * * Protobuf type {@code google.bigtable.v2.Type.Aggregate} */ - public static final class Aggregate extends com.google.protobuf.GeneratedMessageV3 + public static final class Aggregate extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate) AggregateOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Aggregate"); + } + // Use Aggregate.newBuilder() to construct. - private Aggregate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Aggregate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Aggregate() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Aggregate(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable @@ -13432,6 +20348,7 @@ public interface SumOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Sum) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -13443,31 +20360,36 @@ public interface SumOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Sum} */ - public static final class Sum extends com.google.protobuf.GeneratedMessageV3 + public static final class Sum extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Sum) SumOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Sum"); + } + // Use Sum.newBuilder() to construct. - private Sum(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Sum(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Sum() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Sum(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Sum_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable @@ -13568,38 +20490,38 @@ public static com.google.bigtable.v2.Type.Aggregate.Sum parseFrom( public static com.google.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum 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); } @@ -13623,10 +20545,11 @@ 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; } + /** * * @@ -13639,7 +20562,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Sum} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Sum) com.google.bigtable.v2.Type.Aggregate.SumOrBuilder { @@ -13649,7 +20572,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable @@ -13661,7 +20584,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.Aggregate.Sum.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -13699,41 +20622,6 @@ public com.google.bigtable.v2.Type.Aggregate.Sum 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.bigtable.v2.Type.Aggregate.Sum) { @@ -13789,18 +20677,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.bigtable.v2.Type.Aggregate.Sum) } @@ -13857,6 +20733,7 @@ public interface MaxOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Max) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -13868,31 +20745,36 @@ public interface MaxOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Max} */ - public static final class Max extends com.google.protobuf.GeneratedMessageV3 + public static final class Max extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Max) MaxOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Max"); + } + // Use Max.newBuilder() to construct. - private Max(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Max(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Max() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Max(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Max_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable @@ -13993,38 +20875,38 @@ public static com.google.bigtable.v2.Type.Aggregate.Max parseFrom( public static com.google.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max 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); } @@ -14048,10 +20930,11 @@ 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; } + /** * * @@ -14064,7 +20947,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Max} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Max) com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder { @@ -14074,7 +20957,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable @@ -14086,7 +20969,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.Aggregate.Max.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14124,41 +21007,6 @@ public com.google.bigtable.v2.Type.Aggregate.Max 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.bigtable.v2.Type.Aggregate.Max) { @@ -14214,18 +21062,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.bigtable.v2.Type.Aggregate.Max) } @@ -14282,6 +21118,7 @@ public interface MinOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.Min) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -14293,31 +21130,36 @@ public interface MinOrBuilder * * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Min} */ - public static final class Min extends com.google.protobuf.GeneratedMessageV3 + public static final class Min extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.Min) MinOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Min"); + } + // Use Min.newBuilder() to construct. - private Min(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Min(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Min() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Min(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Min_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable @@ -14418,38 +21260,38 @@ public static com.google.bigtable.v2.Type.Aggregate.Min parseFrom( public static com.google.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min 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); } @@ -14473,10 +21315,11 @@ 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; } + /** * * @@ -14489,7 +21332,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.Type.Aggregate.Min} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.Min) com.google.bigtable.v2.Type.Aggregate.MinOrBuilder { @@ -14499,7 +21342,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable @@ -14511,7 +21354,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.Type.Aggregate.Min.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14549,41 +21392,6 @@ public com.google.bigtable.v2.Type.Aggregate.Min 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.bigtable.v2.Type.Aggregate.Min) { @@ -14639,18 +21447,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.bigtable.v2.Type.Aggregate.Min) } @@ -14707,6 +21503,7 @@ public interface HyperLogLogPlusPlusUniqueCountOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) com.google.protobuf.MessageOrBuilder {} + /** * * @@ -14723,32 +21520,37 @@ public interface HyperLogLogPlusPlusUniqueCountOrBuilder * Protobuf type {@code google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} */ public static final class HyperLogLogPlusPlusUniqueCount - extends com.google.protobuf.GeneratedMessageV3 + extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) HyperLogLogPlusPlusUniqueCountOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HyperLogLogPlusPlusUniqueCount"); + } + // Use HyperLogLogPlusPlusUniqueCount.newBuilder() to construct. private HyperLogLogPlusPlusUniqueCount( - com.google.protobuf.GeneratedMessageV3.Builder builder) { + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private HyperLogLogPlusPlusUniqueCount() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HyperLogLogPlusPlusUniqueCount(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable @@ -14850,19 +21652,19 @@ public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCou public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount @@ -14870,20 +21672,20 @@ public static com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCou 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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount 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); } @@ -14908,10 +21710,11 @@ 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; } + /** * * @@ -14928,7 +21731,7 @@ protected Builder newBuilderForType( * Protobuf type {@code google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount} */ public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder + extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder { @@ -14938,7 +21741,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable @@ -14952,7 +21755,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -14972,60 +21775,25 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount getDefaultInstanceForType() { return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount build() { - com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount buildPartial() { - com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = - new com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + .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); + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount build() { + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount buildPartial() { + com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount result = + new com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount(this); + onBuilt(); + return result; } @java.lang.Override @@ -15088,18 +21856,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.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount) } @@ -15176,6 +21932,7 @@ public enum AggregatorCase private AggregatorCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -15214,12 +21971,12 @@ public AggregatorCase getAggregatorCase() { public static final int INPUT_TYPE_FIELD_NUMBER = 1; private com.google.bigtable.v2.Type inputType_; + /** * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -15231,12 +21988,12 @@ public AggregatorCase getAggregatorCase() { public boolean hasInputType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -15248,12 +22005,12 @@ public boolean hasInputType() { public com.google.bigtable.v2.Type getInputType() { return inputType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : inputType_; } + /** * * *
    -     * Type of the inputs that are accumulated by this `Aggregate`, which must
    -     * specify a full encoding.
    +     * Type of the inputs that are accumulated by this `Aggregate`.
          * Use `AddInput` mutations to accumulate new inputs.
          * 
    * @@ -15266,13 +22023,14 @@ public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { public static final int STATE_TYPE_FIELD_NUMBER = 2; private com.google.bigtable.v2.Type stateType_; + /** * * *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -15284,13 +22042,14 @@ public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { public boolean hasStateType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -15302,13 +22061,14 @@ public boolean hasStateType() { public com.google.bigtable.v2.Type getStateType() { return stateType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : stateType_; } + /** * * *
          * Output only. Type that holds the internal accumulator state for the
          * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -     * chosen, and will always specify a full encoding.
    +     * chosen.
          * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -15320,6 +22080,7 @@ public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { } public static final int SUM_FIELD_NUMBER = 4; + /** * * @@ -15335,6 +22096,7 @@ public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { public boolean hasSum() { return aggregatorCase_ == 4; } + /** * * @@ -15353,6 +22115,7 @@ public com.google.bigtable.v2.Type.Aggregate.Sum getSum() { } return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); } + /** * * @@ -15371,6 +22134,7 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { } public static final int HLLPP_UNIQUE_COUNT_FIELD_NUMBER = 5; + /** * * @@ -15388,6 +22152,7 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { public boolean hasHllppUniqueCount() { return aggregatorCase_ == 5; } + /** * * @@ -15410,6 +22175,7 @@ public boolean hasHllppUniqueCount() { return com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount .getDefaultInstance(); } + /** * * @@ -15432,6 +22198,7 @@ public boolean hasHllppUniqueCount() { } public static final int MAX_FIELD_NUMBER = 6; + /** * * @@ -15447,6 +22214,7 @@ public boolean hasHllppUniqueCount() { public boolean hasMax() { return aggregatorCase_ == 6; } + /** * * @@ -15465,6 +22233,7 @@ public com.google.bigtable.v2.Type.Aggregate.Max getMax() { } return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); } + /** * * @@ -15483,6 +22252,7 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { } public static final int MIN_FIELD_NUMBER = 7; + /** * * @@ -15498,6 +22268,7 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { public boolean hasMin() { return aggregatorCase_ == 7; } + /** * * @@ -15516,6 +22287,7 @@ public com.google.bigtable.v2.Type.Aggregate.Min getMin() { } return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); } + /** * * @@ -15723,38 +22495,38 @@ public static com.google.bigtable.v2.Type.Aggregate parseFrom( public static com.google.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate 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); } @@ -15777,26 +22549,25 @@ 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; } + /** * * *
          * A value that combines incremental updates into a summarized value.
          *
    -     * Data is never directly written or read using type `Aggregate`. Writes will
    -     * provide either the `input_type` or `state_type`, and reads will always
    -     * return the `state_type` .
    +     * Data is never directly written or read using type `Aggregate`. Writes
    +     * provide either the `input_type` or `state_type`, and reads always return
    +     * the `state_type` .
          * 
    * * Protobuf type {@code google.bigtable.v2.Type.Aggregate} */ - 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.bigtable.v2.Type.Aggregate) com.google.bigtable.v2.Type.AggregateOrBuilder { @@ -15806,7 +22577,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.bigtable.v2.TypesProto .internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable @@ -15820,15 +22591,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) { - getInputTypeFieldBuilder(); - getStateTypeFieldBuilder(); + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInputTypeFieldBuilder(); + internalGetStateTypeFieldBuilder(); } } @@ -15926,41 +22697,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.Type.Aggregate 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.bigtable.v2.Type.Aggregate) { @@ -16033,38 +22769,40 @@ public Builder mergeFrom( break; case 10: { - input.readMessage(getInputTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetInputTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - input.readMessage(getStateTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetStateTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 34: { - input.readMessage(getSumFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetSumFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); + internalGetHllppUniqueCountFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 5; break; } // case 42 case 50: { - input.readMessage(getMaxFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMaxFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 6; break; } // case 50 case 58: { - input.readMessage(getMinFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetMinFieldBuilder().getBuilder(), extensionRegistry); aggregatorCase_ = 7; break; } // case 58 @@ -16102,17 +22840,17 @@ public Builder clearAggregator() { private int bitField0_; private com.google.bigtable.v2.Type inputType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> inputTypeBuilder_; + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16123,12 +22861,12 @@ public Builder clearAggregator() { public boolean hasInputType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16143,12 +22881,12 @@ public com.google.bigtable.v2.Type getInputType() { return inputTypeBuilder_.getMessage(); } } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16167,12 +22905,12 @@ public Builder setInputType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16188,12 +22926,12 @@ public Builder setInputType(com.google.bigtable.v2.Type.Builder builderForValue) onChanged(); return this; } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16217,12 +22955,12 @@ public Builder mergeInputType(com.google.bigtable.v2.Type value) { } return this; } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16238,12 +22976,12 @@ public Builder clearInputType() { onChanged(); return this; } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16252,14 +22990,14 @@ public Builder clearInputType() { public com.google.bigtable.v2.Type.Builder getInputTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getInputTypeFieldBuilder().getBuilder(); + return internalGetInputTypeFieldBuilder().getBuilder(); } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * @@ -16272,25 +23010,25 @@ public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { return inputType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : inputType_; } } + /** * * *
    -       * Type of the inputs that are accumulated by this `Aggregate`, which must
    -       * specify a full encoding.
    +       * Type of the inputs that are accumulated by this `Aggregate`.
            * Use `AddInput` mutations to accumulate new inputs.
            * 
    * * .google.bigtable.v2.Type input_type = 1; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getInputTypeFieldBuilder() { + internalGetInputTypeFieldBuilder() { if (inputTypeBuilder_ == null) { inputTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>( @@ -16301,18 +23039,19 @@ public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { } private com.google.bigtable.v2.Type stateType_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> stateTypeBuilder_; + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16323,13 +23062,14 @@ public com.google.bigtable.v2.TypeOrBuilder getInputTypeOrBuilder() { public boolean hasStateType() { return ((bitField0_ & 0x00000002) != 0); } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16344,13 +23084,14 @@ public com.google.bigtable.v2.Type getStateType() { return stateTypeBuilder_.getMessage(); } } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16369,13 +23110,14 @@ public Builder setStateType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16391,13 +23133,14 @@ public Builder setStateType(com.google.bigtable.v2.Type.Builder builderForValue) onChanged(); return this; } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16421,13 +23164,14 @@ public Builder mergeStateType(com.google.bigtable.v2.Type value) { } return this; } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16443,13 +23187,14 @@ public Builder clearStateType() { onChanged(); return this; } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16458,15 +23203,16 @@ public Builder clearStateType() { public com.google.bigtable.v2.Type.Builder getStateTypeBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getStateTypeFieldBuilder().getBuilder(); + return internalGetStateTypeFieldBuilder().getBuilder(); } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -16479,26 +23225,27 @@ public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { return stateType_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : stateType_; } } + /** * * *
            * Output only. Type that holds the internal accumulator state for the
            * `Aggregate`. This is a function of the `input_type` and `aggregator`
    -       * chosen, and will always specify a full encoding.
    +       * chosen.
            * 
    * * .google.bigtable.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getStateTypeFieldBuilder() { + internalGetStateTypeFieldBuilder() { if (stateTypeBuilder_ == null) { stateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>( @@ -16508,11 +23255,12 @@ public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { return stateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Sum, com.google.bigtable.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.v2.Type.Aggregate.SumOrBuilder> sumBuilder_; + /** * * @@ -16528,6 +23276,7 @@ public com.google.bigtable.v2.TypeOrBuilder getStateTypeOrBuilder() { public boolean hasSum() { return aggregatorCase_ == 4; } + /** * * @@ -16553,6 +23302,7 @@ public com.google.bigtable.v2.Type.Aggregate.Sum getSum() { return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); } } + /** * * @@ -16575,6 +23325,7 @@ public Builder setSum(com.google.bigtable.v2.Type.Aggregate.Sum value) { aggregatorCase_ = 4; return this; } + /** * * @@ -16594,6 +23345,7 @@ public Builder setSum(com.google.bigtable.v2.Type.Aggregate.Sum.Builder builderF aggregatorCase_ = 4; return this; } + /** * * @@ -16626,6 +23378,7 @@ public Builder mergeSum(com.google.bigtable.v2.Type.Aggregate.Sum value) { aggregatorCase_ = 4; return this; } + /** * * @@ -16651,6 +23404,7 @@ public Builder clearSum() { } return this; } + /** * * @@ -16661,8 +23415,9 @@ public Builder clearSum() { * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; */ public com.google.bigtable.v2.Type.Aggregate.Sum.Builder getSumBuilder() { - return getSumFieldBuilder().getBuilder(); + return internalGetSumFieldBuilder().getBuilder(); } + /** * * @@ -16683,6 +23438,7 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { return com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); } } + /** * * @@ -16692,17 +23448,17 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { * * .google.bigtable.v2.Type.Aggregate.Sum sum = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Sum, com.google.bigtable.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.v2.Type.Aggregate.SumOrBuilder> - getSumFieldBuilder() { + internalGetSumFieldBuilder() { if (sumBuilder_ == null) { if (!(aggregatorCase_ == 4)) { aggregator_ = com.google.bigtable.v2.Type.Aggregate.Sum.getDefaultInstance(); } sumBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Sum, com.google.bigtable.v2.Type.Aggregate.Sum.Builder, com.google.bigtable.v2.Type.Aggregate.SumOrBuilder>( @@ -16716,11 +23472,12 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { return sumBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> hllppUniqueCountBuilder_; + /** * * @@ -16738,6 +23495,7 @@ public com.google.bigtable.v2.Type.Aggregate.SumOrBuilder getSumOrBuilder() { public boolean hasHllppUniqueCount() { return aggregatorCase_ == 5; } + /** * * @@ -16769,6 +23527,7 @@ public boolean hasHllppUniqueCount() { .getDefaultInstance(); } } + /** * * @@ -16794,6 +23553,7 @@ public Builder setHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -16817,6 +23577,7 @@ public Builder setHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -16855,6 +23616,7 @@ public Builder mergeHllppUniqueCount( aggregatorCase_ = 5; return this; } + /** * * @@ -16882,6 +23644,7 @@ public Builder clearHllppUniqueCount() { } return this; } + /** * * @@ -16895,8 +23658,9 @@ public Builder clearHllppUniqueCount() { */ public com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder getHllppUniqueCountBuilder() { - return getHllppUniqueCountFieldBuilder().getBuilder(); + return internalGetHllppUniqueCountFieldBuilder().getBuilder(); } + /** * * @@ -16922,6 +23686,7 @@ public Builder clearHllppUniqueCount() { .getDefaultInstance(); } } + /** * * @@ -16933,11 +23698,11 @@ public Builder clearHllppUniqueCount() { * .google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount hllpp_unique_count = 5; *
    */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder> - getHllppUniqueCountFieldBuilder() { + internalGetHllppUniqueCountFieldBuilder() { if (hllppUniqueCountBuilder_ == null) { if (!(aggregatorCase_ == 5)) { aggregator_ = @@ -16945,7 +23710,7 @@ public Builder clearHllppUniqueCount() { .getDefaultInstance(); } hllppUniqueCountBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount.Builder, com.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountOrBuilder>( @@ -16960,11 +23725,12 @@ public Builder clearHllppUniqueCount() { return hllppUniqueCountBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Max, com.google.bigtable.v2.Type.Aggregate.Max.Builder, com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder> maxBuilder_; + /** * * @@ -16980,6 +23746,7 @@ public Builder clearHllppUniqueCount() { public boolean hasMax() { return aggregatorCase_ == 6; } + /** * * @@ -17005,6 +23772,7 @@ public com.google.bigtable.v2.Type.Aggregate.Max getMax() { return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); } } + /** * * @@ -17027,6 +23795,7 @@ public Builder setMax(com.google.bigtable.v2.Type.Aggregate.Max value) { aggregatorCase_ = 6; return this; } + /** * * @@ -17046,6 +23815,7 @@ public Builder setMax(com.google.bigtable.v2.Type.Aggregate.Max.Builder builderF aggregatorCase_ = 6; return this; } + /** * * @@ -17078,6 +23848,7 @@ public Builder mergeMax(com.google.bigtable.v2.Type.Aggregate.Max value) { aggregatorCase_ = 6; return this; } + /** * * @@ -17103,6 +23874,7 @@ public Builder clearMax() { } return this; } + /** * * @@ -17113,8 +23885,9 @@ public Builder clearMax() { * .google.bigtable.v2.Type.Aggregate.Max max = 6; */ public com.google.bigtable.v2.Type.Aggregate.Max.Builder getMaxBuilder() { - return getMaxFieldBuilder().getBuilder(); + return internalGetMaxFieldBuilder().getBuilder(); } + /** * * @@ -17135,6 +23908,7 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { return com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); } } + /** * * @@ -17144,17 +23918,17 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { * * .google.bigtable.v2.Type.Aggregate.Max max = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Max, com.google.bigtable.v2.Type.Aggregate.Max.Builder, com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder> - getMaxFieldBuilder() { + internalGetMaxFieldBuilder() { if (maxBuilder_ == null) { if (!(aggregatorCase_ == 6)) { aggregator_ = com.google.bigtable.v2.Type.Aggregate.Max.getDefaultInstance(); } maxBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Max, com.google.bigtable.v2.Type.Aggregate.Max.Builder, com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder>( @@ -17168,11 +23942,12 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { return maxBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Min, com.google.bigtable.v2.Type.Aggregate.Min.Builder, com.google.bigtable.v2.Type.Aggregate.MinOrBuilder> minBuilder_; + /** * * @@ -17188,6 +23963,7 @@ public com.google.bigtable.v2.Type.Aggregate.MaxOrBuilder getMaxOrBuilder() { public boolean hasMin() { return aggregatorCase_ == 7; } + /** * * @@ -17213,6 +23989,7 @@ public com.google.bigtable.v2.Type.Aggregate.Min getMin() { return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); } } + /** * * @@ -17235,6 +24012,7 @@ public Builder setMin(com.google.bigtable.v2.Type.Aggregate.Min value) { aggregatorCase_ = 7; return this; } + /** * * @@ -17254,6 +24032,7 @@ public Builder setMin(com.google.bigtable.v2.Type.Aggregate.Min.Builder builderF aggregatorCase_ = 7; return this; } + /** * * @@ -17286,6 +24065,7 @@ public Builder mergeMin(com.google.bigtable.v2.Type.Aggregate.Min value) { aggregatorCase_ = 7; return this; } + /** * * @@ -17311,6 +24091,7 @@ public Builder clearMin() { } return this; } + /** * * @@ -17321,8 +24102,9 @@ public Builder clearMin() { * .google.bigtable.v2.Type.Aggregate.Min min = 7; */ public com.google.bigtable.v2.Type.Aggregate.Min.Builder getMinBuilder() { - return getMinFieldBuilder().getBuilder(); + return internalGetMinFieldBuilder().getBuilder(); } + /** * * @@ -17343,6 +24125,7 @@ public com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { return com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); } } + /** * * @@ -17352,17 +24135,17 @@ public com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { * * .google.bigtable.v2.Type.Aggregate.Min min = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Min, com.google.bigtable.v2.Type.Aggregate.Min.Builder, com.google.bigtable.v2.Type.Aggregate.MinOrBuilder> - getMinFieldBuilder() { + internalGetMinFieldBuilder() { if (minBuilder_ == null) { if (!(aggregatorCase_ == 7)) { aggregator_ = com.google.bigtable.v2.Type.Aggregate.Min.getDefaultInstance(); } minBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type.Aggregate.Min, com.google.bigtable.v2.Type.Aggregate.Min.Builder, com.google.bigtable.v2.Type.Aggregate.MinOrBuilder>( @@ -17376,18 +24159,6 @@ public com.google.bigtable.v2.Type.Aggregate.MinOrBuilder getMinOrBuilder() { return minBuilder_; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type.Aggregate) } @@ -17461,12 +24232,15 @@ public enum KindCase STRUCT_TYPE(7), ARRAY_TYPE(3), MAP_TYPE(4), + PROTO_TYPE(13), + ENUM_TYPE(14), KIND_NOT_SET(0); private final int value; private KindCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -17503,6 +24277,10 @@ public static KindCase forNumber(int value) { return ARRAY_TYPE; case 4: return MAP_TYPE; + case 13: + return PROTO_TYPE; + case 14: + return ENUM_TYPE; case 0: return KIND_NOT_SET; default: @@ -17520,6 +24298,7 @@ public KindCase getKindCase() { } public static final int BYTES_TYPE_FIELD_NUMBER = 1; + /** * * @@ -17535,6 +24314,7 @@ public KindCase getKindCase() { public boolean hasBytesType() { return kindCase_ == 1; } + /** * * @@ -17553,6 +24333,7 @@ public com.google.bigtable.v2.Type.Bytes getBytesType() { } return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); } + /** * * @@ -17571,6 +24352,7 @@ public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { } public static final int STRING_TYPE_FIELD_NUMBER = 2; + /** * * @@ -17586,6 +24368,7 @@ public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { public boolean hasStringType() { return kindCase_ == 2; } + /** * * @@ -17604,6 +24387,7 @@ public com.google.bigtable.v2.Type.String getStringType() { } return com.google.bigtable.v2.Type.String.getDefaultInstance(); } + /** * * @@ -17622,6 +24406,7 @@ public com.google.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder() { } public static final int INT64_TYPE_FIELD_NUMBER = 5; + /** * * @@ -17637,6 +24422,7 @@ public com.google.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder() { public boolean hasInt64Type() { return kindCase_ == 5; } + /** * * @@ -17655,6 +24441,7 @@ public com.google.bigtable.v2.Type.Int64 getInt64Type() { } return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } + /** * * @@ -17673,6 +24460,7 @@ public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { } public static final int FLOAT32_TYPE_FIELD_NUMBER = 12; + /** * * @@ -17688,6 +24476,7 @@ public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { public boolean hasFloat32Type() { return kindCase_ == 12; } + /** * * @@ -17706,6 +24495,7 @@ public com.google.bigtable.v2.Type.Float32 getFloat32Type() { } return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } + /** * * @@ -17724,6 +24514,7 @@ public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { } public static final int FLOAT64_TYPE_FIELD_NUMBER = 9; + /** * * @@ -17739,6 +24530,7 @@ public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { public boolean hasFloat64Type() { return kindCase_ == 9; } + /** * * @@ -17757,6 +24549,7 @@ public com.google.bigtable.v2.Type.Float64 getFloat64Type() { } return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } + /** * * @@ -17775,6 +24568,7 @@ public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { } public static final int BOOL_TYPE_FIELD_NUMBER = 8; + /** * * @@ -17790,6 +24584,7 @@ public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { public boolean hasBoolType() { return kindCase_ == 8; } + /** * * @@ -17808,6 +24603,7 @@ public com.google.bigtable.v2.Type.Bool getBoolType() { } return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } + /** * * @@ -17826,6 +24622,7 @@ public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { } public static final int TIMESTAMP_TYPE_FIELD_NUMBER = 10; + /** * * @@ -17841,6 +24638,7 @@ public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { public boolean hasTimestampType() { return kindCase_ == 10; } + /** * * @@ -17859,6 +24657,7 @@ public com.google.bigtable.v2.Type.Timestamp getTimestampType() { } return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); } + /** * * @@ -17877,6 +24676,7 @@ public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder( } public static final int DATE_TYPE_FIELD_NUMBER = 11; + /** * * @@ -17892,6 +24692,7 @@ public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder( public boolean hasDateType() { return kindCase_ == 11; } + /** * * @@ -17910,6 +24711,7 @@ public com.google.bigtable.v2.Type.Date getDateType() { } return com.google.bigtable.v2.Type.Date.getDefaultInstance(); } + /** * * @@ -17928,6 +24730,7 @@ public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { } public static final int AGGREGATE_TYPE_FIELD_NUMBER = 6; + /** * * @@ -17943,6 +24746,7 @@ public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { public boolean hasAggregateType() { return kindCase_ == 6; } + /** * * @@ -17961,6 +24765,7 @@ public com.google.bigtable.v2.Type.Aggregate getAggregateType() { } return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); } + /** * * @@ -17979,6 +24784,7 @@ public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder( } public static final int STRUCT_TYPE_FIELD_NUMBER = 7; + /** * * @@ -17994,6 +24800,26 @@ public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder( public boolean hasStructType() { return kindCase_ == 7; } + + /** + * + * + *
    +   * Struct
    +   * 
    + * + * .google.bigtable.v2.Type.Struct struct_type = 7; + * + * @return The structType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Struct getStructType() { + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; + } + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } + /** * * @@ -18001,134 +24827,230 @@ public boolean hasStructType() { * Struct * * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Struct struct_type = 7; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; + } + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + } + + public static final int ARRAY_TYPE_FIELD_NUMBER = 3; + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + * + * @return Whether the arrayType field is set. + */ + @java.lang.Override + public boolean hasArrayType() { + return kindCase_ == 3; + } + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + * + * @return The arrayType. + */ + @java.lang.Override + public com.google.bigtable.v2.Type.Array getArrayType() { + if (kindCase_ == 3) { + return (com.google.bigtable.v2.Type.Array) kind_; + } + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + } + + /** + * + * + *
    +   * Array
    +   * 
    + * + * .google.bigtable.v2.Type.Array array_type = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { + if (kindCase_ == 3) { + return (com.google.bigtable.v2.Type.Array) kind_; + } + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + } + + public static final int MAP_TYPE_FIELD_NUMBER = 4; + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; + * + * @return Whether the mapType field is set. + */ + @java.lang.Override + public boolean hasMapType() { + return kindCase_ == 4; + } + + /** + * + * + *
    +   * Map
    +   * 
    + * + * .google.bigtable.v2.Type.Map map_type = 4; * - * @return The structType. + * @return The mapType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Struct getStructType() { - if (kindCase_ == 7) { - return (com.google.bigtable.v2.Type.Struct) kind_; + public com.google.bigtable.v2.Type.Map getMapType() { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.Type.Map) kind_; } - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); } + /** * * *
    -   * Struct
    +   * Map
        * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ @java.lang.Override - public com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder() { - if (kindCase_ == 7) { - return (com.google.bigtable.v2.Type.Struct) kind_; + public com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder() { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.Type.Map) kind_; } - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); } - public static final int ARRAY_TYPE_FIELD_NUMBER = 3; + public static final int PROTO_TYPE_FIELD_NUMBER = 13; + /** * * *
    -   * Array
    +   * Proto
        * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; * - * @return Whether the arrayType field is set. + * @return Whether the protoType field is set. */ @java.lang.Override - public boolean hasArrayType() { - return kindCase_ == 3; + public boolean hasProtoType() { + return kindCase_ == 13; } + /** * * *
    -   * Array
    +   * Proto
        * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; * - * @return The arrayType. + * @return The protoType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Array getArrayType() { - if (kindCase_ == 3) { - return (com.google.bigtable.v2.Type.Array) kind_; + public com.google.bigtable.v2.Type.Proto getProtoType() { + if (kindCase_ == 13) { + return (com.google.bigtable.v2.Type.Proto) kind_; } - return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); } + /** * * *
    -   * Array
    +   * Proto
        * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ @java.lang.Override - public com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { - if (kindCase_ == 3) { - return (com.google.bigtable.v2.Type.Array) kind_; + public com.google.bigtable.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder() { + if (kindCase_ == 13) { + return (com.google.bigtable.v2.Type.Proto) kind_; } - return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); } - public static final int MAP_TYPE_FIELD_NUMBER = 4; + public static final int ENUM_TYPE_FIELD_NUMBER = 14; + /** * * *
    -   * Map
    +   * Enum
        * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; * - * @return Whether the mapType field is set. + * @return Whether the enumType field is set. */ @java.lang.Override - public boolean hasMapType() { - return kindCase_ == 4; + public boolean hasEnumType() { + return kindCase_ == 14; } + /** * * *
    -   * Map
    +   * Enum
        * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; * - * @return The mapType. + * @return The enumType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Map getMapType() { - if (kindCase_ == 4) { - return (com.google.bigtable.v2.Type.Map) kind_; + public com.google.bigtable.v2.Type.Enum getEnumType() { + if (kindCase_ == 14) { + return (com.google.bigtable.v2.Type.Enum) kind_; } - return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } + /** * * *
    -   * Map
    +   * Enum
        * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ @java.lang.Override - public com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder() { - if (kindCase_ == 4) { - return (com.google.bigtable.v2.Type.Map) kind_; + public com.google.bigtable.v2.Type.EnumOrBuilder getEnumTypeOrBuilder() { + if (kindCase_ == 14) { + return (com.google.bigtable.v2.Type.Enum) kind_; } - return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -18181,6 +25103,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 12) { output.writeMessage(12, (com.google.bigtable.v2.Type.Float32) kind_); } + if (kindCase_ == 13) { + output.writeMessage(13, (com.google.bigtable.v2.Type.Proto) kind_); + } + if (kindCase_ == 14) { + output.writeMessage(14, (com.google.bigtable.v2.Type.Enum) kind_); + } getUnknownFields().writeTo(output); } @@ -18250,6 +25178,16 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 12, (com.google.bigtable.v2.Type.Float32) kind_); } + if (kindCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.bigtable.v2.Type.Proto) kind_); + } + if (kindCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.bigtable.v2.Type.Enum) kind_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18303,6 +25241,12 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getMapType().equals(other.getMapType())) return false; break; + case 13: + if (!getProtoType().equals(other.getProtoType())) return false; + break; + case 14: + if (!getEnumType().equals(other.getEnumType())) return false; + break; case 0: default: } @@ -18366,627 +25310,1081 @@ public int hashCode() { hash = (37 * hash) + MAP_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMapType().hashCode(); break; + case 13: + hash = (37 * hash) + PROTO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getProtoType().hashCode(); + break; + case 14: + hash = (37 * hash) + ENUM_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getEnumType().hashCode(); + break; case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.bigtable.v2.Type parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.Type parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type 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.bigtable.v2.Type parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.Type parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.Type parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type 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.bigtable.v2.Type parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type 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.bigtable.v2.Type parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.Type 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.bigtable.v2.Type 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; + } + + /** + * + * + *
    +   * `Type` represents the type of data that is written to, read from, or stored
    +   * in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
    +   * familiarity and consistency across products and features.
    +   *
    +   * For compatibility with Bigtable's existing untyped APIs, each `Type` includes
    +   * an `Encoding` which describes how to convert to or from the underlying data.
    +   *
    +   * Each encoding can operate in one of two modes:
    +   *
    +   * - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
    +   * if and only if `X <= Y`. This is useful anywhere sort order is important,
    +   * for example when encoding keys.
    +   * - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
    +   * `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
    +   * example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}`
    +   * are valid encodings of the same JSON value.
    +   *
    +   * The API clearly documents which mode is used wherever an encoding can be
    +   * configured. Each encoding also documents which values are supported in which
    +   * modes. For example, when encoding INT64 as a numeric STRING, negative numbers
    +   * cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
    +   * `STRING("-00001") > STRING("00001")`.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.Type} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type) + com.google.bigtable.v2.TypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.TypesProto.internal_static_google_bigtable_v2_Type_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.TypesProto + .internal_static_google_bigtable_v2_Type_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.Type.class, com.google.bigtable.v2.Type.Builder.class); + } + + // Construct using com.google.bigtable.v2.Type.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bytesTypeBuilder_ != null) { + bytesTypeBuilder_.clear(); + } + if (stringTypeBuilder_ != null) { + stringTypeBuilder_.clear(); + } + if (int64TypeBuilder_ != null) { + int64TypeBuilder_.clear(); + } + if (float32TypeBuilder_ != null) { + float32TypeBuilder_.clear(); + } + if (float64TypeBuilder_ != null) { + float64TypeBuilder_.clear(); + } + if (boolTypeBuilder_ != null) { + boolTypeBuilder_.clear(); + } + if (timestampTypeBuilder_ != null) { + timestampTypeBuilder_.clear(); + } + if (dateTypeBuilder_ != null) { + dateTypeBuilder_.clear(); + } + if (aggregateTypeBuilder_ != null) { + aggregateTypeBuilder_.clear(); + } + if (structTypeBuilder_ != null) { + structTypeBuilder_.clear(); + } + if (arrayTypeBuilder_ != null) { + arrayTypeBuilder_.clear(); + } + if (mapTypeBuilder_ != null) { + mapTypeBuilder_.clear(); + } + if (protoTypeBuilder_ != null) { + protoTypeBuilder_.clear(); + } + if (enumTypeBuilder_ != null) { + enumTypeBuilder_.clear(); + } + kindCase_ = 0; + kind_ = null; + return this; + } - public static com.google.bigtable.v2.Type parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.TypesProto.internal_static_google_bigtable_v2_Type_descriptor; + } - public static com.google.bigtable.v2.Type parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.bigtable.v2.Type getDefaultInstanceForType() { + return com.google.bigtable.v2.Type.getDefaultInstance(); + } - public static com.google.bigtable.v2.Type parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.bigtable.v2.Type build() { + com.google.bigtable.v2.Type result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.bigtable.v2.Type parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.bigtable.v2.Type buildPartial() { + com.google.bigtable.v2.Type result = new com.google.bigtable.v2.Type(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - public static com.google.bigtable.v2.Type parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private void buildPartial0(com.google.bigtable.v2.Type result) { + int from_bitField0_ = bitField0_; + } - public static com.google.bigtable.v2.Type parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private void buildPartialOneofs(com.google.bigtable.v2.Type result) { + result.kindCase_ = kindCase_; + result.kind_ = this.kind_; + if (kindCase_ == 1 && bytesTypeBuilder_ != null) { + result.kind_ = bytesTypeBuilder_.build(); + } + if (kindCase_ == 2 && stringTypeBuilder_ != null) { + result.kind_ = stringTypeBuilder_.build(); + } + if (kindCase_ == 5 && int64TypeBuilder_ != null) { + result.kind_ = int64TypeBuilder_.build(); + } + if (kindCase_ == 12 && float32TypeBuilder_ != null) { + result.kind_ = float32TypeBuilder_.build(); + } + if (kindCase_ == 9 && float64TypeBuilder_ != null) { + result.kind_ = float64TypeBuilder_.build(); + } + if (kindCase_ == 8 && boolTypeBuilder_ != null) { + result.kind_ = boolTypeBuilder_.build(); + } + if (kindCase_ == 10 && timestampTypeBuilder_ != null) { + result.kind_ = timestampTypeBuilder_.build(); + } + if (kindCase_ == 11 && dateTypeBuilder_ != null) { + result.kind_ = dateTypeBuilder_.build(); + } + if (kindCase_ == 6 && aggregateTypeBuilder_ != null) { + result.kind_ = aggregateTypeBuilder_.build(); + } + if (kindCase_ == 7 && structTypeBuilder_ != null) { + result.kind_ = structTypeBuilder_.build(); + } + if (kindCase_ == 3 && arrayTypeBuilder_ != null) { + result.kind_ = arrayTypeBuilder_.build(); + } + if (kindCase_ == 4 && mapTypeBuilder_ != null) { + result.kind_ = mapTypeBuilder_.build(); + } + if (kindCase_ == 13 && protoTypeBuilder_ != null) { + result.kind_ = protoTypeBuilder_.build(); + } + if (kindCase_ == 14 && enumTypeBuilder_ != null) { + result.kind_ = enumTypeBuilder_.build(); + } + } - public static com.google.bigtable.v2.Type parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.Type) { + return mergeFrom((com.google.bigtable.v2.Type) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.bigtable.v2.Type parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + public Builder mergeFrom(com.google.bigtable.v2.Type other) { + if (other == com.google.bigtable.v2.Type.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case BYTES_TYPE: + { + mergeBytesType(other.getBytesType()); + break; + } + case STRING_TYPE: + { + mergeStringType(other.getStringType()); + break; + } + case INT64_TYPE: + { + mergeInt64Type(other.getInt64Type()); + break; + } + case FLOAT32_TYPE: + { + mergeFloat32Type(other.getFloat32Type()); + break; + } + case FLOAT64_TYPE: + { + mergeFloat64Type(other.getFloat64Type()); + break; + } + case BOOL_TYPE: + { + mergeBoolType(other.getBoolType()); + break; + } + case TIMESTAMP_TYPE: + { + mergeTimestampType(other.getTimestampType()); + break; + } + case DATE_TYPE: + { + mergeDateType(other.getDateType()); + break; + } + case AGGREGATE_TYPE: + { + mergeAggregateType(other.getAggregateType()); + break; + } + case STRUCT_TYPE: + { + mergeStructType(other.getStructType()); + break; + } + case ARRAY_TYPE: + { + mergeArrayType(other.getArrayType()); + break; + } + case MAP_TYPE: + { + mergeMapType(other.getMapType()); + break; + } + case PROTO_TYPE: + { + mergeProtoType(other.getProtoType()); + break; + } + case ENUM_TYPE: + { + mergeEnumType(other.getEnumType()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static com.google.bigtable.v2.Type parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.bigtable.v2.Type parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @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( + internalGetBytesTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStringTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetArrayTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetMapTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetInt64TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetAggregateTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetStructTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetBoolTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetFloat64TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetTimestampTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetDateTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetFloat32TypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetProtoTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetEnumTypeFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 14; + break; + } // case 114 + 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; + } - public static com.google.bigtable.v2.Type parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int kindCase_ = 0; + private java.lang.Object kind_; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } - public static Builder newBuilder(com.google.bigtable.v2.Type prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private int bitField0_; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bytes, + com.google.bigtable.v2.Type.Bytes.Builder, + com.google.bigtable.v2.Type.BytesOrBuilder> + bytesTypeBuilder_; - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
    -   * `Type` represents the type of data that is written to, read from, or stored
    -   * in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
    -   * familiarity and consistency across products and features.
    -   *
    -   * For compatibility with Bigtable's existing untyped APIs, each `Type` includes
    -   * an `Encoding` which describes how to convert to/from the underlying data.
    -   *
    -   * Each encoding also defines the following properties:
    -   *
    -   *  * Order-preserving: Does the encoded value sort consistently with the
    -   *    original typed value? Note that Bigtable will always sort data based on
    -   *    the raw encoded value, *not* the decoded type.
    -   *     - Example: BYTES values sort in the same order as their raw encodings.
    -   *     - Counterexample: Encoding INT64 as a fixed-width decimal string does
    -   *       *not* preserve sort order when dealing with negative numbers.
    -   *       `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`.
    -   *  * Self-delimiting: If we concatenate two encoded values, can we always tell
    -   *    where the first one ends and the second one begins?
    -   *     - Example: If we encode INT64s to fixed-width STRINGs, the first value
    -   *       will always contain exactly N digits, possibly preceded by a sign.
    -   *     - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have
    -   *       no way to tell where the first one ends.
    -   *  * Compatibility: Which other systems have matching encoding schemes? For
    -   *    example, does this encoding have a GoogleSQL equivalent? HBase? Java?
    -   * 
    - * - * Protobuf type {@code google.bigtable.v2.Type} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.Type) - com.google.bigtable.v2.TypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bigtable.v2.TypesProto.internal_static_google_bigtable_v2_Type_descriptor; + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return Whether the bytesType field is set. + */ + @java.lang.Override + public boolean hasBytesType() { + return kindCase_ == 1; } + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * + * @return The bytesType. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.bigtable.v2.TypesProto - .internal_static_google_bigtable_v2_Type_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.bigtable.v2.Type.class, com.google.bigtable.v2.Type.Builder.class); + public com.google.bigtable.v2.Type.Bytes getBytesType() { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes) kind_; + } + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } else { + if (kindCase_ == 1) { + return bytesTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } } - // Construct using com.google.bigtable.v2.Type.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder setBytesType(com.google.bigtable.v2.Type.Bytes value) { + if (bytesTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + bytesTypeBuilder_.setMessage(value); + } + kindCase_ = 1; + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (bytesTypeBuilder_ != null) { - bytesTypeBuilder_.clear(); - } - if (stringTypeBuilder_ != null) { - stringTypeBuilder_.clear(); - } - if (int64TypeBuilder_ != null) { - int64TypeBuilder_.clear(); - } - if (float32TypeBuilder_ != null) { - float32TypeBuilder_.clear(); - } - if (float64TypeBuilder_ != null) { - float64TypeBuilder_.clear(); - } - if (boolTypeBuilder_ != null) { - boolTypeBuilder_.clear(); - } - if (timestampTypeBuilder_ != null) { - timestampTypeBuilder_.clear(); - } - if (dateTypeBuilder_ != null) { - dateTypeBuilder_.clear(); - } - if (aggregateTypeBuilder_ != null) { - aggregateTypeBuilder_.clear(); - } - if (structTypeBuilder_ != null) { - structTypeBuilder_.clear(); - } - if (arrayTypeBuilder_ != null) { - arrayTypeBuilder_.clear(); + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderForValue) { + if (bytesTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + bytesTypeBuilder_.setMessage(builderForValue.build()); } - if (mapTypeBuilder_ != null) { - mapTypeBuilder_.clear(); + kindCase_ = 1; + return this; + } + + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1 && kind_ != com.google.bigtable.v2.Type.Bytes.getDefaultInstance()) { + kind_ = + com.google.bigtable.v2.Type.Bytes.newBuilder( + (com.google.bigtable.v2.Type.Bytes) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 1) { + bytesTypeBuilder_.mergeFrom(value); + } else { + bytesTypeBuilder_.setMessage(value); + } } - kindCase_ = 0; - kind_ = null; + kindCase_ = 1; return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bigtable.v2.TypesProto.internal_static_google_bigtable_v2_Type_descriptor; - } - - @java.lang.Override - public com.google.bigtable.v2.Type getDefaultInstanceForType() { - return com.google.bigtable.v2.Type.getDefaultInstance(); + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public Builder clearBytesType() { + if (bytesTypeBuilder_ == null) { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + } + bytesTypeBuilder_.clear(); + } + return this; } - @java.lang.Override - public com.google.bigtable.v2.Type build() { - com.google.bigtable.v2.Type result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { + return internalGetBytesTypeFieldBuilder().getBuilder(); } + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ @java.lang.Override - public com.google.bigtable.v2.Type buildPartial() { - com.google.bigtable.v2.Type result = new com.google.bigtable.v2.Type(this); - if (bitField0_ != 0) { - buildPartial0(result); + public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { + if ((kindCase_ == 1) && (bytesTypeBuilder_ != null)) { + return bytesTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 1) { + return (com.google.bigtable.v2.Type.Bytes) kind_; + } + return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(com.google.bigtable.v2.Type result) { - int from_bitField0_ = bitField0_; } - private void buildPartialOneofs(com.google.bigtable.v2.Type result) { - result.kindCase_ = kindCase_; - result.kind_ = this.kind_; - if (kindCase_ == 1 && bytesTypeBuilder_ != null) { - result.kind_ = bytesTypeBuilder_.build(); - } - if (kindCase_ == 2 && stringTypeBuilder_ != null) { - result.kind_ = stringTypeBuilder_.build(); - } - if (kindCase_ == 5 && int64TypeBuilder_ != null) { - result.kind_ = int64TypeBuilder_.build(); - } - if (kindCase_ == 12 && float32TypeBuilder_ != null) { - result.kind_ = float32TypeBuilder_.build(); - } - if (kindCase_ == 9 && float64TypeBuilder_ != null) { - result.kind_ = float64TypeBuilder_.build(); - } - if (kindCase_ == 8 && boolTypeBuilder_ != null) { - result.kind_ = boolTypeBuilder_.build(); - } - if (kindCase_ == 10 && timestampTypeBuilder_ != null) { - result.kind_ = timestampTypeBuilder_.build(); - } - if (kindCase_ == 11 && dateTypeBuilder_ != null) { - result.kind_ = dateTypeBuilder_.build(); - } - if (kindCase_ == 6 && aggregateTypeBuilder_ != null) { - result.kind_ = aggregateTypeBuilder_.build(); - } - if (kindCase_ == 7 && structTypeBuilder_ != null) { - result.kind_ = structTypeBuilder_.build(); - } - if (kindCase_ == 3 && arrayTypeBuilder_ != null) { - result.kind_ = arrayTypeBuilder_.build(); - } - if (kindCase_ == 4 && mapTypeBuilder_ != null) { - result.kind_ = mapTypeBuilder_.build(); + /** + * + * + *
    +     * Bytes
    +     * 
    + * + * .google.bigtable.v2.Type.Bytes bytes_type = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bytes, + com.google.bigtable.v2.Type.Bytes.Builder, + com.google.bigtable.v2.Type.BytesOrBuilder> + internalGetBytesTypeFieldBuilder() { + if (bytesTypeBuilder_ == null) { + if (!(kindCase_ == 1)) { + kind_ = com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + } + bytesTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bytes, + com.google.bigtable.v2.Type.Bytes.Builder, + com.google.bigtable.v2.Type.BytesOrBuilder>( + (com.google.bigtable.v2.Type.Bytes) kind_, getParentForChildren(), isClean()); + kind_ = null; } + kindCase_ = 1; + onChanged(); + return bytesTypeBuilder_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @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.bigtable.v2.Type.String, + com.google.bigtable.v2.Type.String.Builder, + com.google.bigtable.v2.Type.StringOrBuilder> + stringTypeBuilder_; + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return Whether the stringType field is set. + */ @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + public boolean hasStringType() { + return kindCase_ == 2; } + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + * + * @return The stringType. + */ @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public com.google.bigtable.v2.Type.String getStringType() { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2) { + return (com.google.bigtable.v2.Type.String) kind_; + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); + } else { + if (kindCase_ == 2) { + return stringTypeBuilder_.getMessage(); + } + return com.google.bigtable.v2.Type.String.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); + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public Builder setStringType(com.google.bigtable.v2.Type.String value) { + if (stringTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + stringTypeBuilder_.setMessage(value); + } + kindCase_ = 2; + return this; } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public Builder setStringType(com.google.bigtable.v2.Type.String.Builder builderForValue) { + if (stringTypeBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + stringTypeBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 2; + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bigtable.v2.Type) { - return mergeFrom((com.google.bigtable.v2.Type) other); + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public Builder mergeStringType(com.google.bigtable.v2.Type.String value) { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2 && kind_ != com.google.bigtable.v2.Type.String.getDefaultInstance()) { + kind_ = + com.google.bigtable.v2.Type.String.newBuilder( + (com.google.bigtable.v2.Type.String) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); } else { - super.mergeFrom(other); - return this; + if (kindCase_ == 2) { + stringTypeBuilder_.mergeFrom(value); + } else { + stringTypeBuilder_.setMessage(value); + } } + kindCase_ = 2; + return this; } - public Builder mergeFrom(com.google.bigtable.v2.Type other) { - if (other == com.google.bigtable.v2.Type.getDefaultInstance()) return this; - switch (other.getKindCase()) { - case BYTES_TYPE: - { - mergeBytesType(other.getBytesType()); - break; - } - case STRING_TYPE: - { - mergeStringType(other.getStringType()); - break; - } - case INT64_TYPE: - { - mergeInt64Type(other.getInt64Type()); - break; - } - case FLOAT32_TYPE: - { - mergeFloat32Type(other.getFloat32Type()); - break; - } - case FLOAT64_TYPE: - { - mergeFloat64Type(other.getFloat64Type()); - break; - } - case BOOL_TYPE: - { - mergeBoolType(other.getBoolType()); - break; - } - case TIMESTAMP_TYPE: - { - mergeTimestampType(other.getTimestampType()); - break; - } - case DATE_TYPE: - { - mergeDateType(other.getDateType()); - break; - } - case AGGREGATE_TYPE: - { - mergeAggregateType(other.getAggregateType()); - break; - } - case STRUCT_TYPE: - { - mergeStructType(other.getStructType()); - break; - } - case ARRAY_TYPE: - { - mergeArrayType(other.getArrayType()); - break; - } - case MAP_TYPE: - { - mergeMapType(other.getMapType()); - break; - } - case KIND_NOT_SET: - { - break; - } + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public Builder clearStringType() { + if (stringTypeBuilder_ == null) { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + } + stringTypeBuilder_.clear(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + public com.google.bigtable.v2.Type.String.Builder getStringTypeBuilder() { + return internalGetStringTypeFieldBuilder().getBuilder(); } + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 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.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder() { + if ((kindCase_ == 2) && (stringTypeBuilder_ != null)) { + return stringTypeBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 2) { + return (com.google.bigtable.v2.Type.String) kind_; + } + return com.google.bigtable.v2.Type.String.getDefaultInstance(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getBytesTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage(getStringTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage(getArrayTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(getMapTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 4; - break; - } // case 34 - case 42: - { - input.readMessage(getInt64TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 5; - break; - } // case 42 - case 50: - { - input.readMessage(getAggregateTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 6; - break; - } // case 50 - case 58: - { - input.readMessage(getStructTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 7; - break; - } // case 58 - case 66: - { - input.readMessage(getBoolTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 8; - break; - } // case 66 - case 74: - { - input.readMessage(getFloat64TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 9; - break; - } // case 74 - case 82: - { - input.readMessage(getTimestampTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 10; - break; - } // case 82 - case 90: - { - input.readMessage(getDateTypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 11; - break; - } // case 90 - case 98: - { - input.readMessage(getFloat32TypeFieldBuilder().getBuilder(), extensionRegistry); - kindCase_ = 12; - break; - } // case 98 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int kindCase_ = 0; - private java.lang.Object kind_; - - public KindCase getKindCase() { - return KindCase.forNumber(kindCase_); } - public Builder clearKind() { - kindCase_ = 0; - kind_ = null; + /** + * + * + *
    +     * String
    +     * 
    + * + * .google.bigtable.v2.Type.String string_type = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.String, + com.google.bigtable.v2.Type.String.Builder, + com.google.bigtable.v2.Type.StringOrBuilder> + internalGetStringTypeFieldBuilder() { + if (stringTypeBuilder_ == null) { + if (!(kindCase_ == 2)) { + kind_ = com.google.bigtable.v2.Type.String.getDefaultInstance(); + } + stringTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.String, + com.google.bigtable.v2.Type.String.Builder, + com.google.bigtable.v2.Type.StringOrBuilder>( + (com.google.bigtable.v2.Type.String) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 2; onChanged(); - return this; + return stringTypeBuilder_; } - private int bitField0_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64, + com.google.bigtable.v2.Type.Int64.Builder, + com.google.bigtable.v2.Type.Int64OrBuilder> + int64TypeBuilder_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bytes, - com.google.bigtable.v2.Type.Bytes.Builder, - com.google.bigtable.v2.Type.BytesOrBuilder> - bytesTypeBuilder_; /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; * - * @return Whether the bytesType field is set. + * @return Whether the int64Type field is set. */ @java.lang.Override - public boolean hasBytesType() { - return kindCase_ == 1; + public boolean hasInt64Type() { + return kindCase_ == 5; } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; * - * @return The bytesType. + * @return The int64Type. */ @java.lang.Override - public com.google.bigtable.v2.Type.Bytes getBytesType() { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1) { - return (com.google.bigtable.v2.Type.Bytes) kind_; + public com.google.bigtable.v2.Type.Int64 getInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { + return (com.google.bigtable.v2.Type.Int64) kind_; } - return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } else { - if (kindCase_ == 1) { - return bytesTypeBuilder_.getMessage(); + if (kindCase_ == 5) { + return int64TypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - public Builder setBytesType(com.google.bigtable.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == null) { + public Builder setInt64Type(com.google.bigtable.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - bytesTypeBuilder_.setMessage(value); + int64TypeBuilder_.setMessage(value); } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - public Builder setBytesType(com.google.bigtable.v2.Type.Bytes.Builder builderForValue) { - if (bytesTypeBuilder_ == null) { + public Builder setInt64Type(com.google.bigtable.v2.Type.Int64.Builder builderForValue) { + if (int64TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - bytesTypeBuilder_.setMessage(builderForValue.build()); + int64TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1 && kind_ != com.google.bigtable.v2.Type.Bytes.getDefaultInstance()) { + public Builder mergeInt64Type(com.google.bigtable.v2.Type.Int64 value) { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5 && kind_ != com.google.bigtable.v2.Type.Int64.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Bytes.newBuilder( - (com.google.bigtable.v2.Type.Bytes) kind_) + com.google.bigtable.v2.Type.Int64.newBuilder( + (com.google.bigtable.v2.Type.Int64) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -18994,204 +26392,213 @@ public Builder mergeBytesType(com.google.bigtable.v2.Type.Bytes value) { } onChanged(); } else { - if (kindCase_ == 1) { - bytesTypeBuilder_.mergeFrom(value); + if (kindCase_ == 5) { + int64TypeBuilder_.mergeFrom(value); } else { - bytesTypeBuilder_.setMessage(value); + int64TypeBuilder_.setMessage(value); } } - kindCase_ = 1; + kindCase_ = 5; return this; } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - public Builder clearBytesType() { - if (bytesTypeBuilder_ == null) { - if (kindCase_ == 1) { + public Builder clearInt64Type() { + if (int64TypeBuilder_ == null) { + if (kindCase_ == 5) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 1) { + if (kindCase_ == 5) { kindCase_ = 0; kind_ = null; } - bytesTypeBuilder_.clear(); + int64TypeBuilder_.clear(); } return this; } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - public com.google.bigtable.v2.Type.Bytes.Builder getBytesTypeBuilder() { - return getBytesTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Int64.Builder getInt64TypeBuilder() { + return internalGetInt64TypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ @java.lang.Override - public com.google.bigtable.v2.Type.BytesOrBuilder getBytesTypeOrBuilder() { - if ((kindCase_ == 1) && (bytesTypeBuilder_ != null)) { - return bytesTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { + if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { + return int64TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 1) { - return (com.google.bigtable.v2.Type.Bytes) kind_; + if (kindCase_ == 5) { + return (com.google.bigtable.v2.Type.Int64) kind_; } - return com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } } + /** * * *
    -     * Bytes
    +     * Int64
          * 
    * - * .google.bigtable.v2.Type.Bytes bytes_type = 1; + * .google.bigtable.v2.Type.Int64 int64_type = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bytes, - com.google.bigtable.v2.Type.Bytes.Builder, - com.google.bigtable.v2.Type.BytesOrBuilder> - getBytesTypeFieldBuilder() { - if (bytesTypeBuilder_ == null) { - if (!(kindCase_ == 1)) { - kind_ = com.google.bigtable.v2.Type.Bytes.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64, + com.google.bigtable.v2.Type.Int64.Builder, + com.google.bigtable.v2.Type.Int64OrBuilder> + internalGetInt64TypeFieldBuilder() { + if (int64TypeBuilder_ == null) { + if (!(kindCase_ == 5)) { + kind_ = com.google.bigtable.v2.Type.Int64.getDefaultInstance(); } - bytesTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bytes, - com.google.bigtable.v2.Type.Bytes.Builder, - com.google.bigtable.v2.Type.BytesOrBuilder>( - (com.google.bigtable.v2.Type.Bytes) kind_, getParentForChildren(), isClean()); + int64TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Int64, + com.google.bigtable.v2.Type.Int64.Builder, + com.google.bigtable.v2.Type.Int64OrBuilder>( + (com.google.bigtable.v2.Type.Int64) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 1; + kindCase_ = 5; onChanged(); - return bytesTypeBuilder_; + return int64TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.String, - com.google.bigtable.v2.Type.String.Builder, - com.google.bigtable.v2.Type.StringOrBuilder> - stringTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float32, + com.google.bigtable.v2.Type.Float32.Builder, + com.google.bigtable.v2.Type.Float32OrBuilder> + float32TypeBuilder_; + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; * - * @return Whether the stringType field is set. + * @return Whether the float32Type field is set. */ @java.lang.Override - public boolean hasStringType() { - return kindCase_ == 2; + public boolean hasFloat32Type() { + return kindCase_ == 12; } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; * - * @return The stringType. + * @return The float32Type. */ @java.lang.Override - public com.google.bigtable.v2.Type.String getStringType() { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2) { - return (com.google.bigtable.v2.Type.String) kind_; + public com.google.bigtable.v2.Type.Float32 getFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { + return (com.google.bigtable.v2.Type.Float32) kind_; } - return com.google.bigtable.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } else { - if (kindCase_ == 2) { - return stringTypeBuilder_.getMessage(); + if (kindCase_ == 12) { + return float32TypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - public Builder setStringType(com.google.bigtable.v2.Type.String value) { - if (stringTypeBuilder_ == null) { + public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - stringTypeBuilder_.setMessage(value); + float32TypeBuilder_.setMessage(value); } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - public Builder setStringType(com.google.bigtable.v2.Type.String.Builder builderForValue) { - if (stringTypeBuilder_ == null) { + public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32.Builder builderForValue) { + if (float32TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - stringTypeBuilder_.setMessage(builderForValue.build()); + float32TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - public Builder mergeStringType(com.google.bigtable.v2.Type.String value) { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2 && kind_ != com.google.bigtable.v2.Type.String.getDefaultInstance()) { + public Builder mergeFloat32Type(com.google.bigtable.v2.Type.Float32 value) { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12 && kind_ != com.google.bigtable.v2.Type.Float32.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.String.newBuilder( - (com.google.bigtable.v2.Type.String) kind_) + com.google.bigtable.v2.Type.Float32.newBuilder( + (com.google.bigtable.v2.Type.Float32) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19199,204 +26606,213 @@ public Builder mergeStringType(com.google.bigtable.v2.Type.String value) { } onChanged(); } else { - if (kindCase_ == 2) { - stringTypeBuilder_.mergeFrom(value); + if (kindCase_ == 12) { + float32TypeBuilder_.mergeFrom(value); } else { - stringTypeBuilder_.setMessage(value); + float32TypeBuilder_.setMessage(value); } } - kindCase_ = 2; + kindCase_ = 12; return this; } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - public Builder clearStringType() { - if (stringTypeBuilder_ == null) { - if (kindCase_ == 2) { + public Builder clearFloat32Type() { + if (float32TypeBuilder_ == null) { + if (kindCase_ == 12) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 2) { + if (kindCase_ == 12) { kindCase_ = 0; kind_ = null; } - stringTypeBuilder_.clear(); + float32TypeBuilder_.clear(); } return this; } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - public com.google.bigtable.v2.Type.String.Builder getStringTypeBuilder() { - return getStringTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Float32.Builder getFloat32TypeBuilder() { + return internalGetFloat32TypeFieldBuilder().getBuilder(); } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ @java.lang.Override - public com.google.bigtable.v2.Type.StringOrBuilder getStringTypeOrBuilder() { - if ((kindCase_ == 2) && (stringTypeBuilder_ != null)) { - return stringTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { + if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { + return float32TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 2) { - return (com.google.bigtable.v2.Type.String) kind_; + if (kindCase_ == 12) { + return (com.google.bigtable.v2.Type.Float32) kind_; } - return com.google.bigtable.v2.Type.String.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } } + /** * * *
    -     * String
    +     * Float32
          * 
    * - * .google.bigtable.v2.Type.String string_type = 2; + * .google.bigtable.v2.Type.Float32 float32_type = 12; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.String, - com.google.bigtable.v2.Type.String.Builder, - com.google.bigtable.v2.Type.StringOrBuilder> - getStringTypeFieldBuilder() { - if (stringTypeBuilder_ == null) { - if (!(kindCase_ == 2)) { - kind_ = com.google.bigtable.v2.Type.String.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float32, + com.google.bigtable.v2.Type.Float32.Builder, + com.google.bigtable.v2.Type.Float32OrBuilder> + internalGetFloat32TypeFieldBuilder() { + if (float32TypeBuilder_ == null) { + if (!(kindCase_ == 12)) { + kind_ = com.google.bigtable.v2.Type.Float32.getDefaultInstance(); } - stringTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.String, - com.google.bigtable.v2.Type.String.Builder, - com.google.bigtable.v2.Type.StringOrBuilder>( - (com.google.bigtable.v2.Type.String) kind_, getParentForChildren(), isClean()); + float32TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float32, + com.google.bigtable.v2.Type.Float32.Builder, + com.google.bigtable.v2.Type.Float32OrBuilder>( + (com.google.bigtable.v2.Type.Float32) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 2; + kindCase_ = 12; onChanged(); - return stringTypeBuilder_; + return float32TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64, - com.google.bigtable.v2.Type.Int64.Builder, - com.google.bigtable.v2.Type.Int64OrBuilder> - int64TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float64, + com.google.bigtable.v2.Type.Float64.Builder, + com.google.bigtable.v2.Type.Float64OrBuilder> + float64TypeBuilder_; + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; * - * @return Whether the int64Type field is set. + * @return Whether the float64Type field is set. */ @java.lang.Override - public boolean hasInt64Type() { - return kindCase_ == 5; + public boolean hasFloat64Type() { + return kindCase_ == 9; } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; * - * @return The int64Type. + * @return The float64Type. */ @java.lang.Override - public com.google.bigtable.v2.Type.Int64 getInt64Type() { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5) { - return (com.google.bigtable.v2.Type.Int64) kind_; + public com.google.bigtable.v2.Type.Float64 getFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { + return (com.google.bigtable.v2.Type.Float64) kind_; } - return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } else { - if (kindCase_ == 5) { - return int64TypeBuilder_.getMessage(); + if (kindCase_ == 9) { + return float64TypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - public Builder setInt64Type(com.google.bigtable.v2.Type.Int64 value) { - if (int64TypeBuilder_ == null) { + public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - int64TypeBuilder_.setMessage(value); + float64TypeBuilder_.setMessage(value); } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - public Builder setInt64Type(com.google.bigtable.v2.Type.Int64.Builder builderForValue) { - if (int64TypeBuilder_ == null) { + public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64.Builder builderForValue) { + if (float64TypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - int64TypeBuilder_.setMessage(builderForValue.build()); + float64TypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - public Builder mergeInt64Type(com.google.bigtable.v2.Type.Int64 value) { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5 && kind_ != com.google.bigtable.v2.Type.Int64.getDefaultInstance()) { + public Builder mergeFloat64Type(com.google.bigtable.v2.Type.Float64 value) { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9 && kind_ != com.google.bigtable.v2.Type.Float64.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Int64.newBuilder( - (com.google.bigtable.v2.Type.Int64) kind_) + com.google.bigtable.v2.Type.Float64.newBuilder( + (com.google.bigtable.v2.Type.Float64) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19404,204 +26820,212 @@ public Builder mergeInt64Type(com.google.bigtable.v2.Type.Int64 value) { } onChanged(); } else { - if (kindCase_ == 5) { - int64TypeBuilder_.mergeFrom(value); + if (kindCase_ == 9) { + float64TypeBuilder_.mergeFrom(value); } else { - int64TypeBuilder_.setMessage(value); + float64TypeBuilder_.setMessage(value); } } - kindCase_ = 5; + kindCase_ = 9; return this; } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - public Builder clearInt64Type() { - if (int64TypeBuilder_ == null) { - if (kindCase_ == 5) { + public Builder clearFloat64Type() { + if (float64TypeBuilder_ == null) { + if (kindCase_ == 9) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 5) { + if (kindCase_ == 9) { kindCase_ = 0; kind_ = null; } - int64TypeBuilder_.clear(); + float64TypeBuilder_.clear(); } return this; } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - public com.google.bigtable.v2.Type.Int64.Builder getInt64TypeBuilder() { - return getInt64TypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Float64.Builder getFloat64TypeBuilder() { + return internalGetFloat64TypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ @java.lang.Override - public com.google.bigtable.v2.Type.Int64OrBuilder getInt64TypeOrBuilder() { - if ((kindCase_ == 5) && (int64TypeBuilder_ != null)) { - return int64TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { + if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { + return float64TypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 5) { - return (com.google.bigtable.v2.Type.Int64) kind_; + if (kindCase_ == 9) { + return (com.google.bigtable.v2.Type.Float64) kind_; } - return com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } } + /** * * *
    -     * Int64
    +     * Float64
          * 
    * - * .google.bigtable.v2.Type.Int64 int64_type = 5; + * .google.bigtable.v2.Type.Float64 float64_type = 9; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64, - com.google.bigtable.v2.Type.Int64.Builder, - com.google.bigtable.v2.Type.Int64OrBuilder> - getInt64TypeFieldBuilder() { - if (int64TypeBuilder_ == null) { - if (!(kindCase_ == 5)) { - kind_ = com.google.bigtable.v2.Type.Int64.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float64, + com.google.bigtable.v2.Type.Float64.Builder, + com.google.bigtable.v2.Type.Float64OrBuilder> + internalGetFloat64TypeFieldBuilder() { + if (float64TypeBuilder_ == null) { + if (!(kindCase_ == 9)) { + kind_ = com.google.bigtable.v2.Type.Float64.getDefaultInstance(); } - int64TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Int64, - com.google.bigtable.v2.Type.Int64.Builder, - com.google.bigtable.v2.Type.Int64OrBuilder>( - (com.google.bigtable.v2.Type.Int64) kind_, getParentForChildren(), isClean()); + float64TypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Float64, + com.google.bigtable.v2.Type.Float64.Builder, + com.google.bigtable.v2.Type.Float64OrBuilder>( + (com.google.bigtable.v2.Type.Float64) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 5; + kindCase_ = 9; onChanged(); - return int64TypeBuilder_; + return float64TypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float32, - com.google.bigtable.v2.Type.Float32.Builder, - com.google.bigtable.v2.Type.Float32OrBuilder> - float32TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bool, + com.google.bigtable.v2.Type.Bool.Builder, + com.google.bigtable.v2.Type.BoolOrBuilder> + boolTypeBuilder_; + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; * - * @return Whether the float32Type field is set. + * @return Whether the boolType field is set. */ @java.lang.Override - public boolean hasFloat32Type() { - return kindCase_ == 12; + public boolean hasBoolType() { + return kindCase_ == 8; } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; * - * @return The float32Type. + * @return The boolType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Float32 getFloat32Type() { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12) { - return (com.google.bigtable.v2.Type.Float32) kind_; + public com.google.bigtable.v2.Type.Bool getBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { + return (com.google.bigtable.v2.Type.Bool) kind_; } - return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } else { - if (kindCase_ == 12) { - return float32TypeBuilder_.getMessage(); + if (kindCase_ == 8) { + return boolTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32 value) { - if (float32TypeBuilder_ == null) { + public Builder setBoolType(com.google.bigtable.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - float32TypeBuilder_.setMessage(value); + boolTypeBuilder_.setMessage(value); } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - public Builder setFloat32Type(com.google.bigtable.v2.Type.Float32.Builder builderForValue) { - if (float32TypeBuilder_ == null) { + public Builder setBoolType(com.google.bigtable.v2.Type.Bool.Builder builderForValue) { + if (boolTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - float32TypeBuilder_.setMessage(builderForValue.build()); + boolTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - public Builder mergeFloat32Type(com.google.bigtable.v2.Type.Float32 value) { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12 && kind_ != com.google.bigtable.v2.Type.Float32.getDefaultInstance()) { + public Builder mergeBoolType(com.google.bigtable.v2.Type.Bool value) { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8 && kind_ != com.google.bigtable.v2.Type.Bool.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Float32.newBuilder( - (com.google.bigtable.v2.Type.Float32) kind_) + com.google.bigtable.v2.Type.Bool.newBuilder((com.google.bigtable.v2.Type.Bool) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19609,204 +27033,214 @@ public Builder mergeFloat32Type(com.google.bigtable.v2.Type.Float32 value) { } onChanged(); } else { - if (kindCase_ == 12) { - float32TypeBuilder_.mergeFrom(value); + if (kindCase_ == 8) { + boolTypeBuilder_.mergeFrom(value); } else { - float32TypeBuilder_.setMessage(value); + boolTypeBuilder_.setMessage(value); } } - kindCase_ = 12; + kindCase_ = 8; return this; } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - public Builder clearFloat32Type() { - if (float32TypeBuilder_ == null) { - if (kindCase_ == 12) { + public Builder clearBoolType() { + if (boolTypeBuilder_ == null) { + if (kindCase_ == 8) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 12) { + if (kindCase_ == 8) { kindCase_ = 0; kind_ = null; } - float32TypeBuilder_.clear(); + boolTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - public com.google.bigtable.v2.Type.Float32.Builder getFloat32TypeBuilder() { - return getFloat32TypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Bool.Builder getBoolTypeBuilder() { + return internalGetBoolTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ @java.lang.Override - public com.google.bigtable.v2.Type.Float32OrBuilder getFloat32TypeOrBuilder() { - if ((kindCase_ == 12) && (float32TypeBuilder_ != null)) { - return float32TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { + if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { + return boolTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 12) { - return (com.google.bigtable.v2.Type.Float32) kind_; + if (kindCase_ == 8) { + return (com.google.bigtable.v2.Type.Bool) kind_; } - return com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } } + /** * * *
    -     * Float32
    +     * Bool
          * 
    * - * .google.bigtable.v2.Type.Float32 float32_type = 12; + * .google.bigtable.v2.Type.Bool bool_type = 8; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float32, - com.google.bigtable.v2.Type.Float32.Builder, - com.google.bigtable.v2.Type.Float32OrBuilder> - getFloat32TypeFieldBuilder() { - if (float32TypeBuilder_ == null) { - if (!(kindCase_ == 12)) { - kind_ = com.google.bigtable.v2.Type.Float32.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bool, + com.google.bigtable.v2.Type.Bool.Builder, + com.google.bigtable.v2.Type.BoolOrBuilder> + internalGetBoolTypeFieldBuilder() { + if (boolTypeBuilder_ == null) { + if (!(kindCase_ == 8)) { + kind_ = com.google.bigtable.v2.Type.Bool.getDefaultInstance(); } - float32TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float32, - com.google.bigtable.v2.Type.Float32.Builder, - com.google.bigtable.v2.Type.Float32OrBuilder>( - (com.google.bigtable.v2.Type.Float32) kind_, getParentForChildren(), isClean()); + boolTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Bool, + com.google.bigtable.v2.Type.Bool.Builder, + com.google.bigtable.v2.Type.BoolOrBuilder>( + (com.google.bigtable.v2.Type.Bool) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 12; + kindCase_ = 8; onChanged(); - return float32TypeBuilder_; + return boolTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float64, - com.google.bigtable.v2.Type.Float64.Builder, - com.google.bigtable.v2.Type.Float64OrBuilder> - float64TypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp, + com.google.bigtable.v2.Type.Timestamp.Builder, + com.google.bigtable.v2.Type.TimestampOrBuilder> + timestampTypeBuilder_; + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; * - * @return Whether the float64Type field is set. + * @return Whether the timestampType field is set. */ @java.lang.Override - public boolean hasFloat64Type() { - return kindCase_ == 9; + public boolean hasTimestampType() { + return kindCase_ == 10; } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; * - * @return The float64Type. + * @return The timestampType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Float64 getFloat64Type() { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9) { - return (com.google.bigtable.v2.Type.Float64) kind_; + public com.google.bigtable.v2.Type.Timestamp getTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { + return (com.google.bigtable.v2.Type.Timestamp) kind_; } - return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); } else { - if (kindCase_ == 9) { - return float64TypeBuilder_.getMessage(); + if (kindCase_ == 10) { + return timestampTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); } } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64 value) { - if (float64TypeBuilder_ == null) { + public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - float64TypeBuilder_.setMessage(value); + timestampTypeBuilder_.setMessage(value); } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - public Builder setFloat64Type(com.google.bigtable.v2.Type.Float64.Builder builderForValue) { - if (float64TypeBuilder_ == null) { + public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp.Builder builderForValue) { + if (timestampTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - float64TypeBuilder_.setMessage(builderForValue.build()); + timestampTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - public Builder mergeFloat64Type(com.google.bigtable.v2.Type.Float64 value) { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9 && kind_ != com.google.bigtable.v2.Type.Float64.getDefaultInstance()) { + public Builder mergeTimestampType(com.google.bigtable.v2.Type.Timestamp value) { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10 + && kind_ != com.google.bigtable.v2.Type.Timestamp.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Float64.newBuilder( - (com.google.bigtable.v2.Type.Float64) kind_) + com.google.bigtable.v2.Type.Timestamp.newBuilder( + (com.google.bigtable.v2.Type.Timestamp) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -19814,203 +27248,212 @@ public Builder mergeFloat64Type(com.google.bigtable.v2.Type.Float64 value) { } onChanged(); } else { - if (kindCase_ == 9) { - float64TypeBuilder_.mergeFrom(value); + if (kindCase_ == 10) { + timestampTypeBuilder_.mergeFrom(value); } else { - float64TypeBuilder_.setMessage(value); + timestampTypeBuilder_.setMessage(value); } } - kindCase_ = 9; + kindCase_ = 10; return this; } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - public Builder clearFloat64Type() { - if (float64TypeBuilder_ == null) { - if (kindCase_ == 9) { + public Builder clearTimestampType() { + if (timestampTypeBuilder_ == null) { + if (kindCase_ == 10) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 9) { + if (kindCase_ == 10) { kindCase_ = 0; kind_ = null; } - float64TypeBuilder_.clear(); + timestampTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - public com.google.bigtable.v2.Type.Float64.Builder getFloat64TypeBuilder() { - return getFloat64TypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { + return internalGetTimestampTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ @java.lang.Override - public com.google.bigtable.v2.Type.Float64OrBuilder getFloat64TypeOrBuilder() { - if ((kindCase_ == 9) && (float64TypeBuilder_ != null)) { - return float64TypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { + if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { + return timestampTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 9) { - return (com.google.bigtable.v2.Type.Float64) kind_; + if (kindCase_ == 10) { + return (com.google.bigtable.v2.Type.Timestamp) kind_; } - return com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); } } + /** * * *
    -     * Float64
    +     * Timestamp
          * 
    * - * .google.bigtable.v2.Type.Float64 float64_type = 9; + * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float64, - com.google.bigtable.v2.Type.Float64.Builder, - com.google.bigtable.v2.Type.Float64OrBuilder> - getFloat64TypeFieldBuilder() { - if (float64TypeBuilder_ == null) { - if (!(kindCase_ == 9)) { - kind_ = com.google.bigtable.v2.Type.Float64.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp, + com.google.bigtable.v2.Type.Timestamp.Builder, + com.google.bigtable.v2.Type.TimestampOrBuilder> + internalGetTimestampTypeFieldBuilder() { + if (timestampTypeBuilder_ == null) { + if (!(kindCase_ == 10)) { + kind_ = com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); } - float64TypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Float64, - com.google.bigtable.v2.Type.Float64.Builder, - com.google.bigtable.v2.Type.Float64OrBuilder>( - (com.google.bigtable.v2.Type.Float64) kind_, getParentForChildren(), isClean()); + timestampTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Timestamp, + com.google.bigtable.v2.Type.Timestamp.Builder, + com.google.bigtable.v2.Type.TimestampOrBuilder>( + (com.google.bigtable.v2.Type.Timestamp) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 9; + kindCase_ = 10; onChanged(); - return float64TypeBuilder_; + return timestampTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bool, - com.google.bigtable.v2.Type.Bool.Builder, - com.google.bigtable.v2.Type.BoolOrBuilder> - boolTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Date, + com.google.bigtable.v2.Type.Date.Builder, + com.google.bigtable.v2.Type.DateOrBuilder> + dateTypeBuilder_; + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; * - * @return Whether the boolType field is set. + * @return Whether the dateType field is set. */ @java.lang.Override - public boolean hasBoolType() { - return kindCase_ == 8; + public boolean hasDateType() { + return kindCase_ == 11; } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; * - * @return The boolType. + * @return The dateType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Bool getBoolType() { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8) { - return (com.google.bigtable.v2.Type.Bool) kind_; + public com.google.bigtable.v2.Type.Date getDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { + return (com.google.bigtable.v2.Type.Date) kind_; } - return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); } else { - if (kindCase_ == 8) { - return boolTypeBuilder_.getMessage(); + if (kindCase_ == 11) { + return dateTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); } } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - public Builder setBoolType(com.google.bigtable.v2.Type.Bool value) { - if (boolTypeBuilder_ == null) { + public Builder setDateType(com.google.bigtable.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - boolTypeBuilder_.setMessage(value); + dateTypeBuilder_.setMessage(value); } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - public Builder setBoolType(com.google.bigtable.v2.Type.Bool.Builder builderForValue) { - if (boolTypeBuilder_ == null) { + public Builder setDateType(com.google.bigtable.v2.Type.Date.Builder builderForValue) { + if (dateTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - boolTypeBuilder_.setMessage(builderForValue.build()); + dateTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - public Builder mergeBoolType(com.google.bigtable.v2.Type.Bool value) { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8 && kind_ != com.google.bigtable.v2.Type.Bool.getDefaultInstance()) { + public Builder mergeDateType(com.google.bigtable.v2.Type.Date value) { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11 && kind_ != com.google.bigtable.v2.Type.Date.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Bool.newBuilder((com.google.bigtable.v2.Type.Bool) kind_) + com.google.bigtable.v2.Type.Date.newBuilder((com.google.bigtable.v2.Type.Date) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20018,205 +27461,213 @@ public Builder mergeBoolType(com.google.bigtable.v2.Type.Bool value) { } onChanged(); } else { - if (kindCase_ == 8) { - boolTypeBuilder_.mergeFrom(value); + if (kindCase_ == 11) { + dateTypeBuilder_.mergeFrom(value); } else { - boolTypeBuilder_.setMessage(value); + dateTypeBuilder_.setMessage(value); } } - kindCase_ = 8; + kindCase_ = 11; return this; } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - public Builder clearBoolType() { - if (boolTypeBuilder_ == null) { - if (kindCase_ == 8) { + public Builder clearDateType() { + if (dateTypeBuilder_ == null) { + if (kindCase_ == 11) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 8) { + if (kindCase_ == 11) { kindCase_ = 0; kind_ = null; } - boolTypeBuilder_.clear(); + dateTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - public com.google.bigtable.v2.Type.Bool.Builder getBoolTypeBuilder() { - return getBoolTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Date.Builder getDateTypeBuilder() { + return internalGetDateTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ @java.lang.Override - public com.google.bigtable.v2.Type.BoolOrBuilder getBoolTypeOrBuilder() { - if ((kindCase_ == 8) && (boolTypeBuilder_ != null)) { - return boolTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { + if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { + return dateTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 8) { - return (com.google.bigtable.v2.Type.Bool) kind_; + if (kindCase_ == 11) { + return (com.google.bigtable.v2.Type.Date) kind_; } - return com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + return com.google.bigtable.v2.Type.Date.getDefaultInstance(); } } + /** * * *
    -     * Bool
    +     * Date
          * 
    * - * .google.bigtable.v2.Type.Bool bool_type = 8; + * .google.bigtable.v2.Type.Date date_type = 11; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bool, - com.google.bigtable.v2.Type.Bool.Builder, - com.google.bigtable.v2.Type.BoolOrBuilder> - getBoolTypeFieldBuilder() { - if (boolTypeBuilder_ == null) { - if (!(kindCase_ == 8)) { - kind_ = com.google.bigtable.v2.Type.Bool.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Date, + com.google.bigtable.v2.Type.Date.Builder, + com.google.bigtable.v2.Type.DateOrBuilder> + internalGetDateTypeFieldBuilder() { + if (dateTypeBuilder_ == null) { + if (!(kindCase_ == 11)) { + kind_ = com.google.bigtable.v2.Type.Date.getDefaultInstance(); } - boolTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Bool, - com.google.bigtable.v2.Type.Bool.Builder, - com.google.bigtable.v2.Type.BoolOrBuilder>( - (com.google.bigtable.v2.Type.Bool) kind_, getParentForChildren(), isClean()); + dateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Date, + com.google.bigtable.v2.Type.Date.Builder, + com.google.bigtable.v2.Type.DateOrBuilder>( + (com.google.bigtable.v2.Type.Date) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 8; + kindCase_ = 11; onChanged(); - return boolTypeBuilder_; + return dateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Timestamp, - com.google.bigtable.v2.Type.Timestamp.Builder, - com.google.bigtable.v2.Type.TimestampOrBuilder> - timestampTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Aggregate, + com.google.bigtable.v2.Type.Aggregate.Builder, + com.google.bigtable.v2.Type.AggregateOrBuilder> + aggregateTypeBuilder_; + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; * - * @return Whether the timestampType field is set. + * @return Whether the aggregateType field is set. */ @java.lang.Override - public boolean hasTimestampType() { - return kindCase_ == 10; + public boolean hasAggregateType() { + return kindCase_ == 6; } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; * - * @return The timestampType. + * @return The aggregateType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Timestamp getTimestampType() { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10) { - return (com.google.bigtable.v2.Type.Timestamp) kind_; + public com.google.bigtable.v2.Type.Aggregate getAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate) kind_; } - return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); } else { - if (kindCase_ == 10) { - return timestampTypeBuilder_.getMessage(); + if (kindCase_ == 6) { + return aggregateTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); } } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp value) { - if (timestampTypeBuilder_ == null) { + public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - timestampTypeBuilder_.setMessage(value); + aggregateTypeBuilder_.setMessage(value); } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - public Builder setTimestampType(com.google.bigtable.v2.Type.Timestamp.Builder builderForValue) { - if (timestampTypeBuilder_ == null) { + public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate.Builder builderForValue) { + if (aggregateTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - timestampTypeBuilder_.setMessage(builderForValue.build()); + aggregateTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - public Builder mergeTimestampType(com.google.bigtable.v2.Type.Timestamp value) { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10 - && kind_ != com.google.bigtable.v2.Type.Timestamp.getDefaultInstance()) { + public Builder mergeAggregateType(com.google.bigtable.v2.Type.Aggregate value) { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6 && kind_ != com.google.bigtable.v2.Type.Aggregate.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Timestamp.newBuilder( - (com.google.bigtable.v2.Type.Timestamp) kind_) + com.google.bigtable.v2.Type.Aggregate.newBuilder( + (com.google.bigtable.v2.Type.Aggregate) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20224,203 +27675,213 @@ public Builder mergeTimestampType(com.google.bigtable.v2.Type.Timestamp value) { } onChanged(); } else { - if (kindCase_ == 10) { - timestampTypeBuilder_.mergeFrom(value); + if (kindCase_ == 6) { + aggregateTypeBuilder_.mergeFrom(value); } else { - timestampTypeBuilder_.setMessage(value); + aggregateTypeBuilder_.setMessage(value); } } - kindCase_ = 10; + kindCase_ = 6; return this; } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - public Builder clearTimestampType() { - if (timestampTypeBuilder_ == null) { - if (kindCase_ == 10) { + public Builder clearAggregateType() { + if (aggregateTypeBuilder_ == null) { + if (kindCase_ == 6) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 10) { + if (kindCase_ == 6) { kindCase_ = 0; kind_ = null; } - timestampTypeBuilder_.clear(); + aggregateTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - public com.google.bigtable.v2.Type.Timestamp.Builder getTimestampTypeBuilder() { - return getTimestampTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { + return internalGetAggregateTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ @java.lang.Override - public com.google.bigtable.v2.Type.TimestampOrBuilder getTimestampTypeOrBuilder() { - if ((kindCase_ == 10) && (timestampTypeBuilder_ != null)) { - return timestampTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { + if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { + return aggregateTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 10) { - return (com.google.bigtable.v2.Type.Timestamp) kind_; + if (kindCase_ == 6) { + return (com.google.bigtable.v2.Type.Aggregate) kind_; } - return com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); } } + /** * * *
    -     * Timestamp
    +     * Aggregate
          * 
    * - * .google.bigtable.v2.Type.Timestamp timestamp_type = 10; + * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Timestamp, - com.google.bigtable.v2.Type.Timestamp.Builder, - com.google.bigtable.v2.Type.TimestampOrBuilder> - getTimestampTypeFieldBuilder() { - if (timestampTypeBuilder_ == null) { - if (!(kindCase_ == 10)) { - kind_ = com.google.bigtable.v2.Type.Timestamp.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Aggregate, + com.google.bigtable.v2.Type.Aggregate.Builder, + com.google.bigtable.v2.Type.AggregateOrBuilder> + internalGetAggregateTypeFieldBuilder() { + if (aggregateTypeBuilder_ == null) { + if (!(kindCase_ == 6)) { + kind_ = com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); } - timestampTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Timestamp, - com.google.bigtable.v2.Type.Timestamp.Builder, - com.google.bigtable.v2.Type.TimestampOrBuilder>( - (com.google.bigtable.v2.Type.Timestamp) kind_, getParentForChildren(), isClean()); + aggregateTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Aggregate, + com.google.bigtable.v2.Type.Aggregate.Builder, + com.google.bigtable.v2.Type.AggregateOrBuilder>( + (com.google.bigtable.v2.Type.Aggregate) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 10; + kindCase_ = 6; onChanged(); - return timestampTypeBuilder_; + return aggregateTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Date, - com.google.bigtable.v2.Type.Date.Builder, - com.google.bigtable.v2.Type.DateOrBuilder> - dateTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct, + com.google.bigtable.v2.Type.Struct.Builder, + com.google.bigtable.v2.Type.StructOrBuilder> + structTypeBuilder_; + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; * - * @return Whether the dateType field is set. + * @return Whether the structType field is set. */ @java.lang.Override - public boolean hasDateType() { - return kindCase_ == 11; + public boolean hasStructType() { + return kindCase_ == 7; } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; * - * @return The dateType. + * @return The structType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Date getDateType() { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11) { - return (com.google.bigtable.v2.Type.Date) kind_; + public com.google.bigtable.v2.Type.Struct getStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; } - return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); } else { - if (kindCase_ == 11) { - return dateTypeBuilder_.getMessage(); + if (kindCase_ == 7) { + return structTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); } } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - public Builder setDateType(com.google.bigtable.v2.Type.Date value) { - if (dateTypeBuilder_ == null) { + public Builder setStructType(com.google.bigtable.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - dateTypeBuilder_.setMessage(value); + structTypeBuilder_.setMessage(value); } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - public Builder setDateType(com.google.bigtable.v2.Type.Date.Builder builderForValue) { - if (dateTypeBuilder_ == null) { + public Builder setStructType(com.google.bigtable.v2.Type.Struct.Builder builderForValue) { + if (structTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - dateTypeBuilder_.setMessage(builderForValue.build()); + structTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - public Builder mergeDateType(com.google.bigtable.v2.Type.Date value) { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11 && kind_ != com.google.bigtable.v2.Type.Date.getDefaultInstance()) { + public Builder mergeStructType(com.google.bigtable.v2.Type.Struct value) { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7 && kind_ != com.google.bigtable.v2.Type.Struct.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Date.newBuilder((com.google.bigtable.v2.Type.Date) kind_) + com.google.bigtable.v2.Type.Struct.newBuilder( + (com.google.bigtable.v2.Type.Struct) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20428,204 +27889,213 @@ public Builder mergeDateType(com.google.bigtable.v2.Type.Date value) { } onChanged(); } else { - if (kindCase_ == 11) { - dateTypeBuilder_.mergeFrom(value); + if (kindCase_ == 7) { + structTypeBuilder_.mergeFrom(value); } else { - dateTypeBuilder_.setMessage(value); + structTypeBuilder_.setMessage(value); } } - kindCase_ = 11; + kindCase_ = 7; return this; } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - public Builder clearDateType() { - if (dateTypeBuilder_ == null) { - if (kindCase_ == 11) { + public Builder clearStructType() { + if (structTypeBuilder_ == null) { + if (kindCase_ == 7) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 11) { + if (kindCase_ == 7) { kindCase_ = 0; kind_ = null; } - dateTypeBuilder_.clear(); + structTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - public com.google.bigtable.v2.Type.Date.Builder getDateTypeBuilder() { - return getDateTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Struct.Builder getStructTypeBuilder() { + return internalGetStructTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ @java.lang.Override - public com.google.bigtable.v2.Type.DateOrBuilder getDateTypeOrBuilder() { - if ((kindCase_ == 11) && (dateTypeBuilder_ != null)) { - return dateTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder() { + if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { + return structTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 11) { - return (com.google.bigtable.v2.Type.Date) kind_; + if (kindCase_ == 7) { + return (com.google.bigtable.v2.Type.Struct) kind_; } - return com.google.bigtable.v2.Type.Date.getDefaultInstance(); + return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); } } + /** * * *
    -     * Date
    +     * Struct
          * 
    * - * .google.bigtable.v2.Type.Date date_type = 11; + * .google.bigtable.v2.Type.Struct struct_type = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Date, - com.google.bigtable.v2.Type.Date.Builder, - com.google.bigtable.v2.Type.DateOrBuilder> - getDateTypeFieldBuilder() { - if (dateTypeBuilder_ == null) { - if (!(kindCase_ == 11)) { - kind_ = com.google.bigtable.v2.Type.Date.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct, + com.google.bigtable.v2.Type.Struct.Builder, + com.google.bigtable.v2.Type.StructOrBuilder> + internalGetStructTypeFieldBuilder() { + if (structTypeBuilder_ == null) { + if (!(kindCase_ == 7)) { + kind_ = com.google.bigtable.v2.Type.Struct.getDefaultInstance(); } - dateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Date, - com.google.bigtable.v2.Type.Date.Builder, - com.google.bigtable.v2.Type.DateOrBuilder>( - (com.google.bigtable.v2.Type.Date) kind_, getParentForChildren(), isClean()); + structTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Struct, + com.google.bigtable.v2.Type.Struct.Builder, + com.google.bigtable.v2.Type.StructOrBuilder>( + (com.google.bigtable.v2.Type.Struct) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 11; + kindCase_ = 7; onChanged(); - return dateTypeBuilder_; + return structTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Aggregate, - com.google.bigtable.v2.Type.Aggregate.Builder, - com.google.bigtable.v2.Type.AggregateOrBuilder> - aggregateTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Array, + com.google.bigtable.v2.Type.Array.Builder, + com.google.bigtable.v2.Type.ArrayOrBuilder> + arrayTypeBuilder_; + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; * - * @return Whether the aggregateType field is set. + * @return Whether the arrayType field is set. */ @java.lang.Override - public boolean hasAggregateType() { - return kindCase_ == 6; + public boolean hasArrayType() { + return kindCase_ == 3; } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; * - * @return The aggregateType. + * @return The arrayType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Aggregate getAggregateType() { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6) { - return (com.google.bigtable.v2.Type.Aggregate) kind_; + public com.google.bigtable.v2.Type.Array getArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { + return (com.google.bigtable.v2.Type.Array) kind_; } - return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); } else { - if (kindCase_ == 6) { - return aggregateTypeBuilder_.getMessage(); + if (kindCase_ == 3) { + return arrayTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); } } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate value) { - if (aggregateTypeBuilder_ == null) { + public Builder setArrayType(com.google.bigtable.v2.Type.Array value) { + if (arrayTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - aggregateTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - public Builder setAggregateType(com.google.bigtable.v2.Type.Aggregate.Builder builderForValue) { - if (aggregateTypeBuilder_ == null) { + public Builder setArrayType(com.google.bigtable.v2.Type.Array.Builder builderForValue) { + if (arrayTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - aggregateTypeBuilder_.setMessage(builderForValue.build()); + arrayTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - public Builder mergeAggregateType(com.google.bigtable.v2.Type.Aggregate value) { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6 && kind_ != com.google.bigtable.v2.Type.Aggregate.getDefaultInstance()) { + public Builder mergeArrayType(com.google.bigtable.v2.Type.Array value) { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3 && kind_ != com.google.bigtable.v2.Type.Array.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Aggregate.newBuilder( - (com.google.bigtable.v2.Type.Aggregate) kind_) + com.google.bigtable.v2.Type.Array.newBuilder( + (com.google.bigtable.v2.Type.Array) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20633,204 +28103,212 @@ public Builder mergeAggregateType(com.google.bigtable.v2.Type.Aggregate value) { } onChanged(); } else { - if (kindCase_ == 6) { - aggregateTypeBuilder_.mergeFrom(value); + if (kindCase_ == 3) { + arrayTypeBuilder_.mergeFrom(value); } else { - aggregateTypeBuilder_.setMessage(value); + arrayTypeBuilder_.setMessage(value); } } - kindCase_ = 6; + kindCase_ = 3; return this; } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - public Builder clearAggregateType() { - if (aggregateTypeBuilder_ == null) { - if (kindCase_ == 6) { + public Builder clearArrayType() { + if (arrayTypeBuilder_ == null) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 6) { + if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; } - aggregateTypeBuilder_.clear(); + arrayTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - public com.google.bigtable.v2.Type.Aggregate.Builder getAggregateTypeBuilder() { - return getAggregateTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Array.Builder getArrayTypeBuilder() { + return internalGetArrayTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ @java.lang.Override - public com.google.bigtable.v2.Type.AggregateOrBuilder getAggregateTypeOrBuilder() { - if ((kindCase_ == 6) && (aggregateTypeBuilder_ != null)) { - return aggregateTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { + if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { + return arrayTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 6) { - return (com.google.bigtable.v2.Type.Aggregate) kind_; + if (kindCase_ == 3) { + return (com.google.bigtable.v2.Type.Array) kind_; } - return com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + return com.google.bigtable.v2.Type.Array.getDefaultInstance(); } } + /** * * *
    -     * Aggregate
    +     * Array
          * 
    * - * .google.bigtable.v2.Type.Aggregate aggregate_type = 6; + * .google.bigtable.v2.Type.Array array_type = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Aggregate, - com.google.bigtable.v2.Type.Aggregate.Builder, - com.google.bigtable.v2.Type.AggregateOrBuilder> - getAggregateTypeFieldBuilder() { - if (aggregateTypeBuilder_ == null) { - if (!(kindCase_ == 6)) { - kind_ = com.google.bigtable.v2.Type.Aggregate.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Array, + com.google.bigtable.v2.Type.Array.Builder, + com.google.bigtable.v2.Type.ArrayOrBuilder> + internalGetArrayTypeFieldBuilder() { + if (arrayTypeBuilder_ == null) { + if (!(kindCase_ == 3)) { + kind_ = com.google.bigtable.v2.Type.Array.getDefaultInstance(); } - aggregateTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Aggregate, - com.google.bigtable.v2.Type.Aggregate.Builder, - com.google.bigtable.v2.Type.AggregateOrBuilder>( - (com.google.bigtable.v2.Type.Aggregate) kind_, getParentForChildren(), isClean()); + arrayTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Array, + com.google.bigtable.v2.Type.Array.Builder, + com.google.bigtable.v2.Type.ArrayOrBuilder>( + (com.google.bigtable.v2.Type.Array) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 6; + kindCase_ = 3; onChanged(); - return aggregateTypeBuilder_; + return arrayTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Struct, - com.google.bigtable.v2.Type.Struct.Builder, - com.google.bigtable.v2.Type.StructOrBuilder> - structTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Map, + com.google.bigtable.v2.Type.Map.Builder, + com.google.bigtable.v2.Type.MapOrBuilder> + mapTypeBuilder_; + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; * - * @return Whether the structType field is set. + * @return Whether the mapType field is set. */ @java.lang.Override - public boolean hasStructType() { - return kindCase_ == 7; + public boolean hasMapType() { + return kindCase_ == 4; } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; * - * @return The structType. + * @return The mapType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Struct getStructType() { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7) { - return (com.google.bigtable.v2.Type.Struct) kind_; + public com.google.bigtable.v2.Type.Map getMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { + return (com.google.bigtable.v2.Type.Map) kind_; } - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); } else { - if (kindCase_ == 7) { - return structTypeBuilder_.getMessage(); + if (kindCase_ == 4) { + return mapTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); } } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - public Builder setStructType(com.google.bigtable.v2.Type.Struct value) { - if (structTypeBuilder_ == null) { + public Builder setMapType(com.google.bigtable.v2.Type.Map value) { + if (mapTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - structTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - public Builder setStructType(com.google.bigtable.v2.Type.Struct.Builder builderForValue) { - if (structTypeBuilder_ == null) { + public Builder setMapType(com.google.bigtable.v2.Type.Map.Builder builderForValue) { + if (mapTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - structTypeBuilder_.setMessage(builderForValue.build()); + mapTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - public Builder mergeStructType(com.google.bigtable.v2.Type.Struct value) { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7 && kind_ != com.google.bigtable.v2.Type.Struct.getDefaultInstance()) { + public Builder mergeMapType(com.google.bigtable.v2.Type.Map value) { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4 && kind_ != com.google.bigtable.v2.Type.Map.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Struct.newBuilder( - (com.google.bigtable.v2.Type.Struct) kind_) + com.google.bigtable.v2.Type.Map.newBuilder((com.google.bigtable.v2.Type.Map) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -20838,204 +28316,213 @@ public Builder mergeStructType(com.google.bigtable.v2.Type.Struct value) { } onChanged(); } else { - if (kindCase_ == 7) { - structTypeBuilder_.mergeFrom(value); + if (kindCase_ == 4) { + mapTypeBuilder_.mergeFrom(value); } else { - structTypeBuilder_.setMessage(value); + mapTypeBuilder_.setMessage(value); } } - kindCase_ = 7; + kindCase_ = 4; return this; } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - public Builder clearStructType() { - if (structTypeBuilder_ == null) { - if (kindCase_ == 7) { + public Builder clearMapType() { + if (mapTypeBuilder_ == null) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 7) { + if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; } - structTypeBuilder_.clear(); + mapTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - public com.google.bigtable.v2.Type.Struct.Builder getStructTypeBuilder() { - return getStructTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Map.Builder getMapTypeBuilder() { + return internalGetMapTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ @java.lang.Override - public com.google.bigtable.v2.Type.StructOrBuilder getStructTypeOrBuilder() { - if ((kindCase_ == 7) && (structTypeBuilder_ != null)) { - return structTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder() { + if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { + return mapTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 7) { - return (com.google.bigtable.v2.Type.Struct) kind_; + if (kindCase_ == 4) { + return (com.google.bigtable.v2.Type.Map) kind_; } - return com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + return com.google.bigtable.v2.Type.Map.getDefaultInstance(); } } + /** * * *
    -     * Struct
    +     * Map
          * 
    * - * .google.bigtable.v2.Type.Struct struct_type = 7; + * .google.bigtable.v2.Type.Map map_type = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Struct, - com.google.bigtable.v2.Type.Struct.Builder, - com.google.bigtable.v2.Type.StructOrBuilder> - getStructTypeFieldBuilder() { - if (structTypeBuilder_ == null) { - if (!(kindCase_ == 7)) { - kind_ = com.google.bigtable.v2.Type.Struct.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Map, + com.google.bigtable.v2.Type.Map.Builder, + com.google.bigtable.v2.Type.MapOrBuilder> + internalGetMapTypeFieldBuilder() { + if (mapTypeBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = com.google.bigtable.v2.Type.Map.getDefaultInstance(); } - structTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Struct, - com.google.bigtable.v2.Type.Struct.Builder, - com.google.bigtable.v2.Type.StructOrBuilder>( - (com.google.bigtable.v2.Type.Struct) kind_, getParentForChildren(), isClean()); + mapTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Map, + com.google.bigtable.v2.Type.Map.Builder, + com.google.bigtable.v2.Type.MapOrBuilder>( + (com.google.bigtable.v2.Type.Map) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 7; + kindCase_ = 4; onChanged(); - return structTypeBuilder_; + return mapTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Array, - com.google.bigtable.v2.Type.Array.Builder, - com.google.bigtable.v2.Type.ArrayOrBuilder> - arrayTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Proto, + com.google.bigtable.v2.Type.Proto.Builder, + com.google.bigtable.v2.Type.ProtoOrBuilder> + protoTypeBuilder_; + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; * - * @return Whether the arrayType field is set. + * @return Whether the protoType field is set. */ @java.lang.Override - public boolean hasArrayType() { - return kindCase_ == 3; + public boolean hasProtoType() { + return kindCase_ == 13; } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; * - * @return The arrayType. + * @return The protoType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Array getArrayType() { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3) { - return (com.google.bigtable.v2.Type.Array) kind_; + public com.google.bigtable.v2.Type.Proto getProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { + return (com.google.bigtable.v2.Type.Proto) kind_; } - return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); } else { - if (kindCase_ == 3) { - return arrayTypeBuilder_.getMessage(); + if (kindCase_ == 13) { + return protoTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - public Builder setArrayType(com.google.bigtable.v2.Type.Array value) { - if (arrayTypeBuilder_ == null) { + public Builder setProtoType(com.google.bigtable.v2.Type.Proto value) { + if (protoTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - arrayTypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - public Builder setArrayType(com.google.bigtable.v2.Type.Array.Builder builderForValue) { - if (arrayTypeBuilder_ == null) { + public Builder setProtoType(com.google.bigtable.v2.Type.Proto.Builder builderForValue) { + if (protoTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - arrayTypeBuilder_.setMessage(builderForValue.build()); + protoTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - public Builder mergeArrayType(com.google.bigtable.v2.Type.Array value) { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3 && kind_ != com.google.bigtable.v2.Type.Array.getDefaultInstance()) { + public Builder mergeProtoType(com.google.bigtable.v2.Type.Proto value) { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13 && kind_ != com.google.bigtable.v2.Type.Proto.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Array.newBuilder( - (com.google.bigtable.v2.Type.Array) kind_) + com.google.bigtable.v2.Type.Proto.newBuilder( + (com.google.bigtable.v2.Type.Proto) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -21043,203 +28530,212 @@ public Builder mergeArrayType(com.google.bigtable.v2.Type.Array value) { } onChanged(); } else { - if (kindCase_ == 3) { - arrayTypeBuilder_.mergeFrom(value); + if (kindCase_ == 13) { + protoTypeBuilder_.mergeFrom(value); } else { - arrayTypeBuilder_.setMessage(value); + protoTypeBuilder_.setMessage(value); } } - kindCase_ = 3; + kindCase_ = 13; return this; } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - public Builder clearArrayType() { - if (arrayTypeBuilder_ == null) { - if (kindCase_ == 3) { + public Builder clearProtoType() { + if (protoTypeBuilder_ == null) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 3) { + if (kindCase_ == 13) { kindCase_ = 0; kind_ = null; } - arrayTypeBuilder_.clear(); + protoTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - public com.google.bigtable.v2.Type.Array.Builder getArrayTypeBuilder() { - return getArrayTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Proto.Builder getProtoTypeBuilder() { + return internalGetProtoTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ @java.lang.Override - public com.google.bigtable.v2.Type.ArrayOrBuilder getArrayTypeOrBuilder() { - if ((kindCase_ == 3) && (arrayTypeBuilder_ != null)) { - return arrayTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder() { + if ((kindCase_ == 13) && (protoTypeBuilder_ != null)) { + return protoTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 3) { - return (com.google.bigtable.v2.Type.Array) kind_; + if (kindCase_ == 13) { + return (com.google.bigtable.v2.Type.Proto) kind_; } - return com.google.bigtable.v2.Type.Array.getDefaultInstance(); + return com.google.bigtable.v2.Type.Proto.getDefaultInstance(); } } + /** * * *
    -     * Array
    +     * Proto
          * 
    * - * .google.bigtable.v2.Type.Array array_type = 3; + * .google.bigtable.v2.Type.Proto proto_type = 13; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Array, - com.google.bigtable.v2.Type.Array.Builder, - com.google.bigtable.v2.Type.ArrayOrBuilder> - getArrayTypeFieldBuilder() { - if (arrayTypeBuilder_ == null) { - if (!(kindCase_ == 3)) { - kind_ = com.google.bigtable.v2.Type.Array.getDefaultInstance(); - } - arrayTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Array, - com.google.bigtable.v2.Type.Array.Builder, - com.google.bigtable.v2.Type.ArrayOrBuilder>( - (com.google.bigtable.v2.Type.Array) kind_, getParentForChildren(), isClean()); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Proto, + com.google.bigtable.v2.Type.Proto.Builder, + com.google.bigtable.v2.Type.ProtoOrBuilder> + internalGetProtoTypeFieldBuilder() { + if (protoTypeBuilder_ == null) { + if (!(kindCase_ == 13)) { + kind_ = com.google.bigtable.v2.Type.Proto.getDefaultInstance(); + } + protoTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Proto, + com.google.bigtable.v2.Type.Proto.Builder, + com.google.bigtable.v2.Type.ProtoOrBuilder>( + (com.google.bigtable.v2.Type.Proto) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 3; + kindCase_ = 13; onChanged(); - return arrayTypeBuilder_; + return protoTypeBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Map, - com.google.bigtable.v2.Type.Map.Builder, - com.google.bigtable.v2.Type.MapOrBuilder> - mapTypeBuilder_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Enum, + com.google.bigtable.v2.Type.Enum.Builder, + com.google.bigtable.v2.Type.EnumOrBuilder> + enumTypeBuilder_; + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; * - * @return Whether the mapType field is set. + * @return Whether the enumType field is set. */ @java.lang.Override - public boolean hasMapType() { - return kindCase_ == 4; + public boolean hasEnumType() { + return kindCase_ == 14; } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; * - * @return The mapType. + * @return The enumType. */ @java.lang.Override - public com.google.bigtable.v2.Type.Map getMapType() { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4) { - return (com.google.bigtable.v2.Type.Map) kind_; + public com.google.bigtable.v2.Type.Enum getEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { + return (com.google.bigtable.v2.Type.Enum) kind_; } - return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } else { - if (kindCase_ == 4) { - return mapTypeBuilder_.getMessage(); + if (kindCase_ == 14) { + return enumTypeBuilder_.getMessage(); } - return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - public Builder setMapType(com.google.bigtable.v2.Type.Map value) { - if (mapTypeBuilder_ == null) { + public Builder setEnumType(com.google.bigtable.v2.Type.Enum value) { + if (enumTypeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kind_ = value; onChanged(); } else { - mapTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - public Builder setMapType(com.google.bigtable.v2.Type.Map.Builder builderForValue) { - if (mapTypeBuilder_ == null) { + public Builder setEnumType(com.google.bigtable.v2.Type.Enum.Builder builderForValue) { + if (enumTypeBuilder_ == null) { kind_ = builderForValue.build(); onChanged(); } else { - mapTypeBuilder_.setMessage(builderForValue.build()); + enumTypeBuilder_.setMessage(builderForValue.build()); } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - public Builder mergeMapType(com.google.bigtable.v2.Type.Map value) { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4 && kind_ != com.google.bigtable.v2.Type.Map.getDefaultInstance()) { + public Builder mergeEnumType(com.google.bigtable.v2.Type.Enum value) { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14 && kind_ != com.google.bigtable.v2.Type.Enum.getDefaultInstance()) { kind_ = - com.google.bigtable.v2.Type.Map.newBuilder((com.google.bigtable.v2.Type.Map) kind_) + com.google.bigtable.v2.Type.Enum.newBuilder((com.google.bigtable.v2.Type.Enum) kind_) .mergeFrom(value) .buildPartial(); } else { @@ -21247,112 +28743,105 @@ public Builder mergeMapType(com.google.bigtable.v2.Type.Map value) { } onChanged(); } else { - if (kindCase_ == 4) { - mapTypeBuilder_.mergeFrom(value); + if (kindCase_ == 14) { + enumTypeBuilder_.mergeFrom(value); } else { - mapTypeBuilder_.setMessage(value); + enumTypeBuilder_.setMessage(value); } } - kindCase_ = 4; + kindCase_ = 14; return this; } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - public Builder clearMapType() { - if (mapTypeBuilder_ == null) { - if (kindCase_ == 4) { + public Builder clearEnumType() { + if (enumTypeBuilder_ == null) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; onChanged(); } } else { - if (kindCase_ == 4) { + if (kindCase_ == 14) { kindCase_ = 0; kind_ = null; } - mapTypeBuilder_.clear(); + enumTypeBuilder_.clear(); } return this; } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - public com.google.bigtable.v2.Type.Map.Builder getMapTypeBuilder() { - return getMapTypeFieldBuilder().getBuilder(); + public com.google.bigtable.v2.Type.Enum.Builder getEnumTypeBuilder() { + return internalGetEnumTypeFieldBuilder().getBuilder(); } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ @java.lang.Override - public com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder() { - if ((kindCase_ == 4) && (mapTypeBuilder_ != null)) { - return mapTypeBuilder_.getMessageOrBuilder(); + public com.google.bigtable.v2.Type.EnumOrBuilder getEnumTypeOrBuilder() { + if ((kindCase_ == 14) && (enumTypeBuilder_ != null)) { + return enumTypeBuilder_.getMessageOrBuilder(); } else { - if (kindCase_ == 4) { - return (com.google.bigtable.v2.Type.Map) kind_; + if (kindCase_ == 14) { + return (com.google.bigtable.v2.Type.Enum) kind_; } - return com.google.bigtable.v2.Type.Map.getDefaultInstance(); + return com.google.bigtable.v2.Type.Enum.getDefaultInstance(); } } + /** * * *
    -     * Map
    +     * Enum
          * 
    * - * .google.bigtable.v2.Type.Map map_type = 4; + * .google.bigtable.v2.Type.Enum enum_type = 14; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Map, - com.google.bigtable.v2.Type.Map.Builder, - com.google.bigtable.v2.Type.MapOrBuilder> - getMapTypeFieldBuilder() { - if (mapTypeBuilder_ == null) { - if (!(kindCase_ == 4)) { - kind_ = com.google.bigtable.v2.Type.Map.getDefaultInstance(); - } - mapTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.bigtable.v2.Type.Map, - com.google.bigtable.v2.Type.Map.Builder, - com.google.bigtable.v2.Type.MapOrBuilder>( - (com.google.bigtable.v2.Type.Map) kind_, getParentForChildren(), isClean()); + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Enum, + com.google.bigtable.v2.Type.Enum.Builder, + com.google.bigtable.v2.Type.EnumOrBuilder> + internalGetEnumTypeFieldBuilder() { + if (enumTypeBuilder_ == null) { + if (!(kindCase_ == 14)) { + kind_ = com.google.bigtable.v2.Type.Enum.getDefaultInstance(); + } + enumTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.Type.Enum, + com.google.bigtable.v2.Type.Enum.Builder, + com.google.bigtable.v2.Type.EnumOrBuilder>( + (com.google.bigtable.v2.Type.Enum) kind_, getParentForChildren(), isClean()); kind_ = null; } - kindCase_ = 4; + kindCase_ = 14; onChanged(); - return mapTypeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.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 enumTypeBuilder_; } // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Type) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypeOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypeOrBuilder.java index 38abd879ae..9c8366ba78 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypeOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface TypeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Type) @@ -36,6 +38,7 @@ public interface TypeOrBuilder * @return Whether the bytesType field is set. */ boolean hasBytesType(); + /** * * @@ -48,6 +51,7 @@ public interface TypeOrBuilder * @return The bytesType. */ com.google.bigtable.v2.Type.Bytes getBytesType(); + /** * * @@ -71,6 +75,7 @@ public interface TypeOrBuilder * @return Whether the stringType field is set. */ boolean hasStringType(); + /** * * @@ -83,6 +88,7 @@ public interface TypeOrBuilder * @return The stringType. */ com.google.bigtable.v2.Type.String getStringType(); + /** * * @@ -106,6 +112,7 @@ public interface TypeOrBuilder * @return Whether the int64Type field is set. */ boolean hasInt64Type(); + /** * * @@ -118,6 +125,7 @@ public interface TypeOrBuilder * @return The int64Type. */ com.google.bigtable.v2.Type.Int64 getInt64Type(); + /** * * @@ -141,6 +149,7 @@ public interface TypeOrBuilder * @return Whether the float32Type field is set. */ boolean hasFloat32Type(); + /** * * @@ -153,6 +162,7 @@ public interface TypeOrBuilder * @return The float32Type. */ com.google.bigtable.v2.Type.Float32 getFloat32Type(); + /** * * @@ -176,6 +186,7 @@ public interface TypeOrBuilder * @return Whether the float64Type field is set. */ boolean hasFloat64Type(); + /** * * @@ -188,6 +199,7 @@ public interface TypeOrBuilder * @return The float64Type. */ com.google.bigtable.v2.Type.Float64 getFloat64Type(); + /** * * @@ -211,6 +223,7 @@ public interface TypeOrBuilder * @return Whether the boolType field is set. */ boolean hasBoolType(); + /** * * @@ -223,6 +236,7 @@ public interface TypeOrBuilder * @return The boolType. */ com.google.bigtable.v2.Type.Bool getBoolType(); + /** * * @@ -246,6 +260,7 @@ public interface TypeOrBuilder * @return Whether the timestampType field is set. */ boolean hasTimestampType(); + /** * * @@ -258,6 +273,7 @@ public interface TypeOrBuilder * @return The timestampType. */ com.google.bigtable.v2.Type.Timestamp getTimestampType(); + /** * * @@ -281,6 +297,7 @@ public interface TypeOrBuilder * @return Whether the dateType field is set. */ boolean hasDateType(); + /** * * @@ -293,6 +310,7 @@ public interface TypeOrBuilder * @return The dateType. */ com.google.bigtable.v2.Type.Date getDateType(); + /** * * @@ -316,6 +334,7 @@ public interface TypeOrBuilder * @return Whether the aggregateType field is set. */ boolean hasAggregateType(); + /** * * @@ -328,6 +347,7 @@ public interface TypeOrBuilder * @return The aggregateType. */ com.google.bigtable.v2.Type.Aggregate getAggregateType(); + /** * * @@ -351,6 +371,7 @@ public interface TypeOrBuilder * @return Whether the structType field is set. */ boolean hasStructType(); + /** * * @@ -363,6 +384,7 @@ public interface TypeOrBuilder * @return The structType. */ com.google.bigtable.v2.Type.Struct getStructType(); + /** * * @@ -386,6 +408,7 @@ public interface TypeOrBuilder * @return Whether the arrayType field is set. */ boolean hasArrayType(); + /** * * @@ -398,6 +421,7 @@ public interface TypeOrBuilder * @return The arrayType. */ com.google.bigtable.v2.Type.Array getArrayType(); + /** * * @@ -421,6 +445,7 @@ public interface TypeOrBuilder * @return Whether the mapType field is set. */ boolean hasMapType(); + /** * * @@ -433,6 +458,7 @@ public interface TypeOrBuilder * @return The mapType. */ com.google.bigtable.v2.Type.Map getMapType(); + /** * * @@ -444,5 +470,79 @@ public interface TypeOrBuilder */ com.google.bigtable.v2.Type.MapOrBuilder getMapTypeOrBuilder(); + /** + * + * + *
    +   * Proto
    +   * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + * + * @return Whether the protoType field is set. + */ + boolean hasProtoType(); + + /** + * + * + *
    +   * Proto
    +   * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + * + * @return The protoType. + */ + com.google.bigtable.v2.Type.Proto getProtoType(); + + /** + * + * + *
    +   * Proto
    +   * 
    + * + * .google.bigtable.v2.Type.Proto proto_type = 13; + */ + com.google.bigtable.v2.Type.ProtoOrBuilder getProtoTypeOrBuilder(); + + /** + * + * + *
    +   * Enum
    +   * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + * + * @return Whether the enumType field is set. + */ + boolean hasEnumType(); + + /** + * + * + *
    +   * Enum
    +   * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + * + * @return The enumType. + */ + com.google.bigtable.v2.Type.Enum getEnumType(); + + /** + * + * + *
    +   * Enum
    +   * 
    + * + * .google.bigtable.v2.Type.Enum enum_type = 14; + */ + com.google.bigtable.v2.Type.EnumOrBuilder getEnumTypeOrBuilder(); + com.google.bigtable.v2.Type.KindCase getKindCase(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypesProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypesProto.java index 6477361bc2..abb352ec7a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypesProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TypesProto.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/types.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; -public final class TypesProto { +@com.google.protobuf.Generated +public final class TypesProto extends com.google.protobuf.GeneratedFile { private TypesProto() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TypesProto"); + } + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { @@ -30,103 +42,135 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Bytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_String_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_String_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_String_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Int64_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Int64_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Bool_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Float32_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Float64_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Timestamp_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Timestamp_Encoding_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Date_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Struct_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Struct_Field_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Struct_Encoding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Proto_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Proto_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_Type_Enum_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_bigtable_v2_Type_Enum_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Array_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Map_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Aggregate_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Aggregate_Sum_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Aggregate_Max_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Aggregate_Min_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -139,7 +183,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\036google/bigtable/v2/types.proto\022\022google" + ".bigtable.v2\032\037google/api/field_behavior." - + "proto\"\340\020\n\004Type\0224\n\nbytes_type\030\001 \001(\0132\036.goo" + + "proto\"\207\030\n\004Type\0224\n\nbytes_type\030\001 \001(\0132\036.goo" + "gle.bigtable.v2.Type.BytesH\000\0226\n\013string_t" + "ype\030\002 \001(\0132\037.google.bigtable.v2.Type.Stri" + "ngH\000\0224\n\nint64_type\030\005 \001(\0132\036.google.bigtab" @@ -156,48 +200,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.v2.Type.StructH\000\0224\n\narray_type\030\003 \001(\0132\036" + ".google.bigtable.v2.Type.ArrayH\000\0220\n\010map_" + "type\030\004 \001(\0132\034.google.bigtable.v2.Type.Map" - + "H\000\032\235\001\n\005Bytes\0229\n\010encoding\030\001 \001(\0132\'.google." - + "bigtable.v2.Type.Bytes.Encoding\032Y\n\010Encod" - + "ing\022:\n\003raw\030\001 \001(\0132+.google.bigtable.v2.Ty" - + "pe.Bytes.Encoding.RawH\000\032\005\n\003RawB\n\n\010encodi" - + "ng\032\215\002\n\006String\022:\n\010encoding\030\001 \001(\0132(.google" - + ".bigtable.v2.Type.String.Encoding\032\306\001\n\010En" - + "coding\022H\n\010utf8_raw\030\001 \001(\01320.google.bigtab" - + "le.v2.Type.String.Encoding.Utf8RawB\002\030\001H\000" - + "\022H\n\nutf8_bytes\030\002 \001(\01322.google.bigtable.v" - + "2.Type.String.Encoding.Utf8BytesH\000\032\r\n\007Ut" - + "f8Raw:\002\030\001\032\013\n\tUtf8BytesB\n\n\010encoding\032\365\001\n\005I" - + "nt64\0229\n\010encoding\030\001 \001(\0132\'.google.bigtable" - + ".v2.Type.Int64.Encoding\032\260\001\n\010Encoding\022R\n\020" - + "big_endian_bytes\030\001 \001(\01326.google.bigtable" - + ".v2.Type.Int64.Encoding.BigEndianBytesH\000" - + "\032D\n\016BigEndianBytes\0222\n\nbytes_type\030\001 \001(\0132\036" - + ".google.bigtable.v2.Type.BytesB\n\n\010encodi" - + "ng\032\006\n\004Bool\032\t\n\007Float32\032\t\n\007Float64\032\013\n\tTime" - + "stamp\032\006\n\004Date\032\204\001\n\006Struct\0225\n\006fields\030\001 \003(\013" - + "2%.google.bigtable.v2.Type.Struct.Field\032" - + "C\n\005Field\022\022\n\nfield_name\030\001 \001(\t\022&\n\004type\030\002 \001" - + "(\0132\030.google.bigtable.v2.Type\0327\n\005Array\022.\n" - + "\014element_type\030\001 \001(\0132\030.google.bigtable.v2" - + ".Type\032_\n\003Map\022*\n\010key_type\030\001 \001(\0132\030.google." - + "bigtable.v2.Type\022,\n\nvalue_type\030\002 \001(\0132\030.g" - + "oogle.bigtable.v2.Type\032\267\003\n\tAggregate\022,\n\n" - + "input_type\030\001 \001(\0132\030.google.bigtable.v2.Ty" - + "pe\0221\n\nstate_type\030\002 \001(\0132\030.google.bigtable" - + ".v2.TypeB\003\340A\003\0225\n\003sum\030\004 \001(\0132&.google.bigt" - + "able.v2.Type.Aggregate.SumH\000\022_\n\022hllpp_un" - + "ique_count\030\005 \001(\0132A.google.bigtable.v2.Ty" - + "pe.Aggregate.HyperLogLogPlusPlusUniqueCo" - + "untH\000\0225\n\003max\030\006 \001(\0132&.google.bigtable.v2." - + "Type.Aggregate.MaxH\000\0225\n\003min\030\007 \001(\0132&.goog" - + "le.bigtable.v2.Type.Aggregate.MinH\000\032\005\n\003S" - + "um\032\005\n\003Max\032\005\n\003Min\032 \n\036HyperLogLogPlusPlusU" - + "niqueCountB\014\n\naggregatorB\006\n\004kindB\264\001\n\026com" - + ".google.bigtable.v2B\nTypesProtoP\001Z8cloud" - + ".google.com/go/bigtable/apiv2/bigtablepb" - + ";bigtablepb\252\002\030Google.Cloud.Bigtable.V2\312\002" - + "\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::Clou" - + "d::Bigtable::V2b\006proto3" + + "H\000\0224\n\nproto_type\030\r \001(\0132\036.google.bigtable" + + ".v2.Type.ProtoH\000\0222\n\tenum_type\030\016 \001(\0132\035.go" + + "ogle.bigtable.v2.Type.EnumH\000\032\263\001\n\005Bytes\0229" + + "\n\010encoding\030\001 \001(\0132\'.google.bigtable.v2.Ty" + + "pe.Bytes.Encoding\032o\n\010Encoding\022:\n\003raw\030\001 \001" + + "(\0132+.google.bigtable.v2.Type.Bytes.Encod" + + "ing.RawH\000\032\033\n\003Raw\022\024\n\014escape_nulls\030\001 \001(\010B\n" + + "\n\010encoding\032\247\002\n\006String\022:\n\010encoding\030\001 \001(\0132" + + "(.google.bigtable.v2.Type.String.Encodin" + + "g\032\340\001\n\010Encoding\022H\n\010utf8_raw\030\001 \001(\01320.googl" + + "e.bigtable.v2.Type.String.Encoding.Utf8R" + + "awB\002\030\001H\000\022H\n\nutf8_bytes\030\002 \001(\01322.google.bi" + + "gtable.v2.Type.String.Encoding.Utf8Bytes" + + "H\000\032\r\n\007Utf8Raw:\002\030\001\032%\n\tUtf8Bytes\022\030\n\020null_e" + + "scape_char\030\001 \001(\tB\n\n\010encoding\032\345\002\n\005Int64\0229" + + "\n\010encoding\030\001 \001(\0132\'.google.bigtable.v2.Ty" + + "pe.Int64.Encoding\032\240\002\n\010Encoding\022R\n\020big_en" + + "dian_bytes\030\001 \001(\01326.google.bigtable.v2.Ty" + + "pe.Int64.Encoding.BigEndianBytesH\000\022V\n\022or" + + "dered_code_bytes\030\002 \001(\01328.google.bigtable" + + ".v2.Type.Int64.Encoding.OrderedCodeBytes" + + "H\000\032H\n\016BigEndianBytes\0226\n\nbytes_type\030\001 \001(\013" + + "2\036.google.bigtable.v2.Type.BytesB\002\030\001\032\022\n\020" + + "OrderedCodeBytesB\n\n\010encoding\032\006\n\004Bool\032\t\n\007" + + "Float32\032\t\n\007Float64\032\250\001\n\tTimestamp\022=\n\010enco" + + "ding\030\001 \001(\0132+.google.bigtable.v2.Type.Tim" + + "estamp.Encoding\032\\\n\010Encoding\022D\n\021unix_micr" + + "os_int64\030\001 \001(\0132\'.google.bigtable.v2.Type" + + ".Int64.EncodingH\000B\n\n\010encoding\032\006\n\004Date\032\225\004" + + "\n\006Struct\0225\n\006fields\030\001 \003(\0132%.google.bigtab" + + "le.v2.Type.Struct.Field\022:\n\010encoding\030\002 \001(" + + "\0132(.google.bigtable.v2.Type.Struct.Encod" + + "ing\032C\n\005Field\022\022\n\nfield_name\030\001 \001(\t\022&\n\004type" + + "\030\002 \001(\0132\030.google.bigtable.v2.Type\032\322\002\n\010Enc" + + "oding\022G\n\tsingleton\030\001 \001(\01322.google.bigtab" + + "le.v2.Type.Struct.Encoding.SingletonH\000\022R" + + "\n\017delimited_bytes\030\002 \001(\01327.google.bigtabl" + + "e.v2.Type.Struct.Encoding.DelimitedBytes" + + "H\000\022W\n\022ordered_code_bytes\030\003 \001(\01329.google." + + "bigtable.v2.Type.Struct.Encoding.Ordered" + + "CodeBytesH\000\032\013\n\tSingleton\032#\n\016DelimitedByt" + + "es\022\021\n\tdelimiter\030\001 \001(\014\032\022\n\020OrderedCodeByte" + + "sB\n\n\010encoding\0327\n\005Proto\022\030\n\020schema_bundle_" + + "id\030\001 \001(\t\022\024\n\014message_name\030\002 \001(\t\0323\n\004Enum\022\030" + + "\n\020schema_bundle_id\030\001 \001(\t\022\021\n\tenum_name\030\002 " + + "\001(\t\0327\n\005Array\022.\n\014element_type\030\001 \001(\0132\030.goo" + + "gle.bigtable.v2.Type\032_\n\003Map\022*\n\010key_type\030" + + "\001 \001(\0132\030.google.bigtable.v2.Type\022,\n\nvalue" + + "_type\030\002 \001(\0132\030.google.bigtable.v2.Type\032\267\003" + + "\n\tAggregate\022,\n\ninput_type\030\001 \001(\0132\030.google" + + ".bigtable.v2.Type\0221\n\nstate_type\030\002 \001(\0132\030." + + "google.bigtable.v2.TypeB\003\340A\003\0225\n\003sum\030\004 \001(" + + "\0132&.google.bigtable.v2.Type.Aggregate.Su" + + "mH\000\022_\n\022hllpp_unique_count\030\005 \001(\0132A.google" + + ".bigtable.v2.Type.Aggregate.HyperLogLogP" + + "lusPlusUniqueCountH\000\0225\n\003max\030\006 \001(\0132&.goog" + + "le.bigtable.v2.Type.Aggregate.MaxH\000\0225\n\003m" + + "in\030\007 \001(\0132&.google.bigtable.v2.Type.Aggre" + + "gate.MinH\000\032\005\n\003Sum\032\005\n\003Max\032\005\n\003Min\032 \n\036Hyper" + + "LogLogPlusPlusUniqueCountB\014\n\naggregatorB" + + "\006\n\004kindB\264\001\n\026com.google.bigtable.v2B\nType" + + "sProtoP\001Z8cloud.google.com/go/bigtable/a" + + "piv2/bigtablepb;bigtablepb\252\002\030Google.Clou" + + "d.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2" + + "\352\002\033Google::Cloud::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -205,9 +272,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), }); - internal_static_google_bigtable_v2_Type_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_v2_Type_descriptor = getDescriptor().getMessageType(0); internal_static_google_bigtable_v2_Type_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_descriptor, new java.lang.String[] { "BytesType", @@ -222,178 +289,245 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StructType", "ArrayType", "MapType", + "ProtoType", + "EnumType", "Kind", }); internal_static_google_bigtable_v2_Type_Bytes_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Bytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Bytes_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor = - internal_static_google_bigtable_v2_Type_Bytes_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Bytes_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Bytes_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor, new java.lang.String[] { "Raw", "Encoding", }); internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_descriptor = - internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Bytes_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Bytes_Encoding_Raw_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "EscapeNulls", + }); internal_static_google_bigtable_v2_Type_String_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(1); internal_static_google_bigtable_v2_Type_String_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_String_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_v2_Type_String_Encoding_descriptor = - internal_static_google_bigtable_v2_Type_String_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_String_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_String_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_String_Encoding_descriptor, new java.lang.String[] { "Utf8Raw", "Utf8Bytes", "Encoding", }); internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_descriptor = - internal_static_google_bigtable_v2_Type_String_Encoding_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_String_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Raw_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor = - internal_static_google_bigtable_v2_Type_String_Encoding_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_Type_String_Encoding_descriptor.getNestedType(1); internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_String_Encoding_Utf8Bytes_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "NullEscapeChar", + }); internal_static_google_bigtable_v2_Type_Int64_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(2); internal_static_google_bigtable_v2_Type_Int64_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Int64_descriptor, new java.lang.String[] { "Encoding", }); internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor = - internal_static_google_bigtable_v2_Type_Int64_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Int64_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Int64_Encoding_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor, new java.lang.String[] { - "BigEndianBytes", "Encoding", + "BigEndianBytes", "OrderedCodeBytes", "Encoding", }); internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_descriptor = - internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Int64_Encoding_BigEndianBytes_descriptor, new java.lang.String[] { "BytesType", }); + internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor = + internal_static_google_bigtable_v2_Type_Int64_Encoding_descriptor.getNestedType(1); + internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Int64_Encoding_OrderedCodeBytes_descriptor, + new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Bool_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(3); internal_static_google_bigtable_v2_Type_Bool_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Bool_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Float32_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(4); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(4); internal_static_google_bigtable_v2_Type_Float32_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Float32_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Float64_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(5); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(5); internal_static_google_bigtable_v2_Type_Float64_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Float64_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Timestamp_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(6); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(6); internal_static_google_bigtable_v2_Type_Timestamp_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Timestamp_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "Encoding", + }); + internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor = + internal_static_google_bigtable_v2_Type_Timestamp_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_Type_Timestamp_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Timestamp_Encoding_descriptor, + new java.lang.String[] { + "UnixMicrosInt64", "Encoding", + }); internal_static_google_bigtable_v2_Type_Date_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(7); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(7); internal_static_google_bigtable_v2_Type_Date_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Date_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Struct_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(8); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(8); internal_static_google_bigtable_v2_Type_Struct_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Struct_descriptor, new java.lang.String[] { - "Fields", + "Fields", "Encoding", }); internal_static_google_bigtable_v2_Type_Struct_Field_descriptor = - internal_static_google_bigtable_v2_Type_Struct_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Struct_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Struct_Field_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Struct_Field_descriptor, new java.lang.String[] { "FieldName", "Type", }); + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor = + internal_static_google_bigtable_v2_Type_Struct_descriptor.getNestedType(1); + internal_static_google_bigtable_v2_Type_Struct_Encoding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor, + new java.lang.String[] { + "Singleton", "DelimitedBytes", "OrderedCodeBytes", "Encoding", + }); + internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor = + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor.getNestedType(0); + internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_Encoding_Singleton_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor = + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor.getNestedType(1); + internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_Encoding_DelimitedBytes_descriptor, + new java.lang.String[] { + "Delimiter", + }); + internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor = + internal_static_google_bigtable_v2_Type_Struct_Encoding_descriptor.getNestedType(2); + internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Struct_Encoding_OrderedCodeBytes_descriptor, + new java.lang.String[] {}); + internal_static_google_bigtable_v2_Type_Proto_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(9); + internal_static_google_bigtable_v2_Type_Proto_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Proto_descriptor, + new java.lang.String[] { + "SchemaBundleId", "MessageName", + }); + internal_static_google_bigtable_v2_Type_Enum_descriptor = + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(10); + internal_static_google_bigtable_v2_Type_Enum_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_bigtable_v2_Type_Enum_descriptor, + new java.lang.String[] { + "SchemaBundleId", "EnumName", + }); internal_static_google_bigtable_v2_Type_Array_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(9); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(11); internal_static_google_bigtable_v2_Type_Array_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Array_descriptor, new java.lang.String[] { "ElementType", }); internal_static_google_bigtable_v2_Type_Map_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(10); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(12); internal_static_google_bigtable_v2_Type_Map_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Map_descriptor, new java.lang.String[] { "KeyType", "ValueType", }); internal_static_google_bigtable_v2_Type_Aggregate_descriptor = - internal_static_google_bigtable_v2_Type_descriptor.getNestedTypes().get(11); + internal_static_google_bigtable_v2_Type_descriptor.getNestedType(13); internal_static_google_bigtable_v2_Type_Aggregate_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Aggregate_descriptor, new java.lang.String[] { "InputType", "StateType", "Sum", "HllppUniqueCount", "Max", "Min", "Aggregator", }); internal_static_google_bigtable_v2_Type_Aggregate_Sum_descriptor = - internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedTypes().get(0); + internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedType(0); internal_static_google_bigtable_v2_Type_Aggregate_Sum_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Aggregate_Sum_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Aggregate_Max_descriptor = - internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedTypes().get(1); + internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedType(1); internal_static_google_bigtable_v2_Type_Aggregate_Max_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Aggregate_Max_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Aggregate_Min_descriptor = - internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedTypes().get(2); + internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedType(2); internal_static_google_bigtable_v2_Type_Aggregate_Min_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Aggregate_Min_descriptor, new java.lang.String[] {}); internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor = - internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedTypes().get(3); + internal_static_google_bigtable_v2_Type_Aggregate_descriptor.getNestedType(3); internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_bigtable_v2_Type_Aggregate_HyperLogLogPlusPlusUniqueCount_descriptor, new java.lang.String[] {}); + 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-bigtable-v2/src/main/java/com/google/bigtable/v2/Value.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Value.java index 7883882ca4..060b7ea61e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Value.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Value.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -31,30 +32,36 @@ * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Value_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Value_fieldAccessorTable @@ -88,6 +95,7 @@ public enum KindCase private KindCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -138,6 +146,7 @@ public KindCase getKindCase() { public static final int TYPE_FIELD_NUMBER = 7; private com.google.bigtable.v2.Type type_; + /** * * @@ -165,6 +174,7 @@ public KindCase getKindCase() { public boolean hasType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -192,6 +202,7 @@ public boolean hasType() { public com.google.bigtable.v2.Type getType() { return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; } + /** * * @@ -219,6 +230,7 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { } public static final int RAW_VALUE_FIELD_NUMBER = 8; + /** * * @@ -235,6 +247,7 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { public boolean hasRawValue() { return kindCase_ == 8; } + /** * * @@ -256,6 +269,7 @@ public com.google.protobuf.ByteString getRawValue() { } public static final int RAW_TIMESTAMP_MICROS_FIELD_NUMBER = 9; + /** * * @@ -272,6 +286,7 @@ public com.google.protobuf.ByteString getRawValue() { public boolean hasRawTimestampMicros() { return kindCase_ == 9; } + /** * * @@ -293,6 +308,7 @@ public long getRawTimestampMicros() { } public static final int BYTES_VALUE_FIELD_NUMBER = 2; + /** * * @@ -308,6 +324,7 @@ public long getRawTimestampMicros() { public boolean hasBytesValue() { return kindCase_ == 2; } + /** * * @@ -328,6 +345,7 @@ public com.google.protobuf.ByteString getBytesValue() { } public static final int STRING_VALUE_FIELD_NUMBER = 3; + /** * * @@ -342,6 +360,7 @@ public com.google.protobuf.ByteString getBytesValue() { public boolean hasStringValue() { return kindCase_ == 3; } + /** * * @@ -369,6 +388,7 @@ public java.lang.String getStringValue() { return s; } } + /** * * @@ -398,6 +418,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { } public static final int INT_VALUE_FIELD_NUMBER = 6; + /** * * @@ -413,6 +434,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { public boolean hasIntValue() { return kindCase_ == 6; } + /** * * @@ -433,6 +455,7 @@ public long getIntValue() { } public static final int BOOL_VALUE_FIELD_NUMBER = 10; + /** * * @@ -448,6 +471,7 @@ public long getIntValue() { public boolean hasBoolValue() { return kindCase_ == 10; } + /** * * @@ -468,11 +492,13 @@ public boolean getBoolValue() { } public static final int FLOAT_VALUE_FIELD_NUMBER = 11; + /** * * *
        * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
        * 
    * * double float_value = 11; @@ -483,11 +509,13 @@ public boolean getBoolValue() { public boolean hasFloatValue() { return kindCase_ == 11; } + /** * * *
        * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
        * 
    * * double float_value = 11; @@ -503,6 +531,7 @@ public double getFloatValue() { } public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 12; + /** * * @@ -518,6 +547,7 @@ public double getFloatValue() { public boolean hasTimestampValue() { return kindCase_ == 12; } + /** * * @@ -536,6 +566,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { } return com.google.protobuf.Timestamp.getDefaultInstance(); } + /** * * @@ -554,6 +585,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { } public static final int DATE_VALUE_FIELD_NUMBER = 13; + /** * * @@ -569,6 +601,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { public boolean hasDateValue() { return kindCase_ == 13; } + /** * * @@ -587,6 +620,7 @@ public com.google.type.Date getDateValue() { } return com.google.type.Date.getDefaultInstance(); } + /** * * @@ -605,6 +639,7 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { } public static final int ARRAY_VALUE_FIELD_NUMBER = 4; + /** * * @@ -624,6 +659,7 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { public boolean hasArrayValue() { return kindCase_ == 4; } + /** * * @@ -646,6 +682,7 @@ public com.google.bigtable.v2.ArrayValue getArrayValue() { } return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); } + /** * * @@ -685,7 +722,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeBytes(2, (com.google.protobuf.ByteString) kind_); } if (kindCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kind_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, kind_); } if (kindCase_ == 4) { output.writeMessage(4, (com.google.bigtable.v2.ArrayValue) kind_); @@ -729,7 +766,7 @@ public int getSerializedSize() { 2, (com.google.protobuf.ByteString) kind_); } if (kindCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kind_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, kind_); } if (kindCase_ == 4) { size += @@ -932,38 +969,38 @@ public static com.google.bigtable.v2.Value parseFrom( public static com.google.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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.bigtable.v2.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); } @@ -986,10 +1023,11 @@ 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; } + /** * * @@ -1002,7 +1040,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.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.bigtable.v2.Value) com.google.bigtable.v2.ValueOrBuilder { @@ -1011,7 +1049,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Value_fieldAccessorTable @@ -1024,14 +1062,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(); } } @@ -1112,39 +1150,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.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.bigtable.v2.Value) { @@ -1259,7 +1264,8 @@ public Builder mergeFrom( } // case 26 case 34: { - input.readMessage(getArrayValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetArrayValueFieldBuilder().getBuilder(), extensionRegistry); kindCase_ = 4; break; } // case 34 @@ -1271,7 +1277,7 @@ public Builder mergeFrom( } // case 48 case 58: { - input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage(internalGetTypeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 58 @@ -1301,13 +1307,15 @@ public Builder mergeFrom( } // case 89 case 98: { - input.readMessage(getTimestampValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetTimestampValueFieldBuilder().getBuilder(), extensionRegistry); kindCase_ = 12; break; } // case 98 case 106: { - input.readMessage(getDateValueFieldBuilder().getBuilder(), extensionRegistry); + input.readMessage( + internalGetDateValueFieldBuilder().getBuilder(), extensionRegistry); kindCase_ = 13; break; } // case 106 @@ -1345,11 +1353,12 @@ public Builder clearKind() { private int bitField0_; private com.google.bigtable.v2.Type type_; - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> typeBuilder_; + /** * * @@ -1376,6 +1385,7 @@ public Builder clearKind() { public boolean hasType() { return ((bitField0_ & 0x00000001) != 0); } + /** * * @@ -1406,6 +1416,7 @@ public com.google.bigtable.v2.Type getType() { return typeBuilder_.getMessage(); } } + /** * * @@ -1440,6 +1451,7 @@ public Builder setType(com.google.bigtable.v2.Type value) { onChanged(); return this; } + /** * * @@ -1471,6 +1483,7 @@ public Builder setType(com.google.bigtable.v2.Type.Builder builderForValue) { onChanged(); return this; } + /** * * @@ -1510,6 +1523,7 @@ public Builder mergeType(com.google.bigtable.v2.Type value) { } return this; } + /** * * @@ -1541,6 +1555,7 @@ public Builder clearType() { onChanged(); return this; } + /** * * @@ -1565,8 +1580,9 @@ public Builder clearType() { public com.google.bigtable.v2.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return internalGetTypeFieldBuilder().getBuilder(); } + /** * * @@ -1595,6 +1611,7 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { return type_ == null ? com.google.bigtable.v2.Type.getDefaultInstance() : type_; } } + /** * * @@ -1616,14 +1633,14 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { * * .google.bigtable.v2.Type type = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder> - getTypeFieldBuilder() { + internalGetTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.Type, com.google.bigtable.v2.Type.Builder, com.google.bigtable.v2.TypeOrBuilder>(getType(), getParentForChildren(), isClean()); @@ -1647,6 +1664,7 @@ public com.google.bigtable.v2.TypeOrBuilder getTypeOrBuilder() { public boolean hasRawValue() { return kindCase_ == 8; } + /** * * @@ -1665,6 +1683,7 @@ public com.google.protobuf.ByteString getRawValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1687,6 +1706,7 @@ public Builder setRawValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1723,6 +1743,7 @@ public Builder clearRawValue() { public boolean hasRawTimestampMicros() { return kindCase_ == 9; } + /** * * @@ -1741,6 +1762,7 @@ public long getRawTimestampMicros() { } return 0L; } + /** * * @@ -1761,6 +1783,7 @@ public Builder setRawTimestampMicros(long value) { onChanged(); return this; } + /** * * @@ -1796,6 +1819,7 @@ public Builder clearRawTimestampMicros() { public boolean hasBytesValue() { return kindCase_ == 2; } + /** * * @@ -1813,6 +1837,7 @@ public com.google.protobuf.ByteString getBytesValue() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1834,6 +1859,7 @@ public Builder setBytesValue(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1869,6 +1895,7 @@ public Builder clearBytesValue() { public boolean hasStringValue() { return kindCase_ == 3; } + /** * * @@ -1897,6 +1924,7 @@ public java.lang.String getStringValue() { return (java.lang.String) ref; } } + /** * * @@ -1925,6 +1953,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { return (com.google.protobuf.ByteString) ref; } } + /** * * @@ -1946,6 +1975,7 @@ public Builder setStringValue(java.lang.String value) { onChanged(); return this; } + /** * * @@ -1965,6 +1995,7 @@ public Builder clearStringValue() { } return this; } + /** * * @@ -2002,6 +2033,7 @@ public Builder setStringValueBytes(com.google.protobuf.ByteString value) { public boolean hasIntValue() { return kindCase_ == 6; } + /** * * @@ -2019,6 +2051,7 @@ public long getIntValue() { } return 0L; } + /** * * @@ -2038,6 +2071,7 @@ public Builder setIntValue(long value) { onChanged(); return this; } + /** * * @@ -2072,6 +2106,7 @@ public Builder clearIntValue() { public boolean hasBoolValue() { return kindCase_ == 10; } + /** * * @@ -2089,6 +2124,7 @@ public boolean getBoolValue() { } return false; } + /** * * @@ -2108,6 +2144,7 @@ public Builder setBoolValue(boolean value) { onChanged(); return this; } + /** * * @@ -2133,6 +2170,7 @@ public Builder clearBoolValue() { * *
          * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
          * 
    * * double float_value = 11; @@ -2142,11 +2180,13 @@ public Builder clearBoolValue() { public boolean hasFloatValue() { return kindCase_ == 11; } + /** * * *
          * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
          * 
    * * double float_value = 11; @@ -2159,11 +2199,13 @@ public double getFloatValue() { } return 0D; } + /** * * *
          * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
          * 
    * * double float_value = 11; @@ -2178,11 +2220,13 @@ public Builder setFloatValue(double value) { onChanged(); return this; } + /** * * *
          * Represents a typed value transported as a floating point number.
    +     * Does not support NaN or infinities.
          * 
    * * double float_value = 11; @@ -2198,11 +2242,12 @@ public Builder clearFloatValue() { 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> timestampValueBuilder_; + /** * * @@ -2218,6 +2263,7 @@ public Builder clearFloatValue() { public boolean hasTimestampValue() { return kindCase_ == 12; } + /** * * @@ -2243,6 +2289,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -2265,6 +2312,7 @@ public Builder setTimestampValue(com.google.protobuf.Timestamp value) { kindCase_ = 12; return this; } + /** * * @@ -2284,6 +2332,7 @@ public Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderFo kindCase_ = 12; return this; } + /** * * @@ -2314,6 +2363,7 @@ public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { kindCase_ = 12; return this; } + /** * * @@ -2339,6 +2389,7 @@ public Builder clearTimestampValue() { } return this; } + /** * * @@ -2349,8 +2400,9 @@ public Builder clearTimestampValue() { * .google.protobuf.Timestamp timestamp_value = 12; */ public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { - return getTimestampValueFieldBuilder().getBuilder(); + return internalGetTimestampValueFieldBuilder().getBuilder(); } + /** * * @@ -2371,6 +2423,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { return com.google.protobuf.Timestamp.getDefaultInstance(); } } + /** * * @@ -2380,17 +2433,17 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { * * .google.protobuf.Timestamp timestamp_value = 12; */ - 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 (!(kindCase_ == 12)) { kind_ = 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>( @@ -2402,9 +2455,10 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { return timestampValueBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> dateValueBuilder_; + /** * * @@ -2420,6 +2474,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { public boolean hasDateValue() { return kindCase_ == 13; } + /** * * @@ -2445,6 +2500,7 @@ public com.google.type.Date getDateValue() { return com.google.type.Date.getDefaultInstance(); } } + /** * * @@ -2467,6 +2523,7 @@ public Builder setDateValue(com.google.type.Date value) { kindCase_ = 13; return this; } + /** * * @@ -2486,6 +2543,7 @@ public Builder setDateValue(com.google.type.Date.Builder builderForValue) { kindCase_ = 13; return this; } + /** * * @@ -2516,6 +2574,7 @@ public Builder mergeDateValue(com.google.type.Date value) { kindCase_ = 13; return this; } + /** * * @@ -2541,6 +2600,7 @@ public Builder clearDateValue() { } return this; } + /** * * @@ -2551,8 +2611,9 @@ public Builder clearDateValue() { * .google.type.Date date_value = 13; */ public com.google.type.Date.Builder getDateValueBuilder() { - return getDateValueFieldBuilder().getBuilder(); + return internalGetDateValueFieldBuilder().getBuilder(); } + /** * * @@ -2573,6 +2634,7 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { return com.google.type.Date.getDefaultInstance(); } } + /** * * @@ -2582,15 +2644,15 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { * * .google.type.Date date_value = 13; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getDateValueFieldBuilder() { + internalGetDateValueFieldBuilder() { if (dateValueBuilder_ == null) { if (!(kindCase_ == 13)) { kind_ = com.google.type.Date.getDefaultInstance(); } dateValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( (com.google.type.Date) kind_, getParentForChildren(), isClean()); kind_ = null; @@ -2600,11 +2662,12 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { return dateValueBuilder_; } - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ArrayValue, com.google.bigtable.v2.ArrayValue.Builder, com.google.bigtable.v2.ArrayValueOrBuilder> arrayValueBuilder_; + /** * * @@ -2624,6 +2687,7 @@ public com.google.type.DateOrBuilder getDateValueOrBuilder() { public boolean hasArrayValue() { return kindCase_ == 4; } + /** * * @@ -2653,6 +2717,7 @@ public com.google.bigtable.v2.ArrayValue getArrayValue() { return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); } } + /** * * @@ -2679,6 +2744,7 @@ public Builder setArrayValue(com.google.bigtable.v2.ArrayValue value) { kindCase_ = 4; return this; } + /** * * @@ -2702,6 +2768,7 @@ public Builder setArrayValue(com.google.bigtable.v2.ArrayValue.Builder builderFo kindCase_ = 4; return this; } + /** * * @@ -2737,6 +2804,7 @@ public Builder mergeArrayValue(com.google.bigtable.v2.ArrayValue value) { kindCase_ = 4; return this; } + /** * * @@ -2766,6 +2834,7 @@ public Builder clearArrayValue() { } return this; } + /** * * @@ -2780,8 +2849,9 @@ public Builder clearArrayValue() { * .google.bigtable.v2.ArrayValue array_value = 4; */ public com.google.bigtable.v2.ArrayValue.Builder getArrayValueBuilder() { - return getArrayValueFieldBuilder().getBuilder(); + return internalGetArrayValueFieldBuilder().getBuilder(); } + /** * * @@ -2806,6 +2876,7 @@ public com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder() { return com.google.bigtable.v2.ArrayValue.getDefaultInstance(); } } + /** * * @@ -2819,17 +2890,17 @@ public com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder() { * * .google.bigtable.v2.ArrayValue array_value = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ArrayValue, com.google.bigtable.v2.ArrayValue.Builder, com.google.bigtable.v2.ArrayValueOrBuilder> - getArrayValueFieldBuilder() { + internalGetArrayValueFieldBuilder() { if (arrayValueBuilder_ == null) { if (!(kindCase_ == 4)) { kind_ = com.google.bigtable.v2.ArrayValue.getDefaultInstance(); } arrayValueBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< + new com.google.protobuf.SingleFieldBuilder< com.google.bigtable.v2.ArrayValue, com.google.bigtable.v2.ArrayValue.Builder, com.google.bigtable.v2.ArrayValueOrBuilder>( @@ -2841,17 +2912,6 @@ public com.google.bigtable.v2.ArrayValueOrBuilder getArrayValueOrBuilder() { return arrayValueBuilder_; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.Value) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueOrBuilder.java index 32593579ed..be294593e7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ValueOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.Value) @@ -48,6 +50,7 @@ public interface ValueOrBuilder * @return Whether the type field is set. */ boolean hasType(); + /** * * @@ -72,6 +75,7 @@ public interface ValueOrBuilder * @return The type. */ com.google.bigtable.v2.Type getType(); + /** * * @@ -108,6 +112,7 @@ public interface ValueOrBuilder * @return Whether the rawValue field is set. */ boolean hasRawValue(); + /** * * @@ -135,6 +140,7 @@ public interface ValueOrBuilder * @return Whether the rawTimestampMicros field is set. */ boolean hasRawTimestampMicros(); + /** * * @@ -161,6 +167,7 @@ public interface ValueOrBuilder * @return Whether the bytesValue field is set. */ boolean hasBytesValue(); + /** * * @@ -186,6 +193,7 @@ public interface ValueOrBuilder * @return Whether the stringValue field is set. */ boolean hasStringValue(); + /** * * @@ -198,6 +206,7 @@ public interface ValueOrBuilder * @return The stringValue. */ java.lang.String getStringValue(); + /** * * @@ -223,6 +232,7 @@ public interface ValueOrBuilder * @return Whether the intValue field is set. */ boolean hasIntValue(); + /** * * @@ -248,6 +258,7 @@ public interface ValueOrBuilder * @return Whether the boolValue field is set. */ boolean hasBoolValue(); + /** * * @@ -266,6 +277,7 @@ public interface ValueOrBuilder * *
        * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
        * 
    * * double float_value = 11; @@ -273,11 +285,13 @@ public interface ValueOrBuilder * @return Whether the floatValue field is set. */ boolean hasFloatValue(); + /** * * *
        * Represents a typed value transported as a floating point number.
    +   * Does not support NaN or infinities.
        * 
    * * double float_value = 11; @@ -298,6 +312,7 @@ public interface ValueOrBuilder * @return Whether the timestampValue field is set. */ boolean hasTimestampValue(); + /** * * @@ -310,6 +325,7 @@ public interface ValueOrBuilder * @return The timestampValue. */ com.google.protobuf.Timestamp getTimestampValue(); + /** * * @@ -333,6 +349,7 @@ public interface ValueOrBuilder * @return Whether the dateValue field is set. */ boolean hasDateValue(); + /** * * @@ -345,6 +362,7 @@ public interface ValueOrBuilder * @return The dateValue. */ com.google.type.Date getDateValue(); + /** * * @@ -372,6 +390,7 @@ public interface ValueOrBuilder * @return Whether the arrayValue field is set. */ boolean hasArrayValue(); + /** * * @@ -388,6 +407,7 @@ public interface ValueOrBuilder * @return The arrayValue. */ com.google.bigtable.v2.ArrayValue getArrayValue(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java index 0055351652..ae3f11b4f9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; /** @@ -28,31 +29,37 @@ * * Protobuf type {@code google.bigtable.v2.ValueRange} */ -public final class ValueRange extends com.google.protobuf.GeneratedMessageV3 +@com.google.protobuf.Generated +public final class ValueRange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:google.bigtable.v2.ValueRange) ValueRangeOrBuilder { private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ValueRange"); + } + // Use ValueRange.newBuilder() to construct. - private ValueRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ValueRange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ValueRange() {} - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValueRange(); - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ValueRange_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ValueRange_fieldAccessorTable @@ -78,6 +85,7 @@ public enum StartValueCase private StartValueCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -127,6 +135,7 @@ public enum EndValueCase private EndValueCase(int value) { this.value = value; } + /** * @param value The number of the enum to look for. * @return The enum associated with the given number. @@ -160,6 +169,7 @@ public EndValueCase getEndValueCase() { } public static final int START_VALUE_CLOSED_FIELD_NUMBER = 1; + /** * * @@ -175,6 +185,7 @@ public EndValueCase getEndValueCase() { public boolean hasStartValueClosed() { return startValueCase_ == 1; } + /** * * @@ -195,6 +206,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { } public static final int START_VALUE_OPEN_FIELD_NUMBER = 2; + /** * * @@ -210,6 +222,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { public boolean hasStartValueOpen() { return startValueCase_ == 2; } + /** * * @@ -230,6 +243,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { } public static final int END_VALUE_CLOSED_FIELD_NUMBER = 3; + /** * * @@ -245,6 +259,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { public boolean hasEndValueClosed() { return endValueCase_ == 3; } + /** * * @@ -265,6 +280,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { } public static final int END_VALUE_OPEN_FIELD_NUMBER = 4; + /** * * @@ -280,6 +296,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { public boolean hasEndValueOpen() { return endValueCase_ == 4; } + /** * * @@ -467,38 +484,38 @@ public static com.google.bigtable.v2.ValueRange parseFrom( public static com.google.bigtable.v2.ValueRange 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.bigtable.v2.ValueRange 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.bigtable.v2.ValueRange 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.bigtable.v2.ValueRange 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.bigtable.v2.ValueRange 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.bigtable.v2.ValueRange 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,10 +538,11 @@ 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; } + /** * * @@ -534,7 +552,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * Protobuf type {@code google.bigtable.v2.ValueRange} */ - 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.bigtable.v2.ValueRange) com.google.bigtable.v2.ValueRangeOrBuilder { @@ -544,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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ValueRange_fieldAccessorTable @@ -556,7 +574,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using com.google.bigtable.v2.ValueRange.newBuilder() private Builder() {} - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); } @@ -613,39 +631,6 @@ private void buildPartialOneofs(com.google.bigtable.v2.ValueRange result) { result.endValue_ = this.endValue_; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.v2.ValueRange) { @@ -801,6 +786,7 @@ public Builder clearEndValue() { public boolean hasStartValueClosed() { return startValueCase_ == 1; } + /** * * @@ -818,6 +804,7 @@ public com.google.protobuf.ByteString getStartValueClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -839,6 +826,7 @@ public Builder setStartValueClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -873,6 +861,7 @@ public Builder clearStartValueClosed() { public boolean hasStartValueOpen() { return startValueCase_ == 2; } + /** * * @@ -890,6 +879,7 @@ public com.google.protobuf.ByteString getStartValueOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -911,6 +901,7 @@ public Builder setStartValueOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -945,6 +936,7 @@ public Builder clearStartValueOpen() { public boolean hasEndValueClosed() { return endValueCase_ == 3; } + /** * * @@ -962,6 +954,7 @@ public com.google.protobuf.ByteString getEndValueClosed() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -983,6 +976,7 @@ public Builder setEndValueClosed(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1017,6 +1011,7 @@ public Builder clearEndValueClosed() { public boolean hasEndValueOpen() { return endValueCase_ == 4; } + /** * * @@ -1034,6 +1029,7 @@ public com.google.protobuf.ByteString getEndValueOpen() { } return com.google.protobuf.ByteString.EMPTY; } + /** * * @@ -1055,6 +1051,7 @@ public Builder setEndValueOpen(com.google.protobuf.ByteString value) { onChanged(); return this; } + /** * * @@ -1075,17 +1072,6 @@ public Builder clearEndValueOpen() { 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.bigtable.v2.ValueRange) } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRangeOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRangeOrBuilder.java index 1be71017db..3576fd1187 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRangeOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRangeOrBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2026 Google 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/bigtable/v2/data.proto +// Protobuf Java Version: 4.33.2 -// Protobuf Java Version: 3.25.3 package com.google.bigtable.v2; +@com.google.protobuf.Generated public interface ValueRangeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ValueRange) @@ -36,6 +38,7 @@ public interface ValueRangeOrBuilder * @return Whether the startValueClosed field is set. */ boolean hasStartValueClosed(); + /** * * @@ -61,6 +64,7 @@ public interface ValueRangeOrBuilder * @return Whether the startValueOpen field is set. */ boolean hasStartValueOpen(); + /** * * @@ -86,6 +90,7 @@ public interface ValueRangeOrBuilder * @return Whether the endValueClosed field is set. */ boolean hasEndValueClosed(); + /** * * @@ -111,6 +116,7 @@ public interface ValueRangeOrBuilder * @return Whether the endValueOpen field is set. */ boolean hasEndValueOpen(); + /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequest.java new file mode 100644 index 0000000000..da34767643 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequest.java @@ -0,0 +1,2298 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcRequest} + */ +@com.google.protobuf.Generated +public final class VirtualRpcRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.VirtualRpcRequest) + VirtualRpcRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VirtualRpcRequest"); + } + + // Use VirtualRpcRequest.newBuilder() to construct. + private VirtualRpcRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VirtualRpcRequest() { + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcRequest.class, + com.google.bigtable.v2.VirtualRpcRequest.Builder.class); + } + + public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.VirtualRpcRequest.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +     * Track retry attempts for this vRPC at the AFE.
    +     * 
    + * + * int64 attempt_number = 1; + * + * @return The attemptNumber. + */ + long getAttemptNumber(); + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return Whether the attemptStart field is set. + */ + boolean hasAttemptStart(); + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return The attemptStart. + */ + com.google.protobuf.Timestamp getAttemptStart(); + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + com.google.protobuf.TimestampOrBuilder getAttemptStartOrBuilder(); + + /** + * + * + *
    +     * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +     * attempts together for the same logical operation (e.g. in logs / traces).
    +     *
    +     * Note, this may not be needed for V1, TBD.
    +     * 
    + * + * string traceparent = 3; + * + * @return The traceparent. + */ + java.lang.String getTraceparent(); + + /** + * + * + *
    +     * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +     * attempts together for the same logical operation (e.g. in logs / traces).
    +     *
    +     * Note, this may not be needed for V1, TBD.
    +     * 
    + * + * string traceparent = 3; + * + * @return The bytes for traceparent. + */ + com.google.protobuf.ByteString getTraceparentBytes(); + } + + /** + * + * + *
    +   * Container for all vRPC Metadata.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcRequest.Metadata} + */ + public static final class Metadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.VirtualRpcRequest.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Metadata"); + } + + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Metadata() { + traceparent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcRequest.Metadata.class, + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder.class); + } + + private int bitField0_; + public static final int ATTEMPT_NUMBER_FIELD_NUMBER = 1; + private long attemptNumber_ = 0L; + + /** + * + * + *
    +     * Track retry attempts for this vRPC at the AFE.
    +     * 
    + * + * int64 attempt_number = 1; + * + * @return The attemptNumber. + */ + @java.lang.Override + public long getAttemptNumber() { + return attemptNumber_; + } + + public static final int ATTEMPT_START_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp attemptStart_; + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return Whether the attemptStart field is set. + */ + @java.lang.Override + public boolean hasAttemptStart() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return The attemptStart. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAttemptStart() { + return attemptStart_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : attemptStart_; + } + + /** + * + * + *
    +     * Track the client's known start time for the attempt. This is likely not
    +     * easily compared with the server's time due to clock skew.
    +     * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAttemptStartOrBuilder() { + return attemptStart_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : attemptStart_; + } + + public static final int TRACEPARENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceparent_ = ""; + + /** + * + * + *
    +     * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +     * attempts together for the same logical operation (e.g. in logs / traces).
    +     *
    +     * Note, this may not be needed for V1, TBD.
    +     * 
    + * + * string traceparent = 3; + * + * @return The traceparent. + */ + @java.lang.Override + public java.lang.String getTraceparent() { + java.lang.Object ref = traceparent_; + 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(); + traceparent_ = s; + return s; + } + } + + /** + * + * + *
    +     * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +     * attempts together for the same logical operation (e.g. in logs / traces).
    +     *
    +     * Note, this may not be needed for V1, TBD.
    +     * 
    + * + * string traceparent = 3; + * + * @return The bytes for traceparent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceparentBytes() { + java.lang.Object ref = traceparent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceparent_ = 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 (attemptNumber_ != 0L) { + output.writeInt64(1, attemptNumber_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAttemptStart()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceparent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, traceparent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attemptNumber_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, attemptNumber_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAttemptStart()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(traceparent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, traceparent_); + } + 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.bigtable.v2.VirtualRpcRequest.Metadata)) { + return super.equals(obj); + } + com.google.bigtable.v2.VirtualRpcRequest.Metadata other = + (com.google.bigtable.v2.VirtualRpcRequest.Metadata) obj; + + if (getAttemptNumber() != other.getAttemptNumber()) return false; + if (hasAttemptStart() != other.hasAttemptStart()) return false; + if (hasAttemptStart()) { + if (!getAttemptStart().equals(other.getAttemptStart())) return false; + } + if (!getTraceparent().equals(other.getTraceparent())) 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) + ATTEMPT_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAttemptNumber()); + if (hasAttemptStart()) { + hash = (37 * hash) + ATTEMPT_START_FIELD_NUMBER; + hash = (53 * hash) + getAttemptStart().hashCode(); + } + hash = (37 * hash) + TRACEPARENT_FIELD_NUMBER; + hash = (53 * hash) + getTraceparent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata 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.bigtable.v2.VirtualRpcRequest.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata 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.bigtable.v2.VirtualRpcRequest.Metadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata 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.bigtable.v2.VirtualRpcRequest.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata 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.bigtable.v2.VirtualRpcRequest.Metadata 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 all vRPC Metadata.
    +     * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcRequest.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.VirtualRpcRequest.Metadata) + com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcRequest.Metadata.class, + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder.class); + } + + // Construct using com.google.bigtable.v2.VirtualRpcRequest.Metadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAttemptStartFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attemptNumber_ = 0L; + attemptStart_ = null; + if (attemptStartBuilder_ != null) { + attemptStartBuilder_.dispose(); + attemptStartBuilder_ = null; + } + traceparent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_Metadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest.Metadata getDefaultInstanceForType() { + return com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest.Metadata build() { + com.google.bigtable.v2.VirtualRpcRequest.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest.Metadata buildPartial() { + com.google.bigtable.v2.VirtualRpcRequest.Metadata result = + new com.google.bigtable.v2.VirtualRpcRequest.Metadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.VirtualRpcRequest.Metadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attemptNumber_ = attemptNumber_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attemptStart_ = + attemptStartBuilder_ == null ? attemptStart_ : attemptStartBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.traceparent_ = traceparent_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.VirtualRpcRequest.Metadata) { + return mergeFrom((com.google.bigtable.v2.VirtualRpcRequest.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.VirtualRpcRequest.Metadata other) { + if (other == com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance()) + return this; + if (other.getAttemptNumber() != 0L) { + setAttemptNumber(other.getAttemptNumber()); + } + if (other.hasAttemptStart()) { + mergeAttemptStart(other.getAttemptStart()); + } + if (!other.getTraceparent().isEmpty()) { + traceparent_ = other.traceparent_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + attemptNumber_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetAttemptStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + traceparent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long attemptNumber_; + + /** + * + * + *
    +       * Track retry attempts for this vRPC at the AFE.
    +       * 
    + * + * int64 attempt_number = 1; + * + * @return The attemptNumber. + */ + @java.lang.Override + public long getAttemptNumber() { + return attemptNumber_; + } + + /** + * + * + *
    +       * Track retry attempts for this vRPC at the AFE.
    +       * 
    + * + * int64 attempt_number = 1; + * + * @param value The attemptNumber to set. + * @return This builder for chaining. + */ + public Builder setAttemptNumber(long value) { + + attemptNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Track retry attempts for this vRPC at the AFE.
    +       * 
    + * + * int64 attempt_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttemptNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + attemptNumber_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp attemptStart_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + attemptStartBuilder_; + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return Whether the attemptStart field is set. + */ + public boolean hasAttemptStart() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + * + * @return The attemptStart. + */ + public com.google.protobuf.Timestamp getAttemptStart() { + if (attemptStartBuilder_ == null) { + return attemptStart_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : attemptStart_; + } else { + return attemptStartBuilder_.getMessage(); + } + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public Builder setAttemptStart(com.google.protobuf.Timestamp value) { + if (attemptStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attemptStart_ = value; + } else { + attemptStartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public Builder setAttemptStart(com.google.protobuf.Timestamp.Builder builderForValue) { + if (attemptStartBuilder_ == null) { + attemptStart_ = builderForValue.build(); + } else { + attemptStartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public Builder mergeAttemptStart(com.google.protobuf.Timestamp value) { + if (attemptStartBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && attemptStart_ != null + && attemptStart_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getAttemptStartBuilder().mergeFrom(value); + } else { + attemptStart_ = value; + } + } else { + attemptStartBuilder_.mergeFrom(value); + } + if (attemptStart_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public Builder clearAttemptStart() { + bitField0_ = (bitField0_ & ~0x00000002); + attemptStart_ = null; + if (attemptStartBuilder_ != null) { + attemptStartBuilder_.dispose(); + attemptStartBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public com.google.protobuf.Timestamp.Builder getAttemptStartBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAttemptStartFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + public com.google.protobuf.TimestampOrBuilder getAttemptStartOrBuilder() { + if (attemptStartBuilder_ != null) { + return attemptStartBuilder_.getMessageOrBuilder(); + } else { + return attemptStart_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : attemptStart_; + } + } + + /** + * + * + *
    +       * Track the client's known start time for the attempt. This is likely not
    +       * easily compared with the server's time due to clock skew.
    +       * 
    + * + * .google.protobuf.Timestamp attempt_start = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetAttemptStartFieldBuilder() { + if (attemptStartBuilder_ == null) { + attemptStartBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getAttemptStart(), getParentForChildren(), isClean()); + attemptStart_ = null; + } + return attemptStartBuilder_; + } + + private java.lang.Object traceparent_ = ""; + + /** + * + * + *
    +       * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +       * attempts together for the same logical operation (e.g. in logs / traces).
    +       *
    +       * Note, this may not be needed for V1, TBD.
    +       * 
    + * + * string traceparent = 3; + * + * @return The traceparent. + */ + public java.lang.String getTraceparent() { + java.lang.Object ref = traceparent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceparent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
    +       * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +       * attempts together for the same logical operation (e.g. in logs / traces).
    +       *
    +       * Note, this may not be needed for V1, TBD.
    +       * 
    + * + * string traceparent = 3; + * + * @return The bytes for traceparent. + */ + public com.google.protobuf.ByteString getTraceparentBytes() { + java.lang.Object ref = traceparent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceparent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
    +       * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +       * attempts together for the same logical operation (e.g. in logs / traces).
    +       *
    +       * Note, this may not be needed for V1, TBD.
    +       * 
    + * + * string traceparent = 3; + * + * @param value The traceparent to set. + * @return This builder for chaining. + */ + public Builder setTraceparent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceparent_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +       * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +       * attempts together for the same logical operation (e.g. in logs / traces).
    +       *
    +       * Note, this may not be needed for V1, TBD.
    +       * 
    + * + * string traceparent = 3; + * + * @return This builder for chaining. + */ + public Builder clearTraceparent() { + traceparent_ = getDefaultInstance().getTraceparent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
    +       * Link OpenTelemetry traces (e.g. Tapper). This can be used to link
    +       * attempts together for the same logical operation (e.g. in logs / traces).
    +       *
    +       * Note, this may not be needed for V1, TBD.
    +       * 
    + * + * string traceparent = 3; + * + * @param value The bytes for traceparent to set. + * @return This builder for chaining. + */ + public Builder setTraceparentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceparent_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.VirtualRpcRequest.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.VirtualRpcRequest.Metadata) + private static final com.google.bigtable.v2.VirtualRpcRequest.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.VirtualRpcRequest.Metadata(); + } + + public static com.google.bigtable.v2.VirtualRpcRequest.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata 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.bigtable.v2.VirtualRpcRequest.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int RPC_ID_FIELD_NUMBER = 1; + private long rpcId_ = 0L; + + /** + * + * + *
    +   * Client chosen, monotonically increasing identifier for the request.
    +   * Must be unique within a session.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + public static final int DEADLINE_FIELD_NUMBER = 2; + private com.google.protobuf.Duration deadline_; + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return Whether the deadline field is set. + */ + @java.lang.Override + public boolean hasDeadline() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return The deadline. + */ + @java.lang.Override + public com.google.protobuf.Duration getDeadline() { + return deadline_ == null ? com.google.protobuf.Duration.getDefaultInstance() : deadline_; + } + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDeadlineOrBuilder() { + return deadline_ == null ? com.google.protobuf.Duration.getDefaultInstance() : deadline_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.bigtable.v2.VirtualRpcRequest.Metadata metadata_; + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest.Metadata getMetadata() { + return metadata_ == null + ? com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance() + : metadata_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Could be TableRequest (or in post-V1, SqlRequest)
    +   * 
    + * + * bytes payload = 4; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return 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 (rpcId_ != 0L) { + output.writeInt64(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDeadline()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getMetadata()); + } + if (!payload_.isEmpty()) { + output.writeBytes(4, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rpcId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeadline()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, payload_); + } + 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.bigtable.v2.VirtualRpcRequest)) { + return super.equals(obj); + } + com.google.bigtable.v2.VirtualRpcRequest other = (com.google.bigtable.v2.VirtualRpcRequest) obj; + + if (getRpcId() != other.getRpcId()) return false; + if (hasDeadline() != other.hasDeadline()) return false; + if (hasDeadline()) { + if (!getDeadline().equals(other.getDeadline())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + 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) + RPC_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRpcId()); + if (hasDeadline()) { + hash = (37 * hash) + DEADLINE_FIELD_NUMBER; + hash = (53 * hash) + getDeadline().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.VirtualRpcRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest 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.bigtable.v2.VirtualRpcRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest 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.bigtable.v2.VirtualRpcRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest 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.bigtable.v2.VirtualRpcRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcRequest 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.bigtable.v2.VirtualRpcRequest 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.VirtualRpcRequest) + com.google.bigtable.v2.VirtualRpcRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcRequest.class, + com.google.bigtable.v2.VirtualRpcRequest.Builder.class); + } + + // Construct using com.google.bigtable.v2.VirtualRpcRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDeadlineFieldBuilder(); + internalGetMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rpcId_ = 0L; + deadline_ = null; + if (deadlineBuilder_ != null) { + deadlineBuilder_.dispose(); + deadlineBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest build() { + com.google.bigtable.v2.VirtualRpcRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcRequest buildPartial() { + com.google.bigtable.v2.VirtualRpcRequest result = + new com.google.bigtable.v2.VirtualRpcRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.VirtualRpcRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rpcId_ = rpcId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deadline_ = deadlineBuilder_ == null ? deadline_ : deadlineBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.payload_ = payload_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.VirtualRpcRequest) { + return mergeFrom((com.google.bigtable.v2.VirtualRpcRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.VirtualRpcRequest other) { + if (other == com.google.bigtable.v2.VirtualRpcRequest.getDefaultInstance()) return this; + if (other.getRpcId() != 0L) { + setRpcId(other.getRpcId()); + } + if (other.hasDeadline()) { + mergeDeadline(other.getDeadline()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.getPayload().isEmpty()) { + setPayload(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 8: + { + rpcId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetDeadlineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + payload_ = 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 rpcId_; + + /** + * + * + *
    +     * Client chosen, monotonically increasing identifier for the request.
    +     * Must be unique within a session.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + /** + * + * + *
    +     * Client chosen, monotonically increasing identifier for the request.
    +     * Must be unique within a session.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @param value The rpcId to set. + * @return This builder for chaining. + */ + public Builder setRpcId(long value) { + + rpcId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Client chosen, monotonically increasing identifier for the request.
    +     * Must be unique within a session.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearRpcId() { + bitField0_ = (bitField0_ & ~0x00000001); + rpcId_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Duration deadline_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + deadlineBuilder_; + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return Whether the deadline field is set. + */ + public boolean hasDeadline() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return The deadline. + */ + public com.google.protobuf.Duration getDeadline() { + if (deadlineBuilder_ == null) { + return deadline_ == null ? com.google.protobuf.Duration.getDefaultInstance() : deadline_; + } else { + return deadlineBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public Builder setDeadline(com.google.protobuf.Duration value) { + if (deadlineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deadline_ = value; + } else { + deadlineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public Builder setDeadline(com.google.protobuf.Duration.Builder builderForValue) { + if (deadlineBuilder_ == null) { + deadline_ = builderForValue.build(); + } else { + deadlineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public Builder mergeDeadline(com.google.protobuf.Duration value) { + if (deadlineBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && deadline_ != null + && deadline_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDeadlineBuilder().mergeFrom(value); + } else { + deadline_ = value; + } + } else { + deadlineBuilder_.mergeFrom(value); + } + if (deadline_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public Builder clearDeadline() { + bitField0_ = (bitField0_ & ~0x00000002); + deadline_ = null; + if (deadlineBuilder_ != null) { + deadlineBuilder_.dispose(); + deadlineBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public com.google.protobuf.Duration.Builder getDeadlineBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDeadlineFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + public com.google.protobuf.DurationOrBuilder getDeadlineOrBuilder() { + if (deadlineBuilder_ != null) { + return deadlineBuilder_.getMessageOrBuilder(); + } else { + return deadline_ == null ? com.google.protobuf.Duration.getDefaultInstance() : deadline_; + } + } + + /** + * + * + *
    +     * Attempt deadline.
    +     *
    +     * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +     * deadline).
    +     * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetDeadlineFieldBuilder() { + if (deadlineBuilder_ == null) { + deadlineBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDeadline(), getParentForChildren(), isClean()); + deadline_ = null; + } + return deadlineBuilder_; + } + + private com.google.bigtable.v2.VirtualRpcRequest.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest.Metadata, + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder, + com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return The metadata. + */ + public com.google.bigtable.v2.VirtualRpcRequest.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public Builder setMetadata(com.google.bigtable.v2.VirtualRpcRequest.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public Builder setMetadata( + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public Builder mergeMetadata(com.google.bigtable.v2.VirtualRpcRequest.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && metadata_ != null + && metadata_ + != com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + public com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.bigtable.v2.VirtualRpcRequest.Metadata.getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
    +     * vRPC metadata.
    +     * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest.Metadata, + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder, + com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.VirtualRpcRequest.Metadata, + com.google.bigtable.v2.VirtualRpcRequest.Metadata.Builder, + com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Could be TableRequest (or in post-V1, SqlRequest)
    +     * 
    + * + * bytes payload = 4; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + /** + * + * + *
    +     * Could be TableRequest (or in post-V1, SqlRequest)
    +     * 
    + * + * bytes payload = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Could be TableRequest (or in post-V1, SqlRequest)
    +     * 
    + * + * bytes payload = 4; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000008); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.VirtualRpcRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.VirtualRpcRequest) + private static final com.google.bigtable.v2.VirtualRpcRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.VirtualRpcRequest(); + } + + public static com.google.bigtable.v2.VirtualRpcRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualRpcRequest 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.bigtable.v2.VirtualRpcRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequestOrBuilder.java new file mode 100644 index 0000000000..2d18771f31 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface VirtualRpcRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.VirtualRpcRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Client chosen, monotonically increasing identifier for the request.
    +   * Must be unique within a session.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + long getRpcId(); + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return Whether the deadline field is set. + */ + boolean hasDeadline(); + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + * + * @return The deadline. + */ + com.google.protobuf.Duration getDeadline(); + + /** + * + * + *
    +   * Attempt deadline.
    +   *
    +   * Note, this may not be needed for V1, TBD (e.g. operation vs attempt
    +   * deadline).
    +   * 
    + * + * .google.protobuf.Duration deadline = 2; + */ + com.google.protobuf.DurationOrBuilder getDeadlineOrBuilder(); + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + * + * @return The metadata. + */ + com.google.bigtable.v2.VirtualRpcRequest.Metadata getMetadata(); + + /** + * + * + *
    +   * vRPC metadata.
    +   * 
    + * + * .google.bigtable.v2.VirtualRpcRequest.Metadata metadata = 3; + */ + com.google.bigtable.v2.VirtualRpcRequest.MetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
    +   * Could be TableRequest (or in post-V1, SqlRequest)
    +   * 
    + * + * bytes payload = 4; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponse.java new file mode 100644 index 0000000000..c7a7d7e56a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponse.java @@ -0,0 +1,1001 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +/** + * + * + *
    + * Internal usage only.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcResponse} + */ +@com.google.protobuf.Generated +public final class VirtualRpcResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.VirtualRpcResponse) + VirtualRpcResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VirtualRpcResponse"); + } + + // Use VirtualRpcResponse.newBuilder() to construct. + private VirtualRpcResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VirtualRpcResponse() { + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcResponse.class, + com.google.bigtable.v2.VirtualRpcResponse.Builder.class); + } + + private int bitField0_; + public static final int RPC_ID_FIELD_NUMBER = 1; + private long rpcId_ = 0L; + + /** + * + * + *
    +   * Which vRPC this response is for.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + public static final int CLUSTER_INFO_FIELD_NUMBER = 2; + private com.google.bigtable.v2.ClusterInformation clusterInfo_; + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + @java.lang.Override + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + @java.lang.Override + public com.google.bigtable.v2.ClusterInformation getClusterInfo() { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + @java.lang.Override + public com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder() { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + + public static final int STATS_FIELD_NUMBER = 4; + private com.google.bigtable.v2.SessionRequestStats stats_; + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return The stats. + */ + @java.lang.Override + public com.google.bigtable.v2.SessionRequestStats getStats() { + return stats_ == null + ? com.google.bigtable.v2.SessionRequestStats.getDefaultInstance() + : stats_; + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + @java.lang.Override + public com.google.bigtable.v2.SessionRequestStatsOrBuilder getStatsOrBuilder() { + return stats_ == null + ? com.google.bigtable.v2.SessionRequestStats.getDefaultInstance() + : stats_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +   * Could be TableResponse (or in post-V1, SqlResponse)
    +   * 
    + * + * bytes payload = 3; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return 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 (rpcId_ != 0L) { + output.writeInt64(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getClusterInfo()); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rpcId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rpcId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getClusterInfo()); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, payload_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStats()); + } + 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.bigtable.v2.VirtualRpcResponse)) { + return super.equals(obj); + } + com.google.bigtable.v2.VirtualRpcResponse other = + (com.google.bigtable.v2.VirtualRpcResponse) obj; + + if (getRpcId() != other.getRpcId()) return false; + if (hasClusterInfo() != other.hasClusterInfo()) return false; + if (hasClusterInfo()) { + if (!getClusterInfo().equals(other.getClusterInfo())) return false; + } + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats().equals(other.getStats())) return false; + } + 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) + RPC_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRpcId()); + if (hasClusterInfo()) { + hash = (37 * hash) + CLUSTER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getClusterInfo().hashCode(); + } + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.VirtualRpcResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcResponse 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.bigtable.v2.VirtualRpcResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.VirtualRpcResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.VirtualRpcResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcResponse 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.bigtable.v2.VirtualRpcResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcResponse 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.bigtable.v2.VirtualRpcResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.VirtualRpcResponse 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.bigtable.v2.VirtualRpcResponse 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; + } + + /** + * + * + *
    +   * Internal usage only.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.VirtualRpcResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.VirtualRpcResponse) + com.google.bigtable.v2.VirtualRpcResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.VirtualRpcResponse.class, + com.google.bigtable.v2.VirtualRpcResponse.Builder.class); + } + + // Construct using com.google.bigtable.v2.VirtualRpcResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClusterInfoFieldBuilder(); + internalGetStatsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rpcId_ = 0L; + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.SessionProto + .internal_static_google_bigtable_v2_VirtualRpcResponse_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponse build() { + com.google.bigtable.v2.VirtualRpcResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.VirtualRpcResponse buildPartial() { + com.google.bigtable.v2.VirtualRpcResponse result = + new com.google.bigtable.v2.VirtualRpcResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.bigtable.v2.VirtualRpcResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rpcId_ = rpcId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterInfo_ = + clusterInfoBuilder_ == null ? clusterInfo_ : clusterInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.payload_ = payload_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.VirtualRpcResponse) { + return mergeFrom((com.google.bigtable.v2.VirtualRpcResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.VirtualRpcResponse other) { + if (other == com.google.bigtable.v2.VirtualRpcResponse.getDefaultInstance()) return this; + if (other.getRpcId() != 0L) { + setRpcId(other.getRpcId()); + } + if (other.hasClusterInfo()) { + mergeClusterInfo(other.getClusterInfo()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + if (!other.getPayload().isEmpty()) { + setPayload(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 8: + { + rpcId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetClusterInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + payload_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + 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 rpcId_; + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + @java.lang.Override + public long getRpcId() { + return rpcId_; + } + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @param value The rpcId to set. + * @return This builder for chaining. + */ + public Builder setRpcId(long value) { + + rpcId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Which vRPC this response is for.
    +     * 
    + * + * int64 rpc_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearRpcId() { + bitField0_ = (bitField0_ & ~0x00000001); + rpcId_ = 0L; + onChanged(); + return this; + } + + private com.google.bigtable.v2.ClusterInformation clusterInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder> + clusterInfoBuilder_; + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + public com.google.bigtable.v2.ClusterInformation getClusterInfo() { + if (clusterInfoBuilder_ == null) { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } else { + return clusterInfoBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder setClusterInfo(com.google.bigtable.v2.ClusterInformation value) { + if (clusterInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterInfo_ = value; + } else { + clusterInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder setClusterInfo( + com.google.bigtable.v2.ClusterInformation.Builder builderForValue) { + if (clusterInfoBuilder_ == null) { + clusterInfo_ = builderForValue.build(); + } else { + clusterInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder mergeClusterInfo(com.google.bigtable.v2.ClusterInformation value) { + if (clusterInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && clusterInfo_ != null + && clusterInfo_ != com.google.bigtable.v2.ClusterInformation.getDefaultInstance()) { + getClusterInfoBuilder().mergeFrom(value); + } else { + clusterInfo_ = value; + } + } else { + clusterInfoBuilder_.mergeFrom(value); + } + if (clusterInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public Builder clearClusterInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public com.google.bigtable.v2.ClusterInformation.Builder getClusterInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetClusterInfoFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + public com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder() { + if (clusterInfoBuilder_ != null) { + return clusterInfoBuilder_.getMessageOrBuilder(); + } else { + return clusterInfo_ == null + ? com.google.bigtable.v2.ClusterInformation.getDefaultInstance() + : clusterInfo_; + } + } + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder> + internalGetClusterInfoFieldBuilder() { + if (clusterInfoBuilder_ == null) { + clusterInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.ClusterInformation, + com.google.bigtable.v2.ClusterInformation.Builder, + com.google.bigtable.v2.ClusterInformationOrBuilder>( + getClusterInfo(), getParentForChildren(), isClean()); + clusterInfo_ = null; + } + return clusterInfoBuilder_; + } + + private com.google.bigtable.v2.SessionRequestStats stats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRequestStats, + com.google.bigtable.v2.SessionRequestStats.Builder, + com.google.bigtable.v2.SessionRequestStatsOrBuilder> + statsBuilder_; + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return The stats. + */ + public com.google.bigtable.v2.SessionRequestStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null + ? com.google.bigtable.v2.SessionRequestStats.getDefaultInstance() + : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public Builder setStats(com.google.bigtable.v2.SessionRequestStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + } else { + statsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public Builder setStats(com.google.bigtable.v2.SessionRequestStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public Builder mergeStats(com.google.bigtable.v2.SessionRequestStats value) { + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && stats_ != null + && stats_ != com.google.bigtable.v2.SessionRequestStats.getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); + } else { + stats_ = value; + } + } else { + statsBuilder_.mergeFrom(value); + } + if (stats_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public Builder clearStats() { + bitField0_ = (bitField0_ & ~0x00000004); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + onChanged(); + return this; + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public com.google.bigtable.v2.SessionRequestStats.Builder getStatsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetStatsFieldBuilder().getBuilder(); + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + public com.google.bigtable.v2.SessionRequestStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null + ? com.google.bigtable.v2.SessionRequestStats.getDefaultInstance() + : stats_; + } + } + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + private com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRequestStats, + com.google.bigtable.v2.SessionRequestStats.Builder, + com.google.bigtable.v2.SessionRequestStatsOrBuilder> + internalGetStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.bigtable.v2.SessionRequestStats, + com.google.bigtable.v2.SessionRequestStats.Builder, + com.google.bigtable.v2.SessionRequestStatsOrBuilder>( + getStats(), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
    +     * Could be TableResponse (or in post-V1, SqlResponse)
    +     * 
    + * + * bytes payload = 3; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + /** + * + * + *
    +     * Could be TableResponse (or in post-V1, SqlResponse)
    +     * 
    + * + * 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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
    +     * Could be TableResponse (or in post-V1, SqlResponse)
    +     * 
    + * + * bytes payload = 3; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000008); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.VirtualRpcResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.VirtualRpcResponse) + private static final com.google.bigtable.v2.VirtualRpcResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.VirtualRpcResponse(); + } + + public static com.google.bigtable.v2.VirtualRpcResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualRpcResponse 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.bigtable.v2.VirtualRpcResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponseOrBuilder.java new file mode 100644 index 0000000000..a4619c1118 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/VirtualRpcResponseOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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/bigtable/v2/session.proto +// Protobuf Java Version: 4.33.2 + +package com.google.bigtable.v2; + +@com.google.protobuf.Generated +public interface VirtualRpcResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.VirtualRpcResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Which vRPC this response is for.
    +   * 
    + * + * int64 rpc_id = 1; + * + * @return The rpcId. + */ + long getRpcId(); + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return Whether the clusterInfo field is set. + */ + boolean hasClusterInfo(); + + /** + * .google.bigtable.v2.ClusterInformation cluster_info = 2; + * + * @return The clusterInfo. + */ + com.google.bigtable.v2.ClusterInformation getClusterInfo(); + + /** .google.bigtable.v2.ClusterInformation cluster_info = 2; */ + com.google.bigtable.v2.ClusterInformationOrBuilder getClusterInfoOrBuilder(); + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return Whether the stats field is set. + */ + boolean hasStats(); + + /** + * .google.bigtable.v2.SessionRequestStats stats = 4; + * + * @return The stats. + */ + com.google.bigtable.v2.SessionRequestStats getStats(); + + /** .google.bigtable.v2.SessionRequestStats stats = 4; */ + com.google.bigtable.v2.SessionRequestStatsOrBuilder getStatsOrBuilder(); + + /** + * + * + *
    +   * Could be TableResponse (or in post-V1, SqlResponse)
    +   * 
    + * + * bytes payload = 3; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto index 7c85b3f756..1a2bb37ccc 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import "google/api/resource.proto"; import "google/api/routing.proto"; import "google/bigtable/v2/data.proto"; import "google/bigtable/v2/request_stats.proto"; +import "google/bigtable/v2/session.proto"; +import "google/bigtable/v2/types.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -47,6 +49,10 @@ option (google.api.resource_definition) = { type: "bigtableadmin.googleapis.com/AuthorizedView" pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}" }; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + pattern: "projects/{project}/instances/{instance}/materializedViews/{materialized_view}" +}; // Service for reading from and writing to existing Bigtable tables. service Bigtable { @@ -72,6 +78,10 @@ service Bigtable { post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows" body: "*" } + additional_bindings { + post: "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows" + body: "*" + } }; option (google.api.routing) = { routing_parameters { @@ -81,7 +91,11 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + routing_parameters { + field: "materialized_view_name" + path_template: "{name=projects/*/instances/*}/**" } }; option (google.api.method_signature) = "table_name"; @@ -99,6 +113,9 @@ service Bigtable { additional_bindings { get: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys" } + additional_bindings { + get: "/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys" + } }; option (google.api.routing) = { routing_parameters { @@ -108,7 +125,11 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" + } + routing_parameters { + field: "materialized_view_name" + path_template: "{name=projects/*/instances/*}/**" } }; option (google.api.method_signature) = "table_name"; @@ -134,7 +155,7 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" } }; option (google.api.method_signature) = "table_name,row_key,mutations"; @@ -162,7 +183,7 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" } }; option (google.api.method_signature) = "table_name,entries"; @@ -188,7 +209,7 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" } }; option (google.api.method_signature) = @@ -238,7 +259,7 @@ service Bigtable { routing_parameters { field: "app_profile_id" } routing_parameters { field: "authorized_view_name" - path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}" + path_template: "{table_name=projects/*/instances/*/tables/*}/**" } }; option (google.api.method_signature) = "table_name,row_key,rules"; @@ -246,10 +267,10 @@ service Bigtable { "table_name,row_key,rules,app_profile_id"; } - // NOTE: This API is intended to be used by Apache Beam BigtableIO. // Returns the current list of partitions that make up the table's // change stream. The union of partitions will cover the entire keyspace. // Partitions can be read with `ReadChangeStream`. + // NOTE: This API is only intended to be used by Apache Beam BigtableIO. rpc GenerateInitialChangeStreamPartitions( GenerateInitialChangeStreamPartitionsRequest) returns (stream GenerateInitialChangeStreamPartitionsResponse) { @@ -261,10 +282,10 @@ service Bigtable { option (google.api.method_signature) = "table_name,app_profile_id"; } - // NOTE: This API is intended to be used by Apache Beam BigtableIO. // Reads changes from a table's change stream. Changes will // reflect both user-initiated mutations and mutations that are caused by // garbage collection. + // NOTE: This API is only intended to be used by Apache Beam BigtableIO. rpc ReadChangeStream(ReadChangeStreamRequest) returns (stream ReadChangeStreamResponse) { option (google.api.http) = { @@ -275,7 +296,24 @@ service Bigtable { option (google.api.method_signature) = "table_name,app_profile_id"; } - // Executes a BTQL query against a particular Cloud Bigtable instance. + // Prepares a GoogleSQL query for execution on a particular Bigtable instance. + rpc PrepareQuery(PrepareQueryRequest) returns (PrepareQueryResponse) { + option (google.api.http) = { + post: "/v2/{instance_name=projects/*/instances/*}:prepareQuery" + body: "*" + }; + option (google.api.routing) = { + routing_parameters { + field: "instance_name" + path_template: "{name=projects/*/instances/*}" + } + routing_parameters { field: "app_profile_id" } + }; + option (google.api.method_signature) = "instance_name,query"; + option (google.api.method_signature) = "instance_name,query,app_profile_id"; + } + + // Executes a SQL query against a particular Bigtable instance. rpc ExecuteQuery(ExecuteQueryRequest) returns (stream ExecuteQueryResponse) { option (google.api.http) = { post: "/v2/{instance_name=projects/*/instances/*}:executeQuery" @@ -291,6 +329,36 @@ service Bigtable { option (google.api.method_signature) = "instance_name,query"; option (google.api.method_signature) = "instance_name,query,app_profile_id"; } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc GetClientConfiguration(GetClientConfigurationRequest) + returns (ClientConfiguration) {} + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenTable(stream SessionRequest) returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = SESSION_TYPE_TABLE; + } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenAuthorizedView(stream SessionRequest) + returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + } + + // This RPC is only intended to be used by the official Cloud Bigtable client + // libraries to implement the Bigtable Session based protocol. It is subject + // to change without notice. + rpc OpenMaterializedView(stream SessionRequest) + returns (stream SessionResponse) { + option (google.bigtable.v2.rpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + } } // Request message for Bigtable.ReadRows. @@ -333,6 +401,17 @@ message ReadRowsRequest { } ]; + // Optional. The unique name of the MaterializedView from which to read. + // + // Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 5; @@ -445,26 +524,11 @@ message ReadRowsResponse { // key, allowing the client to skip that work on a retry. bytes last_scanned_row_key = 2; - // - // If requested, provide enhanced query performance statistics. The semantics - // dictate: - // * request_stats is empty on every (streamed) response, except - // * request_stats has non-empty information after all chunks have been - // streamed, where the ReadRowsResponse message only contains - // request_stats. - // * For example, if a read request would have returned an empty - // response instead a single ReadRowsResponse is streamed with empty - // chunks and request_stats filled. - // - // Visually, response messages will stream as follows: - // ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - // \______________________/ \________________________________/ - // Primary response Trailer of RequestStats info - // - // Or if the read did not return any values: - // {chunks: [], request_stats: {...}} - // \________________________________/ - // Trailer of RequestStats info + // If requested, return enhanced query performance statistics. The field + // request_stats is empty in a streamed response unless the ReadRowsResponse + // message contains request_stats in the last message of the stream. Always + // returned when requested, even when the read request returns an empty + // response. RequestStats request_stats = 3; } @@ -493,6 +557,17 @@ message SampleRowKeysRequest { } ]; + // Optional. The unique name of the MaterializedView from which to read. + // + // Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/MaterializedView" + } + ]; + // This value specifies routing for replication. If not specified, the // "default" application profile will be used. string app_profile_id = 2; @@ -553,6 +628,10 @@ message MutateRowRequest { // are applied in order, meaning that earlier mutations can be masked by later // ones. Must contain at least one entry and at most 100000. repeated Mutation mutations = 3 [(google.api.field_behavior) = REQUIRED]; + + // If set consistently across retries, prevents this mutation from being + // double applied to aggregate column families within a 15m window. + Idempotency idempotency = 8; } // Response message for Bigtable.MutateRow. @@ -569,6 +648,10 @@ message MutateRowsRequest { // Mutations are applied in order, meaning that earlier mutations can be // masked by later ones. You must specify at least one mutation. repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set consistently across retries, prevents this mutation from being + // double applied to aggregate column families within a 15m window. + Idempotency idempotency = 3; } // Optional. The unique name of the table to which the mutations should be @@ -647,7 +730,7 @@ message RateLimitInfo { // target load should be 80. After adjusting, the client should ignore // `factor` until another `period` has passed. // - // The client can measure its load using any unit that's comparable over time + // The client can measure its load using any unit that's comparable over time. // For example, QPS can be used as long as each request involves a similar // amount of work. double factor = 2; @@ -771,7 +854,8 @@ message ReadModifyWriteRowRequest { // Required. Rules specifying how the specified row's contents are to be // transformed into writes. Entries are applied in order, meaning that earlier - // rules will affect the results of later ones. + // rules will affect the results of later ones. At least one entry must be + // specified, and there can be at most 100000 rules. repeated ReadModifyWriteRule rules = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -844,10 +928,10 @@ message ReadChangeStreamRequest { // the position. Tokens are delivered on the stream as part of `Heartbeat` // and `CloseStream` messages. // - // If a single token is provided, the token’s partition must exactly match - // the request’s partition. If multiple tokens are provided, as in the case + // If a single token is provided, the token's partition must exactly match + // the request's partition. If multiple tokens are provided, as in the case // of a partition merge, the union of the token partitions must exactly - // cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + // cover the request's partition. Otherwise, INVALID_ARGUMENT will be // returned. StreamContinuationTokens continuation_tokens = 6; } @@ -955,8 +1039,8 @@ message ReadChangeStreamResponse { // An estimate of the commit timestamp that is usually lower than or equal // to any timestamp for a record that will be delivered in the future on the // stream. It is possible that, under particular circumstances that a future - // record has a timestamp is is lower than a previously seen timestamp. For - // an example usage see + // record has a timestamp that is lower than a previously seen timestamp. + // For an example usage see // https://beam.apache.org/documentation/basics/#watermarks google.protobuf.Timestamp estimated_low_watermark = 10; } @@ -971,8 +1055,8 @@ message ReadChangeStreamResponse { // An estimate of the commit timestamp that is usually lower than or equal // to any timestamp for a record that will be delivered in the future on the // stream. It is possible that, under particular circumstances that a future - // record has a timestamp is is lower than a previously seen timestamp. For - // an example usage see + // record has a timestamp that is lower than a previously seen timestamp. + // For an example usage see // https://beam.apache.org/documentation/basics/#watermarks google.protobuf.Timestamp estimated_low_watermark = 2; } @@ -983,17 +1067,19 @@ message ReadChangeStreamResponse { // If `continuation_tokens` & `new_partitions` are present, then a change in // partitioning requires the client to open a new stream for each token to // resume reading. Example: - // [B, D) ends - // | - // v - // new_partitions: [A, C) [C, E) - // continuation_tokens.partitions: [B,C) [C,D) - // ^---^ ^---^ - // ^ ^ - // | | - // | StreamContinuationToken 2 - // | - // StreamContinuationToken 1 + // + // [B, D) ends + // | + // v + // new_partitions: [A, C) [C, E) + // continuation_tokens.partitions: [B,C) [C,D) + // ^---^ ^---^ + // ^ ^ + // | | + // | StreamContinuationToken 2 + // | + // StreamContinuationToken 1 + // // To read the new partition [A,C), supply the continuation tokens whose // ranges cover the new partition, for example ContinuationToken[A,B) & // ContinuationToken[B,C). @@ -1041,13 +1127,31 @@ message ExecuteQueryRequest { string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The query string. - string query = 3 [(google.api.field_behavior) = REQUIRED]; + // + // Exactly one of `query` and `prepared_query` is required. Setting both + // or neither is an `INVALID_ARGUMENT`. + string query = 3 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + + // A prepared query that was returned from `PrepareQueryResponse`. + // + // Exactly one of `query` and `prepared_query` is required. Setting both + // or neither is an `INVALID_ARGUMENT`. + // + // Setting this field also places restrictions on several other fields: + // - `data_format` must be empty. + // - `validate_only` must be false. + // - `params` must match the `param_types` set in the `PrepareQueryRequest`. + bytes prepared_query = 9; - // Required. Requested data format for the response. + // Requested data format for the response. + // + // If `prepared_query` is set, then the `data_format` is fixed by the + // `PrepareQueryRequest`, and a non-empty `data_format` in the + // `ExecuteQueryRequest` will be rejected with `INVALID_ARGUMENT`. oneof data_format { // Protocol buffer format as described by ProtoSchema and ProtoRows // messages. - ProtoFormat proto_format = 4; + ProtoFormat proto_format = 4 [deprecated = true]; } // Optional. If this request is resuming a previously interrupted query @@ -1067,17 +1171,21 @@ message ExecuteQueryRequest { // // For example, if // `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - // then `@firstName` will be replaced with googlesql bytes value "foo" in the - // query string during query evaluation. + // then `@firstName` will be replaced with googlesql bytes value "foo" in the + // query string during query evaluation. + // + // If `Value.kind` is not set, the value is treated as a NULL value of the + // given type. For example, if + // `params["firstName"] = type {string_type {}}` + // then `@firstName` will be replaced with googlesql null string. // - // In case of Value.kind is not set, it will be set to corresponding null - // value in googlesql. - // `params["firstName"] = type {string_type {}}` - // then `@firstName` will be replaced with googlesql null string. + // If `query` is set, any empty `Value.type` in the map will be rejected with + // `INVALID_ARGUMENT`. // - // Value.type should always be set and no inference of type will be made from - // Value.kind. If Value.type is not set, we will return INVALID_ARGUMENT - // error. + // If `prepared_query` is set, any empty `Value.type` in the map will be + // inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + // `Value.type` must match the corresponding `param_types` entry, or be + // rejected with `INVALID_ARGUMENT`. map params = 7 [(google.api.field_behavior) = REQUIRED]; } @@ -1100,3 +1208,63 @@ message ExecuteQueryResponse { PartialResultSet results = 2; } } + +// Request message for Bigtable.PrepareQuery +message PrepareQueryRequest { + // Required. The unique name of the instance against which the query should be + // executed. + // Values are of the form `projects//instances/` + string instance_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Optional. This value specifies routing for preparing the query. Note that + // this `app_profile_id` is only used for preparing the query. The actual + // query execution will use the app profile specified in the + // `ExecuteQueryRequest`. If not specified, the `default` application profile + // will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The query string. + string query = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Requested data format for the response. Note that the selected + // data format is binding for all `ExecuteQuery` rpcs that use the prepared + // query. + oneof data_format { + // Protocol buffer format as described by ProtoSchema and ProtoRows + // messages. + ProtoFormat proto_format = 4; + } + + // Required. `param_types` is a map of parameter identifier strings to their + // `Type`s. + // + // In query string, a parameter placeholder consists of the + // `@` character followed by the parameter name (for example, `@firstName`) in + // the query string. + // + // For example, if param_types["firstName"] = Bytes then @firstName will be a + // query parameter of type Bytes. The specific `Value` to be used for the + // query execution must be sent in `ExecuteQueryRequest` in the `params` map. + map param_types = 6 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for Bigtable.PrepareQueryResponse +message PrepareQueryResponse { + // Structure of rows in the response stream of `ExecuteQueryResponse` for the + // returned `prepared_query`. + ResultSetMetadata metadata = 1; + + // A serialized prepared query. Clients should treat this as an opaque + // blob of bytes to send in `ExecuteQueryRequest`. + bytes prepared_query = 2; + + // The time at which the prepared query token becomes invalid. + // A token may become invalid early due to changes in the data being read, but + // it provides a guideline to refresh query plans asynchronously. + google.protobuf.Timestamp valid_until = 3; +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto index 8265611f3b..8320a0c22f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -138,6 +138,7 @@ message Value { bool bool_value = 10; // Represents a typed value transported as a floating point number. + // Does not support NaN or infinities. double float_value = 11; // Represents a typed value transported as a timestamp. @@ -724,54 +725,132 @@ message ProtoRows { repeated Value values = 2; } -// Batch of serialized ProtoRows. +// A part of a serialized `ProtoRows` message. message ProtoRowsBatch { - // Merge partial results by concatenating these bytes, then parsing the - // overall value as a `ProtoRows` message. + // Part of a serialized `ProtoRows` message. + // A complete, parseable ProtoRows message is constructed by + // concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The + // `PartialResultSet` that contains the last part has `complete_batch` set to + // `true`. bytes batch_data = 1; } // A partial result set from the streaming query API. -// CBT client will buffer partial_rows from result_sets until it gets a -// resumption_token. +// Cloud Bigtable clients buffer partial results received in this message until +// a `resume_token` is received. +// +// The pseudocode below describes how to buffer and parse a stream of +// `PartialResultSet` messages. +// +// Having: +// - queue of row results waiting to be returned `queue` +// - extensible buffer of bytes `buffer` +// - a place to keep track of the most recent `resume_token` +// for each PartialResultSet `p` received { +// if p.reset { +// ensure `queue` is empty +// ensure `buffer` is empty +// } +// if p.estimated_batch_size != 0 { +// (optional) ensure `buffer` is sized to at least `p.estimated_batch_size` +// } +// if `p.proto_rows_batch` is set { +// append `p.proto_rows_batch.bytes` to `buffer` +// } +// if p.batch_checksum is set and `buffer` is not empty { +// validate the checksum matches the contents of `buffer` +// (see comments on `batch_checksum`) +// parse `buffer` as `ProtoRows` message, clearing `buffer` +// add parsed rows to end of `queue` +// } +// if p.resume_token is set { +// release results in `queue` +// save `p.resume_token` in `resume_token` +// } +// } message PartialResultSet { - // Partial Rows in one of the supported formats. It may require many - // PartialResultSets to stream a batch of rows that can decoded on the client. - // The client should buffer partial_rows until it gets a `resume_token`, - // at which point the batch is complete and can be decoded and yielded to the - // user. Each sub-message documents the appropriate way to combine results. + // Some rows of the result set in one of the supported formats. + // + // Multiple `PartialResultSet` messages may be sent to represent a complete + // response. The client should buffer data constructed from the fields in + // `partial_rows` until a non-empty `resume_token` is received. Each + // sub-message documents the appropriate way to combine results. oneof partial_rows { // Partial rows in serialized ProtoRows format. ProtoRowsBatch proto_rows_batch = 3; } + // CRC32C checksum of concatenated `partial_rows` data for the current batch. + // + // When present, the buffered data from `partial_rows` forms a complete + // parseable message of the appropriate type. + // + // The client should mark the end of a parseable message and prepare to + // receive a new one starting from the next `PartialResultSet` message. + // Clients must verify the checksum of the serialized batch before yielding it + // to the caller. + // + // This does NOT mean the values can be yielded to the callers since a + // `resume_token` is required to safely do so. + // + // If `resume_token` is non-empty and any data has been received since the + // last one, this field is guaranteed to be non-empty. In other words, clients + // may assume that a batch will never cross a `resume_token` boundary. + optional uint32 batch_checksum = 6; + // An opaque token sent by the server to allow query resumption and signal - // the client to accumulate `partial_rows` since the last non-empty - // `resume_token`. On resumption, the resumed query will return the remaining - // rows for this query. + // that the buffered values constructed from received `partial_rows` can be + // yielded to the caller. Clients can provide this token in a subsequent + // request to resume the result stream from the current point. + // + // When `resume_token` is non-empty, the buffered values received from + // `partial_rows` since the last non-empty `resume_token` can be yielded to + // the callers, provided that the client keeps the value of `resume_token` and + // uses it on subsequent retries. // - // If there is a batch in progress, a non-empty `resume_token` - // means that that the batch of `partial_rows` will be complete after merging - // the `partial_rows` from this response. The client must only yield - // completed batches to the application, and must ensure that any future - // retries send the latest token to avoid returning duplicate data. + // A `resume_token` may be sent without information in `partial_rows` to + // checkpoint the progress of a sparse query. Any previous `partial_rows` data + // should still be yielded in this case, and the new `resume_token` should be + // saved for future retries as normal. // - // The server may set 'resume_token' without a 'partial_rows'. If there is a - // batch in progress the client should yield it. + // A `resume_token` will only be sent on a boundary where there is either no + // ongoing result batch, or `batch_checksum` is also populated. // // The server will also send a sentinel `resume_token` when last batch of // `partial_rows` is sent. If the client retries the ExecuteQueryRequest with // the sentinel `resume_token`, the server will emit it again without any - // `partial_rows`, then return OK. + // data in `partial_rows`, then return OK. bytes resume_token = 5; - // Estimated size of a new batch. The server will always set this when - // returning the first `partial_rows` of a batch, and will not set it at any - // other time. + // If `true`, any data buffered since the last non-empty `resume_token` must + // be discarded before the other parts of this message, if any, are handled. + bool reset = 7; + + // Estimated size of the buffer required to hold the next batch of results. + // + // This value will be sent with the first `partial_rows` of a batch. That is, + // on the first `partial_rows` received in a stream, on the first message + // after a `batch_checksum` message, and any time `reset` is true. // - // The client can use this estimate to allocate an initial buffer for the - // batched results. This helps minimize the number of allocations required, - // though the buffer size may still need to be increased if the estimate is - // too low. + // The client can use this estimate to allocate a buffer for the next batch of + // results. This helps minimize the number of allocations required, though the + // buffer size may still need to be increased if the estimate is too low. int32 estimated_batch_size = 4; } + +// Parameters on mutations where clients want to ensure idempotency (i.e. +// at-most-once semantics). This is currently only needed for certain aggregate +// types. +message Idempotency { + // Unique token used to identify replays of this mutation. + // Must be at least 8 bytes long. + bytes token = 1; + + // Client-assigned timestamp when the mutation's first attempt was sent. + // Used to reject mutations that arrive after idempotency protection may + // have expired. May cause spurious rejections if clock skew is too high. + // + // Leave unset or zero to always accept the mutation, at the risk of + // double counting if the protection for previous attempts has expired. + google.protobuf.Timestamp start_time = 2; +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto index e97f23e15a..6cf9ca5b81 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -61,4 +61,19 @@ message FeatureFlags { // Notify the server that the client has client side metrics enabled. bool client_side_metrics_enabled = 8; + + // Notify the server that the client using Traffic Director endpoint. + bool traffic_director_enabled = 9; + + // Notify the server that the client explicitly opted in for Direct Access. + bool direct_access_requested = 10; + + // If the client can support using BigtablePeerInfo. + bool peer_info = 11; + + // Indicates whether the client supports the Bigtable Sessions API. + bool sessions_compatible = 12; + + // Internal flag to force sessions for internal projects. + bool sessions_required = 13; } diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/peer_info.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/peer_info.proto new file mode 100644 index 0000000000..6a89fbf9ed --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/peer_info.proto @@ -0,0 +1,81 @@ +// Copyright 2026 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.bigtable.v2; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "PeerInfoProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// PeerInfo contains information about the peer that the client is +// connecting to. +message PeerInfo { + // The transport type that the client used to connect to this peer. + enum TransportType { + // The transport type is unknown. + TRANSPORT_TYPE_UNKNOWN = 0; + + // The client connected to this peer via an external network + // (e.g. outside Google Coud). + TRANSPORT_TYPE_EXTERNAL = 1; + + // The client connected to this peer via CloudPath. + TRANSPORT_TYPE_CLOUD_PATH = 2; + + // The client connected to this peer via DirectAccess. + TRANSPORT_TYPE_DIRECT_ACCESS = 3; + + // The client connected to this peer via Bigtable Sessions using an unknown + // transport type. + TRANSPORT_TYPE_SESSION_UNKNOWN = 4; + + // The client connected to this peer via Bigtable Sessions on an external + // network (e.g. outside Google Cloud). + TRANSPORT_TYPE_SESSION_EXTERNAL = 5; + + // The client connected to this peer via Bigtable Sessions using CloudPath. + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6; + + // The client connected to this peer via Bigtable Sessions using + // DirectAccess. + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7; + } + + // An opaque identifier for the Google Frontend which serviced this request. + // Only set when not using DirectAccess. + int64 google_frontend_id = 1; + + // An opaque identifier for the application frontend which serviced this + // request. + int64 application_frontend_id = 2; + + // The Cloud region of the application frontend that served this request. + string application_frontend_region = 6; + + // The Cloud zone of the application frontend that served this request. + string application_frontend_zone = 3 [deprecated = true]; + + // The subzone of the application frontend that served this request, e.g. an + // identifier for where within a zone (within the reported region) the + // application frontend is. + string application_frontend_subzone = 4; + + TransportType transport_type = 5; +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto index c82876876c..bcebc08e65 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -98,8 +98,7 @@ message FullReadStatsView { // RequestStats is the container for additional information pertaining to a // single request, helpful for evaluating the performance of the sent request. -// Currently, there are the following supported methods: -// * google.bigtable.v2.ReadRows +// Currently, the following method is supported: google.bigtable.v2.ReadRows message RequestStats { // Information pertaining to each request type received. The type is chosen // based on the requested view. diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/response_params.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/response_params.proto index feb0f7d2a1..9a48e2008f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/response_params.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/response_params.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,9 +25,6 @@ option php_namespace = "Google\\Cloud\\Bigtable\\V2"; option ruby_package = "Google::Cloud::Bigtable::V2"; // Response metadata proto -// This is an experimental feature that will be used to get zone_id and -// cluster_id from response trailers to tag the metrics. This should not be -// used by customers directly message ResponseParams { // The cloud bigtable zone associated with the cluster. optional string zone_id = 1; @@ -35,4 +32,7 @@ message ResponseParams { // Identifier for a cluster that represents set of // bigtable resources. optional string cluster_id = 2; + + // The AFE ID for the AFE that is served this request. + optional int64 afe_id = 3; } diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/session.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/session.proto new file mode 100644 index 0000000000..4a79df1c67 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/session.proto @@ -0,0 +1,706 @@ +// Copyright 2026 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.bigtable.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/bigtable/v2/data.proto"; +import "google/bigtable/v2/feature_flags.proto"; +import "google/bigtable/v2/request_stats.proto"; +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/error_details.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb"; +option java_multiple_files = true; +option java_outer_classname = "SessionProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +extend google.protobuf.MessageOptions { + // Only OpenSessionRequest.payload's with a type matching rpc_session_type are + // accepted by the server, and only OpenSessionResponse.payload's with a type + // matching rpc_session_type are accepted by the client. + google.bigtable.v2.SessionType open_session_type = 138898474; + + // Only VirtualRpcRequest.payload's with a type matching rpc_session_type are + // accepted by the server, and only VirtualRpcResponse.payload's with a type + // matching rpc_session_type are accepted by the client. + repeated google.bigtable.v2.SessionType vrpc_session_type = 138899157; +} + +extend google.protobuf.MethodOptions { + // All session service methods must set this option to indicate which + // messages are permissible within the generic envelope. + google.bigtable.v2.SessionType rpc_session_type = 137964804; +} + +// Supported session types. +enum SessionType { + SESSION_TYPE_UNSET = 0; + + SESSION_TYPE_TABLE = 1; + + SESSION_TYPE_AUTHORIZED_VIEW = 2; + + SESSION_TYPE_MATERIALIZED_VIEW = 3; + + // For internal protocol testing only. + SESSION_TYPE_TEST = -1; +} + +// See GetClientConfiguration() RPC in bigtable.proto. Internal usage only. +message GetClientConfigurationRequest { + // Required. The unique name of the instance for which the client will target + // with Data API requests. + // + // Values are of the form `projects//instances/` + string instance_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Instance" + } + ]; + + // Optional. The name of the AppProfile which will be used by the client when + // sending requests in the Data API. + // + // If not specified, the `default` application profile will be used. + string app_profile_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for how to balance vRPCs over sessions. Internal usage only. +message LoadBalancingOptions { + // Balances vRPCs over backends, preferring to send new vRPCs to AFEs with the + // least number of active vRPCs. + message LeastInFlight { + // Of all connected AFEs, the size of the random subset to run the algorithm + // on. Zero implies all connected AFEs. + int64 random_subset_size = 1; + } + + // Balances vRPCs over backends, by maintaining a moving average of each AFE's + // round-trip time, weighted by the number of outstanding vRPCs, and + // distribute traffic to AFEs where that cost function is smallest. + // + // See: + // https://linkerd.io/2016/03/16/beyond-round-robin-load-balancing-for-latency + message PeakEwma { + // Of all connected AFEs, the size of the random subset to compare costs + // over. Zero implies all connected AFEs. + int64 random_subset_size = 1; + } + + // Balances vRPCs over backends, by randomly selecting a backend. + message Random {} + + oneof load_balancing_strategy { + LeastInFlight least_in_flight = 1; + + PeakEwma peak_ewma = 2; + + Random random = 4; + } +} + +// Configuration for the Session API. Internal usage only. +message SessionClientConfiguration { + // Configuration for the channel pool. + message ChannelPoolConfiguration { + // A channel mode which allows DirectAccess with a fallback to CloudPath if + // DirectAccess is unavailable. + message DirectAccessWithFallback { + // The threshold for errors on DirectAccess to trigger CloudPath fallback. + // The error rate is calculated based on a count of vRPCs with errors + // divided by a total count of vRPCs, over a rolling window of the past + // check_interval. If this ratio exceeds this threshold, the fallback to + // CloudPath is triggered. [0, 1]. + float error_rate_threshold = 1; + + // The interval to check the error rate over. + google.protobuf.Duration check_interval = 2; + } + + // A channel mode which only allows DirectAccess. + message DirectAccessOnly {} + + // A channel mode which only allows CloudPath. + message CloudPathOnly {} + + // The minimum number of distcint servers to connect to in the channel pool. + // The client will ensure that the channel pool will have at least this many + // distinct servers, but may have multiple channels connected to the same + // server (e.g. the client may have M channels on N machines, where M > N). + int32 min_server_count = 1; + + // The maximum number of distinct servers to connect to in the channel pool. + // The client will ensure that the channel pool will have at most this many + // distinct servers. + int32 max_server_count = 2; + + // Soft maximum for how many sessions are allowed per server. Normally, the + // client will ensure that it does not host more than this count of sessions + // per server, unless there are other limits encountered (e.g. the connected + // servers is already at max_servers). + int32 per_server_session_count = 3; + + // The fallback mode of the channel pool. + oneof mode { + // DirectAccess with a fallback to CloudPath. + DirectAccessWithFallback direct_access_with_fallback = 4; + + // DirectAccess only. + DirectAccessOnly direct_access_only = 5; + + // CloudPath only. + CloudPathOnly cloud_path_only = 6; + } + } + + // Configuration for the session pools. Session pools are tied to a scope + // like a table, an app profile, and a permission. + message SessionPoolConfiguration { + // Fraction of idle sessions to keep in order to manage an increase in + // requests-in-flight. For example, a headroom of 0.5 will keep enough + // sessions to deal with a 50% increase in QPS. + float headroom = 1; + + // The minimum number of sessions for a given scope. + int32 min_session_count = 2; + + // The maximum number of sessions for a given scope. + int32 max_session_count = 3; + + // Number of vRPCs that can be queued per starting session. + int32 new_session_queue_length = 4; + + // How many concurrent session establishments are allowed. The client will + // hold onto a count against this budget whenever it is establishing a new + // session, and release that count once the session is successfully + // established or failed to establish. + int32 new_session_creation_budget = 5; + + // How long to penalize the creation budget for a failed session creation + // attempt. + google.protobuf.Duration new_session_creation_penalty = 6; + + // A threshold for cancelling all pending vRPCs based on how many + // consecutive session establishment errors have been observed. The client + // will eagerly cancel queued vRPCs after this threshold is met to avoid + // them waiting their entire deadlines before terminating (while waiting for + // any session to establish to actually send the vRPC). + int32 consecutive_session_failure_threshold = 8; + + // How to balance vRPC load over connections to AFEs. + // Set only if session_load > 0. + LoadBalancingOptions load_balancing_options = 9; + } + + // What share of requests should operate on a session, [0, 1]. The rest + // should operate on the old-style API. + float session_load = 1; + + LoadBalancingOptions load_balancing_options = 2 [deprecated = true]; + + // Configuration for the channel pool. + ChannelPoolConfiguration channel_configuration = 3; + + // Configuration for the session pools. + SessionPoolConfiguration session_pool_configuration = 4; +} + +// Server provided instructions for enabling finer grained observability on +// the client to help diagnose customer issues. Internal usage only. +message TelemetryConfiguration { + // The level of detail of telemetry to be sent from the client. + enum Level { + // Server did not specify a level. Should disable all debug tag counters. + LEVEL_UNSPECIFIED = 0; + + // Enables all debug tag counter levels. + DEBUG = 1; + + // Eables all debug tag counters except for DEBUG. + INFO = 2; + + // Enables all debug tag counters except for DEBUG and INFO. + WARN = 3; + + // Enables only error debug tag counters. + ERROR = 4; + } + + // Selector for the debug counters that should be uploaded. + Level debug_tag_level = 1; +} + +// Configuration for the Session API. Internal usage only. +message ClientConfiguration { + message PollingConfiguration { + // A duration describing the time between GetClientConfiguration RPCs. + // Only strictly positive values are permissible. + google.protobuf.Duration polling_interval = 1; + + // How long the client should consider the configuration it receives from + // GetClientConfiguration valid for. Once this duration has passed, the + // client should consider the configuration invalid and must either: + // - Get a new configuration from GetClientConfiguration + // - Or if it cannot, use a sane default configuration + // + // This duration will be at least as long as the polling interval. + google.protobuf.Duration validity_duration = 2; + + // Number of times the client should retry a failed + // GetClientConfiguration RPC per polling interval before giving up. + int32 max_rpc_retry_count = 6; + } + + // The configuration for Bigtable Sessions. + SessionClientConfiguration session_configuration = 2; + + // How often the client should refresh this configuration. + oneof polling { + // If the client should cease to check for new configurations, e.g. a + // backstop to prevent excessive GetClientConfiguration RPCs. + bool stop_polling = 3; + + // Deprecated, prerfer polling_configuration. + // + // A duration describing the time between GetClientConfiguration RPCs. + // Only strictly positive values are permissible. + google.protobuf.Duration polling_interval = 4 [deprecated = true]; + + // If the client should continue to check for new configurations. + PollingConfiguration polling_configuration = 5; + } + + // Configuration for telemetry. + TelemetryConfiguration telemetry_configuration = 6; +} + +// Internal usage only. +message SessionRequest { + oneof payload { + OpenSessionRequest open_session = 1; + + CloseSessionRequest close_session = 2; + + VirtualRpcRequest virtual_rpc = 3; + } +} + +// Internal usage only. +message SessionResponse { + oneof payload { + OpenSessionResponse open_session = 1; + + // A vRPC can result in either a successful result or an error. + // Error results are separate to allow for multiple vRPC responses, + // e.g. for streaming calls like scans (post-V1). See Flow Control. + VirtualRpcResponse virtual_rpc = 2; + + ErrorResponse error = 3; + + SessionParametersResponse session_parameters = 4; + + HeartbeatResponse heartbeat = 5; + + GoAwayResponse go_away = 6; + + SessionRefreshConfig session_refresh_config = 7; + } +} + +// Internal usage only. +message OpenSessionRequest { + // A version indicator from the client stating its understanding of the + // protocol. This is to disambiguate client behavior amidst changes in + // semantic usage of the API, e.g. if the structure remains the same but + // behavior changes. + int64 protocol_version = 1; + + // Client settings, including a record of + FeatureFlags flags = 2; + + // Used for serverside observability. + int64 consecutive_failed_connection_attempts = 3; + + // How the request should be routed (if presented as part of a GOAWAY + // from a previous session). Post V1. + bytes routing_cookie = 4; + + // Can be Open{Table,AuthorizedView,MaterializedView}Request, + // (or in post-V1, PrepareSqlQueryRequest) + bytes payload = 5; +} + +// Information about the connected backends from a session client's +// perspective. This information may be used to make choices about session +// re-establishment en-masse for sessions with the same backend identifiers. +// Internal usage only. +message BackendIdentifier { + // An opaque identifier for the Google Frontend which serviced this request. + // Only set when not using DirectAccess. + int64 google_frontend_id = 1; + + // An opaque identifier for the application frontend which serviced this + // request. + int64 application_frontend_id = 2; + + // The zone of the application frontend that served this request. + string application_frontend_zone = 3; +} + +// Internal usage only. +message OpenSessionResponse { + // Information on the backend(s) that are hosting this session. + BackendIdentifier backend = 2; + + // Can be Open{Table,AuthorizedView,MaterializedView}Response, + // (or in post-V1, PrepareSqlQueryResponse) + bytes payload = 1; +} + +// Internal usage only. +message CloseSessionRequest { + // Client-generated reason for terminating the session, including a + // plain-text description of why. + // 'reason' may be used for metrics, while both may be logged (server-side). + enum CloseSessionReason { + CLOSE_SESSION_REASON_UNSET = 0; + + CLOSE_SESSION_REASON_GOAWAY = 1; + + CLOSE_SESSION_REASON_ERROR = 2; + + CLOSE_SESSION_REASON_USER = 3; + + CLOSE_SESSION_REASON_DOWNSIZE = 4; + + CLOSE_SESSION_REASON_MISSED_HEARTBEAT = 5; + } + + CloseSessionReason reason = 1; + + string description = 2; +} + +// Internal usage only. +message OpenTableRequest { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TABLE; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + + PERMISSION_WRITE = 2; + + PERMISSION_READ_WRITE = 3; + } + + string table_name = 1; + + string app_profile_id = 2; + + Permission permission = 3; +} + +// Internal usage only. +message OpenTableResponse { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_TABLE; +} + +// Open sessions for an AuthorizedView. Internal usage only. +message OpenAuthorizedViewRequest { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + + PERMISSION_WRITE = 2; + + PERMISSION_READ_WRITE = 3; + } + + // The Authorized view name to read and write from. Values are of the form + // `projects//instances//tables/
    /authorizedViews/`. + string authorized_view_name = 1; + + // The app profile id to use for the authorized view sessions. + string app_profile_id = 2; + + // Permission for the session. + Permission permission = 3; +} + +// Internal usage only. +message OpenAuthorizedViewResponse { + option (google.bigtable.v2.open_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; +} + +// Open sessions for a MaterializedView. Internal usage only. +message OpenMaterializedViewRequest { + option (google.bigtable.v2.open_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + enum Permission { + PERMISSION_UNSET = 0; + + PERMISSION_READ = 1; + } + + // The Materialized view name to read and write from. Values are of the form + // `projects//instances//materializedViews/`. + string materialized_view_name = 1; + + // The app profile id to use for the materialized view sessions. + string app_profile_id = 2; + + // Permission for the session. + Permission permission = 3; +} + +// Internal usage only. +message OpenMaterializedViewResponse { + option (google.bigtable.v2.open_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; +} + +// Internal usage only. +message VirtualRpcRequest { + // Container for all vRPC Metadata. + message Metadata { + // Track retry attempts for this vRPC at the AFE. + int64 attempt_number = 1; + + // Track the client's known start time for the attempt. This is likely not + // easily compared with the server's time due to clock skew. + google.protobuf.Timestamp attempt_start = 2; + + // Link OpenTelemetry traces (e.g. Tapper). This can be used to link + // attempts together for the same logical operation (e.g. in logs / traces). + // + // Note, this may not be needed for V1, TBD. + string traceparent = 3; + } + + // Client chosen, monotonically increasing identifier for the request. + // Must be unique within a session. + int64 rpc_id = 1; + + // Attempt deadline. + // + // Note, this may not be needed for V1, TBD (e.g. operation vs attempt + // deadline). + google.protobuf.Duration deadline = 2; + + // vRPC metadata. + Metadata metadata = 3; + + // Could be TableRequest (or in post-V1, SqlRequest) + bytes payload = 4; +} + +// Information on which Cluster served a vRPC, e.g. for Client-Side metrics. +// Internal usage only. +message ClusterInformation { + string cluster_id = 1; + + string zone_id = 2; +} + +// Internal usage only. +message SessionRequestStats { + // Backend (critical section) latency for the request. + google.protobuf.Duration backend_latency = 1; +} + +// Internal usage only. +message VirtualRpcResponse { + // Which vRPC this response is for. + int64 rpc_id = 1; + + ClusterInformation cluster_info = 2; + + SessionRequestStats stats = 4; + + // Could be TableResponse (or in post-V1, SqlResponse) + bytes payload = 3; +} + +// Internal usage only. +message ErrorResponse { + // Which vRPC this response is for. + int64 rpc_id = 1; + + ClusterInformation cluster_info = 2; + + // The error from the vRPC and any retry information to consider. + google.rpc.Status status = 3; + + google.rpc.RetryInfo retry_info = 4; +} + +// Internal usage only. +message TableRequest { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TABLE; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + + SessionMutateRowRequest mutate_row = 2; + } +} + +// Internal usage only. +message TableResponse { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_TABLE; + + oneof payload { + SessionReadRowResponse read_row = 1; + + SessionMutateRowResponse mutate_row = 2; + } +} + +// A request wrapper for operations on an authorized view. Internal usage only. +message AuthorizedViewRequest { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + + SessionMutateRowRequest mutate_row = 2; + } +} + +// A response wrapper for operations on an authorized view. Internal usage only. +message AuthorizedViewResponse { + option (google.bigtable.v2.vrpc_session_type) = SESSION_TYPE_AUTHORIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowResponse read_row = 1; + + SessionMutateRowResponse mutate_row = 2; + } +} + +// A request wrapper for operations on a materialized view. Internal usage only. +message MaterializedViewRequest { + option (google.bigtable.v2.vrpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowRequest read_row = 1; + } +} + +// A response wrapper for operations on a materialized view. Internal usage +// only. +message MaterializedViewResponse { + option (google.bigtable.v2.vrpc_session_type) = + SESSION_TYPE_MATERIALIZED_VIEW; + + // Note in V1 we target only pure point operations. + oneof payload { + SessionReadRowResponse read_row = 1; + } +} + +// Internal usage only. +message SessionReadRowRequest { + bytes key = 1; + + RowFilter filter = 2; +} + +// Internal usage only. +message SessionReadRowResponse { + Row row = 1; + + RequestStats stats = 2; +} + +// Internal usage only. +message SessionMutateRowRequest { + bytes key = 1; + + repeated Mutation mutations = 2; +} + +// Internal usage only. +message SessionMutateRowResponse {} + +// Internal usage only. +message SessionParametersResponse { + // Maximum time between messages that the AFE will send to the client. The + // client may use this information to determine its control-flow in relation + // to pruning black-holed or otherwise non-responsive sessions. Must be set + // and positive. + // + // See also Heartbeats. + google.protobuf.Duration keep_alive = 1; +} + +// Internal usage only. +message HeartbeatResponse {} + +// Internal usage only. +message GoAwayResponse { + // Server-generated reason for GOAWAY, including a plain-text description of + // why. 'reason' may be used for CSM, while both may be logged. + string reason = 1; + + string description = 2; + + // The last vRPC which was admitted by the AFE. The client may expect the + // result from the vRPC on the stream before disconnecting, and should + // retry vRPCs beyond this boundary. + int64 last_rpc_id_admitted = 3; +} + +// Internal usage only. +message SessionRefreshConfig { + // Any additional metadata to include when reconnecting. Not a `map<>` type as + // this can be a multimap. + message Metadata { + // Output only. The key for the metadata entry. + string key = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The value for the metadata entry. + bytes value = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // An optimized Open request that the session may use on a retry when + // establishing this session again. This can be sent from the AFE to + // avoid certain work e.g. encoding a query plan for BTQL. + OpenSessionRequest optimized_open_request = 1; + + // Output only. Any additional metadata to include when reconnecting. + repeated Metadata metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/types.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/types.proto index 71817d44cd..607cf2bea9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/types.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/types.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// 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. @@ -31,36 +31,41 @@ option ruby_package = "Google::Cloud::Bigtable::V2"; // familiarity and consistency across products and features. // // For compatibility with Bigtable's existing untyped APIs, each `Type` includes -// an `Encoding` which describes how to convert to/from the underlying data. +// an `Encoding` which describes how to convert to or from the underlying data. // -// Each encoding also defines the following properties: +// Each encoding can operate in one of two modes: // -// * Order-preserving: Does the encoded value sort consistently with the -// original typed value? Note that Bigtable will always sort data based on -// the raw encoded value, *not* the decoded type. -// - Example: BYTES values sort in the same order as their raw encodings. -// - Counterexample: Encoding INT64 as a fixed-width decimal string does -// *not* preserve sort order when dealing with negative numbers. -// `INT64(1) > INT64(-1)`, but `STRING("-00001") > STRING("00001)`. -// * Self-delimiting: If we concatenate two encoded values, can we always tell -// where the first one ends and the second one begins? -// - Example: If we encode INT64s to fixed-width STRINGs, the first value -// will always contain exactly N digits, possibly preceded by a sign. -// - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have -// no way to tell where the first one ends. -// * Compatibility: Which other systems have matching encoding schemes? For -// example, does this encoding have a GoogleSQL equivalent? HBase? Java? +// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` +// if and only if `X <= Y`. This is useful anywhere sort order is important, +// for example when encoding keys. +// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then +// `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For +// example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}` +// are valid encodings of the same JSON value. +// +// The API clearly documents which mode is used wherever an encoding can be +// configured. Each encoding also documents which values are supported in which +// modes. For example, when encoding INT64 as a numeric STRING, negative numbers +// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but +// `STRING("-00001") > STRING("00001")`. message Type { // Bytes // Values of type `Bytes` are stored in `Value.bytes_value`. message Bytes { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { - // Leaves the value "as-is" - // * Order-preserving? Yes - // * Self-delimiting? No - // * Compatibility? N/A - message Raw {} + // Leaves the value as-is. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message Raw { + // If set, allows NULL values to be encoded as the empty string "". + // + // The actual empty string, or any value which only contains the + // null byte `0x00`, has one more null byte appended. + bool escape_nulls = 1; + } // Which encoding to use. oneof encoding { @@ -69,28 +74,47 @@ message Type { } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } // String // Values of type `String` are stored in `Value.string_value`. message String { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { // Deprecated: prefer the equivalent `Utf8Bytes`. message Utf8Raw { option deprecated = true; } - // UTF-8 encoding - // * Order-preserving? Yes (code point order) - // * Self-delimiting? No - // * Compatibility? - // - BigQuery Federation `TEXT` encoding - // - HBase `Bytes.toBytes` - // - Java `String#getBytes(StandardCharsets.UTF_8)` - message Utf8Bytes {} + // UTF-8 encoding. + // + // Sorted mode: + // - All values are supported. + // - Code point order is preserved. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `TEXT` encoding + // - HBase `Bytes.toBytes` + // - Java `String#getBytes(StandardCharsets.UTF_8)` + message Utf8Bytes { + // Single-character escape sequence used to support NULL values. + // + // If set, allows NULL values to be encoded as the empty string "". + // + // The actual empty string, or any value where every character equals + // `null_escape_char`, has one more `null_escape_char` appended. + // + // If `null_escape_char` is set and does not equal the ASCII null + // character `0x00`, then the encoding will not support sorted mode. + // + // . + string null_escape_char = 1; + } // Which encoding to use. oneof encoding { @@ -102,36 +126,50 @@ message Type { } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } // Int64 // Values of type `Int64` are stored in `Value.int_value`. message Int64 { - // Rules used to convert to/from lower level types. + // Rules used to convert to or from lower level types. message Encoding { - // Encodes the value as an 8-byte big endian twos complement `Bytes` - // value. - // * Order-preserving? No (positive values only) - // * Self-delimiting? Yes - // * Compatibility? - // - BigQuery Federation `BINARY` encoding - // - HBase `Bytes.toBytes` - // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + // Encodes the value as an 8-byte big-endian two's complement value. + // + // Sorted mode: non-negative values are supported. + // + // Distinct mode: all values are supported. + // + // Compatible with: + // + // - BigQuery `BINARY` encoding + // - HBase `Bytes.toBytes` + // - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` message BigEndianBytes { // Deprecated: ignored if set. - Bytes bytes_type = 1; + Bytes bytes_type = 1 [deprecated = true]; } + // Encodes the value in a variable length binary format of up to 10 bytes. + // Values that are closer to zero use fewer bytes. + // + // Sorted mode: all values are supported. + // + // Distinct mode: all values are supported. + message OrderedCodeBytes {} + // Which encoding to use. oneof encoding { // Use `BigEndianBytes` encoding. BigEndianBytes big_endian_bytes = 1; + + // Use `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 2; } } - // The encoding to use when converting to/from lower level types. + // The encoding to use when converting to or from lower level types. Encoding encoding = 1; } @@ -149,7 +187,24 @@ message Type { // Timestamp // Values of type `Timestamp` are stored in `Value.timestamp_value`. - message Timestamp {} + message Timestamp { + // Rules used to convert to or from lower level types. + message Encoding { + // Which encoding to use. + oneof encoding { + // Encodes the number of microseconds since the Unix epoch using the + // given `Int64` encoding. Values must be microsecond-aligned. + // + // Compatible with: + // + // - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` + Int64.Encoding unix_micros_int64 = 1; + } + } + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 1; + } // Date // Values of type `Date` are stored in `Value.date_value`. @@ -170,8 +225,119 @@ message Type { Type type = 2; } + // Rules used to convert to or from lower level types. + message Encoding { + // Uses the encoding of `fields[0].type` as-is. + // Only valid if `fields.size == 1`. + message Singleton {} + + // Fields are encoded independently and concatenated with a configurable + // `delimiter` in between. + // + // A struct with no fields defined is encoded as a single `delimiter`. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - Encoded field values must not contain any bytes <= `delimiter[0]` + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - Encoded field values must not contain `delimiter[0]`. + message DelimitedBytes { + // Byte sequence used to delimit concatenated fields. The delimiter must + // contain at least 1 character and at most 50 characters. + bytes delimiter = 1; + } + + // Fields are encoded independently and concatenated with the fixed byte + // pair `{0x00, 0x01}` in between. + // + // Any null `(0x00)` byte in an encoded field is replaced by the fixed + // byte pair `{0x00, 0xFF}`. + // + // Fields that encode to the empty string "" have special handling: + // + // - If *every* field encodes to "", or if the STRUCT has no fields + // defined, then the STRUCT is encoded as the fixed byte pair + // `{0x00, 0x00}`. + // - Otherwise, the STRUCT only encodes until the last non-empty field, + // omitting any trailing empty fields. Any empty fields that aren't + // omitted are replaced with the fixed byte pair `{0x00, 0x00}`. + // + // Examples: + // + // ``` + // - STRUCT() -> "\00\00" + // - STRUCT("") -> "\00\00" + // - STRUCT("", "") -> "\00\00" + // - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "") -> "A" + // - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" + // - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" + // ``` + // + // + // Since null bytes are always escaped, this encoding can cause size + // blowup for encodings like `Int64.BigEndianBytes` that are likely to + // produce many such bytes. + // + // Sorted mode: + // + // - Fields are encoded in sorted mode. + // - All values supported by the field encodings are allowed + // - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + // `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + // + // Distinct mode: + // + // - Fields are encoded in distinct mode. + // - All values supported by the field encodings are allowed. + message OrderedCodeBytes {} + + // Which encoding to use. + oneof encoding { + // Use `Singleton` encoding. + Singleton singleton = 1; + + // Use `DelimitedBytes` encoding. + DelimitedBytes delimited_bytes = 2; + + // User `OrderedCodeBytes` encoding. + OrderedCodeBytes ordered_code_bytes = 3; + } + } + // The names and types of the fields in this struct. repeated Field fields = 1; + + // The encoding to use when converting to or from lower level types. + Encoding encoding = 2; + } + + // A protobuf message type. + // Values of type `Proto` are stored in `Value.bytes_value`. + message Proto { + // The ID of the schema bundle that this proto is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf message, including package. In + // the format of "foo.bar.Message". + string message_name = 2; + } + + // A protobuf enum type. + // Values of type `Enum` are stored in `Value.int_value`. + message Enum { + // The ID of the schema bundle that this enum is defined in. + string schema_bundle_id = 1; + + // The fully qualified name of the protobuf enum message, including package. + // In the format of "foo.bar.EnumMessage". + string enum_name = 2; } // An ordered list of elements of a given type. @@ -199,9 +365,9 @@ message Type { // A value that combines incremental updates into a summarized value. // - // Data is never directly written or read using type `Aggregate`. Writes will - // provide either the `input_type` or `state_type`, and reads will always - // return the `state_type` . + // Data is never directly written or read using type `Aggregate`. Writes + // provide either the `input_type` or `state_type`, and reads always return + // the `state_type` . message Aggregate { // Computes the sum of the input values. // Allowed input: `Int64` @@ -227,14 +393,13 @@ message Type { // Special state conversions: `Int64` (the unique count estimate) message HyperLogLogPlusPlusUniqueCount {} - // Type of the inputs that are accumulated by this `Aggregate`, which must - // specify a full encoding. + // Type of the inputs that are accumulated by this `Aggregate`. // Use `AddInput` mutations to accumulate new inputs. Type input_type = 1; // Output only. Type that holds the internal accumulator state for the // `Aggregate`. This is a function of the `input_type` and `aggregator` - // chosen, and will always specify a full encoding. + // chosen. Type state_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Which aggregator function to use. The configured types must match. @@ -290,5 +455,11 @@ message Type { // Map Map map_type = 4; + + // Proto + Proto proto_type = 13; + + // Enum + Enum enum_type = 14; } } diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 0086139fdb..3abc0a6617 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.2.0 + 1.2.2 @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.40.0 + 2.67.0 @@ -49,6 +49,11 @@ + + + ../snippets/src/main/resources + + org.codehaus.mojo diff --git a/samples/native-image-sample/README.md b/samples/native-image-sample/README.md deleted file mode 100644 index a797a9a78e..0000000000 --- a/samples/native-image-sample/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# BigTable Sample Application with Native Image - -This application uses the [Google Cloud BigTable Client Libraries](https://cloud.google.com/bigtable/docs/reference/libraries) and is compatible with Native Image compilation. - -The application runs through some simple BigTable Client Library operations to demonstrate compatibility. - -## Setup Instructions - -You will need to follow these prerequisite steps in order to run the samples: - -1. If you have not already, [create a Google Cloud Platform Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project). - -2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/) which will allow you to run the sample with your project's credentials. - - Once installed, log in with Application Default Credentials using the following command: - - ``` - gcloud auth application-default login - ``` - - **Note:** Authenticating with Application Default Credentials is convenient to use during development, but we recommend [alternate methods of authentication](https://cloud.google.com/docs/authentication/production) during production use. - -3. Install the native image compiler. - - You can follow the [installation instructions](https://www.graalvm.org/docs/getting-started/#install-graalvm). - After following the instructions, ensure that you install the native image extension installed by running: - - ``` - gu install native-image - ``` - - Once you finish following the instructions, verify that the default version of Java is set to the GraalVM version by running `java -version` in a terminal. - - You will see something similar to the below output: - - ``` - $ java -version - - openjdk version "17.0.3" 2022-04-19 - OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) - OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing) - ``` - -## BigTable Environment setup -The following sections describe how you can run the sample application against the BigTable emulator or a real BigTable instance. - -1. *(Using emulator)* If you wish to run the application against the [BigTable emulator](https://cloud.google.com/bigtable/docs/emulator), ensure that you have the [Google Cloud SDK](https://cloud.google.com/sdk) installed. - - In a new terminal window, start the emulator via `gcloud`: - - ``` - gcloud beta emulators bigtable start --host-port=localhost:9010 - ``` - - Leave the emulator running in this terminal for now. - In the next section, we will run the sample application against the BigTable emulator instance. - -2. *(Using real BigTable instance)* If instead you wish to run the application against a real BigTable instance, ensure you already have a BigTable instance created. - - For example, the following command creates a new BigTable instance named `nativeimage-test-instance`. - - ``` - gcloud bigtable instances create nativeimage-test-instance \ - --cluster=nativeimage-test-cluster \ - --cluster-zone=us-central1-c \ - --cluster-num-nodes=1 \ - --display-name=nativeimage-test-instance - ``` - - You can also manually manage your BigTable resources through the [BigTable Cloud Console view](http://console.cloud.google.com/bigtable). - -## Run with Native Image Compilation - -1. Compile the application with the Native Image compiler. - - ``` - mvn package -P native -DskipTests - ``` - -2. **(Optional)** If you're using the emulator, export the `BIGTABLE_EMULATOR_HOST` as an environment variable in your terminal. - - ``` - export BIGTABLE_EMULATOR_HOST=localhost:9010 - ``` - - The BigTable Client Libraries will detect this environment variable and automatically connect to the emulator instance if this variable is set. - -3. Run the application. - Pass in the BigTable instance you wish to use via the `-Dbigtable.instance` property. - - ``` - ./target/bigtable-sample -Dbigtable.instance={BIGTABLE_INSTANCE_NAME} - ``` - -4. The application will run through some basic BigTable operations and log some output statements. - - ``` - Created table: nativeimage-test-table2b5b0031-f4ea-4c39-bc0c-bf6c3c62c90c - Successfully wrote row: phone#1608775178843000 - Reading phone data in table: - Key: phone#1608775178843000 - connected_cell: @1608775178843000 - connected_wifi: @1608775178843000 - os_build: PQ2A.190405.003 @1608775178843000 - Deleted table: nativeimage-test-table2b5b0031-f4ea-4c39-bc0c-bf6c3c62c90c - ``` -## Run integration test for the sample - -In order to run the sample's integration test, call the following command: - - ``` - mvn test -P native - ``` diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml deleted file mode 100644 index d11eb99521..0000000000 --- a/samples/native-image-sample/pom.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - 4.0.0 - com.example.bigtable - native-image-sample - Native Image Sample - https://github.com/googleapis/java-bigtable - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - - com.google.cloud - libraries-bom - 26.25.0 - pom - import - - - - - - - com.google.cloud - google-cloud-bigtable - - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.4.4 - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - com.example.bigquery.NativeImageBigtableSample - - - - - - - - - - - - native - - - - org.junit.vintage - junit-vintage-engine - 5.10.3 - test - - - org.graalvm.buildtools - junit-platform-native - 0.10.2 - test - - - - - - - org.graalvm.buildtools - native-maven-plugin - 0.10.2 - true - - com.example.bigtable.NativeImageBigtableSample - - - --no-fallback - --no-server - - - - - build-native - - build - test - - package - - - test-native - - test - - test - - - - - - - - diff --git a/samples/native-image-sample/src/main/java/com/example/bigtable/NativeImageBigtableSample.java b/samples/native-image-sample/src/main/java/com/example/bigtable/NativeImageBigtableSample.java deleted file mode 100644 index 99d902721b..0000000000 --- a/samples/native-image-sample/src/main/java/com/example/bigtable/NativeImageBigtableSample.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2020-2021 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.example.bigtable; - -import com.google.api.gax.rpc.ServerStream; -import com.google.cloud.ServiceOptions; -import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; -import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings; -import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; -import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; -import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; -import com.google.cloud.bigtable.admin.v2.models.Instance; -import com.google.cloud.bigtable.admin.v2.models.StorageType; -import com.google.cloud.bigtable.data.v2.BigtableDataClient; -import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.cloud.bigtable.data.v2.models.Query; -import com.google.cloud.bigtable.data.v2.models.Row; -import com.google.cloud.bigtable.data.v2.models.RowCell; -import com.google.cloud.bigtable.data.v2.models.RowMutation; -import com.google.common.collect.ImmutableMap; -import com.google.protobuf.ByteString; -import java.io.IOException; -import java.util.Map.Entry; -import java.util.UUID; - -/** Sample Cloud BigTable application. */ -public class NativeImageBigtableSample { - - private static final String INSTANCE_NAME = - System.getProperty("bigtable.instance", "nativeimage-test-instance"); - private static final String TABLE_NAME = "nativeimage-test-"; - - private static final String COLUMN_FAMILY_NAME = "stats_summary"; - - /** Entrypoint to the BigTable sample application. */ - public static void main(String[] args) throws IOException { - String projectId = ServiceOptions.getDefaultProjectId(); - - BigtableTableAdminSettings adminClientSettings = - BigtableTableAdminSettings.newBuilder() - .setInstanceId(INSTANCE_NAME) - .setProjectId(projectId) - .build(); - BigtableDataSettings clientSettings = - BigtableDataSettings.newBuilder() - .setInstanceId(INSTANCE_NAME) - .setProjectId(projectId) - .build(); - BigtableInstanceAdminSettings instanceAdminSettings = - BigtableInstanceAdminSettings.newBuilder().setProjectId(projectId).build(); - - BigtableTableAdminClient adminClient = BigtableTableAdminClient.create(adminClientSettings); - BigtableDataClient standardClient = BigtableDataClient.create(clientSettings); - BigtableInstanceAdminClient instanceAdminClient = - BigtableInstanceAdminClient.create(instanceAdminSettings); - - if (!instanceAdminClient.exists(INSTANCE_NAME)) { - instanceAdminClient.createInstance( - CreateInstanceRequest.of(INSTANCE_NAME) - .addCluster("cluster", "us-central1-f", 3, StorageType.SSD) - .setType(Instance.Type.PRODUCTION) - .addLabel("example", "instance_admin")); - } - String tableName = TABLE_NAME + UUID.randomUUID().toString().replace("-", ""); - - createTable(adminClient, tableName); - - // Add data into table - ImmutableMap dataWithLong = - ImmutableMap.of("connected_cell", 1L, "connected_wifi", 1L); - ImmutableMap dataWithStrings = ImmutableMap.of("os_build", "PQ2A.190405.003"); - - long timestamp = System.currentTimeMillis() * 1000; - insertData(standardClient, tableName, timestamp, dataWithLong, dataWithStrings); - readData(standardClient, tableName); - - // Clean up - deleteTable(adminClient, tableName); - } - - static void readData(BigtableDataClient client, String tableId) { - Query query = Query.create(tableId).prefix(""); - ServerStream rows = client.readRows(query); - - System.out.println("Reading phone data in table:"); - for (Row row : rows) { - System.out.println("Key: " + row.getKey().toStringUtf8()); - for (RowCell cell : row.getCells()) { - System.out.printf( - "\t%s: %s @%s\n", - cell.getQualifier().toStringUtf8(), - cell.getValue().toStringUtf8(), - cell.getTimestamp()); - } - System.out.println(); - } - } - - public static void insertData( - BigtableDataClient client, - String tableId, - long timestamp, - ImmutableMap dataWithLong, - ImmutableMap dataWithStrings) { - String rowKey = String.format("phone#%d", timestamp); - RowMutation rowMutation = RowMutation.create(tableId, rowKey); - for (Entry longEntry : dataWithLong.entrySet()) { - rowMutation.setCell( - COLUMN_FAMILY_NAME, - ByteString.copyFrom(longEntry.getKey().getBytes()), - timestamp, - longEntry.getValue()); - } - - for (Entry stringEntry : dataWithStrings.entrySet()) { - rowMutation.setCell( - COLUMN_FAMILY_NAME, stringEntry.getKey(), timestamp, stringEntry.getValue()); - } - - client.mutateRow(rowMutation); - System.out.println("Successfully wrote row: " + rowKey); - } - - public static void createTable(BigtableTableAdminClient adminClient, String table) { - adminClient.createTable(CreateTableRequest.of(table).addFamily(COLUMN_FAMILY_NAME)); - System.out.println("Created table: " + table); - } - - static void deleteTable(BigtableTableAdminClient adminClient, String table) { - adminClient.deleteTable(table); - System.out.println("Deleted table: " + table); - } -} diff --git a/samples/native-image-sample/src/test/java/com/example/bigtable/NativeImageBigtableTest.java b/samples/native-image-sample/src/test/java/com/example/bigtable/NativeImageBigtableTest.java deleted file mode 100644 index f1ecf94661..0000000000 --- a/samples/native-image-sample/src/test/java/com/example/bigtable/NativeImageBigtableTest.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2022 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.example.bigtable; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.cloud.ServiceOptions; -import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; -import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings; -import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; -import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; -import com.google.cloud.bigtable.admin.v2.models.Instance; -import com.google.cloud.bigtable.admin.v2.models.StorageType; -import com.google.cloud.bigtable.data.v2.BigtableDataClient; -import com.google.cloud.bigtable.data.v2.BigtableDataSettings; -import com.google.common.collect.ImmutableMap; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintStream; -import java.time.Instant; -import java.util.UUID; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class NativeImageBigtableTest { - - private static final String INSTANCE_NAME = - System.getProperty("bigtable.instance", "nativeimage-it-instance"); - private static final String TABLE_SUFFIX = "nativeimage-it-"; - - private static final String PROJECT_ID = ServiceOptions.getDefaultProjectId(); - - private static final Instant TIMESTAMP = Instant.EPOCH; - - private String tableName; - private BigtableDataClient dataClient; - private BigtableTableAdminClient adminClient; - - private static PrintStream originalOut; - public ByteArrayOutputStream bout; - - @After - public void tearDown() { - System.setOut(originalOut); - bout.reset(); - } - - @Before - public void setUp() throws IOException { - // Create instance if not present - BigtableInstanceAdminSettings instanceAdminSettings = - BigtableInstanceAdminSettings.newBuilder().setProjectId(PROJECT_ID).build(); - BigtableInstanceAdminClient instanceAdminClient = - BigtableInstanceAdminClient.create(instanceAdminSettings); - if (!instanceAdminClient.exists(INSTANCE_NAME)) { - instanceAdminClient.createInstance( - CreateInstanceRequest.of(INSTANCE_NAME) - .addCluster("cluster", "us-central1-f", 3, StorageType.SSD) - .setType(Instance.Type.PRODUCTION) - .addLabel("example", "instance_admin")); - } - - BigtableTableAdminSettings adminClientSettings = - BigtableTableAdminSettings.newBuilder() - .setInstanceId(INSTANCE_NAME) - .setProjectId(PROJECT_ID) - .build(); - BigtableDataSettings clientSettings = - BigtableDataSettings.newBuilder() - .setInstanceId(INSTANCE_NAME) - .setProjectId(PROJECT_ID) - .build(); - adminClient = BigtableTableAdminClient.create(adminClientSettings); - tableName = TABLE_SUFFIX + UUID.randomUUID().toString().replace("-", ""); - NativeImageBigtableSample.createTable(adminClient, tableName); - - dataClient = BigtableDataClient.create(clientSettings); - - // To test output stream - originalOut = System.out; - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - } - - @Test - public void testReadData() { - ImmutableMap dataWithInts = ImmutableMap.of("connection_cell", 1L); - ImmutableMap dataWithStrings = ImmutableMap.of("os_build", "build_value"); - NativeImageBigtableSample.insertData( - dataClient, tableName, TIMESTAMP.getEpochSecond(), dataWithInts, dataWithStrings); - - NativeImageBigtableSample.readData(dataClient, tableName); - - String output = bout.toString(); - assertThat(output) - .contains( - "Successfully wrote row: phone#0\n" - + "Reading phone data in table:\n" - + "Key: phone#0\n" - + "\tconnection_cell: \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001 @0\n" - + "\tos_build: build_value @0\n\n"); - - // Clean up - NativeImageBigtableSample.deleteTable(adminClient, tableName); - } -} diff --git a/samples/pom.xml b/samples/pom.xml index b80bf27ab5..624ab90266 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.2.0 + 1.2.2 @@ -31,7 +31,6 @@ install-without-bom snapshot snippets - native-image-sample @@ -39,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.2 + 3.1.4 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f463808d69..3c32470985 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.2.0 + 1.2.2 @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.42.0 + 2.76.1-SNAPSHOT @@ -48,6 +48,11 @@ + + + ../snippets/src/main/resources + + org.codehaus.mojo diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4e4239ecc8..41b35ec41d 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 com.google.cloud google-cloud-bigtable-snippets @@ -14,7 +16,7 @@ com.google.cloud.samples shared-configuration - 1.2.0 + 1.2.2 @@ -29,7 +31,7 @@ com.google.cloud libraries-bom - 26.37.0 + 26.69.0 pom import @@ -56,4 +58,18 @@ test + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.3.1 + + + **/SingerProto.java + + + + diff --git a/samples/snippets/src/main/java/com/example/bigtable/Filters.java b/samples/snippets/src/main/java/com/example/bigtable/Filters.java index c27437da58..c8387c17a0 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/Filters.java +++ b/samples/snippets/src/main/java/com/example/bigtable/Filters.java @@ -49,6 +49,7 @@ public static void filterLimitRowSample(String projectId, String instanceId, Str Filter filter = FILTERS.key().sample(.75); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_row_sample] // [START bigtable_filters_limit_row_regex] @@ -65,6 +66,7 @@ public static void filterLimitRowRegex(String projectId, String instanceId, Stri Filter filter = FILTERS.key().regex(".*#20190501$"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_row_regex] // [START bigtable_filters_limit_cells_per_col] @@ -81,6 +83,7 @@ public static void filterLimitCellsPerCol(String projectId, String instanceId, S Filter filter = FILTERS.limit().cellsPerColumn(2); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_cells_per_col] // [START bigtable_filters_limit_cells_per_row] @@ -97,6 +100,7 @@ public static void filterLimitCellsPerRow(String projectId, String instanceId, S Filter filter = FILTERS.limit().cellsPerRow(2); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_cells_per_row] // [START bigtable_filters_limit_cells_per_row_offset] @@ -114,6 +118,7 @@ public static void filterLimitCellsPerRowOffset( Filter filter = FILTERS.offset().cellsPerRow(2); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_cells_per_row_offset] // [START bigtable_filters_limit_col_family_regex] @@ -131,6 +136,7 @@ public static void filterLimitColFamilyRegex( Filter filter = FILTERS.family().regex("stats_.*$"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_col_family_regex] // [START bigtable_filters_limit_col_qualifier_regex] @@ -148,6 +154,7 @@ public static void filterLimitColQualifierRegex( Filter filter = FILTERS.qualifier().regex("connected_.*$"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_col_qualifier_regex] // [START bigtable_filters_limit_col_range] @@ -170,6 +177,7 @@ public static void filterLimitColRange(String projectId, String instanceId, Stri .endOpen("data_plan_10gb"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_col_range] // [START bigtable_filters_limit_value_range] @@ -186,6 +194,7 @@ public static void filterLimitValueRange(String projectId, String instanceId, St Filter filter = FILTERS.value().range().startClosed("PQ2A.190405").endClosed("PQ2A.190406"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_value_range] // [START bigtable_filters_limit_value_regex] @@ -202,6 +211,7 @@ public static void filterLimitValueRegex(String projectId, String instanceId, St Filter filter = FILTERS.value().regex("PQ2A.*$"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_value_regex] // [START bigtable_filters_limit_timestamp_range] @@ -222,6 +232,7 @@ public static void filterLimitTimestampRange( Filter filter = FILTERS.timestamp().range().startClosed(0L).endOpen(timestamp); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_timestamp_range] // [START bigtable_filters_limit_block_all] @@ -238,6 +249,7 @@ public static void filterLimitBlockAll(String projectId, String instanceId, Stri Filter filter = FILTERS.block(); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_block_all] // [START bigtable_filters_limit_pass_all] @@ -254,6 +266,7 @@ public static void filterLimitPassAll(String projectId, String instanceId, Strin Filter filter = FILTERS.pass(); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_limit_pass_all] // [START bigtable_filters_modify_strip_value] @@ -270,6 +283,7 @@ public static void filterModifyStripValue(String projectId, String instanceId, S Filter filter = FILTERS.value().strip(); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_modify_strip_value] // [START bigtable_filters_modify_apply_label] @@ -286,6 +300,7 @@ public static void filterModifyApplyLabel(String projectId, String instanceId, S Filter filter = FILTERS.label("labelled"); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_modify_apply_label] // [START bigtable_filters_composing_chain] @@ -306,6 +321,7 @@ public static void filterComposingChain(String projectId, String instanceId, Str .filter(FILTERS.family().exactMatch("cell_plan")); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_composing_chain] // [START bigtable_filters_composing_interleave] @@ -327,6 +343,7 @@ public static void filterComposingInterleave( .filter(FILTERS.qualifier().exactMatch("os_build")); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_composing_interleave] // [START bigtable_filters_composing_condition] @@ -352,6 +369,7 @@ public static void filterComposingCondition(String projectId, String instanceId, .otherwise(FILTERS.label("filtered-out")); readFilter(projectId, instanceId, tableId, filter); } + // [END bigtable_filters_composing_condition] // [END_EXCLUDE] diff --git a/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java b/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java index 99bc25735d..02a568f615 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java +++ b/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java @@ -24,7 +24,6 @@ import com.google.api.gax.rpc.ServerStream; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; @@ -60,6 +59,8 @@ public class HelloWorld { private static final String COLUMN_QUALIFIER_GREETING = "greeting"; private static final String COLUMN_QUALIFIER_NAME = "name"; private static final String ROW_KEY_PREFIX = "rowKey"; + private final String projectId; + private final String instanceId; private final String tableId; private final BigtableDataClient dataClient; private final BigtableTableAdminClient adminClient; @@ -78,6 +79,8 @@ public static void main(String[] args) throws Exception { } public HelloWorld(String projectId, String instanceId, String tableId) throws IOException { + this.projectId = projectId; + this.instanceId = instanceId; this.tableId = tableId; // [START bigtable_hw_connect] @@ -122,9 +125,19 @@ public void createTable() { // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Creating table: " + tableId); - CreateTableRequest createTableRequest = - CreateTableRequest.of(tableId).addFamily(COLUMN_FAMILY); - adminClient.createTable(createTableRequest); + String parent = "projects/" + projectId + "/instances/" + instanceId; + com.google.bigtable.admin.v2.CreateTableRequest request = + com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() + .setParent(parent) + .setTableId(tableId) + .setTable( + com.google.bigtable.admin.v2.Table.newBuilder() + .putColumnFamilies( + COLUMN_FAMILY, + com.google.bigtable.admin.v2.ColumnFamily.getDefaultInstance()) + .build()) + .build(); + adminClient.getBaseClient().createTable(request); System.out.printf("Table %s created successfully%n", tableId); } // [END bigtable_hw_create_table] @@ -224,6 +237,7 @@ public void filterLimitCellsPerCol(String tableId) { readRowFilter(tableId, filter); readFilter(tableId, filter); } + // [END bigtable_hw_create_filter] // [START bigtable_hw_get_with_filter] @@ -234,6 +248,7 @@ private void readRowFilter(String tableId, Filter filter) { printRow(row); System.out.println("Row filter completed."); } + // [END bigtable_hw_get_with_filter] // [START bigtable_hw_scan_with_filter] @@ -245,6 +260,7 @@ private void readFilter(String tableId, Filter filter) { } System.out.println("Table filter completed."); } + // [END bigtable_hw_scan_with_filter] /** Demonstrates how to delete a table. */ @@ -252,7 +268,9 @@ public void deleteTable() { // [START bigtable_hw_delete_table] System.out.println("\nDeleting table: " + tableId); try { - adminClient.deleteTable(tableId); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + adminClient.getBaseClient().deleteTable(tableName); System.out.printf("Table %s deleted successfully%n", tableId); } catch (NotFoundException e) { System.err.println("Failed to delete a non-existent table: " + e.getMessage()); diff --git a/samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java b/samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java index df813ace39..07ae1fe007 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java +++ b/samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java @@ -16,18 +16,22 @@ package com.example.bigtable; -import com.google.api.gax.rpc.AlreadyExistsException; import com.google.api.gax.rpc.NotFoundException; +import com.google.bigtable.admin.v2.Cluster; +import com.google.bigtable.admin.v2.CreateClusterRequest; +import com.google.bigtable.admin.v2.CreateInstanceRequest; +import com.google.bigtable.admin.v2.DeleteClusterRequest; +import com.google.bigtable.admin.v2.DeleteInstanceRequest; +import com.google.bigtable.admin.v2.GetInstanceRequest; +import com.google.bigtable.admin.v2.Instance; +import com.google.bigtable.admin.v2.ListClustersRequest; +import com.google.bigtable.admin.v2.ListClustersResponse; +import com.google.bigtable.admin.v2.ListInstancesRequest; +import com.google.bigtable.admin.v2.ListInstancesResponse; +import com.google.bigtable.admin.v2.StorageType; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.Cluster; -import com.google.cloud.bigtable.admin.v2.models.CreateClusterRequest; -import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; -import com.google.cloud.bigtable.admin.v2.models.Instance; -import com.google.cloud.bigtable.admin.v2.models.PartialListInstancesException; -import com.google.cloud.bigtable.admin.v2.models.StorageType; import java.io.IOException; -import java.util.List; import java.util.Map; /** @@ -49,6 +53,7 @@ public class InstanceAdminExample { private static final String CLUSTER = "cluster"; + private final String projectId; private final String clusterId; private final String instanceId; private final BigtableInstanceAdminClient adminClient; @@ -68,6 +73,7 @@ public static void main(String[] args) throws IOException { public InstanceAdminExample(String projectId, String instanceId, String clusterId) throws IOException { + this.projectId = projectId; this.instanceId = instanceId; this.clusterId = clusterId; @@ -103,18 +109,33 @@ public void createProdInstance() { // [START bigtable_create_prod_instance] // Creates a Production Instance with the ID "ssd-instance", // cluster id "ssd-cluster", 3 nodes and location "us-central1-f". - CreateInstanceRequest createInstanceRequest = - CreateInstanceRequest.of(instanceId) - .addCluster(clusterId, "us-central1-f", 3, StorageType.SSD) + String parent = "projects/" + projectId; + Instance instanceObj = + Instance.newBuilder() + .setDisplayName(instanceId) .setType(Instance.Type.PRODUCTION) - .addLabel("department", "accounting"); + .putLabels("department", "accounting") + .build(); + Cluster clusterObj = + Cluster.newBuilder() + .setLocation("projects/" + projectId + "/locations/us-central1-f") + .setServeNodes(3) + .setDefaultStorageType(StorageType.SSD) + .build(); + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent) + .setInstanceId(instanceId) + .setInstance(instanceObj) + .putClusters(clusterId, clusterObj) + .build(); // Creates a production instance with the given request. try { - Instance instance = adminClient.createInstance(createInstanceRequest); - System.out.printf("PRODUCTION type instance %s created successfully%n", instance.getId()); + Instance instance = adminClient.getBaseClient().createInstanceAsync(request).get(); + System.out.printf("PRODUCTION type instance %s created successfully%n", instance.getName()); } catch (Exception e) { System.err.println("Failed to create instance: " + e.getMessage()); - throw e; + throw new RuntimeException(e); } // [END bigtable_create_prod_instance] } @@ -125,14 +146,14 @@ public void listInstances() { System.out.println("\nListing Instances"); // [START bigtable_list_instances] try { - List instances = adminClient.listInstances(); - for (Instance instance : instances) { - System.out.println(instance.getId()); + String parent = "projects/" + projectId; + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + ListInstancesResponse response = adminClient.getBaseClient().listInstances(request); + for (Instance instance : response.getInstancesList()) { + System.out.println(instance.getName()); } - } catch (PartialListInstancesException e) { + } catch (Exception e) { System.err.println("Failed to list instances: " + e.getMessage()); - System.err.println("The following zones are unavailable: " + e.getUnavailableZones()); - System.err.println("But the following instances are reachable: " + e.getInstances()); } // [END bigtable_list_instances] } @@ -143,11 +164,13 @@ public Instance getInstance() { // [START bigtable_get_instance] Instance instance = null; try { - instance = adminClient.getInstance(instanceId); - System.out.println("Instance ID: " + instance.getId()); + String name = "projects/" + projectId + "/instances/" + instanceId; + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + instance = adminClient.getBaseClient().getInstance(request); + System.out.println("Instance ID: " + instance.getName()); System.out.println("Display Name: " + instance.getDisplayName()); System.out.print("Labels: "); - Map labels = instance.getLabels(); + Map labels = instance.getLabelsMap(); for (String key : labels.keySet()) { System.out.printf("%s - %s", key, labels.get(key)); } @@ -165,9 +188,11 @@ public void listClusters() { System.out.println("\nListing Clusters"); // [START bigtable_get_clusters] try { - List clusters = adminClient.listClusters(instanceId); - for (Cluster cluster : clusters) { - System.out.println(cluster.getId()); + String parent = "projects/" + projectId + "/instances/" + instanceId; + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + ListClustersResponse response = adminClient.getBaseClient().listClusters(request); + for (Cluster cluster : response.getClustersList()) { + System.out.println(cluster.getName()); } } catch (NotFoundException e) { System.err.println("Failed to list clusters from a non-existent instance: " + e.getMessage()); @@ -180,7 +205,9 @@ public void deleteInstance() { System.out.println("\nDeleting Instance"); // [START bigtable_delete_instance] try { - adminClient.deleteInstance(instanceId); + String name = "projects/" + projectId + "/instances/" + instanceId; + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + adminClient.getBaseClient().deleteInstance(request); System.out.println("Instance deleted: " + instanceId); } catch (NotFoundException e) { System.err.println("Failed to delete non-existent instance: " + e.getMessage()); @@ -193,14 +220,23 @@ public void addCluster() { System.out.printf("%nAdding cluster: %s to instance: %s%n", CLUSTER, instanceId); // [START bigtable_create_cluster] try { - adminClient.createCluster( - CreateClusterRequest.of(instanceId, CLUSTER) - .setZone("us-central1-c") + String parent = "projects/" + projectId + "/instances/" + instanceId; + Cluster clusterObj = + Cluster.newBuilder() + .setLocation("projects/" + projectId + "/locations/us-central1-c") .setServeNodes(3) - .setStorageType(StorageType.SSD)); + .setDefaultStorageType(StorageType.SSD) + .build(); + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent) + .setClusterId(CLUSTER) + .setCluster(clusterObj) + .build(); + adminClient.getBaseClient().createClusterAsync(request).get(); System.out.printf("Cluster: %s created successfully%n", CLUSTER); - } catch (AlreadyExistsException e) { - System.err.println("Failed to add cluster, already exists: " + e.getMessage()); + } catch (Exception e) { + System.err.println("Failed to add cluster: " + e.getMessage()); } // [END bigtable_create_cluster] } @@ -210,7 +246,9 @@ public void deleteCluster() { System.out.printf("%nDeleting cluster: %s from instance: %s%n", CLUSTER, instanceId); // [START bigtable_delete_cluster] try { - adminClient.deleteCluster(instanceId, CLUSTER); + String name = "projects/" + projectId + "/instances/" + instanceId + "/clusters/" + CLUSTER; + DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build(); + adminClient.getBaseClient().deleteCluster(request); System.out.printf("Cluster: %s deleted successfully%n", CLUSTER); } catch (NotFoundException e) { System.err.println("Failed to delete a non-existent cluster: " + e.getMessage()); diff --git a/samples/snippets/src/main/java/com/example/bigtable/Reads.java b/samples/snippets/src/main/java/com/example/bigtable/Reads.java index a5a7923bb3..d1cca037f0 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/Reads.java +++ b/samples/snippets/src/main/java/com/example/bigtable/Reads.java @@ -57,6 +57,7 @@ public static void readRow(String projectId, String instanceId, String tableId) "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_row] // [START bigtable_reads_row_partial] @@ -88,6 +89,7 @@ public static void readRowPartial(String projectId, String instanceId, String ta "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_row_partial] // [START bigtable_reads_rows] @@ -117,6 +119,7 @@ public static void readRows(String projectId, String instanceId, String tableId) "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_rows] // [START bigtable_reads_row_range] @@ -146,6 +149,7 @@ public static void readRowRange(String projectId, String instanceId, String tabl "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_row_range] // [START bigtable_reads_row_ranges] @@ -175,6 +179,7 @@ public static void readRowRanges(String projectId, String instanceId, String tab "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_row_ranges] // [START bigtable_reads_prefix] @@ -201,6 +206,7 @@ public static void readPrefix(String projectId, String instanceId, String tableI "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_prefix] // [START bigtable_reverse_scan] @@ -232,6 +238,7 @@ public static void readRowsReversed(String projectId, String instanceId, String "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reverse_scan] // [START bigtable_reads_filter] @@ -260,6 +267,7 @@ public static void readFilter(String projectId, String instanceId, String tableI "Unable to initialize service client, as a network error occurred: \n" + e.toString()); } } + // [END bigtable_reads_filter] // [END_EXCLUDE] diff --git a/samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java b/samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java new file mode 100644 index 0000000000..7ac0af3fcb --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigtable/SchemaBundleExample.java @@ -0,0 +1,232 @@ +/* + * 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.example.bigtable; + +import com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; +import com.google.cloud.bigtable.admin.v2.models.CreateSchemaBundleRequest; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.SchemaBundle; +import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.admin.v2.models.UpdateSchemaBundleRequest; +import com.google.protobuf.ByteString; +import com.google.protobuf.DescriptorProtos; +import com.google.protobuf.InvalidProtocolBufferException; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +/** + * This example demonstrates the usage of BigtableTableAdminClient to create, configure and delete a + * Cloud Bigtable schema bundle. + * + *

    The example follows these steps: + * + *

      + *
    1. Creates a Bigtable table. + *
    2. Creates a schema bundle. + *
    3. Updates a schema bundle. + *
    4. Gets the schema bundle. + *
    5. Lists all schema bundles for the table. + *
    6. Deletes the schema bundle. + *
    7. Deletes the table. + *
    + */ +public class SchemaBundleExample { + + private static final String COLUMN_FAMILY = "cf"; + private static final String PROTO_FILE_PATH = "com/example/bigtable/descriptors.pb"; + private final String tableId; + private final String schemaBundleId; + private final BigtableTableAdminClient adminClient; + + public static void main(String[] args) throws IOException { + if (args.length != 2) { + System.out.println("Missing required project id or instance id"); + return; + } + String projectId = args[0]; + String instanceId = args[1]; + + SchemaBundleExample example = + new SchemaBundleExample(projectId, instanceId, "test-table", "test-schema-bundle"); + example.run(); + } + + public SchemaBundleExample( + String projectId, String instanceId, String tableId, String schemaBundleId) + throws IOException { + this.tableId = tableId; + this.schemaBundleId = schemaBundleId; + + // Creates the settings to configure a bigtable table admin client. + BigtableTableAdminSettings adminSettings = + BigtableTableAdminSettings.newBuilder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .build(); + + // Creates a bigtable table admin client. + adminClient = BigtableTableAdminClient.create(adminSettings); + } + + public void close() { + adminClient.close(); + } + + public void run() { + createTable(); + createSchemaBundle(); + updateSchemaBundle(); + getSchemaBundle(); + listAllSchemaBundles(); + deleteSchemaBundle(); + deleteTable(); + close(); + } + + public void createTable() { + // Checks if table exists, creates table if it does not exist. + if (!adminClient.exists(tableId)) { + System.out.println("Table does not exist, creating table: " + tableId); + CreateTableRequest createTableRequest = + CreateTableRequest.of(tableId).addFamily(COLUMN_FAMILY); + Table table = adminClient.createTable(createTableRequest); + System.out.printf("Table: %s created successfully%n", table.getId()); + } + } + + public void deleteTable() { + // Deletes the entire table. + System.out.println("\nDelete table: " + tableId); + try { + adminClient.deleteTable(tableId); + System.out.printf("Table: %s deleted successfully%n", tableId); + } catch (NotFoundException e) { + System.err.println("Failed to delete a non-existent table: " + e.getMessage()); + } + } + + /** Demonstrates how to create a schema bundle under a table with the specified schema. */ + public void createSchemaBundle() { + // Checks if the schema bundle exists, creates it if it does not exist. + try { + adminClient.getSchemaBundle(tableId, schemaBundleId); + } catch (NotFoundException exception) { + System.out.printf("%nCreating schema bundle %s in table %s%n", schemaBundleId, tableId); + // [START bigtable_create_schema_bundle] + try { + InputStream in = getClass().getClassLoader().getResourceAsStream(PROTO_FILE_PATH); + CreateSchemaBundleRequest request = + CreateSchemaBundleRequest.of(tableId, schemaBundleId) + .setProtoSchema(ByteString.readFrom(in)); + SchemaBundle schemaBundle = adminClient.createSchemaBundle(request); + System.out.printf("Schema bundle: %s created successfully%n", schemaBundle.getId()); + } catch (NotFoundException e) { + System.err.println( + "Failed to create a schema bundle from a non-existent table: " + e.getMessage()); + } catch (IOException e) { + throw new RuntimeException(e); + } + // [END bigtable_create_schema_bundle] + } + } + + /** Demonstrates how to modify a schema bundle. */ + public void updateSchemaBundle() { + System.out.printf("%nUpdating schema bundle %s in table %s%n", schemaBundleId, tableId); + // [START bigtable_update_schema_bundle] + try { + InputStream in = getClass().getClassLoader().getResourceAsStream(PROTO_FILE_PATH); + UpdateSchemaBundleRequest request = + UpdateSchemaBundleRequest.of(tableId, schemaBundleId) + .setProtoSchema(ByteString.readFrom(in)); + SchemaBundle schemaBundle = adminClient.updateSchemaBundle(request); + System.out.printf("Schema bundle: %s updated successfully%n", schemaBundle.getId()); + } catch (NotFoundException e) { + System.err.println("Failed to modify a non-existent schema bundle: " + e.getMessage()); + } catch (IOException e) { + throw new RuntimeException(e); + } + // [END bigtable_update_schema_bundle] + } + + /** Demonstrates how to get a schema bundle's definition. */ + public SchemaBundle getSchemaBundle() { + System.out.printf("%nGetting schema bundle %s in table %s%n", schemaBundleId, tableId); + // [START bigtable_get_schema_bundle] + SchemaBundle schemaBundle = null; + try { + schemaBundle = adminClient.getSchemaBundle(tableId, schemaBundleId); + // Deserialize and print the FileDescriptorSet + DescriptorProtos.FileDescriptorSet fileDescriptorSet = + DescriptorProtos.FileDescriptorSet.parseFrom(schemaBundle.getProtoSchema()); + + System.out.println("--------- Deserialized FileDescriptorSet ---------"); + for (DescriptorProtos.FileDescriptorProto fileDescriptorProto : + fileDescriptorSet.getFileList()) { + System.out.println("File: " + fileDescriptorProto.getName()); + System.out.println(" Package: " + fileDescriptorProto.getPackage()); + for (DescriptorProtos.DescriptorProto messageType : + fileDescriptorProto.getMessageTypeList()) { + System.out.println(" Message: " + messageType.getName()); + } + } + System.out.println("--------------------------------------------------"); + } catch (InvalidProtocolBufferException e) { + System.err.println("Failed to parse FileDescriptorSet: " + e.getMessage()); + } catch (NotFoundException e) { + System.err.println( + "Failed to retrieve metadata from a non-existent schema bundle: " + e.getMessage()); + } + // [END bigtable_get_schema_bundle] + return schemaBundle; + } + + /** Demonstrates how to list all schema bundles within a table. */ + public List listAllSchemaBundles() { + System.out.printf("%nListing schema bundles in table %s%n", tableId); + // [START bigtable_list_schema_bundles] + List schemaBundleIds = new ArrayList<>(); + try { + schemaBundleIds = adminClient.listSchemaBundles(tableId); + for (String schemaBundleId : schemaBundleIds) { + System.out.println(schemaBundleId); + } + } catch (NotFoundException e) { + System.err.println( + "Failed to list schema bundles from a non-existent table: " + e.getMessage()); + } + // [END bigtable_list_schema_bundles] + return schemaBundleIds; + } + + /** Demonstrates how to delete a schema bundle. */ + public void deleteSchemaBundle() { + System.out.printf("%nDeleting schema bundle %s in table %s%n", schemaBundleId, tableId); + // [START bigtable_delete_schema_bundle] + try { + adminClient.deleteSchemaBundle(tableId, schemaBundleId); + System.out.printf("SchemaBundle: %s deleted successfully%n", schemaBundleId); + } catch (NotFoundException e) { + System.err.println("Failed to delete a non-existent schema bundle: " + e.getMessage()); + } + // [END bigtable_delete_schema_bundle] + } +} diff --git a/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java b/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java index 5f804153a1..009fef3910 100644 --- a/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java +++ b/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java @@ -16,24 +16,19 @@ package com.example.bigtable; -import static com.google.cloud.bigtable.admin.v2.models.GCRules.GCRULES; - import com.google.api.gax.rpc.AlreadyExistsException; import com.google.api.gax.rpc.NotFoundException; +import com.google.bigtable.admin.v2.ColumnFamily; +import com.google.bigtable.admin.v2.CreateTableRequest; +import com.google.bigtable.admin.v2.GcRule; +import com.google.bigtable.admin.v2.ListTablesRequest; +import com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest; +import com.google.bigtable.admin.v2.Table; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.ColumnFamily; -import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; -import com.google.cloud.bigtable.admin.v2.models.GCRules.DurationRule; -import com.google.cloud.bigtable.admin.v2.models.GCRules.IntersectionRule; -import com.google.cloud.bigtable.admin.v2.models.GCRules.UnionRule; -import com.google.cloud.bigtable.admin.v2.models.GCRules.VersionRule; -import com.google.cloud.bigtable.admin.v2.models.ModifyColumnFamiliesRequest; -import com.google.cloud.bigtable.admin.v2.models.Table; +import com.google.cloud.bigtable.admin.v2.models.GcRuleBuilder; import java.io.IOException; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.TimeUnit; +import java.time.Duration; /** * An example of using Google Cloud Bigtable. @@ -64,6 +59,8 @@ public class TableAdminExample { private static final String COLUMN_FAMILY_3 = "cf3"; private static final String COLUMN_FAMILY_4 = "cf4"; private static final String COLUMN_FAMILY_5 = "cf5"; + private final String projectId; + private final String instanceId; private final String tableId; private final BigtableTableAdminClient adminClient; @@ -81,6 +78,8 @@ public static void main(String[] args) throws IOException { } public TableAdminExample(String projectId, String instanceId, String tableId) throws IOException { + this.projectId = projectId; + this.instanceId = instanceId; this.tableId = tableId; // Creates the settings to configure a bigtable table admin client. @@ -122,9 +121,18 @@ public void createTable() { // Checks if table exists, creates table if does not exist. if (!adminClient.exists(tableId)) { System.out.println("Table does not exist, creating table: " + tableId); - CreateTableRequest createTableRequest = CreateTableRequest.of(tableId).addFamily("cf"); - Table table = adminClient.createTable(createTableRequest); - System.out.printf("Table: %s created successfully%n", table.getId()); + String parent = "projects/" + projectId + "/instances/" + instanceId; + CreateTableRequest createTableRequest = + CreateTableRequest.newBuilder() + .setParent(parent) + .setTableId(tableId) + .setTable( + Table.newBuilder() + .putColumnFamilies("cf", ColumnFamily.getDefaultInstance()) + .build()) + .build(); + Table table = adminClient.getBaseClient().createTable(createTableRequest); + System.out.printf("Table: %s created successfully%n", table.getName()); } // [END bigtable_create_table] } @@ -135,9 +143,10 @@ public void listAllTables() { // [START bigtable_list_tables] // Lists tables in the current instance. try { - List tableIds = adminClient.listTables(); - for (String tableId : tableIds) { - System.out.println(tableId); + String parent = "projects/" + projectId + "/instances/" + instanceId; + ListTablesRequest request = ListTablesRequest.newBuilder().setParent(parent).build(); + for (Table table : adminClient.getBaseClient().listTables(request).iterateAll()) { + System.out.println(table.getName()); } } catch (NotFoundException e) { System.err.println("Failed to list tables from a non-existent instance: " + e.getMessage()); @@ -151,13 +160,14 @@ public void getTableMeta() { // [START bigtable_get_table_metadata] // Gets table metadata, and applies a view to the table fields. try { - Table table = adminClient.getTable(tableId); - System.out.println("Table: " + table.getId()); - Collection columnFamilies = table.getColumnFamilies(); - for (ColumnFamily columnFamily : columnFamilies) { + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + Table table = adminClient.getBaseClient().getTable(tableName); + System.out.println("Table: " + table.getName()); + for (java.util.Map.Entry entry : + table.getColumnFamiliesMap().entrySet()) { System.out.printf( - "Column family: %s%nGC Rule: %s%n", - columnFamily.getId(), columnFamily.getGCRule().toString()); + "Column family: %s%nGC Rule: %s%n", entry.getKey(), entry.getValue().getGcRule()); } } catch (NotFoundException e) { System.err.println( @@ -174,15 +184,21 @@ public void addFamilyWithMaxAgeRule() { // where age = current time minus cell timestamp // Defines the GC rule to retain data with max age of 5 days. - DurationRule maxAgeRule = GCRULES.maxAge(5, TimeUnit.DAYS); + GcRule maxAgeRule = GcRuleBuilder.maxAge(Duration.ofDays(5)); // Creates column family with given GC rule. try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to add a family - ModifyColumnFamiliesRequest columnFamiliesRequest = - ModifyColumnFamiliesRequest.of(tableId).addFamily(COLUMN_FAMILY_1, maxAgeRule); - adminClient.modifyFamilies(columnFamiliesRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_1) + .setCreate(ColumnFamily.newBuilder().setGcRule(maxAgeRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.println("Created column family: " + COLUMN_FAMILY_1); } catch (AlreadyExistsException e) { System.err.println( @@ -199,15 +215,21 @@ public void addFamilyWithMaxVersionsRule() { // where 1 = most recent version // Defines the GC policy to retain only the most recent 2 versions. - VersionRule versionRule = GCRULES.maxVersions(2); + GcRule versionRule = GcRuleBuilder.maxVersions(2); // Creates column family with given GC rule. try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to add a family - ModifyColumnFamiliesRequest columnFamiliesRequest = - ModifyColumnFamiliesRequest.of(tableId).addFamily(COLUMN_FAMILY_2, versionRule); - adminClient.modifyFamilies(columnFamiliesRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_2) + .setCreate(ColumnFamily.newBuilder().setGcRule(versionRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.println("Created column family: " + COLUMN_FAMILY_2); } catch (AlreadyExistsException e) { System.err.println( @@ -224,16 +246,25 @@ public void addFamilyWithUnionRule() { // Defines a list of GC rules to drop cells older than 5 days OR not the most recent // version. - UnionRule unionRule = - GCRULES.union().rule(GCRULES.maxAge(5, TimeUnit.DAYS)).rule(GCRULES.maxVersions(1)); + GcRule unionRule = + GcRuleBuilder.union() + .add(GcRuleBuilder.maxAge(Duration.ofDays(5))) + .add(GcRuleBuilder.maxVersions(1)) + .build(); // Creates column family with given GC rule. try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to add a family - ModifyColumnFamiliesRequest columnFamiliesRequest = - ModifyColumnFamiliesRequest.of(tableId).addFamily(COLUMN_FAMILY_3, unionRule); - adminClient.modifyFamilies(columnFamiliesRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_3) + .setCreate(ColumnFamily.newBuilder().setGcRule(unionRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.println("Created column family: " + COLUMN_FAMILY_3); } catch (AlreadyExistsException e) { System.err.println( @@ -249,17 +280,25 @@ public void addFamilyWithIntersectionRule() { // Creates a column family with GC policy to drop data that matches all conditions. // Defines a GC rule to drop cells older than 5 days AND older than the most recent 2 versions. - DurationRule maxAgeRule = GCRULES.maxAge(5, TimeUnit.DAYS); - VersionRule versionRule = GCRULES.maxVersions(2); - IntersectionRule intersectionRule = GCRULES.intersection().rule(maxAgeRule).rule(versionRule); + GcRule intersectionRule = + GcRuleBuilder.intersection() + .add(GcRuleBuilder.maxAge(Duration.ofDays(5))) + .add(GcRuleBuilder.maxVersions(2)) + .build(); // Creates column family with given GC rule. try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to add a family - ModifyColumnFamiliesRequest columnFamiliesRequest = - ModifyColumnFamiliesRequest.of(tableId).addFamily(COLUMN_FAMILY_4, intersectionRule); - adminClient.modifyFamilies(columnFamiliesRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_4) + .setCreate(ColumnFamily.newBuilder().setGcRule(intersectionRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.println("Created column family: " + COLUMN_FAMILY_4); } catch (AlreadyExistsException e) { System.err.println( @@ -276,19 +315,27 @@ public void addFamilyWithNestedRule() { // Drop cells that are either older than the 10 recent versions // OR // Drop cells that are older than a month AND older than the 2 recent versions - VersionRule versionRule1 = GCRULES.maxVersions(10); - VersionRule versionRule2 = GCRULES.maxVersions(2); - DurationRule maxAgeRule = GCRULES.maxAge(30, TimeUnit.DAYS); - IntersectionRule intersectionRule = GCRULES.intersection().rule(maxAgeRule).rule(versionRule2); - UnionRule unionRule = GCRULES.union().rule(intersectionRule).rule(versionRule1); + GcRule intersectionRule = + GcRuleBuilder.intersection() + .add(GcRuleBuilder.maxAge(Duration.ofDays(30))) + .add(GcRuleBuilder.maxVersions(2)) + .build(); + GcRule unionRule = + GcRuleBuilder.union().add(intersectionRule).add(GcRuleBuilder.maxVersions(10)).build(); // Creates column family with given GC rule. try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to add a family - ModifyColumnFamiliesRequest columnFamiliesRequest = - ModifyColumnFamiliesRequest.of(tableId).addFamily(COLUMN_FAMILY_5, unionRule); - adminClient.modifyFamilies(columnFamiliesRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_5) + .setCreate(ColumnFamily.newBuilder().setGcRule(unionRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.println("Created column family: " + COLUMN_FAMILY_5); } catch (AlreadyExistsException e) { System.err.println( @@ -303,12 +350,13 @@ public void listColumnFamilies() { // [START bigtable_list_column_families] // Lists all families in the table with GC rules. try { - Table table = adminClient.getTable(tableId); - Collection columnFamilies = table.getColumnFamilies(); - for (ColumnFamily columnFamily : columnFamilies) { + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + Table table = adminClient.getBaseClient().getTable(tableName); + for (java.util.Map.Entry entry : + table.getColumnFamiliesMap().entrySet()) { System.out.printf( - "Column family: %s%nGC Rule: %s%n", - columnFamily.getId(), columnFamily.getGCRule().toString()); + "Column family: %s%nGC Rule: %s%n", entry.getKey(), entry.getValue().getGcRule()); } } catch (NotFoundException e) { System.err.println( @@ -323,14 +371,19 @@ public void modifyColumnFamilyRule() { // [START bigtable_update_gc_rule] // Updates the column family metadata to update the GC rule. // Updates a column family GC rule. - VersionRule versionRule = GCRULES.maxVersions(1); + GcRule versionRule = GcRuleBuilder.maxVersions(1); try { - // ModifyColumnFamiliesRequest can be used both for adding and modifying families, here it is - // being used to modify a family - // Updates column family with given GC rule. - ModifyColumnFamiliesRequest updateRequest = - ModifyColumnFamiliesRequest.of(tableId).updateFamily(COLUMN_FAMILY_1, versionRule); - adminClient.modifyFamilies(updateRequest); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_1) + .setUpdate(ColumnFamily.newBuilder().setGcRule(versionRule))) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.printf("Column family %s GC rule updated%n", COLUMN_FAMILY_1); } catch (NotFoundException e) { System.err.println("Failed to modify a non-existent column family: " + e.getMessage()); @@ -343,14 +396,13 @@ public void printModifiedColumnFamily() { System.out.printf("%nPrint updated GC rule for column family %s%n", COLUMN_FAMILY_1); // [START bigtable_family_get_gc_rule] try { - Table table = adminClient.getTable(tableId); - Collection columnFamilies = table.getColumnFamilies(); - for (ColumnFamily columnFamily : columnFamilies) { - if (columnFamily.getId().equals(COLUMN_FAMILY_1)) { - System.out.printf( - "Column family: %s%nGC Rule: %s%n", - columnFamily.getId(), columnFamily.getGCRule().toString()); - } + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + Table table = adminClient.getBaseClient().getTable(tableName); + if (table.containsColumnFamilies(COLUMN_FAMILY_1)) { + System.out.printf( + "Column family: %s%nGC Rule: %s%n", + COLUMN_FAMILY_1, table.getColumnFamiliesMap().get(COLUMN_FAMILY_1).getGcRule()); } } catch (NotFoundException e) { System.err.println("Failed to print a non-existent column family: " + e.getMessage()); @@ -364,9 +416,17 @@ public void deleteColumnFamily() { // [START bigtable_delete_family] // Deletes a column family. try { - ModifyColumnFamiliesRequest deleted = - ModifyColumnFamiliesRequest.of(tableId).dropFamily(COLUMN_FAMILY_2); - adminClient.modifyFamilies(deleted); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + ModifyColumnFamiliesRequest request = + ModifyColumnFamiliesRequest.newBuilder() + .setName(tableName) + .addModifications( + ModifyColumnFamiliesRequest.Modification.newBuilder() + .setId(COLUMN_FAMILY_2) + .setDrop(true)) + .build(); + adminClient.getBaseClient().modifyColumnFamilies(request); System.out.printf("Column family %s deleted successfully%n", COLUMN_FAMILY_2); } catch (NotFoundException e) { System.err.println("Failed to delete a non-existent column family: " + e.getMessage()); @@ -380,7 +440,9 @@ public void deleteTable() { // Deletes the entire table. System.out.println("\nDelete table: " + tableId); try { - adminClient.deleteTable(tableId); + String tableName = + "projects/" + projectId + "/instances/" + instanceId + "/tables/" + tableId; + adminClient.getBaseClient().deleteTable(tableName); System.out.printf("Table: %s deleted successfully%n", tableId); } catch (NotFoundException e) { System.err.println("Failed to delete a non-existent table: " + e.getMessage()); diff --git a/samples/snippets/src/main/resources/com/example/bigtable/README.md b/samples/snippets/src/main/resources/com/example/bigtable/README.md new file mode 100644 index 0000000000..da219f2e66 --- /dev/null +++ b/samples/snippets/src/main/resources/com/example/bigtable/README.md @@ -0,0 +1,6 @@ +#### To generate SingerProto.java and descriptors.pb file from singer.proto using `protoc` +```shell +cd samples/snippets/src/main/resources/ +protoc --proto_path=com/example/bigtable/ --include_imports --descriptor_set_out=com/example/bigtable/descriptors.pb \ +--java_out=. com/example/bigtable/singer.proto +``` diff --git a/samples/snippets/src/main/resources/com/example/bigtable/SingerProto.java b/samples/snippets/src/main/resources/com/example/bigtable/SingerProto.java new file mode 100644 index 0000000000..8f1ed90d12 --- /dev/null +++ b/samples/snippets/src/main/resources/com/example/bigtable/SingerProto.java @@ -0,0 +1,1248 @@ +/* + * 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. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: singer.proto +// Protobuf Java Version: 4.32.0 + +package com.example.bigtable; + +@com.google.protobuf.Generated +public final class SingerProto { + private SingerProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + SingerProto.class.getName()); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + /** Protobuf enum {@code examples.bigtable.music.Genre} */ + public enum Genre implements com.google.protobuf.ProtocolMessageEnum { + /** POP = 0; */ + POP(0), + /** JAZZ = 1; */ + JAZZ(1), + /** FOLK = 2; */ + FOLK(2), + /** ROCK = 3; */ + ROCK(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + Genre.class.getName()); + } + + /** POP = 0; */ + public static final int POP_VALUE = 0; + + /** JAZZ = 1; */ + public static final int JAZZ_VALUE = 1; + + /** FOLK = 2; */ + public static final int FOLK_VALUE = 2; + + /** ROCK = 3; */ + public static final int ROCK_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 Genre 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 Genre forNumber(int value) { + switch (value) { + case 0: + return POP; + case 1: + return JAZZ; + case 2: + return FOLK; + case 3: + return ROCK; + 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 Genre findValueByNumber(int number) { + return Genre.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.example.bigtable.SingerProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Genre[] VALUES = values(); + + public static Genre 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 Genre(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:examples.bigtable.music.Genre) + } + + public interface SingerInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:examples.bigtable.music.SingerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 singer_id = 1; + * + * @return Whether the singerId field is set. + */ + boolean hasSingerId(); + + /** + * optional int64 singer_id = 1; + * + * @return The singerId. + */ + long getSingerId(); + + /** + * optional string birth_date = 2; + * + * @return Whether the birthDate field is set. + */ + boolean hasBirthDate(); + + /** + * optional string birth_date = 2; + * + * @return The birthDate. + */ + java.lang.String getBirthDate(); + + /** + * optional string birth_date = 2; + * + * @return The bytes for birthDate. + */ + com.google.protobuf.ByteString getBirthDateBytes(); + + /** + * optional string nationality = 3; + * + * @return Whether the nationality field is set. + */ + boolean hasNationality(); + + /** + * optional string nationality = 3; + * + * @return The nationality. + */ + java.lang.String getNationality(); + + /** + * optional string nationality = 3; + * + * @return The bytes for nationality. + */ + com.google.protobuf.ByteString getNationalityBytes(); + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return Whether the genre field is set. + */ + boolean hasGenre(); + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The enum numeric value on the wire for genre. + */ + int getGenreValue(); + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The genre. + */ + com.example.bigtable.SingerProto.Genre getGenre(); + } + + /** Protobuf type {@code examples.bigtable.music.SingerInfo} */ + public static final class SingerInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:examples.bigtable.music.SingerInfo) + SingerInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 32, + /* patch= */ 0, + /* suffix= */ "", + SingerInfo.class.getName()); + } + + // Use SingerInfo.newBuilder() to construct. + private SingerInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SingerInfo() { + birthDate_ = ""; + nationality_ = ""; + genre_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.example.bigtable.SingerProto + .internal_static_examples_bigtable_music_SingerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.example.bigtable.SingerProto + .internal_static_examples_bigtable_music_SingerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.example.bigtable.SingerProto.SingerInfo.class, + com.example.bigtable.SingerProto.SingerInfo.Builder.class); + } + + private int bitField0_; + public static final int SINGER_ID_FIELD_NUMBER = 1; + private long singerId_ = 0L; + + /** + * optional int64 singer_id = 1; + * + * @return Whether the singerId field is set. + */ + @java.lang.Override + public boolean hasSingerId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * optional int64 singer_id = 1; + * + * @return The singerId. + */ + @java.lang.Override + public long getSingerId() { + return singerId_; + } + + public static final int BIRTH_DATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object birthDate_ = ""; + + /** + * optional string birth_date = 2; + * + * @return Whether the birthDate field is set. + */ + @java.lang.Override + public boolean hasBirthDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * optional string birth_date = 2; + * + * @return The birthDate. + */ + @java.lang.Override + public java.lang.String getBirthDate() { + java.lang.Object ref = birthDate_; + 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(); + birthDate_ = s; + return s; + } + } + + /** + * optional string birth_date = 2; + * + * @return The bytes for birthDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBirthDateBytes() { + java.lang.Object ref = birthDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + birthDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NATIONALITY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object nationality_ = ""; + + /** + * optional string nationality = 3; + * + * @return Whether the nationality field is set. + */ + @java.lang.Override + public boolean hasNationality() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * optional string nationality = 3; + * + * @return The nationality. + */ + @java.lang.Override + public java.lang.String getNationality() { + java.lang.Object ref = nationality_; + 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(); + nationality_ = s; + return s; + } + } + + /** + * optional string nationality = 3; + * + * @return The bytes for nationality. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNationalityBytes() { + java.lang.Object ref = nationality_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nationality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENRE_FIELD_NUMBER = 4; + private int genre_ = 0; + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return Whether the genre field is set. + */ + @java.lang.Override + public boolean hasGenre() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The enum numeric value on the wire for genre. + */ + @java.lang.Override + public int getGenreValue() { + return genre_; + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The genre. + */ + @java.lang.Override + public com.example.bigtable.SingerProto.Genre getGenre() { + com.example.bigtable.SingerProto.Genre result = + com.example.bigtable.SingerProto.Genre.forNumber(genre_); + return result == null ? com.example.bigtable.SingerProto.Genre.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, singerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, birthDate_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, nationality_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeEnum(4, genre_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, singerId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, birthDate_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, nationality_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, genre_); + } + 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.example.bigtable.SingerProto.SingerInfo)) { + return super.equals(obj); + } + com.example.bigtable.SingerProto.SingerInfo other = + (com.example.bigtable.SingerProto.SingerInfo) obj; + + if (hasSingerId() != other.hasSingerId()) return false; + if (hasSingerId()) { + if (getSingerId() != other.getSingerId()) return false; + } + if (hasBirthDate() != other.hasBirthDate()) return false; + if (hasBirthDate()) { + if (!getBirthDate().equals(other.getBirthDate())) return false; + } + if (hasNationality() != other.hasNationality()) return false; + if (hasNationality()) { + if (!getNationality().equals(other.getNationality())) return false; + } + if (hasGenre() != other.hasGenre()) return false; + if (hasGenre()) { + if (genre_ != other.genre_) 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 (hasSingerId()) { + hash = (37 * hash) + SINGER_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSingerId()); + } + if (hasBirthDate()) { + hash = (37 * hash) + BIRTH_DATE_FIELD_NUMBER; + hash = (53 * hash) + getBirthDate().hashCode(); + } + if (hasNationality()) { + hash = (37 * hash) + NATIONALITY_FIELD_NUMBER; + hash = (53 * hash) + getNationality().hashCode(); + } + if (hasGenre()) { + hash = (37 * hash) + GENRE_FIELD_NUMBER; + hash = (53 * hash) + genre_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.example.bigtable.SingerProto.SingerInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.example.bigtable.SingerProto.SingerInfo 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.example.bigtable.SingerProto.SingerInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.example.bigtable.SingerProto.SingerInfo 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.example.bigtable.SingerProto.SingerInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.example.bigtable.SingerProto.SingerInfo 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.example.bigtable.SingerProto.SingerInfo 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; + } + + /** Protobuf type {@code examples.bigtable.music.SingerInfo} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:examples.bigtable.music.SingerInfo) + com.example.bigtable.SingerProto.SingerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.example.bigtable.SingerProto + .internal_static_examples_bigtable_music_SingerInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.example.bigtable.SingerProto + .internal_static_examples_bigtable_music_SingerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.example.bigtable.SingerProto.SingerInfo.class, + com.example.bigtable.SingerProto.SingerInfo.Builder.class); + } + + // Construct using com.example.bigtable.SingerProto.SingerInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + singerId_ = 0L; + birthDate_ = ""; + nationality_ = ""; + genre_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.example.bigtable.SingerProto + .internal_static_examples_bigtable_music_SingerInfo_descriptor; + } + + @java.lang.Override + public com.example.bigtable.SingerProto.SingerInfo getDefaultInstanceForType() { + return com.example.bigtable.SingerProto.SingerInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.example.bigtable.SingerProto.SingerInfo build() { + com.example.bigtable.SingerProto.SingerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.example.bigtable.SingerProto.SingerInfo buildPartial() { + com.example.bigtable.SingerProto.SingerInfo result = + new com.example.bigtable.SingerProto.SingerInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.example.bigtable.SingerProto.SingerInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.singerId_ = singerId_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.birthDate_ = birthDate_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nationality_ = nationality_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.genre_ = genre_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.example.bigtable.SingerProto.SingerInfo) { + return mergeFrom((com.example.bigtable.SingerProto.SingerInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.example.bigtable.SingerProto.SingerInfo other) { + if (other == com.example.bigtable.SingerProto.SingerInfo.getDefaultInstance()) return this; + if (other.hasSingerId()) { + setSingerId(other.getSingerId()); + } + if (other.hasBirthDate()) { + birthDate_ = other.birthDate_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasNationality()) { + nationality_ = other.nationality_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasGenre()) { + setGenreValue(other.getGenreValue()); + } + 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: + { + singerId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + birthDate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + nationality_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + genre_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long singerId_; + + /** + * optional int64 singer_id = 1; + * + * @return Whether the singerId field is set. + */ + @java.lang.Override + public boolean hasSingerId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * optional int64 singer_id = 1; + * + * @return The singerId. + */ + @java.lang.Override + public long getSingerId() { + return singerId_; + } + + /** + * optional int64 singer_id = 1; + * + * @param value The singerId to set. + * @return This builder for chaining. + */ + public Builder setSingerId(long value) { + + singerId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * optional int64 singer_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearSingerId() { + bitField0_ = (bitField0_ & ~0x00000001); + singerId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object birthDate_ = ""; + + /** + * optional string birth_date = 2; + * + * @return Whether the birthDate field is set. + */ + public boolean hasBirthDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * optional string birth_date = 2; + * + * @return The birthDate. + */ + public java.lang.String getBirthDate() { + java.lang.Object ref = birthDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + birthDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * optional string birth_date = 2; + * + * @return The bytes for birthDate. + */ + public com.google.protobuf.ByteString getBirthDateBytes() { + java.lang.Object ref = birthDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + birthDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * optional string birth_date = 2; + * + * @param value The birthDate to set. + * @return This builder for chaining. + */ + public Builder setBirthDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + birthDate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * optional string birth_date = 2; + * + * @return This builder for chaining. + */ + public Builder clearBirthDate() { + birthDate_ = getDefaultInstance().getBirthDate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * optional string birth_date = 2; + * + * @param value The bytes for birthDate to set. + * @return This builder for chaining. + */ + public Builder setBirthDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + birthDate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object nationality_ = ""; + + /** + * optional string nationality = 3; + * + * @return Whether the nationality field is set. + */ + public boolean hasNationality() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * optional string nationality = 3; + * + * @return The nationality. + */ + public java.lang.String getNationality() { + java.lang.Object ref = nationality_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nationality_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * optional string nationality = 3; + * + * @return The bytes for nationality. + */ + public com.google.protobuf.ByteString getNationalityBytes() { + java.lang.Object ref = nationality_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nationality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * optional string nationality = 3; + * + * @param value The nationality to set. + * @return This builder for chaining. + */ + public Builder setNationality(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nationality_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * optional string nationality = 3; + * + * @return This builder for chaining. + */ + public Builder clearNationality() { + nationality_ = getDefaultInstance().getNationality(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * optional string nationality = 3; + * + * @param value The bytes for nationality to set. + * @return This builder for chaining. + */ + public Builder setNationalityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nationality_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int genre_ = 0; + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return Whether the genre field is set. + */ + @java.lang.Override + public boolean hasGenre() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The enum numeric value on the wire for genre. + */ + @java.lang.Override + public int getGenreValue() { + return genre_; + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @param value The enum numeric value on the wire for genre to set. + * @return This builder for chaining. + */ + public Builder setGenreValue(int value) { + genre_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return The genre. + */ + @java.lang.Override + public com.example.bigtable.SingerProto.Genre getGenre() { + com.example.bigtable.SingerProto.Genre result = + com.example.bigtable.SingerProto.Genre.forNumber(genre_); + return result == null ? com.example.bigtable.SingerProto.Genre.UNRECOGNIZED : result; + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @param value The genre to set. + * @return This builder for chaining. + */ + public Builder setGenre(com.example.bigtable.SingerProto.Genre value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + genre_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * optional .examples.bigtable.music.Genre genre = 4; + * + * @return This builder for chaining. + */ + public Builder clearGenre() { + bitField0_ = (bitField0_ & ~0x00000008); + genre_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:examples.bigtable.music.SingerInfo) + } + + // @@protoc_insertion_point(class_scope:examples.bigtable.music.SingerInfo) + private static final com.example.bigtable.SingerProto.SingerInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.example.bigtable.SingerProto.SingerInfo(); + } + + public static com.example.bigtable.SingerProto.SingerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SingerInfo 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.example.bigtable.SingerProto.SingerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_examples_bigtable_music_SingerInfo_descriptor; + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_examples_bigtable_music_SingerInfo_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" + + "\014singer.proto\022\027examples.bigtable.music\"\302\001\n\n" + + "SingerInfo\022\026\n" + + "\tsinger_id\030\001 \001(\003H\000\210\001\001\022\027\n\n" + + "birth_date\030\002 \001(\tH\001\210\001\001\022\030\n" + + "\013nationality\030\003 \001(\tH\002\210\001\001\0222\n" + + "\005genre\030\004" + + " \001(\0162\036.examples.bigtable.music.GenreH\003\210\001\001B\014\n\n" + + "_singer_idB\r\n" + + "\013_birth_dateB\016\n" + + "\014_nationalityB\010\n" + + "\006_genre*.\n" + + "\005Genre\022\007\n" + + "\003POP\020\000\022\010\n" + + "\004JAZZ\020\001\022\010\n" + + "\004FOLK\020\002\022\010\n" + + "\004ROCK\020\003B%\n" + + "\024com.example.bigtableB\013SingerProtoP\000b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_examples_bigtable_music_SingerInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_examples_bigtable_music_SingerInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_examples_bigtable_music_SingerInfo_descriptor, + new java.lang.String[] { + "SingerId", "BirthDate", "Nationality", "Genre", + }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/samples/snippets/src/main/resources/com/example/bigtable/descriptors.pb b/samples/snippets/src/main/resources/com/example/bigtable/descriptors.pb new file mode 100644 index 0000000000..c8726c6084 Binary files /dev/null and b/samples/snippets/src/main/resources/com/example/bigtable/descriptors.pb differ diff --git a/samples/snippets/src/main/resources/com/example/bigtable/singer.proto b/samples/snippets/src/main/resources/com/example/bigtable/singer.proto new file mode 100644 index 0000000000..8d697fdfd9 --- /dev/null +++ b/samples/snippets/src/main/resources/com/example/bigtable/singer.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package examples.bigtable.music; + +option java_package = "com.example.bigtable"; +option java_outer_classname = "SingerProto"; +option java_multiple_files = false; + +message SingerInfo { + optional int64 singer_id = 1; + optional string birth_date = 2; + optional string nationality = 3; + optional Genre genre = 4; +} + +enum Genre { + POP = 0; + JAZZ = 1; + FOLK = 2; + ROCK = 3; +} \ No newline at end of file diff --git a/samples/snippets/src/test/java/com/example/bigtable/InstanceAdminExampleTest.java b/samples/snippets/src/test/java/com/example/bigtable/InstanceAdminExampleTest.java index 15df1f8fa5..acab4fca74 100644 --- a/samples/snippets/src/test/java/com/example/bigtable/InstanceAdminExampleTest.java +++ b/samples/snippets/src/test/java/com/example/bigtable/InstanceAdminExampleTest.java @@ -23,9 +23,7 @@ import com.google.api.gax.rpc.NotFoundException; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient; import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings; -import com.google.cloud.bigtable.admin.v2.models.Cluster; import com.google.cloud.bigtable.admin.v2.models.CreateInstanceRequest; -import com.google.cloud.bigtable.admin.v2.models.Instance; import com.google.cloud.bigtable.admin.v2.models.Instance.Type; import com.google.cloud.bigtable.admin.v2.models.StorageType; import java.io.IOException; @@ -101,7 +99,7 @@ public void testCreateAndDeleteInstance() throws IOException { @Test public void testGetInstance() { // Gets an instance. - Instance instance = instanceAdmin.getInstance(); + com.google.bigtable.admin.v2.Instance instance = instanceAdmin.getInstance(); assertNotNull(instance); } @@ -109,7 +107,8 @@ public void testGetInstance() { public void testAddAndDeleteCluster() { // Adds a cluster. instanceAdmin.addCluster(); - Cluster cluster = adminClient.getCluster(instanceId, CLUSTER); + com.google.cloud.bigtable.admin.v2.models.Cluster cluster = + adminClient.getCluster(instanceId, CLUSTER); assertNotNull(cluster); // Deletes a cluster. @@ -132,7 +131,8 @@ private static String generateId() { private static void garbageCollect() { Pattern timestampPattern = Pattern.compile(ID_PREFIX + "-([0-9a-f]+)"); System.out.println(); - for (Instance instance : adminClient.listInstances()) { + for (com.google.cloud.bigtable.admin.v2.models.Instance instance : + adminClient.listInstances()) { Matcher matcher = timestampPattern.matcher(instance.getId()); if (!matcher.matches()) { continue; diff --git a/samples/snippets/src/test/java/com/example/bigtable/SchemaBundleExampleTest.java b/samples/snippets/src/test/java/com/example/bigtable/SchemaBundleExampleTest.java new file mode 100644 index 0000000000..c76d1288eb --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigtable/SchemaBundleExampleTest.java @@ -0,0 +1,138 @@ +/* + * 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.example.bigtable; + +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 com.google.api.gax.rpc.NotFoundException; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient; +import com.google.cloud.bigtable.admin.v2.BigtableTableAdminSettings; +import com.google.cloud.bigtable.admin.v2.models.CreateTableRequest; +import com.google.cloud.bigtable.admin.v2.models.SchemaBundle; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class SchemaBundleExampleTest extends BigtableBaseTest { + + private static final String TABLE_PREFIX = "table"; + private static final String SCHEMA_BUNDLE_PREFIX = "schema-bundle"; + private static final String COLUMN_FAMILY = "cf"; + private String tableId; + private String schemaBundleId; + private static BigtableTableAdminClient adminClient; + private SchemaBundleExample schemaBundleExample; + + @BeforeClass + public static void beforeClass() throws IOException { + initializeVariables(); + BigtableTableAdminSettings adminSettings = + BigtableTableAdminSettings.newBuilder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .build(); + adminClient = BigtableTableAdminClient.create(adminSettings); + } + + @AfterClass + public static void afterClass() { + garbageCollect(); + adminClient.close(); + } + + @Before + public void setup() throws IOException { + tableId = generateResourceId(TABLE_PREFIX); + schemaBundleId = generateResourceId(SCHEMA_BUNDLE_PREFIX); + schemaBundleExample = new SchemaBundleExample(projectId, instanceId, tableId, schemaBundleId); + adminClient.createTable(CreateTableRequest.of(tableId).addFamily(COLUMN_FAMILY)); + } + + @After + public void after() { + if (adminClient.exists(tableId)) { + adminClient.deleteTable(tableId); + } + schemaBundleExample.close(); + } + + @Test + public void testRunDoesNotFail() { + schemaBundleExample.run(); + } + + @Test + public void testSchemaBundleCreateUpdateDelete() throws IOException { + // Creates a schema bundle. + schemaBundleExample.createSchemaBundle(); + SchemaBundle schemaBundle = adminClient.getSchemaBundle(tableId, schemaBundleId); + assertEquals(schemaBundle.getId(), schemaBundleId); + + // Updates the schema bundle. + schemaBundleExample.updateSchemaBundle(); + SchemaBundle updatedSchemaBundle = adminClient.getSchemaBundle(tableId, schemaBundleId); + assertNotEquals(schemaBundle, updatedSchemaBundle); + + // Deletes the schema bundle. + schemaBundleExample.deleteSchemaBundle(); + assertThrows( + NotFoundException.class, () -> adminClient.getSchemaBundle(tableId, schemaBundleId)); + } + + @Test + public void testGetSchemaBundle() { + schemaBundleExample.createSchemaBundle(); + SchemaBundle schemaBundle = schemaBundleExample.getSchemaBundle(); + assertNotNull(schemaBundle); + assertEquals(schemaBundle.getId(), schemaBundleId); + } + + @Test + public void testListSchemaBundles() { + schemaBundleExample.createSchemaBundle(); + List schemaBundleIds = schemaBundleExample.listAllSchemaBundles(); + assertEquals(schemaBundleIds.size(), 1); + assertEquals(schemaBundleIds.get(0), schemaBundleId); + } + + private static void garbageCollect() { + Pattern timestampPattern = Pattern.compile(TABLE_PREFIX + "-([0-9a-f]+)-([0-9a-f]+)"); + for (String tableId : adminClient.listTables()) { + Matcher matcher = timestampPattern.matcher(tableId); + if (!matcher.matches()) { + continue; + } + String timestampStr = matcher.group(1); + long timestamp = Long.parseLong(timestampStr, 16); + if (System.currentTimeMillis() - timestamp < TimeUnit.MINUTES.toMillis(10)) { + continue; + } + System.out.println("\nGarbage collecting orphaned table: " + tableId); + adminClient.deleteTable(tableId); + } + } +} diff --git a/test-proxy/README.md b/test-proxy/README.md index 18778ba8c3..f87a3374ca 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -1,6 +1,6 @@ # CBT Java Test Proxy -The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client. +The CBT test proxy is intended for running conformance tests for Cloud Bigtable Java Client. ## Set up diff --git a/test-proxy/known_failures.txt b/test-proxy/known_failures.txt index 8b13789179..46d48c46f8 100644 --- a/test-proxy/known_failures.txt +++ b/test-proxy/known_failures.txt @@ -1 +1 @@ - +TestFeatureGap/(traffic_director_enabled|direct_access_requested)|TestReadRows_Retry_WithRetryInfo_MultipleErrorResponse diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml index e324c38423..b96678d029 100644 --- a/test-proxy/pom.xml +++ b/test-proxy/pom.xml @@ -12,11 +12,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.42.0 + 2.76.1-SNAPSHOT - 2.42.0 + 2.76.1-SNAPSHOT diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/BoundStatementDeserializer.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/BoundStatementDeserializer.java new file mode 100644 index 0000000000..43da147274 --- /dev/null +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/BoundStatementDeserializer.java @@ -0,0 +1,169 @@ +/* + * 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 + * + * 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.bigtable.testproxy; + +import com.google.bigtable.v2.Value; +import com.google.bigtable.v2.Value.KindCase; +import com.google.cloud.Date; +import com.google.cloud.bigtable.data.v2.models.sql.BoundStatement; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.protobuf.Timestamp; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BoundStatementDeserializer { + + static BoundStatement toBoundStatement( + PreparedStatement preparedStatement, ExecuteQueryRequest request) { + BoundStatement.Builder boundStatementBuilder = preparedStatement.bind(); + for (Map.Entry paramEntry : request.getRequest().getParamsMap().entrySet()) { + String name = paramEntry.getKey(); + Value value = paramEntry.getValue(); + switch (value.getType().getKindCase()) { + case BYTES_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setBytesParam(name, null); + } else if (value.getKindCase().equals(KindCase.BYTES_VALUE)) { + boundStatementBuilder.setBytesParam(name, value.getBytesValue()); + } else { + throw new IllegalArgumentException("Unexpected bytes value: " + value); + } + break; + case STRING_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setStringParam(name, null); + } else if (value.getKindCase().equals(KindCase.STRING_VALUE)) { + boundStatementBuilder.setStringParam(name, value.getStringValue()); + } else { + throw new IllegalArgumentException("Malformed string value: " + value); + } + break; + case INT64_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setLongParam(name, null); + } else if (value.getKindCase().equals(KindCase.INT_VALUE)) { + boundStatementBuilder.setLongParam(name, value.getIntValue()); + } else { + throw new IllegalArgumentException("Malformed int64 value: " + value); + } + break; + case FLOAT32_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setFloatParam(name, null); + } else if (value.getKindCase().equals(KindCase.FLOAT_VALUE)) { + boundStatementBuilder.setFloatParam(name, (float) value.getFloatValue()); + } else { + throw new IllegalArgumentException("Malformed float32 value: " + value); + } + break; + case FLOAT64_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setDoubleParam(name, null); + } else if (value.getKindCase().equals(KindCase.FLOAT_VALUE)) { + boundStatementBuilder.setDoubleParam(name, value.getFloatValue()); + } else { + throw new IllegalArgumentException("Malformed float64 value: " + value); + } + break; + case BOOL_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setBooleanParam(name, null); + } else if (value.getKindCase().equals(KindCase.BOOL_VALUE)) { + boundStatementBuilder.setBooleanParam(name, value.getBoolValue()); + } else { + throw new IllegalArgumentException("Malformed boolean value: " + value); + } + break; + case TIMESTAMP_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setTimestampParam(name, null); + } else if (value.getKindCase().equals(KindCase.TIMESTAMP_VALUE)) { + Timestamp ts = value.getTimestampValue(); + boundStatementBuilder.setTimestampParam(name, toInstant(ts)); + } else { + throw new IllegalArgumentException("Malformed timestamp value: " + value); + } + break; + case DATE_TYPE: + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setDateParam(name, null); + } else if (value.getKindCase().equals(KindCase.DATE_VALUE)) { + com.google.type.Date protoDate = value.getDateValue(); + boundStatementBuilder.setDateParam(name, fromProto(protoDate)); + } else { + throw new IllegalArgumentException("Malformed boolean value: " + value); + } + break; + case ARRAY_TYPE: + SqlType.Array sqlType = (SqlType.Array) SqlType.fromProto(value.getType()); + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + boundStatementBuilder.setListParam(name, null, sqlType); + } else if (value.getKindCase().equals(KindCase.ARRAY_VALUE)) { + List array = new ArrayList<>(); + for (Value elem : value.getArrayValue().getValuesList()) { + array.add(decodeArrayElement(elem, sqlType.getElementType())); + } + boundStatementBuilder.setListParam(name, array, sqlType); + } else { + throw new IllegalArgumentException("Malformed array value: " + value); + } + break; + default: + throw new IllegalArgumentException("Unexpected query param type in param: " + value); + } + } + return boundStatementBuilder.build(); + } + + static Object decodeArrayElement(Value value, SqlType elemType) { + if (value.getKindCase().equals(KindCase.KIND_NOT_SET)) { + return null; + } + switch (elemType.getCode()) { + case BYTES: + return value.getBytesValue(); + case STRING: + return value.getStringValue(); + case INT64: + return value.getIntValue(); + case FLOAT64: + return value.getFloatValue(); + case FLOAT32: + // cast to float so we produce List, etc + return (float) value.getFloatValue(); + case BOOL: + return value.getBoolValue(); + case TIMESTAMP: + return toInstant(value.getTimestampValue()); + case DATE: + return fromProto(value.getDateValue()); + default: + // We should have already thrown an exception in the SqlRowMerger + throw new IllegalStateException("Unsupported array query param element type: " + elemType); + } + } + + private static Instant toInstant(Timestamp timestamp) { + return Instant.ofEpochSecond(timestamp.getSeconds(), timestamp.getNanos()); + } + + private static Date fromProto(com.google.type.Date proto) { + return Date.fromYearMonthDay(proto.getYear(), proto.getMonth(), proto.getDay()); + } +} diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java index 6e563d4df0..d2147e6167 100644 --- a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * 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. @@ -26,11 +26,13 @@ import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.ServerStream; -import com.google.auth.oauth2.GoogleCredentials; +import com.google.auth.oauth2.AccessToken; +import com.google.auth.oauth2.OAuth2Credentials; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.Column; import com.google.bigtable.v2.Family; import com.google.bigtable.v2.Row; +import com.google.bigtable.v2.Value; import com.google.cloud.bigtable.data.v2.BigtableDataClient; import com.google.cloud.bigtable.data.v2.BigtableDataSettings; import com.google.cloud.bigtable.data.v2.models.BulkMutation; @@ -41,6 +43,9 @@ import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.RowCell; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.sql.PreparedStatement; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; import com.google.cloud.bigtable.testproxy.CloudBigtableV2TestProxyGrpc.CloudBigtableV2TestProxyImplBase; import com.google.common.base.Preconditions; @@ -50,27 +55,27 @@ import io.grpc.ManagedChannelBuilder; import io.grpc.Status; import io.grpc.StatusException; +import io.grpc.StatusRuntimeException; import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; +import io.grpc.protobuf.StatusProto; import io.grpc.stub.StreamObserver; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; +import java.time.Duration; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutionException; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import org.threeten.bp.Duration; /** Java implementation of the CBT test proxy. Used to test the Java CBT client. */ public class CbtTestProxy extends CloudBigtableV2TestProxyImplBase implements Closeable { @@ -92,50 +97,13 @@ static CbtClient create(BigtableDataSettings settings, BigtableDataClient dataCl private static final Logger logger = Logger.getLogger(CbtTestProxy.class.getName()); - private CbtTestProxy( - boolean encrypted, - @Nullable String rootCerts, - @Nullable String sslTarget, - @Nullable String credential) { - this.encrypted = encrypted; - this.rootCerts = rootCerts; - this.sslTarget = sslTarget; - this.credential = credential; + private CbtTestProxy() { this.idClientMap = new ConcurrentHashMap<>(); } - /** - * Factory method to return a proxy instance that interacts with server unencrypted and - * unauthenticated. - */ - public static CbtTestProxy createUnencrypted() { - return new CbtTestProxy(false, null, null, null); - } - - /** - * Factory method to return a proxy instance that interacts with server encrypted. Default - * authority and public certificates are used if null values are passed in. - * - * @param rootCertsPemPath The path to a root certificate PEM file - * @param sslTarget The override of SSL target name - * @param credentialJsonPath The path to a credential JSON file - */ - public static CbtTestProxy createEncrypted( - @Nullable String rootCertsPemPath, - @Nullable String sslTarget, - @Nullable String credentialJsonPath) - throws IOException { - String tmpRootCerts = null, tmpCredential = null; - if (rootCertsPemPath != null) { - Path file = Paths.get(rootCertsPemPath); - tmpRootCerts = new String(Files.readAllBytes(file), UTF_8); - } - if (credentialJsonPath != null) { - Path file = Paths.get(credentialJsonPath); - tmpCredential = new String(Files.readAllBytes(file), UTF_8); - } - - return new CbtTestProxy(true, tmpRootCerts, sslTarget, tmpCredential); + /** Factory method to return a proxy instance. */ + public static CbtTestProxy create() { + return new CbtTestProxy(); } /** @@ -159,20 +127,24 @@ private static BigtableDataSettings.Builder overrideTimeoutSetting( settingsBuilder.stubSettings().readModifyWriteRowSettings().retrySettings(), newTimeout); updateTimeout( settingsBuilder.stubSettings().sampleRowKeysSettings().retrySettings(), newTimeout); + updateTimeout( + settingsBuilder.stubSettings().executeQuerySettings().retrySettings(), newTimeout); + updateTimeout( + settingsBuilder.stubSettings().prepareQuerySettings().retrySettings(), newTimeout); return settingsBuilder; } private static void updateTimeout(RetrySettings.Builder settings, Duration newTimeout) { - Duration rpcTimeout = settings.getInitialRpcTimeout(); + Duration rpcTimeout = settings.getInitialRpcTimeoutDuration(); // TODO: this should happen in gax // Clamp the rpcTimeout to the overall timeout if (rpcTimeout != null && rpcTimeout.compareTo(newTimeout) > 0) { - settings.setInitialRpcTimeout(newTimeout).setMaxRpcTimeout(newTimeout); + settings.setInitialRpcTimeoutDuration(newTimeout).setMaxRpcTimeoutDuration(newTimeout); } - settings.setTotalTimeout(newTimeout); + settings.setTotalTimeoutDuration(newTimeout); } /** Helper method to get a client object by its id. */ @@ -191,8 +163,12 @@ public synchronized void createClient( Preconditions.checkArgument(!request.getProjectId().isEmpty(), "project id must be provided"); Preconditions.checkArgument(!request.getInstanceId().isEmpty(), "instance id must be provided"); Preconditions.checkArgument(!request.getDataTarget().isEmpty(), "data target must be provided"); + Preconditions.checkArgument( + !request.getSecurityOptions().getUseSsl() + || !request.getSecurityOptions().getSslRootCertsPemBytes().isEmpty(), + "security_options.ssl_root_certs_pem must be provided if security_options.use_ssl is true"); - if (idClientMap.contains(request.getClientId())) { + if (idClientMap.containsKey(request.getClientId())) { responseObserver.onError( Status.ALREADY_EXISTS .withDescription("Client " + request.getClientId() + " already exists.") @@ -200,6 +176,8 @@ public synchronized void createClient( return; } + // setRefreshingChannel is needed for now. + @SuppressWarnings("deprecation") BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder() // Disable channel refreshing when not using the real server @@ -208,9 +186,6 @@ public synchronized void createClient( .setInstanceId(request.getInstanceId()) .setAppProfileId(request.getAppProfileId()); - settingsBuilder.stubSettings().setEnableRoutingCookie(false); - settingsBuilder.stubSettings().setEnableRetryInfo(false); - if (request.hasPerOperationTimeout()) { Duration newTimeout = Duration.ofMillis(Durations.toMillis(request.getPerOperationTimeout())); settingsBuilder = overrideTimeoutSetting(newTimeout, settingsBuilder); @@ -244,8 +219,13 @@ public synchronized void createClient( settingsBuilder .stubSettings() .setEndpoint(request.getDataTarget()) - .setTransportChannelProvider(getTransportChannel()) - .setCredentialsProvider(getCredentialsProvider()); + .setTransportChannelProvider( + getTransportChannel( + request.getSecurityOptions().getUseSsl(), + request.getSecurityOptions().getSslRootCertsPem(), + request.getSecurityOptions().getSslEndpointOverride())) + .setCredentialsProvider( + getCredentialsProvider(request.getSecurityOptions().getAccessToken())); } BigtableDataSettings settings = settingsBuilder.build(); BigtableDataClient client = BigtableDataClient.create(settings); @@ -304,21 +284,17 @@ public void mutateRow( return; } - // TODO(developer): evaluate if we want to manually unpack the proto into a model, instead of - // using fromProto. Same for the other methods. RowMutation mutation = RowMutation.fromProto(request.getRequest()); try { // This response is empty. client.dataClient().mutateRow(mutation); } catch (ApiException e) { + responseObserver.onNext(MutateRowResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { responseObserver.onNext( - MutateRowResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) - .setMessage(e.getMessage()) - .build()) - .build()); + MutateRowResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); responseObserver.onCompleted(); return; } @@ -355,12 +331,7 @@ public void bulkMutateRows( .build()); } responseObserver.onNext( - resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); - responseObserver.onCompleted(); - return; - } catch (ApiException e) { - responseObserver.onNext( - MutateRowsResult.newBuilder() + resultBuilder .setStatus( com.google.rpc.Status.newBuilder() .setCode(e.getStatusCode().getCode().ordinal()) @@ -369,10 +340,20 @@ public void bulkMutateRows( .build()); responseObserver.onCompleted(); return; + } catch (ApiException e) { + responseObserver.onNext(MutateRowsResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + MutateRowsResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); + responseObserver.onCompleted(); + return; } responseObserver.onNext( MutateRowsResult.newBuilder() + // Note that the default instance == OK .setStatus(com.google.rpc.Status.getDefaultInstance()) .build()); responseObserver.onCompleted(); @@ -403,42 +384,36 @@ public void readRow(ReadRowRequest request, StreamObserver responseOb client .dataClient() .readRow(tableId, request.getRowKey(), FILTERS.fromProto(request.getFilter())); + if (row != null) { + RowResult.Builder resultBuilder = convertRowResult(row); + responseObserver.onNext( + // Note that the default instance == OK + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } else { + logger.info(String.format("readRow() did not find row: %s", request.getRowKey())); + } } catch (ApiException e) { + responseObserver.onNext(RowResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + RowResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); + responseObserver.onCompleted(); + return; + } catch (RuntimeException e) { + // If client encounters problem, don't return any row result. responseObserver.onNext( RowResult.newBuilder() .setStatus( com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) + .setCode(Code.INTERNAL.getNumber()) .setMessage(e.getMessage()) .build()) .build()); responseObserver.onCompleted(); return; } - - if (row != null) { - try { - RowResult.Builder resultBuilder = convertRowResult(row); - responseObserver.onNext( - resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); - } catch (RuntimeException e) { - // If client encounters problem, don't return any row result. - responseObserver.onNext( - RowResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(Code.INTERNAL.getNumber()) - .setMessage(e.getMessage()) - .build()) - .build()); - responseObserver.onCompleted(); - return; - } - } else { - logger.info(String.format("readRow() did not find row: %s", request.getRowKey())); - responseObserver.onNext( - RowResult.newBuilder().setStatus(com.google.rpc.Status.getDefaultInstance()).build()); - } responseObserver.onCompleted(); } @@ -456,24 +431,20 @@ public void readRows(ReadRowsRequest request, StreamObserver respons Query query = Query.fromProto(request.getRequest()); try { rows = client.dataClient().readRows(query); - } catch (ApiException e) { + int cancelAfterRows = request.getCancelAfterRows(); + RowsResult.Builder resultBuilder = convertRowsResult(rows, cancelAfterRows); responseObserver.onNext( - RowsResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) - .setMessage(e.getMessage()) - .build()) - .build()); + // Note that the default instance == OK + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } catch (ApiException e) { + responseObserver.onNext(RowsResult.newBuilder().setStatus(convertStatus(e)).build()); responseObserver.onCompleted(); return; - } - - int cancelAfterRows = request.getCancelAfterRows(); - try { - RowsResult.Builder resultBuilder = convertRowsResult(rows, cancelAfterRows); + } catch (StatusRuntimeException e) { responseObserver.onNext( - resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + RowsResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); + responseObserver.onCompleted(); + return; } catch (RuntimeException e) { // If client encounters problem, don't return any row result. responseObserver.onNext( @@ -583,14 +554,12 @@ public void sampleRowKeys( try { keyOffsets = client.dataClient().sampleRowKeys(tableId); } catch (ApiException e) { + responseObserver.onNext(SampleRowKeysResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { responseObserver.onNext( - SampleRowKeysResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) - .setMessage(e.getMessage()) - .build()) - .build()); + SampleRowKeysResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); responseObserver.onCompleted(); return; } @@ -603,6 +572,7 @@ public void sampleRowKeys( .setOffsetBytes(keyOffset.getOffsetBytes()); } responseObserver.onNext( + // Note that the default instance == OK resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); responseObserver.onCompleted(); } @@ -624,13 +594,12 @@ public void checkAndMutateRow( matched = client.dataClient().checkAndMutateRow(mutation); } catch (ApiException e) { responseObserver.onNext( - CheckAndMutateRowResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) - .setMessage(e.getMessage()) - .build()) - .build()); + CheckAndMutateRowResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + CheckAndMutateRowResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); responseObserver.onCompleted(); return; } @@ -638,6 +607,7 @@ public void checkAndMutateRow( CheckAndMutateRowResult.Builder resultBuilder = CheckAndMutateRowResult.newBuilder(); resultBuilder.getResultBuilder().setPredicateMatched(matched); responseObserver.onNext( + // Note that the default instance == OK resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); responseObserver.onCompleted(); } @@ -657,43 +627,97 @@ public void readModifyWriteRow( ReadModifyWriteRow mutation = ReadModifyWriteRow.fromProto(request.getRequest()); try { row = client.dataClient().readModifyWriteRow(mutation); + if (row != null) { + RowResult.Builder resultBuilder = convertRowResult(row); + responseObserver.onNext( + // Note that the default instance == OK + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } else { + logger.info( + String.format( + "readModifyWriteRow() did not find row: %s", request.getRequest().getRowKey())); + } } catch (ApiException e) { + responseObserver.onNext(RowResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + RowResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); + responseObserver.onCompleted(); + return; + } catch (RuntimeException e) { + // If client encounters problem, fail the whole operation. responseObserver.onNext( RowResult.newBuilder() .setStatus( com.google.rpc.Status.newBuilder() - .setCode(e.getStatusCode().getCode().ordinal()) + .setCode(Code.INTERNAL.getNumber()) .setMessage(e.getMessage()) .build()) .build()); responseObserver.onCompleted(); return; } + responseObserver.onCompleted(); + } - if (row != null) { - try { - RowResult.Builder resultBuilder = convertRowResult(row); - responseObserver.onNext( - resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); - } catch (RuntimeException e) { - // If client encounters problem, fail the whole operation. - responseObserver.onNext( - RowResult.newBuilder() - .setStatus( - com.google.rpc.Status.newBuilder() - .setCode(Code.INTERNAL.getNumber()) - .setMessage(e.getMessage()) - .build()) - .build()); - responseObserver.onCompleted(); - return; + @Override + public void executeQuery( + ExecuteQueryRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + ResultSet resultSet = null; + try { + Map> paramTypes = new HashMap<>(); + for (Map.Entry entry : request.getRequest().getParamsMap().entrySet()) { + paramTypes.put(entry.getKey(), SqlType.fromProto(entry.getValue().getType())); } - } else { - logger.info( - String.format( - "readModifyWriteRow() did not find row: %s", request.getRequest().getRowKey())); + PreparedStatement preparedStatement = + client.dataClient().prepareStatement(request.getRequest().getQuery(), paramTypes); + resultSet = + client + .dataClient() + .executeQuery( + BoundStatementDeserializer.toBoundStatement(preparedStatement, request)); + responseObserver.onNext( + new ResultSetSerializer(request.getProtoDescriptors()).toExecuteQueryResult(resultSet)); + } catch (InterruptedException e) { + responseObserver.onError(e); + return; + } catch (ExecutionException e) { + responseObserver.onError(e); + return; + } catch (ApiException e) { + responseObserver.onNext(ExecuteQueryResult.newBuilder().setStatus(convertStatus(e)).build()); + responseObserver.onCompleted(); + return; + } catch (StatusRuntimeException e) { + responseObserver.onNext( + ExecuteQueryResult.newBuilder().setStatus(StatusProto.fromThrowable(e)).build()); + responseObserver.onCompleted(); + return; + } catch (RuntimeException e) { + // If client encounters problem, don't return any results. responseObserver.onNext( - RowResult.newBuilder().setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + ExecuteQueryResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(Code.INTERNAL.getNumber()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } finally { + if (resultSet != null) { + resultSet.close(); + } } responseObserver.onCompleted(); } @@ -717,52 +741,77 @@ private static String extractTableIdFromTableName(String fullTableName) return matcher.group(3); } - private InstantiatingGrpcChannelProvider getTransportChannel() throws IOException { + @SuppressWarnings("rawtypes") + private InstantiatingGrpcChannelProvider getTransportChannel( + boolean encrypted, String rootCertsPem, String sslTarget) { if (!encrypted) { return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder() .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) .build(); } - if (rootCerts == null) { - return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder().build(); + final SslContext sslContext; + if (rootCertsPem.isEmpty()) { + sslContext = null; + } else { + try { + sslContext = + GrpcSslContexts.forClient() + .trustManager(new ByteArrayInputStream(rootCertsPem.getBytes(UTF_8))) + .build(); + } catch (IOException e) { + throw new IllegalArgumentException(e); + } } - final SslContext secureContext = - GrpcSslContexts.forClient() - .trustManager(new ByteArrayInputStream(rootCerts.getBytes(UTF_8))) - .build(); return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder() .setChannelConfigurator( new ApiFunction() { @Override public ManagedChannelBuilder apply(ManagedChannelBuilder input) { NettyChannelBuilder channelBuilder = (NettyChannelBuilder) input; - channelBuilder.sslContext(secureContext).overrideAuthority(sslTarget); + + // The default replaces long (several KiB) error messages with "http2 exception" + channelBuilder.maxInboundMetadataSize(Integer.MAX_VALUE); + + if (sslContext != null) { + channelBuilder.sslContext(sslContext); + } + + if (!sslTarget.isEmpty()) { + channelBuilder.overrideAuthority(sslTarget); + } + return channelBuilder; } }) .build(); } - private CredentialsProvider getCredentialsProvider() throws IOException { - if (credential == null) { - return NoCredentialsProvider.create(); + // Cleanly forwards server errors through the test proxy. Internal client errors + // are wrapped in an UNKNOWN status. + private static com.google.rpc.Status convertStatus(ApiException e) { + com.google.rpc.Status status = StatusProto.fromThrowable(e); + if (status != null) { + return status; } - final GoogleCredentials creds = - GoogleCredentials.fromStream(new ByteArrayInputStream(credential.getBytes(UTF_8))); + return com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build(); + } - return FixedCredentialsProvider.create(creds); + private CredentialsProvider getCredentialsProvider(String accessToken) { + if (accessToken.isEmpty()) { + return NoCredentialsProvider.create(); + } + + return FixedCredentialsProvider.create( + OAuth2Credentials.create(new AccessToken(accessToken, null))); } private final ConcurrentHashMap idClientMap; - private final boolean encrypted; - - // Parameters that may be needed when "encrypted" is true. - private final String rootCerts; - private final String sslTarget; - private final String credential; private static final Pattern tablePattern = Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)"); diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java index 8750909f1a..77a764f551 100644 --- a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java @@ -32,20 +32,14 @@ public static void main(String[] args) throws InterruptedException, IOException throw new IllegalArgumentException(String.format("Port %d is not > 0.", port)); } - CbtTestProxy cbtTestProxy; - - // If encryption is specified - boolean encrypted = Boolean.getBoolean("encrypted"); - if (encrypted) { - String rootCertsPemPath = System.getProperty("root.certs.pem.path"); - String sslTarget = System.getProperty("ssl.target"); - String credentialJsonPath = System.getProperty("credential.json.path"); - cbtTestProxy = CbtTestProxy.createEncrypted(rootCertsPemPath, sslTarget, credentialJsonPath); - } else { - cbtTestProxy = CbtTestProxy.createUnencrypted(); - } - + CbtTestProxy cbtTestProxy = CbtTestProxy.create(); logger.info(String.format("Test proxy starting on %d", port)); - ServerBuilder.forPort(port).addService(cbtTestProxy).build().start().awaitTermination(); + ServerBuilder.forPort(port) + .addService(cbtTestProxy) + .maxInboundMessageSize(Integer.MAX_VALUE) + .maxInboundMetadataSize(Integer.MAX_VALUE) + .build() + .start() + .awaitTermination(); } } diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/ResultSetSerializer.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/ResultSetSerializer.java new file mode 100644 index 0000000000..2467ce5299 --- /dev/null +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/ResultSetSerializer.java @@ -0,0 +1,390 @@ +/* + * 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 + * + * 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.bigtable.testproxy; + +import com.google.bigtable.v2.ArrayValue; +import com.google.bigtable.v2.Type; +import com.google.bigtable.v2.Type.Array; +import com.google.bigtable.v2.Type.Bool; +import com.google.bigtable.v2.Type.Bytes; +import com.google.bigtable.v2.Type.Float32; +import com.google.bigtable.v2.Type.Float64; +import com.google.bigtable.v2.Type.Int64; +import com.google.bigtable.v2.Type.Map; +import com.google.bigtable.v2.Type.Proto; +import com.google.bigtable.v2.Type.Struct; +import com.google.bigtable.v2.Type.Timestamp; +import com.google.bigtable.v2.Value; +import com.google.cloud.Date; +import com.google.cloud.bigtable.common.Type.SchemalessEnum; +import com.google.cloud.bigtable.common.Type.SchemalessProto; +import com.google.cloud.bigtable.data.v2.models.sql.ColumnMetadata; +import com.google.cloud.bigtable.data.v2.models.sql.ResultSet; +import com.google.cloud.bigtable.data.v2.models.sql.SqlType; +import com.google.cloud.bigtable.data.v2.models.sql.StructReader; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.ByteString; +import com.google.protobuf.DescriptorProtos.FileDescriptorProto; +import com.google.protobuf.DescriptorProtos.FileDescriptorSet; +import com.google.protobuf.Descriptors.Descriptor; +import com.google.protobuf.Descriptors.DescriptorValidationException; +import com.google.protobuf.Descriptors.EnumDescriptor; +import com.google.protobuf.Descriptors.FileDescriptor; +import com.google.protobuf.DynamicMessage; +import com.google.protobuf.ProtocolMessageEnum; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; + +public class ResultSetSerializer { + + // This is a helper enum to satisfy the type constraints of {@link StructReader#getProtoEnum}. + private static class DummyEnum implements ProtocolMessageEnum { + + private final int value; + private final EnumDescriptor descriptor; + + private DummyEnum(int value, EnumDescriptor descriptor) { + this.value = value; + this.descriptor = descriptor; + } + + @Override + public int getNumber() { + return value; + } + + @Override + public com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return descriptor.findValueByNumber(value); + } + + @Override + public com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return descriptor; + } + } + + /** + * A map of all known message descriptors, keyed by their fully qualified name (e.g., + * "my.package.MyMessage"). + */ + private final java.util.Map messageDescriptorMap; + + /** + * A map of all known enum descriptors, keyed by their fully qualified name (e.g., + * "my.package.MyEnum"). + */ + private final java.util.Map enumDescriptorMap; + + /** + * Helper function to recursively adds a message descriptor and all its nested types to the map. + */ + private void populateDescriptorMapsRecursively(Descriptor descriptor) { + messageDescriptorMap.put(descriptor.getFullName(), descriptor); + + for (EnumDescriptor nestedEnum : descriptor.getEnumTypes()) { + enumDescriptorMap.put(nestedEnum.getFullName(), nestedEnum); + } + for (Descriptor nestedMessage : descriptor.getNestedTypes()) { + populateDescriptorMapsRecursively(nestedMessage); + } + } + + /** + * Creates a serializer with a descriptor cache built from the provided FileDescriptorSet. This is + * useful for handling PROTO or ENUM types that require schema lookup. + * + * @param descriptorSet A set containing one or more .proto file definitions and all their + * non-standard dependencies. All .proto file must be provided in dependency order. + * @throws IllegalArgumentException if the descriptorSet contains unresolvable dependencies. + */ + public ResultSetSerializer(FileDescriptorSet descriptorSet) throws IllegalArgumentException { + this.messageDescriptorMap = new HashMap<>(); + this.enumDescriptorMap = new HashMap<>(); + java.util.Map builtDescriptors = new HashMap<>(); + + for (FileDescriptorProto fileDescriptorProto : descriptorSet.getFileList()) { + // Collect dependencies. This code require files inside the descriptor set to be sorted + // according to the dependency order. + List dependencies = new ArrayList<>(); + for (String dependencyName : fileDescriptorProto.getDependencyList()) { + FileDescriptor dependency = builtDescriptors.get(dependencyName); + if (dependency != null) { + // Dependency is already built, add it. + dependencies.add(dependency); + } + // Dependency is not in our set. We assume it's a well-known type (e.g., + // google/protobuf/timestamp.proto) that buildFrom() can find and link automatically. + } + + try { + FileDescriptor fileDescriptor = + FileDescriptor.buildFrom( + fileDescriptorProto, dependencies.toArray(new FileDescriptor[0])); + builtDescriptors.put(fileDescriptor.getName(), fileDescriptor); + // Now, populate both message and enum maps with all messages/enums in this file. + for (EnumDescriptor enumDescriptor : fileDescriptor.getEnumTypes()) { + enumDescriptorMap.put(enumDescriptor.getFullName(), enumDescriptor); + } + for (Descriptor messageDescriptor : fileDescriptor.getMessageTypes()) { + populateDescriptorMapsRecursively(messageDescriptor); + } + } catch (DescriptorValidationException e) { + throw new IllegalArgumentException( + "Failed to build descriptor for " + fileDescriptorProto.getName(), e); + } + } + } + + public ExecuteQueryResult toExecuteQueryResult(ResultSet resultSet) + throws ExecutionException, InterruptedException { + ExecuteQueryResult.Builder resultBuilder = ExecuteQueryResult.newBuilder(); + for (ColumnMetadata columnMetadata : resultSet.getMetadata().getColumns()) { + resultBuilder + .getMetadataBuilder() + .addColumnsBuilder() + .setName(columnMetadata.name()) + .setType(toProtoType(columnMetadata.type())); + } + + while (resultSet.next()) { + SqlRow.Builder rowBuilder = resultBuilder.addRowsBuilder(); + + for (int i = 0; i < resultSet.getMetadata().getColumns().size(); i++) { + SqlType colType = resultSet.getMetadata().getColumnType(i); + rowBuilder.addValues(toProtoValue(getColumn(resultSet, i, colType), colType)); + } + } + + return resultBuilder.build(); + } + + private Value toProtoValue(Object value, SqlType type) { + if (value == null) { + return Value.getDefaultInstance(); + } + + Value.Builder valueBuilder = Value.newBuilder(); + switch (type.getCode()) { + case BYTES: + valueBuilder.setBytesValue((ByteString) value); + break; + case PROTO: + valueBuilder.setBytesValue(((AbstractMessage) value).toByteString()); + break; + case STRING: + valueBuilder.setStringValue((String) value); + break; + case INT64: + valueBuilder.setIntValue((Long) value); + break; + case ENUM: + valueBuilder.setIntValue(((ProtocolMessageEnum) value).getNumber()); + break; + case FLOAT32: + valueBuilder.setFloatValue((Float) value); + break; + case FLOAT64: + valueBuilder.setFloatValue((Double) value); + break; + case BOOL: + valueBuilder.setBoolValue((Boolean) value); + break; + case TIMESTAMP: + Instant ts = (Instant) value; + valueBuilder.setTimestampValue( + com.google.protobuf.Timestamp.newBuilder() + .setSeconds(ts.getEpochSecond()) + .setNanos(ts.getNano()) + .build()); + break; + case DATE: + Date date = (Date) value; + valueBuilder.setDateValue( + com.google.type.Date.newBuilder() + .setYear(date.getYear()) + .setMonth(date.getMonth()) + .setDay(date.getDayOfMonth()) + .build()); + break; + case ARRAY: + SqlType elementType = ((SqlType.Array) type).getElementType(); + ArrayValue.Builder arrayValue = ArrayValue.newBuilder(); + for (Object item : (List) value) { + arrayValue.addValues(toProtoValue(item, elementType)); + } + valueBuilder.setArrayValue(arrayValue.build()); + break; + case MAP: + SqlType.Map mapType = (SqlType.Map) type; + SqlType mapKeyType = mapType.getKeyType(); + SqlType mapValueType = mapType.getValueType(); + + ArrayValue.Builder mapArrayValue = ArrayValue.newBuilder(); + ((java.util.Map) value) + .forEach( + (k, v) -> + mapArrayValue.addValues( + Value.newBuilder() + .setArrayValue( + ArrayValue.newBuilder() + .addValues(toProtoValue(k, mapKeyType)) + .addValues(toProtoValue(v, mapValueType)) + .build()))); + valueBuilder.setArrayValue(mapArrayValue.build()); + break; + case STRUCT: + StructReader structValue = (StructReader) value; + SqlType.Struct structType = (SqlType.Struct) type; + ArrayValue.Builder structArrayValue = ArrayValue.newBuilder(); + for (int i = 0; i < structType.getFields().size(); ++i) { + SqlType fieldType = structType.getType(i); + structArrayValue.addValues(toProtoValue(getColumn(structValue, i, fieldType), fieldType)); + } + valueBuilder.setArrayValue(structArrayValue); + break; + default: + throw new IllegalStateException("Unexpected Type: " + type); + } + + return valueBuilder.build(); + } + + private Object getColumn(StructReader struct, int fieldIndex, SqlType fieldType) { + if (struct.isNull(fieldIndex)) { + return null; + } + + switch (fieldType.getCode()) { + case ARRAY: + return struct.getList(fieldIndex, (SqlType.Array) fieldType); + case BOOL: + return struct.getBoolean(fieldIndex); + case BYTES: + return struct.getBytes(fieldIndex); + case PROTO: + SchemalessProto protoType = (SchemalessProto) fieldType; + Descriptor descriptor = messageDescriptorMap.get(protoType.getMessageName()); + if (descriptor == null) { + throw new IllegalArgumentException( + "Descriptor for message " + protoType.getMessageName() + " could not be found"); + } + return struct.getProtoMessage(fieldIndex, DynamicMessage.getDefaultInstance(descriptor)); + case DATE: + return struct.getDate(fieldIndex); + case FLOAT32: + return struct.getFloat(fieldIndex); + case FLOAT64: + return struct.getDouble(fieldIndex); + case INT64: + return struct.getLong(fieldIndex); + case ENUM: + SchemalessEnum enumType = (SchemalessEnum) fieldType; + EnumDescriptor enumDescriptor = enumDescriptorMap.get(enumType.getEnumName()); + if (enumDescriptor == null) { + throw new IllegalArgumentException( + "Descriptor for enum " + enumType.getEnumName() + " could not be found"); + } + // We need to extract the integer value of the enum. `getProtoEnum` is the only + // available method, but it is designed for static enum types. To work around this, + // we can pass a lambda that constructs our DummyEnum with the captured integer value + // and the descriptor from the outer scope. + return struct.getProtoEnum(fieldIndex, number -> new DummyEnum(number, enumDescriptor)); + case MAP: + return struct.getMap(fieldIndex, (SqlType.Map) fieldType); + case STRING: + return struct.getString(fieldIndex); + case STRUCT: + return struct.getStruct(fieldIndex); + case TIMESTAMP: + return struct.getTimestamp(fieldIndex); + default: + throw new IllegalStateException("Unexpected Type: " + fieldType); + } + } + + private static Type toProtoType(SqlType type) { + switch (type.getCode()) { + case BYTES: + return Type.newBuilder().setBytesType(Bytes.getDefaultInstance()).build(); + case STRING: + return Type.newBuilder() + .setStringType(com.google.bigtable.v2.Type.String.getDefaultInstance()) + .build(); + case INT64: + return Type.newBuilder().setInt64Type(Int64.getDefaultInstance()).build(); + case FLOAT32: + return Type.newBuilder().setFloat32Type(Float32.getDefaultInstance()).build(); + case FLOAT64: + return Type.newBuilder().setFloat64Type(Float64.getDefaultInstance()).build(); + case BOOL: + return Type.newBuilder().setBoolType(Bool.getDefaultInstance()).build(); + case TIMESTAMP: + return Type.newBuilder().setTimestampType(Timestamp.getDefaultInstance()).build(); + case DATE: + return Type.newBuilder() + .setDateType(com.google.bigtable.v2.Type.Date.getDefaultInstance()) + .build(); + case ARRAY: + SqlType.Array arrayType = (SqlType.Array) type; + return Type.newBuilder() + .setArrayType( + Array.newBuilder().setElementType(toProtoType(arrayType.getElementType()))) + .build(); + case MAP: + SqlType.Map mapType = (SqlType.Map) type; + return Type.newBuilder() + .setMapType( + Map.newBuilder() + .setKeyType(toProtoType(mapType.getKeyType())) + .setValueType(toProtoType(mapType.getValueType()))) + .build(); + case STRUCT: + SqlType.Struct structType = (SqlType.Struct) type; + Struct.Builder structBuilder = Struct.newBuilder(); + for (SqlType.Struct.Field field : structType.getFields()) { + structBuilder + .addFieldsBuilder() + .setFieldName(field.name()) + .setType(toProtoType(field.type())); + } + return Type.newBuilder().setStructType(structBuilder.build()).build(); + case PROTO: + SchemalessProto protoType = (SchemalessProto) type; + return Type.newBuilder() + .setProtoType( + Proto.newBuilder() + .setMessageName(protoType.getMessageName()) + .setSchemaBundleId(protoType.schemaBundleId()) + .build()) + .build(); + case ENUM: + SchemalessEnum enumType = (SchemalessEnum) type; + return Type.newBuilder() + .setEnumType( + com.google.bigtable.v2.Type.Enum.newBuilder() + .setEnumName(enumType.getEnumName()) + .setSchemaBundleId(enumType.schemaBundleId()) + .build()) + .build(); + default: + throw new IllegalStateException("Unexpected Type: " + type); + } + } +} diff --git a/test-proxy/src/main/proto/test_proxy.proto b/test-proxy/src/main/proto/test_proxy.proto index e7caef0e7b..34cf534425 100644 --- a/test-proxy/src/main/proto/test_proxy.proto +++ b/test-proxy/src/main/proto/test_proxy.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// 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. @@ -20,6 +20,7 @@ import "google/api/client.proto"; import "google/bigtable/v2/bigtable.proto"; import "google/bigtable/v2/data.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/descriptor.proto"; import "google/rpc/status.proto"; option go_package = "./testproxypb"; @@ -38,6 +39,27 @@ enum OptionalFeatureConfig { // Request to test proxy service to create a client object. message CreateClientRequest { + message SecurityOptions { + // Access token to use for client credentials. If empty, the client will not + // use any call credentials. Certain implementations may require `use_ssl` + // to be set when using this. + string access_token = 1; + + // Whether to use SSL channel credentials when connecting to the data + // endpoint. + bool use_ssl = 2; + + // If using SSL channel credentials, override the SSL endpoint to match the + // host that is specified in the backend's certificate. Also sets the + // client's authority header value. + string ssl_endpoint_override = 3; + + // PEM encoding of the server root certificates. If not set, the default + // root certs will be used instead. The default can be overridden via the + // GRPC_DEFAULT_SSL_ROOTS_FILE_PATH env var. + string ssl_root_certs_pem = 4; + } + // A unique ID associated with the client object to be created. string client_id = 1; @@ -66,6 +88,17 @@ message CreateClientRequest { // Optional config that dictates how the optional features should be enabled // during the client creation. Please check the enum type's docstring above. OptionalFeatureConfig optional_feature_config = 7; + + // Options to allow connecting to backends with channel and/or call + // credentials. This is needed internally by Cloud Bigtable's own testing + // frameworks.It is not necessary to support these fields for client + // conformance testing. + // + // WARNING: this allows the proxy to connect to a real production + // CBT backend with the right options, however, the proxy itself is insecure + // so it is not recommended to use it with real credentials or outside testing + // contexts. + SecurityOptions security_options = 8; } // Response from test proxy service for CreateClientRequest. @@ -217,6 +250,45 @@ message ReadModifyWriteRowRequest { google.bigtable.v2.ReadModifyWriteRowRequest request = 2; } +// Request to test proxy service to execute a query. +message ExecuteQueryRequest { + // The ID of the target client object. + string client_id = 1; + + // The raw request to the Bigtable server. + google.bigtable.v2.ExecuteQueryRequest request = 2; + + // The file descriptor set for the query. + google.protobuf.FileDescriptorSet proto_descriptors = 3; +} + +// Response from test proxy service for ExecuteQueryRequest. +message ExecuteQueryResult { + // The RPC status from the client binding. + google.rpc.Status status = 1; + + // deprecated + google.bigtable.v2.ResultSetMetadata result_set_metadata = 2; + + // Name and type information for the query result. + ResultSetMetadata metadata = 4; + + // Encoded version of the ResultSet. Should not contain type information. + repeated SqlRow rows = 3; +} + +// Schema information for the query result. +message ResultSetMetadata { + // Column metadata for each column inthe query result. + repeated google.bigtable.v2.ColumnMetadata columns = 1; +} + +// Representation of a single row in the query result. +message SqlRow { + // Columnar values returned by the query. + repeated google.bigtable.v2.Value values = 1; +} + // Note that all RPCs are unary, even when the equivalent client binding call // may be streaming. This is an intentional simplification. // @@ -279,4 +351,7 @@ service CloudBigtableV2TestProxy { // Performs a read-modify-write operation with the client. rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (RowResult) {} + + // Executes a BTQL query with the client. + rpc ExecuteQuery(ExecuteQueryRequest) returns (ExecuteQueryResult) {} } diff --git a/versions.txt b/versions.txt index 65b8748dd4..843f20f7f3 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.42.0:2.42.0 -grpc-google-cloud-bigtable-admin-v2:2.42.0:2.42.0 -grpc-google-cloud-bigtable-v2:2.42.0:2.42.0 -proto-google-cloud-bigtable-admin-v2:2.42.0:2.42.0 -proto-google-cloud-bigtable-v2:2.42.0:2.42.0 -google-cloud-bigtable-emulator:0.179.0:0.179.0 -google-cloud-bigtable-emulator-core:0.179.0:0.179.0 +google-cloud-bigtable:2.76.0:2.76.1-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.76.0:2.76.1-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.76.0:2.76.1-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.76.0:2.76.1-SNAPSHOT +proto-google-cloud-bigtable-v2:2.76.0:2.76.1-SNAPSHOT +google-cloud-bigtable-emulator:0.213.0:0.213.1-SNAPSHOT +google-cloud-bigtable-emulator-core:0.213.0:0.213.1-SNAPSHOT